diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f496183dcaf..bbf156e7345 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: tar xzf $HOME/apache-maven-3.6.3-bin.tar.gz -C /opt/ ln -sf /opt/apache-maven-3.6.3/bin/mvn /usr/bin/mvn echo Downloading Bazel - curl -L https://github.com/bazelbuild/bazel/releases/download/0.29.1/bazel-0.29.1-installer-linux-x86_64.sh -o bazel.sh --retry 10 + curl -L https://github.com/bazelbuild/bazel/releases/download/2.0.0/bazel-2.0.0-installer-linux-x86_64.sh -o bazel.sh --retry 10 bash bazel.sh - name: Checkout repository uses: actions/checkout@v1 @@ -55,7 +55,7 @@ jobs: run: | python3 -m pip install six echo Downloading Bazel - curl -L https://github.com/bazelbuild/bazel/releases/download/0.29.1/bazel-0.29.1-installer-darwin-x86_64.sh -o bazel.sh --retry 10 + curl -L https://github.com/bazelbuild/bazel/releases/download/2.0.0/bazel-2.0.0-installer-darwin-x86_64.sh -o bazel.sh --retry 10 bash bazel.sh - name: Checkout repository uses: actions/checkout@v1 @@ -88,7 +88,7 @@ jobs: bash.exe -lc "find 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/' -iname '14.1*' -exec rm -Rf {} \;" echo Downloading Bazel mkdir C:\bazel - curl.exe -L https://github.com/bazelbuild/bazel/releases/download/0.29.1/bazel-0.29.1-windows-x86_64.exe -o C:/bazel/bazel.exe --retry 10 + curl.exe -L https://github.com/bazelbuild/bazel/releases/download/2.0.0/bazel-2.0.0-windows-x86_64.exe -o C:/bazel/bazel.exe --retry 10 echo Installing CUDA curl.exe -L http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_426.00_windows.exe -o cuda.exe curl.exe -L https://developer.download.nvidia.com/compute/redist/cudnn/v7.6.4/cudnn-10.1-windows7-x64-v7.6.4.38.zip -o cudnn.zip diff --git a/tensorflow-core/tensorflow-core-api/BUILD b/tensorflow-core/tensorflow-core-api/BUILD index 5fb3d1b53d0..bd2c8e7edad 100644 --- a/tensorflow-core/tensorflow-core-api/BUILD +++ b/tensorflow-core/tensorflow-core-api/BUILD @@ -1,4 +1,5 @@ load("@org_tensorflow//tensorflow:tensorflow.bzl", "tf_copts", "tf_cc_binary") +load("@rules_java//java:defs.bzl", "java_proto_library") load(":tensorflow-java.bzl", "tf_java_op_gen_srcjar") tf_java_op_gen_srcjar( @@ -57,3 +58,28 @@ filegroup( name = "java_api_def", srcs = glob(["src/bazel/api_def/*"]) ) + +tf_cc_binary( + name = "java_api_import", + srcs = [ + "src/bazel/api_def/import/api_import.cc", + ], + copts = tf_copts() + ["-Wno-unused-result"], + linkopts = select({ + "@org_tensorflow//tensorflow:windows": [], + "//conditions:default": ["-lm"], + }), + linkstatic = 1, + deps = [ + "@org_tensorflow//tensorflow/core:framework", + "@org_tensorflow//tensorflow/core:lib", + "@org_tensorflow//tensorflow/core:ops", + "@org_tensorflow//tensorflow/core:op_gen_lib", + "@org_tensorflow//tensorflow/tools/api/lib:api_objects_proto_cc" + ], +) + +java_proto_library( + name = "java_proto_gen_sources", + deps = ["@org_tensorflow//tensorflow/core:protos_all"] +) diff --git a/tensorflow-core/tensorflow-core-api/WORKSPACE b/tensorflow-core/tensorflow-core-api/WORKSPACE index 62edb6ed820..d4070ec8881 100644 --- a/tensorflow-core/tensorflow-core-api/WORKSPACE +++ b/tensorflow-core/tensorflow-core-api/WORKSPACE @@ -1,26 +1,24 @@ workspace(name = "tensorflow_core_api") -#local_repository( -# name = "tensorflow", -# path = "/Users/klessard/Documents/Projects/MachineLearning/Sources/tensorflow", -#) - load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +# TensorFlow archive +# Note: Make sure to synchronize Maven dependencies inherited from TensorFlow binaries when updating +# the version of this archive (e.g. google protobuf) http_archive( name = "org_tensorflow", patches = [ ":tensorflow-windows.patch", # https://github.com/tensorflow/tensorflow/issues/25213 - ":tensorflow-api-def.patch", - ":tensorflow-grpc-fix-for-gettid.patch" # https://github.com/clearlinux-pkgs/tensorflow/blob/master/Add-grpc-fix-for-gettid.patch + ":tensorflow-proto.patch", + ":tensorflow-api-def.patch" ], patch_args = ["-p1"], + patch_cmds = ["grep -rl 'java_package' tensorflow/core | xargs sed -i.bak 's/^\(.* java_package = \"org\.tensorflow\.\)\(.*\"\)/\\1proto.\\2'/"], urls = [ - "https://mirror.bazel.build/github.com/tensorflow/tensorflow/archive/v2.1.0.tar.gz", - "https://github.com/tensorflow/tensorflow/archive/v2.1.0.tar.gz", + "https://github.com/tensorflow/tensorflow/archive/v2.2.0-rc2.tar.gz", ], - sha256 = "638e541a4981f52c69da4a311815f1e7989bf1d67a41d204511966e1daed14f7", - strip_prefix = "tensorflow-2.1.0" + sha256 = "3e0cffc98ad3767dd16a09b7f25a99961e21d65cfcad67ed3a9b1a01318c7e94", + strip_prefix = "tensorflow-2.2.0-rc2" ) # START: Upstream TensorFlow dependencies @@ -35,17 +33,13 @@ http_archive( "https://github.com/bazelbuild/rules_closure/archive/308b05b2419edb5c8ee0471b67a40403df940149.tar.gz", # 2019-06-13 ], ) -http_archive( - name = "bazel_skylib", - sha256 = "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e", - urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/0.8.0/bazel-skylib.0.8.0.tar.gz"], -) # END: Upstream TensorFlow dependencies -load("@org_tensorflow//tensorflow:workspace.bzl", "tf_repositories") -tf_repositories() -load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories") -closure_repositories() +load("@org_tensorflow//tensorflow:workspace.bzl", "tf_workspace") +tf_workspace() + +load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") +grpc_deps() -load("@org_tensorflow//tensorflow:workspace.bzl", "tf_bind") -tf_bind() +load("@upb//bazel:repository_defs.bzl", "bazel_version_repository") +bazel_version_repository(name = "bazel_version") diff --git a/tensorflow-core/tensorflow-core-api/build.sh b/tensorflow-core/tensorflow-core-api/build.sh index b0d48e43ad8..fe78d35ecee 100755 --- a/tensorflow-core/tensorflow-core-api/build.sh +++ b/tensorflow-core/tensorflow-core-api/build.sh @@ -30,28 +30,40 @@ if [[ "${EXTENSION:-}" == *gpu* ]]; then fi # Build C API of TensorFlow itself including a target to generate ops for Java -bazel build $BUILD_FLAGS --python_path="$PYTHON_BIN_PATH" --config=monolithic --output_filter=DONT_MATCH_ANYTHING --verbose_failures \ - @org_tensorflow//tensorflow:tensorflow @org_tensorflow//tensorflow/tools/lib_package:jnilicenses_generate :java_op_gen_sources -ls -l bazel-bin/external/org_tensorflow/tensorflow/ +bazel build $BUILD_FLAGS --experimental_repo_remote_exec --python_path="$PYTHON_BIN_PATH" --config=monolithic --output_filter=DONT_MATCH_ANYTHING --verbose_failures \ + @org_tensorflow//tensorflow:tensorflow \ + @org_tensorflow//tensorflow/tools/lib_package:jnilicenses_generate \ + :java_op_gen_sources \ + :java_api_import \ + :java_proto_gen_sources + +export BAZEL_BIN=$(pwd -P)/bazel-bin +export TENSORFLOW_BIN=$BAZEL_BIN/external/org_tensorflow/tensorflow # Normalize some paths with symbolic links -TENSORFLOW_SO=(bazel-bin/external/org_tensorflow/tensorflow/libtensorflow.so.?.?.?) +TENSORFLOW_SO=($TENSORFLOW_BIN/libtensorflow.so.?.?.?) if [[ -f $TENSORFLOW_SO ]]; then - ln -sf $(basename $TENSORFLOW_SO) bazel-bin/external/org_tensorflow/tensorflow/libtensorflow.so - ln -sf $(basename $TENSORFLOW_SO) bazel-bin/external/org_tensorflow/tensorflow/libtensorflow.so.2 + ln -sf $(basename $TENSORFLOW_SO) $TENSORFLOW_BIN/libtensorflow.so + ln -sf $(basename $TENSORFLOW_SO) $TENSORFLOW_BIN/libtensorflow.so.2 fi -TENSORFLOW_DYLIB=(bazel-bin/external/org_tensorflow/tensorflow/libtensorflow.?.?.?.dylib) +TENSORFLOW_DYLIB=($TENSORFLOW_BIN/tensorflow/libtensorflow.?.?.?.dylib) if [[ -f $TENSORFLOW_DYLIB ]]; then - ln -sf $(basename $TENSORFLOW_DYLIB) bazel-bin/external/org_tensorflow/tensorflow/libtensorflow.dylib - ln -sf $(basename $TENSORFLOW_DYLIB) bazel-bin/external/org_tensorflow/tensorflow/libtensorflow.2.dylib + ln -sf $(basename $TENSORFLOW_DYLIB) $TENSORFLOW_BIN/libtensorflow.dylib + ln -sf $(basename $TENSORFLOW_DYLIB) $TENSORFLOW_BIN/libtensorflow.2.dylib fi -TENSORFLOW_LIBS=(bazel-bin/external/org_tensorflow/tensorflow/tensorflow.dll.if.lib bazel-bin/external/org_tensorflow/tensorflow/libtensorflow.dll.ifso) +TENSORFLOW_LIBS=($TENSORFLOW_BIN/tensorflow.dll.if.lib $TENSORFLOW_BIN/libtensorflow.dll.ifso) for TENSORFLOW_LIB in ${TENSORFLOW_LIBS[@]}; do if [[ -f $TENSORFLOW_LIB ]]; then - ln -sf $(basename $TENSORFLOW_LIB) bazel-bin/external/org_tensorflow/tensorflow/tensorflow.lib + ln -sf $(basename $TENSORFLOW_LIB) $TENSORFLOW_BIN/tensorflow.lib fi done -# Copy only main generated Java source files for ops mkdir -p src/gen/java/ -cp -r bazel-genfiles/ops/src/* src/gen/java/ +cd src/gen/java + +# Copy only generated Java source files for ops +cp -r $BAZEL_BIN/ops/src/* . + +# Copy generated Java protos from source jars +find $TENSORFLOW_BIN/core -name \*-speed-src.jar -exec jar xf {} \; +rm -rf META-INF diff --git a/tensorflow-core/tensorflow-core-api/external/tensorflow-api-def.patch b/tensorflow-core/tensorflow-core-api/external/tensorflow-api-def.patch index 791e0e2e9c6..1302bbd35b1 100644 --- a/tensorflow-core/tensorflow-core-api/external/tensorflow-api-def.patch +++ b/tensorflow-core/tensorflow-core-api/external/tensorflow-api-def.patch @@ -1,7 +1,6 @@ -diff --git a/tensorflow/core/api_def/BUILD b/tensorflow/core/api_def/BUILD -index f96645ad9f..63f94d3b87 100644 ---- a/tensorflow/core/api_def/BUILD -+++ b/tensorflow/core/api_def/BUILD +diff --ruN a/tensorflow/core/api_def/BUILD b/tensorflow/core/api_def/BUILD +--- a/tensorflow/core/api_def/BUILD 2020-03-26 18:19:19.000000000 -0400 ++++ b/tensorflow/core/api_def/BUILD 2020-04-01 22:50:37.000000000 -0400 @@ -28,7 +28,7 @@ package( filegroup( name = "base_api_def", @@ -11,3 +10,14 @@ index f96645ad9f..63f94d3b87 100644 ) filegroup( +diff -ruN a/tensorflow/tools/api/lib/BUILD b/tensorflow/tools/api/lib/BUILD +--- a/tensorflow/tools/api/lib/BUILD 2020-03-26 18:19:19.000000000 -0400 ++++ b/tensorflow/tools/api/lib/BUILD 2020-04-01 22:50:37.000000000 -0400 +@@ -13,6 +13,7 @@ + tf_proto_library( + name = "api_objects_proto", + srcs = ["api_objects.proto"], ++ visibility = ["//visibility:public"], + ) + + py_library( diff --git a/tensorflow-core/tensorflow-core-api/external/tensorflow-grpc-fix-for-gettid.patch b/tensorflow-core/tensorflow-core-api/external/tensorflow-grpc-fix-for-gettid.patch deleted file mode 100644 index 550e2fd6736..00000000000 --- a/tensorflow-core/tensorflow-core-api/external/tensorflow-grpc-fix-for-gettid.patch +++ /dev/null @@ -1,112 +0,0 @@ -From e50d1fa554154b7e398ef7a0357f646e22cd51cf Mon Sep 17 00:00:00 2001 -From: Jianjun Liu -Date: Thu, 29 Aug 2019 14:56:13 +0800 -Subject: [PATCH] Add grpc fix for gettid - -Add gettid fix on gettid conflict because of glibc - -Signed-off-by: Jianjun Liu ---- - tensorflow/workspace.bzl | 1 + - third_party/Rename-gettid-functions.patch | 78 +++++++++++++++++++++++ - 2 files changed, 79 insertions(+) - create mode 100644 third_party/Rename-gettid-functions.patch - -diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl -index 55d7eb93..33e86087 100755 ---- a/tensorflow/workspace.bzl -+++ b/tensorflow/workspace.bzl -@@ -486,6 +486,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): - # WARNING: make sure ncteisen@ and vpai@ are cc-ed on any CL to change the below rule - tf_http_archive( - name = "grpc", -+ patch_file = clean_dep("//third_party:Rename-gettid-functions.patch"), - sha256 = "67a6c26db56f345f7cee846e681db2c23f919eba46dd639b09462d1b6203d28c", - strip_prefix = "grpc-4566c2a29ebec0835643b972eb99f4306c4234a3", - system_build_file = clean_dep("//third_party/systemlibs:grpc.BUILD"), -diff --git a/third_party/Rename-gettid-functions.patch b/third_party/Rename-gettid-functions.patch -new file mode 100644 -index 00000000..90bd9115 ---- /dev/null -+++ b/third_party/Rename-gettid-functions.patch -@@ -0,0 +1,78 @@ -+From d1d017390b799c59d6fdf7b8afa6136d218bdd61 Mon Sep 17 00:00:00 2001 -+From: Benjamin Peterson -+Date: Fri, 3 May 2019 08:11:00 -0700 -+Subject: [PATCH] Rename gettid() functions. -+ -+glibc 2.30 will declare its own gettid; see https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92. Rename the grpc versions to avoid naming conflicts. -+--- -+ src/core/lib/gpr/log_linux.cc | 4 ++-- -+ src/core/lib/gpr/log_posix.cc | 4 ++-- -+ src/core/lib/iomgr/ev_epollex_linux.cc | 4 ++-- -+ 3 files changed, 6 insertions(+), 6 deletions(-) -+ -+diff --git a/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc -+index 561276f0c20..8b597b4cf2f 100644 -+--- a/src/core/lib/gpr/log_linux.cc -++++ b/src/core/lib/gpr/log_linux.cc -+@@ -40,7 +40,7 @@ -+ #include -+ #include -+ -+-static long gettid(void) { return syscall(__NR_gettid); } -++static long sys_gettid(void) { return syscall(__NR_gettid); } -+ -+ void gpr_log(const char* file, int line, gpr_log_severity severity, -+ const char* format, ...) { -+@@ -70,7 +70,7 @@ void gpr_default_log(gpr_log_func_args* args) { -+ gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME); -+ struct tm tm; -+ static __thread long tid = 0; -+- if (tid == 0) tid = gettid(); -++ if (tid == 0) tid = sys_gettid(); -+ -+ timer = static_cast(now.tv_sec); -+ final_slash = strrchr(args->file, '/'); -+diff --git a/src/core/lib/gpr/log_posix.cc b/src/core/lib/gpr/log_posix.cc -+index b6edc14ab6b..2f7c6ce3760 100644 -+--- a/src/core/lib/gpr/log_posix.cc -++++ b/src/core/lib/gpr/log_posix.cc -+@@ -31,7 +31,7 @@ -+ #include -+ #include -+ -+-static intptr_t gettid(void) { return (intptr_t)pthread_self(); } -++static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); } -+ -+ void gpr_log(const char* file, int line, gpr_log_severity severity, -+ const char* format, ...) { -+@@ -86,7 +86,7 @@ void gpr_default_log(gpr_log_func_args* args) { -+ char* prefix; -+ gpr_asprintf(&prefix, "%s%s.%09d %7" PRIdPTR " %s:%d]", -+ gpr_log_severity_string(args->severity), time_buffer, -+- (int)(now.tv_nsec), gettid(), display_file, args->line); -++ (int)(now.tv_nsec), sys_gettid(), display_file, args->line); -+ -+ fprintf(stderr, "%-70s %s\n", prefix, args->message); -+ gpr_free(prefix); -+diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc -+index 08116b3ab53..76f59844312 100644 -+--- a/src/core/lib/iomgr/ev_epollex_linux.cc -++++ b/src/core/lib/iomgr/ev_epollex_linux.cc -+@@ -1102,7 +1102,7 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker, -+ } -+ -+ #ifndef NDEBUG -+-static long gettid(void) { return syscall(__NR_gettid); } -++static long sys_gettid(void) { return syscall(__NR_gettid); } -+ #endif -+ -+ /* pollset->mu lock must be held by the caller before calling this. -+@@ -1122,7 +1122,7 @@ static grpc_error* pollset_work(grpc_pollset* pollset, -+ #define WORKER_PTR (&worker) -+ #endif -+ #ifndef NDEBUG -+- WORKER_PTR->originator = gettid(); -++ WORKER_PTR->originator = sys_gettid(); -+ #endif -+ if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) { -+ gpr_log(GPR_INFO, --- -2.22.0 \ No newline at end of file diff --git a/tensorflow-core/tensorflow-core-api/external/tensorflow-proto.patch b/tensorflow-core/tensorflow-core-api/external/tensorflow-proto.patch new file mode 100644 index 00000000000..06b42ccfd1d --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/external/tensorflow-proto.patch @@ -0,0 +1,124 @@ +diff -ruN a/tensorflow/core/protobuf/bfc_memory_map.proto b/tensorflow/core/protobuf/bfc_memory_map.proto +--- a/tensorflow/core/protobuf/bfc_memory_map.proto 2020-03-31 00:00:24.000000000 -0400 ++++ b/tensorflow/core/protobuf/bfc_memory_map.proto 2020-03-30 23:43:29.000000000 -0400 +@@ -3,6 +3,9 @@ + package tensorflow; + + option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; ++option java_outer_classname = "BfcMemoryMapProtos"; ++option java_multiple_files = true; ++option java_package = "org.tensorflow.util"; + + // Some of the data from AllocatorStats + message MemAllocatorStats { +diff -ruN a/tensorflow/core/protobuf/data/experimental/snapshot.proto b/tensorflow/core/protobuf/data/experimental/snapshot.proto +--- a/tensorflow/core/protobuf/data/experimental/snapshot.proto 2020-03-31 00:00:24.000000000 -0400 ++++ b/tensorflow/core/protobuf/data/experimental/snapshot.proto 2020-03-30 23:56:11.000000000 -0400 +@@ -6,6 +6,10 @@ + import "tensorflow/core/framework/tensor_shape.proto"; + import "tensorflow/core/framework/types.proto"; + ++option java_outer_classname = "SnapshotProtos"; ++option java_multiple_files = true; ++option java_package = "org.tensorflow.util"; ++ + // Each SnapshotRecord represents one batch of pre-processed input data. A batch + // consists of a list of tensors that we encode as TensorProtos. This message + // doesn't store the structure of the batch. +diff -ruN a/tensorflow/core/protobuf/device_properties.proto b/tensorflow/core/protobuf/device_properties.proto +--- a/tensorflow/core/protobuf/device_properties.proto 2020-03-31 00:00:24.000000000 -0400 ++++ b/tensorflow/core/protobuf/device_properties.proto 2020-03-30 23:44:22.000000000 -0400 +@@ -19,6 +19,8 @@ + + option cc_enable_arenas = true; + option java_outer_classname = "DevicePropertiesProtos"; ++option java_multiple_files = true; ++option java_package = "org.tensorflow.framework"; + option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; + + message DeviceProperties { +diff -ruN a/tensorflow/core/protobuf/saved_object_graph.proto b/tensorflow/core/protobuf/saved_object_graph.proto +--- a/tensorflow/core/protobuf/saved_object_graph.proto 2020-03-31 00:00:24.000000000 -0400 ++++ b/tensorflow/core/protobuf/saved_object_graph.proto 2020-03-30 23:36:13.000000000 -0400 +@@ -11,6 +11,9 @@ + + option cc_enable_arenas = true; + option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; ++option java_outer_classname = "SavedObjectGraphProtos"; ++option java_multiple_files = true; ++option java_package = "org.tensorflow.framework"; + + // A SavedObjectGraph is part of object-based SavedModels in TF 2.0. It + // describes the directed graph of Python objects (or equivalent in other +diff -ruN a/tensorflow/core/protobuf/struct.proto b/tensorflow/core/protobuf/struct.proto +--- a/tensorflow/core/protobuf/struct.proto 2020-03-31 00:00:24.000000000 -0400 ++++ b/tensorflow/core/protobuf/struct.proto 2020-03-30 23:45:26.000000000 -0400 +@@ -6,6 +6,9 @@ + import "tensorflow/core/framework/types.proto"; + + option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; ++option java_outer_classname = "StructProtos"; ++option java_multiple_files = true; ++option java_package = "org.tensorflow.framework"; + + // `StructuredValue` represents a dynamically typed value representing various + // data structures that are inspired by Python data structures typically used in +diff -ruN a/tensorflow/core/protobuf/trackable_object_graph.proto b/tensorflow/core/protobuf/trackable_object_graph.proto +--- a/tensorflow/core/protobuf/trackable_object_graph.proto 2020-03-31 00:00:24.000000000 -0400 ++++ b/tensorflow/core/protobuf/trackable_object_graph.proto 2020-03-30 23:51:22.000000000 -0400 +@@ -4,6 +4,9 @@ + + option cc_enable_arenas = true; + option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; ++option java_outer_classname = "TrackableObjectGraphProtos"; ++option java_multiple_files = true; ++option java_package = "org.tensorflow.framework"; + + // A TensorBundle addition which saves extra information about the objects which + // own variables, allowing for more robust checkpoint loading into modified +diff -ruN a/tensorflow/core/protobuf/transport_options.proto b/tensorflow/core/protobuf/transport_options.proto +--- a/tensorflow/core/protobuf/transport_options.proto 2020-03-31 00:00:24.000000000 -0400 ++++ b/tensorflow/core/protobuf/transport_options.proto 2020-03-30 23:53:15.000000000 -0400 +@@ -3,6 +3,7 @@ + package tensorflow; + + option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto"; ++option java_package = "org.tensorflow.distruntime"; + + // Extra data needed on a non-RDMA RecvBufResponse. + message RecvBufRespExtra { +diff -ruN a/tensorflow/core/lib/core/error_codes.proto b/tensorflow/core/lib/core/error_codes.proto +--- a/tensorflow/core/lib/core/error_codes.proto 2020-03-31 00:00:24.000000000 -0400 ++++ b/tensorflow/core/lib/core/error_codes.proto 2020-03-30 23:44:22.000000000 -0400 +@@ -1,3 +1,5 @@ + syntax = "proto3"; + ++option java_package = "org.tensorflow.framework"; ++ + import public "tensorflow/core/protobuf/error_codes.proto"; +diff -ruN a/tensorflow/core/profiler/protobuf/xplane.proto b/tensorflow/core/profiler/protobuf/xplane.proto +--- a/tensorflow/core/profiler/protobuf/xplane.proto 2020-03-31 00:00:24.000000000 -0400 ++++ b/tensorflow/core/profiler/protobuf/xplane.proto 2020-03-30 23:44:22.000000000 -0400 +@@ -3,6 +3,9 @@ + package tensorflow.profiler; + + option cc_enable_arenas = true; ++option java_outer_classname = "XPlaneProtos"; ++option java_multiple_files = true; ++option java_package = "org.tensorflow.profiler"; + + // A container of parallel XPlanes, generated by one or more profiling sources. + // Next ID: 2 +diff -ruN a/tensorflow/core/util/memmapped_file_system.proto b/tensorflow/core/util/memmapped_file_system.proto +--- a/tensorflow/core/util/memmapped_file_system.proto 2020-03-31 00:00:24.000000000 -0400 ++++ b/tensorflow/core/util/memmapped_file_system.proto 2020-03-30 23:44:22.000000000 -0400 +@@ -17,6 +17,9 @@ + package tensorflow; + + option cc_enable_arenas = true; ++option java_outer_classname = "MemmappedFileSystemProtos"; ++option java_multiple_files = true; ++option java_package = "org.tensorflow.util"; + + // A message that describes one region of memmapped file. + message MemmappedFileSystemDirectoryElement { diff --git a/tensorflow-core/tensorflow-core-api/pom.xml b/tensorflow-core/tensorflow-core-api/pom.xml index 9b371ced016..efcf174e610 100644 --- a/tensorflow-core/tensorflow-core-api/pom.xml +++ b/tensorflow-core/tensorflow-core-api/pom.xml @@ -14,12 +14,22 @@ TensorFlow Core API Library Platform-dependent native code and pure-Java code for the TensorFlow machine intelligence library. + + + 3.8.0 + + org.bytedeco javacpp ${javacpp.version} + + com.google.protobuf + protobuf-java + ${protobuf.version} + org.tensorflow tensorflow-core-generator @@ -244,6 +254,13 @@ + + + com.google.protobuf + protobuf-java + ${protobuf.version} + + maven-jar-plugin diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_AssertCardinalityDataset.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_AssertCardinalityDataset.pbtxt new file mode 100644 index 00000000000..7f8ad1c4491 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_AssertCardinalityDataset.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "AssertCardinalityDataset" + endpoint { + name: "data.experimental.AssertCardinalityDataset" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_BoostedTreesCalculateBestFeatureSplitV2.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_BoostedTreesCalculateBestFeatureSplitV2.pbtxt new file mode 100644 index 00000000000..3af78f46d8d --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_BoostedTreesCalculateBestFeatureSplitV2.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "BoostedTreesCalculateBestFeatureSplitV2" + endpoint { + name: "estimator.BoostedTreesCalculateBestFeatureSplitV2" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CTCLossV2.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CTCLossV2.pbtxt new file mode 100644 index 00000000000..97df8d7a826 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CTCLossV2.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "CTCLossV2" + endpoint { + name: "nn.CTCLossV2" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CheckNumerics.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CheckNumerics.pbtxt index 731e9030a03..7bf14dcba10 100644 --- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CheckNumerics.pbtxt +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CheckNumerics.pbtxt @@ -1,6 +1,4 @@ op { graph_op_name: "CheckNumerics" - endpoint { - name: "math.CheckNumerics" - } + visibility: SKIP } diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CheckNumericsV2.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CheckNumericsV2.pbtxt new file mode 100644 index 00000000000..cfae1f1cd11 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CheckNumericsV2.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "CheckNumericsV2" + endpoint { + name: "debugging.CheckNumerics" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_Dawsn.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_Dawsn.pbtxt new file mode 100644 index 00000000000..253b06bcd4a --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_Dawsn.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "Dawsn" + endpoint { + name: "math.special.Dawsn" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugGradientIdentity.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugGradientIdentity.pbtxt index 7d50c5c8687..1729c4a1508 100644 --- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugGradientIdentity.pbtxt +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugGradientIdentity.pbtxt @@ -1,4 +1,7 @@ op { graph_op_name: "DebugGradientIdentity" + endpoint { + name: "debugging.DebugGradientIdentity" + } visibility: HIDDEN } diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugGradientRefIdentity.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugGradientRefIdentity.pbtxt index 5e14e5fffd6..e892bcefc17 100644 --- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugGradientRefIdentity.pbtxt +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugGradientRefIdentity.pbtxt @@ -1,4 +1,7 @@ op { graph_op_name: "DebugGradientRefIdentity" + endpoint { + name: "debugging.DebugGradientRefIdentity" + } visibility: HIDDEN } diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugIdentity.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugIdentity.pbtxt index 6b3dce91601..e1d6b305f0f 100644 --- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugIdentity.pbtxt +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugIdentity.pbtxt @@ -1,4 +1,4 @@ op { graph_op_name: "DebugIdentity" - visibility: HIDDEN + visibility: SKIP } diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugIdentityV2.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugIdentityV2.pbtxt index d3970c2eeed..2d64252d361 100644 --- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugIdentityV2.pbtxt +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugIdentityV2.pbtxt @@ -1,4 +1,7 @@ op { graph_op_name: "DebugIdentityV2" + endpoint { + name: "debugging.DebugIdentity" + } visibility: HIDDEN } diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugNanCount.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugNanCount.pbtxt index 4057edc6c79..5012ee1e355 100644 --- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugNanCount.pbtxt +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugNanCount.pbtxt @@ -1,4 +1,7 @@ op { graph_op_name: "DebugNanCount" + endpoint { + name: "debugging.DebugNanCount" + } visibility: HIDDEN } diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugNumericSummary.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugNumericSummary.pbtxt index d80befc87d8..8a5c173e170 100644 --- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugNumericSummary.pbtxt +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugNumericSummary.pbtxt @@ -1,4 +1,4 @@ op { graph_op_name: "DebugNumericSummary" - visibility: HIDDEN + visibility: SKIP } diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugNumericSummaryV2.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugNumericSummaryV2.pbtxt index e3821d1cbae..dd70cac6e61 100644 --- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugNumericSummaryV2.pbtxt +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_DebugNumericSummaryV2.pbtxt @@ -1,4 +1,7 @@ op { graph_op_name: "DebugNumericSummaryV2" + endpoint { + name: "debugging.DebugNumericsSummary" + } visibility: HIDDEN } diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_Expint.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_Expint.pbtxt new file mode 100644 index 00000000000..b2cd45a605e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_Expint.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "Expint" + endpoint { + name: "math.special.Expint" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_FresnelCos.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_FresnelCos.pbtxt new file mode 100644 index 00000000000..88373aebe7c --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_FresnelCos.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "FresnelCos" + endpoint { + name: "math.special.FresnelCos" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_FresnelSin.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_FresnelSin.pbtxt new file mode 100644 index 00000000000..294d07b18ce --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_FresnelSin.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "FresnelSin" + endpoint { + name: "math.special.FresnelSin" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ImageProjectiveTransformV2.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ImageProjectiveTransformV2.pbtxt new file mode 100644 index 00000000000..badcf0d63ca --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ImageProjectiveTransformV2.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "ImageProjectiveTransformV2" + endpoint { + name: "image.ImageProjectiveTransformV2" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_LegacyParallelInterleaveDatasetV2.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_LegacyParallelInterleaveDatasetV2.pbtxt new file mode 100644 index 00000000000..a07ccaeaa1f --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_LegacyParallelInterleaveDatasetV2.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "LegacyParallelInterleaveDatasetV2" + endpoint { + name: "data.experimental.LegacyParallelInterleaveDataset" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_MatrixDiagPartV3.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_MatrixDiagPartV3.pbtxt new file mode 100644 index 00000000000..fe362b5058d --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_MatrixDiagPartV3.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "MatrixDiagPartV3" + endpoint { + name: "linalg.MatrixDiagPartV3" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_MatrixDiagV3.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_MatrixDiagV3.pbtxt new file mode 100644 index 00000000000..cebc08f5e23 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_MatrixDiagV3.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "MatrixDiagV3" + endpoint { + name: "linalg.MatrixDiagV3" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_MatrixSetDiagV2.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_MatrixSetDiagV2.pbtxt index f26c1df6daa..c6fbcfc235d 100644 --- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_MatrixSetDiagV2.pbtxt +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_MatrixSetDiagV2.pbtxt @@ -1,6 +1,4 @@ op { graph_op_name: "MatrixSetDiagV2" - endpoint { - name: "linalg.MatrixSetDiag" - } + visibility: SKIP } diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_MatrixSetDiagV3.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_MatrixSetDiagV3.pbtxt new file mode 100644 index 00000000000..a9d26f74c7f --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_MatrixSetDiagV3.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "MatrixSetDiagV3" + endpoint { + name: "linalg.MatrixSetDiag" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelInterleaveDatasetV2.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelInterleaveDatasetV2.pbtxt index 6c74149a6c3..349769a43cf 100644 --- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelInterleaveDatasetV2.pbtxt +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelInterleaveDatasetV2.pbtxt @@ -1,6 +1,4 @@ op { graph_op_name: "ParallelInterleaveDatasetV2" - endpoint { - name: "ParallelInterleaveDataset" - } + visibility: SKIP } diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelInterleaveDatasetV3.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelInterleaveDatasetV3.pbtxt new file mode 100644 index 00000000000..b0f3e0f0f62 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelInterleaveDatasetV3.pbtxt @@ -0,0 +1,4 @@ +op { + graph_op_name: "ParallelInterleaveDatasetV3" + visibility: SKIP +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelInterleaveDatasetV4.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelInterleaveDatasetV4.pbtxt new file mode 100644 index 00000000000..56cfd4f9429 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelInterleaveDatasetV4.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "ParallelInterleaveDatasetV4" + endpoint { + name: "data.experimental.ParallelInterleaveDataset" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelMapDataset.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelMapDataset.pbtxt index 5091bb9cec2..64f25b9e5e9 100644 --- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelMapDataset.pbtxt +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelMapDataset.pbtxt @@ -1,6 +1,4 @@ op { graph_op_name: "ParallelMapDataset" - endpoint { - name: "data.ParallelMapDataset" - } + visibility: SKIP } diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelMapDatasetV2.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelMapDatasetV2.pbtxt new file mode 100644 index 00000000000..8439c4ebc0e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParallelMapDatasetV2.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "ParallelMapDatasetV2" + endpoint { + name: "data.ParallelMapDataset" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParseExample.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParseExample.pbtxt index 6e7384f2e33..9b531803889 100644 --- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParseExample.pbtxt +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParseExample.pbtxt @@ -1,6 +1,4 @@ op { graph_op_name: "ParseExample" - endpoint { - name: "io.ParseExample" - } + visibility: SKIP } diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParseExampleDatasetV2.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParseExampleDatasetV2.pbtxt new file mode 100644 index 00000000000..e0d99d55539 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ParseExampleDatasetV2.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "ParseExampleDatasetV2" + endpoint { + name: "data.experimental.ParseExampleDataset" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_QuantizedMatMulWithBiasAndDequantize.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_QuantizedMatMulWithBiasAndDequantize.pbtxt new file mode 100644 index 00000000000..45af20c078c --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_QuantizedMatMulWithBiasAndDequantize.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "QuantizedMatMulWithBiasAndDequantize" + endpoint { + name: "quantization.QuantizedMatMulWithBiasAndDequantize" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_QuantizedMatMulWithBiasAndRequantize.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_QuantizedMatMulWithBiasAndRequantize.pbtxt new file mode 100644 index 00000000000..6540e8a93fe --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_QuantizedMatMulWithBiasAndRequantize.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "QuantizedMatMulWithBiasAndRequantize" + endpoint { + name: "quantization.QuantizedMatMulWithBiasAndRequantize" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_SobolSample.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_SobolSample.pbtxt new file mode 100644 index 00000000000..4a3daebb2b8 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_SobolSample.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "SobolSample" + endpoint { + name: "math.SobolSample" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_Spence.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_Spence.pbtxt new file mode 100644 index 00000000000..f03a6820aae --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_Spence.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "Spence" + endpoint { + name: "math.special.Spence" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_StatelessRandomBinomial.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_StatelessRandomBinomial.pbtxt new file mode 100644 index 00000000000..b955ecbb4ae --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_StatelessRandomBinomial.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "StatelessRandomBinomial" + endpoint { + name: "random.StatelessRandomBinomial" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_StatelessRandomGammaV2.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_StatelessRandomGammaV2.pbtxt new file mode 100644 index 00000000000..54e27bef58f --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_StatelessRandomGammaV2.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "StatelessRandomGammaV2" + endpoint { + name: "random.StatelessRandomGamma" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_StatelessRandomPoisson.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_StatelessRandomPoisson.pbtxt new file mode 100644 index 00000000000..6fc96330192 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_StatelessRandomPoisson.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "StatelessRandomPoisson" + endpoint { + name: "random.StatelessRandomPoisson" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_StatelessRandomUniformFullInt.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_StatelessRandomUniformFullInt.pbtxt new file mode 100644 index 00000000000..9349b1a79c7 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_StatelessRandomUniformFullInt.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "StatelessRandomUniformFullInt" + endpoint { + name: "random.StatelessRandomUniformFullInt" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ToBool.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ToBool.pbtxt new file mode 100644 index 00000000000..0f4f25bb522 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_ToBool.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "ToBool" + endpoint { + name: "dtypes.ToBool" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_Xlog1py.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_Xlog1py.pbtxt new file mode 100644 index 00000000000..2eb32801d59 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_Xlog1py.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "Xlog1py" + endpoint { + name: "math.Xlog1py" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/import/api_import.cc b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/import/api_import.cc new file mode 100644 index 00000000000..5e7eddfbd62 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/import/api_import.cc @@ -0,0 +1,317 @@ +/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==============================================================================*/ + +#include +#include +#include + +#include "tensorflow/core/framework/op_gen_lib.h" +#include "tensorflow/core/framework/op.h" +#include "tensorflow/core/lib/core/status.h" +#include "tensorflow/core/lib/io/path.h" +#include "tensorflow/core/lib/strings/str_util.h" +#include "tensorflow/core/platform/env.h" +#include "tensorflow/core/platform/file_system.h" +#include "tensorflow/core/platform/init_main.h" +#include "tensorflow/core/util/command_line_flags.h" +#include "tensorflow/tools/api/lib/api_objects.pb.h" + +namespace tensorflow { +namespace java { + +const char kUsageHeader[] = + "\n\nImports API defs from an existing package to generate those for the " + "Java client.\n\n"; + +string SnakeToCamelCase(const string& str, bool upper = false) { + string result; + bool cap = upper; + for (string::const_iterator it = str.begin(); it != str.end(); ++it) { + const char c = *it; + if (c == '_') { + cap = true; + } else if (cap) { + result += toupper(c); + cap = false; + } else { + result += c; + } + } + return result; +} + +string CamelToSnakeCase(const string& str) { + if (islower(str.at(0))) { + return str; // consider the string as already in snake case + } + string result; + bool prev_lower = false; + for (string::const_iterator it = str.begin(); it != str.end(); ++it) { + const char c = *it; + if (isupper(c) || isdigit(c)) { + if (it != str.begin() && (prev_lower || ((it + 1) != str.end() && islower(*(it + 1))))) { + result += '_'; + } + result += tolower(c); + prev_lower = false; + } else { + result += c; + prev_lower = true; + } + } + //LOG(INFO) << str << " became " << result; + return result; +} + +void ImportApiDef(const ApiDef* input_api_def, const string& output_dir, Env* env) { + ApiDefs output_api_defs = ApiDefs(); + ApiDef* output_api_def = output_api_defs.add_op(); + const std::string& graph_op_name = input_api_def->graph_op_name(); + output_api_def->set_graph_op_name(graph_op_name); + //output_api_def->set_visibility(ApiDef::VISIBLE); + // only output the first endpoint, ignore the others + //for (const auto& input_endpoint : input_api_def->endpoint()) { + const auto& input_endpoint = input_api_def->endpoint(0); + if (!input_endpoint.deprecated()) { + std::vector name_tokens = str_util::Split(input_endpoint.name(), "."); + if (name_tokens.size() > 1) { + std::string package = str_util::Lowercase(SnakeToCamelCase(name_tokens.at(0), false)); + std::string name = SnakeToCamelCase(name_tokens.at(1), true); + ApiDef_Endpoint* output_endpoint = output_api_def->add_endpoint(); + output_endpoint->set_name(package + "." + name); + } else if (name_tokens.at(0) != graph_op_name){ + std::string name = SnakeToCamelCase(name_tokens.at(0), true); + ApiDef_Endpoint* output_endpoint = output_api_def->add_endpoint(); + output_endpoint->set_name(name); + } + } + //} + std::unique_ptr output_file; + std::string output_file_name = "api_def_" + graph_op_name + ".pbtxt"; + TF_CHECK_OK(env->NewWritableFile(io::JoinPath(output_dir, output_file_name), &output_file)); + output_file->Append(output_api_defs.DebugString()); + output_file->Close(); +} + +void ImportApiDef(const string& name, string group, const string& output_dir, Env* env) { + ApiDefs output_api_defs = ApiDefs(); + ApiDef* output_api_def = output_api_defs.add_op(); + const std::string& graph_op_name = name; + output_api_def->set_graph_op_name(graph_op_name); + //output_api_def->set_visibility(ApiDef::VISIBLE); + if (!group.empty()) { + std::string package = str_util::Lowercase(SnakeToCamelCase(group, false)); + ApiDef_Endpoint* output_endpoint = output_api_def->add_endpoint(); + output_endpoint->set_name(package + "." + name); + } //else { + //ApiDef_Endpoint* output_endpoint = output_api_def->add_endpoint(); + //output_endpoint->set_name(name); + //} + std::unique_ptr output_file; + std::string output_file_name = "api_def_" + graph_op_name + ".pbtxt"; + TF_CHECK_OK(env->NewWritableFile(io::JoinPath(output_dir, output_file_name), &output_file)); + output_file->Append(output_api_defs.DebugString()); + output_file->Close(); +} + +} // namespace java +} // namespace tensorflow + +using namespace std; +using namespace tensorflow; + +int main(int argc, char* argv[]) { + string java_api_dir = ""; + string tf_src_dir = ""; + std::vector flag_list = { + Flag( + "java_api_dir", &java_api_dir, + "Root directory where generated Java API definitions are exported"), + Flag( + "tf_src_dir", &tf_src_dir, + "Root directory of TensorFlow sources")}; + string usage = java::kUsageHeader; + usage += Flags::Usage(argv[0], flag_list); + bool parsed_flags_ok = Flags::Parse(&argc, argv, flag_list); + port::InitMain(usage.c_str(), &argc, &argv); + QCHECK(parsed_flags_ok && !java_api_dir.empty() && !tf_src_dir.empty()) << usage; + OpList op_defs; + OpRegistry::Global()->Export(false, &op_defs); + ApiDefMap python_api_map(op_defs); + Env* env = Env::Default(); + + // Load Python API defs + string base_api_dir = tf_src_dir + "/tensorflow/core/api_def/base_api"; + string python_api_dir = tf_src_dir + "/tensorflow/core/api_def/python_api"; + vector api_files; + TF_CHECK_OK(env->GetChildren(base_api_dir, &api_files)); + LOG(INFO) << "Loading " << api_files.size() << " Base API definition files"; + for (const auto& filename : api_files) { + TF_CHECK_OK(python_api_map.LoadFile(env, base_api_dir + "/" + filename)) << filename; + } + TF_CHECK_OK(env->GetChildren(python_api_dir, &api_files)); + LOG(INFO) << "Loading " << api_files.size() << " Python API definition files"; + for (const auto& filename : api_files) { + TF_CHECK_OK(python_api_map.LoadFile(env, python_api_dir + "/" + filename)) << filename; + } + python_api_map.UpdateDocs(); + + // Load golden API member names with their module path + string golden_api_dir = tf_src_dir + "/tensorflow/tools/api/golden/v1"; + vector> golden_api_names; + vector golden_api_files; + TF_CHECK_OK(env->GetChildren(golden_api_dir, &golden_api_files)); + LOG(INFO) << "Loading " << golden_api_files.size() << " Python API golden files"; + for (const auto& filename : golden_api_files) { + // Skip the raw_ops API, as it contains all op endpoints + if (filename == "tensorflow.raw_ops.pbtxt") { + continue; + } + string contents; + TF_CHECK_OK(ReadFileToString(env, golden_api_dir + "/" + filename, &contents)); + third_party::tensorflow::tools::api::TFAPIObject object; + google::protobuf::TextFormat::ParseFromString(contents, &object); + if (object.has_tf_module()) { + string group = object.path(); + if (group == "tensorflow") { + group = ""; + } else { + StringPiece g = group; + if (str_util::ConsumePrefix(&g, "tensorflow.")) { + group = string(g.data()); + } + } + for (const auto& member : object.tf_module().member()) { + golden_api_names.push_back(make_pair(member.name(), group)); + } + for (const auto& member_method : object.tf_module().member_method()) { + golden_api_names.push_back(make_pair(member_method.name(), group)); + } + } + } + + // Go through the whole list of registered ops and generate a Java API definition for those that + // are missing + int unresolved_count = 0; + for (const auto& op_def : op_defs.op()) { + if (env->FileExists(java_api_dir + "/api_def_" + op_def.name() + ".pbtxt") == Status::OK()) { + // LOG(INFO) << "Java API for " << op_def.name() << " already defined, skipping"; + continue; + } + // Try to find this ops as a visible endpoint in the Python API definitions first + auto python_api_def = python_api_map.GetApiDef(op_def.name()); + if (python_api_def != nullptr && python_api_def->visibility() == ApiDef::VISIBLE) { + cout << endl << "Found: Op " << op_def.name() << " is visible in python API as " << python_api_def->endpoint(0).name() << endl; + java::ImportApiDef(python_api_def, java_api_dir, env); + } else { + vector> matches; + vector> choices_left; + for (const auto& it : golden_api_names) { + if (it.first == op_def.name() || + java::CamelToSnakeCase(it.first) == java::CamelToSnakeCase(op_def.name())) { + matches.push_back(it); + } else { + choices_left.push_back(it); + } + } + if (matches.size() == 1) { + cout << endl << "Found: Op " << op_def.name() << " matches a single endpoint in golden Python API as " + << matches.at(0).second << endl; + java::ImportApiDef(op_def.name(), matches.at(0).second, java_api_dir, env); + } else { + int perfect_match_count = matches.size(); + string sc_op_name = java::CamelToSnakeCase(op_def.name()); + vector> partial_choices_left; + for (const auto& it : choices_left) { + if (str_util::StrContains(it.first, op_def.name()) || + str_util::StrContains(op_def.name(), it.first) || + str_util::StrContains(it.first, sc_op_name) || + str_util::StrContains(sc_op_name, it.first)) { + matches.push_back(it); + } else { + partial_choices_left.push_back(it); + } + } + int complete_match_count = matches.size() - perfect_match_count; + bool has_complete_matches = complete_match_count > 0; + vector op_name_words = str_util::Split(sc_op_name, "_"); + sort(op_name_words.begin(), op_name_words.end()); + for (const auto& it : partial_choices_left) { + string sc_golden_name = isupper(it.first.at(0)) ? java::CamelToSnakeCase(it.first) : it.first; + vector golden_name_words = str_util::Split(sc_golden_name, "_"); + sort(golden_name_words.begin(), golden_name_words.end()); + vector common_words; + set_intersection(op_name_words.begin(), op_name_words.end(), golden_name_words.begin(), golden_name_words.end(), back_inserter(common_words)); + if (!common_words.empty()) { + matches.push_back(it); + } + } + bool has_partial_matches = (complete_match_count < matches.size()); + bool selected = false; + if (!matches.empty()) { + int choice = 0; + cout << endl << "Pick up your choice:" << endl << endl << op_def.name() << " = " << endl; + if (perfect_match_count > 0) { + for (int i = 0; i < perfect_match_count; ++i) { + cout << " (" << (i+1) << ") " << matches[i].first << " [" << matches[i].second << "]" << endl; + } + cout << endl << "0 for " << ((has_complete_matches || has_partial_matches) ? "more...: " : "none: "); + cin >> choice; + } + if (choice == 0 && complete_match_count > 0) { + for (int i = perfect_match_count; i < complete_match_count; ++i) { + cout << " (" << (i+1) << ") " << matches[i].first << " [" << matches[i].second << "]" << endl; + } + cout << endl << "0 for " << (has_partial_matches ? "more...: " : "none: "); + cin >> choice; + } + if (choice == 0 && has_partial_matches) { + for (int i = complete_match_count; i < matches.size(); ++i) { + cout << " (" << (i+1) << ") " << matches[i].first << " [" << matches[i].second << "]" << endl; + } + cout << endl << "0 for none: "; + cin >> choice; + } + if (choice > 0) { + java::ImportApiDef(op_def.name(), matches[choice - 1].second, java_api_dir, env); + selected = true; + } + } + if (!selected) { + cout << endl << "Pick up a custom group for " << op_def.name() << " (0 to skip): "; + string group; + cin >> group; + if (group != "0") { + if (group == "core") { + group = ""; + } + java::ImportApiDef(op_def.name(), group, java_api_dir, env); + selected = true; + } + } + if (!selected) { + LOG(ERROR) << "Not found : " << op_def.name(); + ++unresolved_count; + } + } + } + } + if (unresolved_count > 0) { + LOG(ERROR) << "Unresolved count = " << unresolved_count; + } else { + LOG(INFO) << "All resolved!"; + } + return 0; +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/AudioOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/AudioOps.java index 2ca43fc8c19..16770394378 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/AudioOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/AudioOps.java @@ -50,8 +50,8 @@ public final class AudioOps { * -1 to 1, together with a window width in samples, and a stride specifying how * far to move the window between slices. From this it generates a three * dimensional output. The first dimension is for the channels in the input, so a - * stereo audio input would have two here for example. The second dimension is time, - * with successive frequency slices. The third dimension has an amplitude value for + * stereo audio input would have two here for example. The second dimension is time, + * with successive frequency slices. The third dimension has an amplitude value for * each frequency during that time slice. *

* This means the layout when converted and saved as an image is rotated 90 degrees diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataOps.java index 13ef38ef856..7893a760155 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataOps.java @@ -171,9 +171,11 @@ public OptionalNone optionalNone() { * Converts the given `resource_handle` representing an iterator to a variant tensor. * * @param resourceHandle A handle to an iterator resource. + * @param options carries optional attributes values * @return a new instance of SerializeIterator */ - public SerializeIterator serializeIterator(Operand resourceHandle) { - return SerializeIterator.create(scope, resourceHandle); + public SerializeIterator serializeIterator(Operand resourceHandle, + SerializeIterator.Options... options) { + return SerializeIterator.create(scope, resourceHandle, options); } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DebuggingOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DebuggingOps.java new file mode 100644 index 00000000000..f12d18f925b --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DebuggingOps.java @@ -0,0 +1,50 @@ +// Copyright 2020 The TensorFlow Authors. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ============================================================================== +// +// This class has been generated, DO NOT EDIT! +// +package org.tensorflow.op; + +import org.tensorflow.Operand; +import org.tensorflow.op.debugging.CheckNumerics; +import org.tensorflow.types.family.TNumber; + +/** + * An API for building {@code debugging} operations as {@link Op Op}s + * + * @see {@link Ops} + */ +public final class DebuggingOps { + private final Scope scope; + + DebuggingOps(Scope scope) { + this.scope = scope; + } + + /** + * Checks a tensor for NaN and Inf values. + *

+ * When run, reports an `InvalidArgument` error if `tensor` has any values + * that are not a number (NaN) or infinity (Inf). Otherwise, passes `tensor` as-is. + * + * @param data type for {@code output()} output + * @param tensor + * @param message Prefix of the error message. + * @return a new instance of CheckNumerics + */ + public CheckNumerics checkNumerics(Operand tensor, String message) { + return CheckNumerics.create(scope, tensor, message); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DtypesOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DtypesOps.java index 547d2fd463d..16d571a6428 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DtypesOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DtypesOps.java @@ -45,6 +45,13 @@ public final class DtypesOps { * For Unicode, see the * [https://www.tensorflow.org/tutorials/representation/unicode](Working with Unicode text) * tutorial. + *

+ * Examples: + *

+ * >>> tf.strings.as_string([3, 2]) + * + * >>> tf.strings.as_string([3.1415926, 2.71828], precision=2).numpy() + * array([b'3.14', b'2.72'], dtype=object) * * @param input * @param options carries optional attributes values diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java index b101a4e4c79..9ea7a898d60 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java @@ -150,12 +150,12 @@ public AdjustSaturation adjustSaturation(Operand image * The output of this operation is the final boxes, scores and classes tensor * returned after performing non_max_suppression. * - * @param boxes A 4-D float tensor of shape `[batch_size, num_boxes, q, 4]`. If `q` is 1 then - * same boxes are used for all classes otherwise, if `q` is equal to number of + * @param boxes A 4-D float tensor of shape `[batch_size, num_boxes, q, 4]`. If `q` is 1 then + * same boxes are used for all classes otherwise, if `q` is equal to number of * classes, class-specific boxes are used. * @param scores A 3-D float tensor of shape `[batch_size, num_boxes, num_classes]` * representing a single score corresponding to each box (each row of boxes). - * @param maxOutputSizePerClass A scalar integer tensor representing the maximum number of + * @param maxOutputSizePerClass A scalar integer tensor representing the maximum number of * boxes to be selected by non max suppression per class * @param maxTotalSize A scalar representing maximum number of boxes retained over all classes. * @param iouThreshold A 0-D float tensor representing the threshold for deciding whether @@ -637,7 +637,7 @@ public ExtractGlimpse extractGlimpse(Operand input, Operand si * @param padding The type of padding algorithm to use. * @return a new instance of ExtractImagePatches */ - public ExtractImagePatches extractImagePatches(Operand images, + public ExtractImagePatches extractImagePatches(Operand images, List ksizes, List strides, List rates, String padding) { return ExtractImagePatches.create(scope, images, ksizes, strides, rates, padding); } @@ -896,6 +896,17 @@ public ResizeNearestNeighbor resizeNearestNeighbor(Operan * `output[..., 0]` contains hue, `output[..., 1]` contains saturation, and * `output[..., 2]` contains value. All HSV values are in `[0,1]`. A hue of 0 * corresponds to pure red, hue 1/3 is pure green, and 2/3 is pure blue. + *

+ * Usage Example: + *

+ * >>> blue_image = tf.stack([ + * ... tf.zeros([5,5]), + * ... tf.zeros([5,5]), + * ... tf.ones([5,5])], + * ... axis=-1) + * >>> blue_hsv_image = tf.image.rgb_to_hsv(blue_image) + * >>> blue_hsv_image[0,0].numpy() + * array([0.6666667, 1. , 1. ], dtype=float32) * * @param data type for {@code output()} output * @param images 1-D or higher rank. RGB data to convert. Last dimension must be size 3. diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/LinalgOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/LinalgOps.java index 4ec67e1b38c..9c82306e539 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/LinalgOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/LinalgOps.java @@ -48,6 +48,8 @@ import org.tensorflow.op.linalg.MatMul; import org.tensorflow.op.linalg.MatrixDiag; import org.tensorflow.op.linalg.MatrixDiagPart; +import org.tensorflow.op.linalg.MatrixDiagPartV3; +import org.tensorflow.op.linalg.MatrixDiagV3; import org.tensorflow.op.linalg.MatrixSetDiag; import org.tensorflow.op.linalg.MatrixSolveLs; import org.tensorflow.op.linalg.Qr; @@ -74,13 +76,10 @@ * @see {@link Ops} */ public final class LinalgOps { - public final LinalgSparseOps sparse; - private final Scope scope; LinalgOps(Scope scope) { this.scope = scope; - sparse = new LinalgSparseOps(scope); } /** @@ -449,7 +448,7 @@ public Eig eig(Operand input, DataType< * Considering the batch matrix multiplication equation again * (`bij,bjk->bik`), the contracted axis label is `j`. *

- * (e) Expand Diagonal: If the output subcripts contain repeated (explicit) axis + * (e) Expand Diagonal: If the output subscripts contain repeated (explicit) axis * labels, the opposite operation of (a) is applied. For example, in the * equation `i->iii`, and input shape `[3]`, the output of shape `[3, 3, 3]` * are all zeros, except for the (generalized) diagonal which is populated @@ -457,7 +456,7 @@ public Eig eig(Operand input, DataType< * Note: This operation is not supported by `np.einsum` or `tf.einsum`; it is * provided to enable computing the symbolic gradient of `tf.einsum`. *

- * The output subcripts must contain only labels appearing in at least one of the + * The output subscripts must contain only labels appearing in at least one of the * input subscripts. Furthermore, all dimensions mapping to the same axis label * must be equal. *

@@ -469,7 +468,7 @@ public Eig eig(Operand input, DataType< *

* The broadcasted dimensions are placed in the corresponding location of the * ellipsis in the output subscript. If the broadcasted dimensions are non-empty - * and the output subcripts do not contain ellipsis, then an InvalidArgument error + * and the output subscripts do not contain ellipsis, then an InvalidArgument error * is raised. *

* @@ -902,6 +901,261 @@ public MatrixDiagPart matrixDiagPart(Operand input, Oper return MatrixDiagPart.create(scope, input, k, paddingValue); } + /** + * Returns the batched diagonal part of a batched tensor. + *

+ * Returns a tensor with the `k[0]`-th to `k[1]`-th diagonals of the batched + * `input`. + *

+ * Assume `input` has `r` dimensions `[I, J, ..., L, M, N]`. + * Let `max_diag_len` be the maximum length among all diagonals to be extracted, + * `max_diag_len = min(M + min(k[1], 0), N + min(-k[0], 0))` + * Let `num_diags` be the number of diagonals to extract, + * `num_diags = k[1] - k[0] + 1`. + *

+ * If `num_diags == 1`, the output tensor is of rank `r - 1` with shape + * `[I, J, ..., L, max_diag_len]` and values: + *

{@code
+   *  diagonal[i, j, ..., l, n]
+   *    = input[i, j, ..., l, n+y, n+x] ; if 0 <= n+y < M and 0 <= n+x < N,
+   *      padding_value                 ; otherwise.
+   *  }
+ * where `y = max(-k[1], 0)`, `x = max(k[1], 0)`. + *

+ * Otherwise, the output tensor has rank `r` with dimensions + * `[I, J, ..., L, num_diags, max_diag_len]` with values: + *

{@code
+   *  diagonal[i, j, ..., l, m, n]
+   *    = input[i, j, ..., l, n+y, n+x] ; if 0 <= n+y < M and 0 <= n+x < N,
+   *      padding_value                 ; otherwise.
+   *  }
+ * where `d = k[1] - m`, `y = max(-d, 0) - offset`, and `x = max(d, 0) - offset`. + *

+ * `offset` is zero except when the alignment of the diagonal is to the right. + *

{@code
+   *  offset = max_diag_len - diag_len(d) ; if (`align` in {RIGHT_LEFT, RIGHT_RIGHT}
+   *                                             and `d >= 0`) or
+   *                                           (`align` in {LEFT_RIGHT, RIGHT_RIGHT}
+   *                                             and `d <= 0`)
+   *           0                          ; otherwise
+   *  }
+ * where `diag_len(d) = min(cols - max(d, 0), rows + min(d, 0))`. + *

+ * The input must be at least a matrix. + *

+ * For example: + *

{@code
+   *  input = np.array([[[1, 2, 3, 4],  # Input shape: (2, 3, 4)
+   *                     [5, 6, 7, 8],
+   *                     [9, 8, 7, 6]],
+   *                    [[5, 4, 3, 2],
+   *                     [1, 2, 3, 4],
+   *                     [5, 6, 7, 8]]])
+   *
+   *  # A main diagonal from each batch.
+   *  tf.matrix_diag_part(input) ==> [[1, 6, 7],  # Output shape: (2, 3)
+   *                                  [5, 2, 7]]
+   *
+   *  # A superdiagonal from each batch.
+   *  tf.matrix_diag_part(input, k = 1)
+   *    ==> [[2, 7, 6],  # Output shape: (2, 3)
+   *         [4, 3, 8]]
+   *
+   *  # A band from each batch.
+   *  tf.matrix_diag_part(input, k = (-1, 2))
+   *    ==> [[[0, 3, 8],  # Output shape: (2, 4, 3)
+   *          [2, 7, 6],
+   *          [1, 6, 7],
+   *          [5, 8, 0]],
+   *         [[0, 3, 4],
+   *          [4, 3, 8],
+   *          [5, 2, 7],
+   *          [1, 6, 0]]]
+   *
+   *  # LEFT_RIGHT alignment.
+   *  tf.matrix_diag_part(input, k = (-1, 2), align="LEFT_RIGHT")
+   *    ==> [[[3, 8, 0],  # Output shape: (2, 4, 3)
+   *          [2, 7, 6],
+   *          [1, 6, 7],
+   *          [0, 5, 8]],
+   *         [[3, 4, 0],
+   *          [4, 3, 8],
+   *          [5, 2, 7],
+   *          [0, 1, 6]]]
+   *
+   *  # max_diag_len can be shorter than the main diagonal.
+   *  tf.matrix_diag_part(input, k = (-2, -1))
+   *    ==> [[[5, 8],
+   *          [9, 0]],
+   *         [[1, 6],
+   *          [5, 0]]]
+   *
+   *  # padding_value = 9
+   *  tf.matrix_diag_part(input, k = (1, 3), padding_value = 9)
+   *    ==> [[[9, 9, 4],  # Output shape: (2, 3, 3)
+   *          [9, 3, 8],
+   *          [2, 7, 6]],
+   *         [[9, 9, 2],
+   *          [9, 3, 4],
+   *          [4, 3, 8]]]
+   *
+   *  }
+ * + * @param data type for {@code diagonal()} output + * @param input Rank `r` tensor where `r >= 2`. + * @param k Diagonal offset(s). Positive value means superdiagonal, 0 refers to the main + * diagonal, and negative value means subdiagonals. `k` can be a single integer + * (for a single diagonal) or a pair of integers specifying the low and high ends + * of a matrix band. `k[0]` must not be larger than `k[1]`. + * @param paddingValue The value to fill the area outside the specified diagonal band with. + * Default is 0. + * @param options carries optional attributes values + * @return a new instance of MatrixDiagPartV3 + */ + public MatrixDiagPartV3 matrixDiagPartV3(Operand input, Operand k, + Operand paddingValue, MatrixDiagPartV3.Options... options) { + return MatrixDiagPartV3.create(scope, input, k, paddingValue, options); + } + + /** + * Returns a batched diagonal tensor with given batched diagonal values. + *

+ * Returns a tensor with the contents in `diagonal` as `k[0]`-th to `k[1]`-th + * diagonals of a matrix, with everything else padded with `padding`. `num_rows` + * and `num_cols` specify the dimension of the innermost matrix of the output. If + * both are not specified, the op assumes the innermost matrix is square and infers + * its size from `k` and the innermost dimension of `diagonal`. If only one of them + * is specified, the op assumes the unspecified value is the smallest possible + * based on other criteria. + *

+ * Let `diagonal` have `r` dimensions `[I, J, ..., L, M, N]`. The output tensor has + * rank `r+1` with shape `[I, J, ..., L, M, num_rows, num_cols]` when only one + * diagonal is given (`k` is an integer or `k[0] == k[1]`). Otherwise, it has rank + * `r` with shape `[I, J, ..., L, num_rows, num_cols]`. + *

+ * The second innermost dimension of `diagonal` has double meaning. + * When `k` is scalar or `k[0] == k[1]`, `M` is part of the batch size + * [I, J, ..., M], and the output tensor is: + *

{@code
+   *  output[i, j, ..., l, m, n]
+   *    = diagonal[i, j, ..., l, n-max(d_upper, 0)] ; if n - m == d_upper
+   *      padding_value                             ; otherwise
+   *  }
+ * Otherwise, `M` is treated as the number of diagonals for the matrix in the + * same batch (`M = k[1]-k[0]+1`), and the output tensor is: + *
{@code
+   *  output[i, j, ..., l, m, n]
+   *    = diagonal[i, j, ..., l, diag_index, index_in_diag] ; if k[0] <= d <= k[1]
+   *      padding_value                                     ; otherwise
+   *  }
+ * where `d = n - m`, `diag_index = [k] - d`, and + * `index_in_diag = n - max(d, 0) + offset`. + *

+ * `offset` is zero except when the alignment of the diagonal is to the right. + *

{@code
+   *  offset = max_diag_len - diag_len(d) ; if (`align` in {RIGHT_LEFT, RIGHT_RIGHT}
+   *                                             and `d >= 0`) or
+   *                                           (`align` in {LEFT_RIGHT, RIGHT_RIGHT}
+   *                                             and `d <= 0`)
+   *           0                          ; otherwise
+   *  }
+ * where `diag_len(d) = min(cols - max(d, 0), rows + min(d, 0))`. + *

+ * For example: + *

{@code
+   *  # The main diagonal.
+   *  diagonal = np.array([[1, 2, 3, 4],            # Input shape: (2, 4)
+   *                       [5, 6, 7, 8]])
+   *  tf.matrix_diag(diagonal) ==> [[[1, 0, 0, 0],  # Output shape: (2, 4, 4)
+   *                                 [0, 2, 0, 0],
+   *                                 [0, 0, 3, 0],
+   *                                 [0, 0, 0, 4]],
+   *                                [[5, 0, 0, 0],
+   *                                 [0, 6, 0, 0],
+   *                                 [0, 0, 7, 0],
+   *                                 [0, 0, 0, 8]]]
+   *
+   *  # A superdiagonal (per batch).
+   *  diagonal = np.array([[1, 2, 3],  # Input shape: (2, 3)
+   *                       [4, 5, 6]])
+   *  tf.matrix_diag(diagonal, k = 1)
+   *    ==> [[[0, 1, 0, 0],  # Output shape: (2, 4, 4)
+   *          [0, 0, 2, 0],
+   *          [0, 0, 0, 3],
+   *          [0, 0, 0, 0]],
+   *         [[0, 4, 0, 0],
+   *          [0, 0, 5, 0],
+   *          [0, 0, 0, 6],
+   *          [0, 0, 0, 0]]]
+   *
+   *  # A tridiagonal band (per batch).
+   *  diagonals = np.array([[[0, 8, 9],  # Input shape: (2, 2, 3)
+   *                         [1, 2, 3],
+   *                         [4, 5, 0]],
+   *                        [[0, 2, 3],
+   *                         [6, 7, 9],
+   *                         [9, 1, 0]]])
+   *  tf.matrix_diag(diagonals, k = (-1, 1))
+   *    ==> [[[1, 8, 0],  # Output shape: (2, 3, 3)
+   *          [4, 2, 9],
+   *          [0, 5, 3]],
+   *         [[6, 2, 0],
+   *          [9, 7, 3],
+   *          [0, 1, 9]]]
+   *
+   *  # LEFT_RIGHT alignment.
+   *  diagonals = np.array([[[8, 9, 0],  # Input shape: (2, 2, 3)
+   *                         [1, 2, 3],
+   *                         [0, 4, 5]],
+   *                        [[2, 3, 0],
+   *                         [6, 7, 9],
+   *                         [0, 9, 1]]])
+   *  tf.matrix_diag(diagonals, k = (-1, 1), align="LEFT_RIGHT")
+   *    ==> [[[1, 8, 0],  # Output shape: (2, 3, 3)
+   *          [4, 2, 9],
+   *          [0, 5, 3]],
+   *         [[6, 2, 0],
+   *          [9, 7, 3],
+   *          [0, 1, 9]]]
+   *
+   *  # Rectangular matrix.
+   *  diagonal = np.array([1, 2])  # Input shape: (2)
+   *  tf.matrix_diag(diagonal, k = -1, num_rows = 3, num_cols = 4)
+   *    ==> [[0, 0, 0, 0],  # Output shape: (3, 4)
+   *         [1, 0, 0, 0],
+   *         [0, 2, 0, 0]]
+   *
+   *  # Rectangular matrix with inferred num_cols and padding_value = 9.
+   *  tf.matrix_diag(diagonal, k = -1, num_rows = 3, padding_value = 9)
+   *    ==> [[9, 9],  # Output shape: (3, 2)
+   *         [1, 9],
+   *         [9, 2]]
+   *
+   *  }
+ * + * @param data type for {@code output()} output + * @param diagonal Rank `r`, where `r >= 1` + * @param k Diagonal offset(s). Positive value means superdiagonal, 0 refers to the main + * diagonal, and negative value means subdiagonals. `k` can be a single integer + * (for a single diagonal) or a pair of integers specifying the low and high ends + * of a matrix band. `k[0]` must not be larger than `k[1]`. + * @param numRows The number of rows of the output matrix. If it is not provided, the op assumes + * the output matrix is a square matrix and infers the matrix size from k and the + * innermost dimension of `diagonal`. + * @param numCols The number of columns of the output matrix. If it is not provided, the op + * assumes the output matrix is a square matrix and infers the matrix size from + * k and the innermost dimension of `diagonal`. + * @param paddingValue The number to fill the area outside the specified diagonal band with. + * Default is 0. + * @param options carries optional attributes values + * @return a new instance of MatrixDiagV3 + */ + public MatrixDiagV3 matrixDiagV3(Operand diagonal, Operand k, + Operand numRows, Operand numCols, Operand paddingValue, + MatrixDiagV3.Options... options) { + return MatrixDiagV3.create(scope, diagonal, k, numRows, numCols, paddingValue, options); + } + /** * Returns a batched matrix tensor with new batched diagonal values. *

@@ -929,7 +1183,18 @@ public MatrixDiagPart matrixDiagPart(Operand input, Oper * = diagonal[i, j, ..., l, diag_index, index_in_diag] ; if k[0] <= d <= k[1] * input[i, j, ..., l, m, n] ; otherwise * } - * where `d = n - m`, `diag_index = k[1] - d`, and `index_in_diag = n - max(d, 0)`. + * where `d = n - m`, `diag_index = k[1] - d`, and + * `index_in_diag = n - max(d, 0) + offset`. + *

+ * `offset` is zero except when the alignment of the diagonal is to the right. + *

{@code
+   *  offset = max_diag_len - diag_len(d) ; if (`align` in {RIGHT_LEFT, RIGHT_RIGHT}
+   *                                             and `d >= 0`) or
+   *                                           (`align` in {LEFT_RIGHT, RIGHT_RIGHT}
+   *                                             and `d <= 0`)
+   *           0                          ; otherwise
+   *  }
+ * where `diag_len(d) = min(cols - max(d, 0), rows + min(d, 0))`. *

* For example: *

{@code
@@ -942,15 +1207,16 @@ public  MatrixDiagPart matrixDiagPart(Operand input, Oper
    *                     [7, 7, 7, 7]]])
    *  diagonal = np.array([[1, 2, 3],               # Diagonal shape: (2, 3)
    *                       [4, 5, 6]])
-   *  tf.matrix_set_diag(diagonal) ==> [[[1, 7, 7, 7],  # Output shape: (2, 3, 4)
-   *                                     [7, 2, 7, 7],
-   *                                     [7, 7, 3, 7]],
-   *                                    [[4, 7, 7, 7],
-   *                                     [7, 5, 7, 7],
-   *                                     [7, 7, 6, 7]]]
+   *  tf.matrix_set_diag(input, diagonal)
+   *    ==> [[[1, 7, 7, 7],  # Output shape: (2, 3, 4)
+   *          [7, 2, 7, 7],
+   *          [7, 7, 3, 7]],
+   *         [[4, 7, 7, 7],
+   *          [7, 5, 7, 7],
+   *          [7, 7, 6, 7]]]
    *
    *  # A superdiagonal (per batch).
-   *  tf.matrix_set_diag(diagonal, k = 1)
+   *  tf.matrix_set_diag(input, diagonal, k = 1)
    *    ==> [[[7, 1, 7, 7],  # Output shape: (2, 3, 4)
    *          [7, 7, 2, 7],
    *          [7, 7, 7, 3]],
@@ -959,17 +1225,38 @@ public  MatrixDiagPart matrixDiagPart(Operand input, Oper
    *          [7, 7, 7, 6]]]
    *
    *  # A band of diagonals.
-   *  diagonals = np.array([[[1, 2, 3],  # Diagonal shape: (2, 2, 3)
+   *  diagonals = np.array([[[0, 9, 1],  # Diagonal shape: (2, 4, 3)
+   *                         [6, 5, 8],
+   *                         [1, 2, 3],
    *                         [4, 5, 0]],
-   *                        [[6, 1, 2],
+   *                        [[0, 1, 2],
+   *                         [5, 6, 4],
+   *                         [6, 1, 2],
    *                         [3, 4, 0]]])
-   *  tf.matrix_set_diag(diagonals, k = (-1, 0))
-   *    ==> [[[1, 7, 7, 7],  # Output shape: (2, 3, 4)
-   *          [4, 2, 7, 7],
-   *          [0, 5, 3, 7]],
-   *         [[6, 7, 7, 7],
-   *          [3, 1, 7, 7],
-   *          [7, 4, 2, 7]]]
+   *  tf.matrix_set_diag(input, diagonals, k = (-1, 2))
+   *    ==> [[[1, 6, 9, 7],  # Output shape: (2, 3, 4)
+   *          [4, 2, 5, 1],
+   *          [7, 5, 3, 8]],
+   *         [[6, 5, 1, 7],
+   *          [3, 1, 6, 2],
+   *          [7, 4, 2, 4]]]
+   *
+   *  # LEFT_RIGHT alignment.
+   *  diagonals = np.array([[[9, 1, 0],  # Diagonal shape: (2, 4, 3)
+   *                         [6, 5, 8],
+   *                         [1, 2, 3],
+   *                         [0, 4, 5]],
+   *                        [[1, 2, 0],
+   *                         [5, 6, 4],
+   *                         [6, 1, 2],
+   *                         [0, 3, 4]]])
+   *  tf.matrix_set_diag(input, diagonals, k = (-1, 2), align="LEFT_RIGHT")
+   *    ==> [[[1, 6, 9, 7],  # Output shape: (2, 3, 4)
+   *          [4, 2, 5, 1],
+   *          [7, 5, 3, 8]],
+   *         [[6, 5, 1, 7],
+   *          [3, 1, 6, 2],
+   *          [7, 4, 2, 4]]]
    *
    *  }
* @@ -981,11 +1268,12 @@ public MatrixDiagPart matrixDiagPart(Operand input, Oper * diagonal, and negative value means subdiagonals. `k` can be a single integer * (for a single diagonal) or a pair of integers specifying the low and high ends * of a matrix band. `k[0]` must not be larger than `k[1]`. + * @param options carries optional attributes values * @return a new instance of MatrixSetDiag */ public MatrixSetDiag matrixSetDiag(Operand input, Operand diagonal, - Operand k) { - return MatrixSetDiag.create(scope, input, diagonal, k); + Operand k, MatrixSetDiag.Options... options) { + return MatrixSetDiag.create(scope, input, diagonal, k, options); } /** @@ -1010,7 +1298,7 @@ public MatrixSetDiag matrixSetDiag(Operand input, Operan * If `fast` is `True`, then the solution is computed by solving the normal * equations using Cholesky decomposition. Specifically, if \\(m \ge n\\) then * \\(X = (A^H A + \lambda I)^{-1} A^H B\\), which solves the least-squares - * problem \\(X = \mathrm{argmin}_{Z \in \Re^{n \times k} } ||A Z - B||_F^2 + \lambda ||Z||_F^2\\). + * problem \\(X = \mathrm{argmin}_{Z \in \Re^{n \times k} } ||A Z - B||_F^2 + \lambda ||Z||_F^2\\). * If \\(m \lt n\\) then `output` is computed as * \\(X = A^H (A A^H + \lambda I)^{-1} B\\), which (for \\(\lambda = 0\\)) is the * minimum-norm solution to the under-determined linear system, i.e. @@ -1146,10 +1434,10 @@ public Solve solve(Operand matrix, Operand rhs, * have no eigenvalues which are real and negative (pairs of complex conjugate * eigenvalues are allowed). *

- * The matrix square root is computed by first reducing the matrix to - * quasi-triangular form with the real Schur decomposition. The square root - * of the quasi-triangular matrix is then computed directly. Details of - * the algorithm can be found in: Nicholas J. Higham, "Computing real + * The matrix square root is computed by first reducing the matrix to + * quasi-triangular form with the real Schur decomposition. The square root + * of the quasi-triangular matrix is then computed directly. Details of + * the algorithm can be found in: Nicholas J. Higham, "Computing real * square roots of a real matrix", Linear Algebra Appl., 1987. *

* The input is a tensor of shape `[..., M, M]` whose inner-most 2 dimensions @@ -1270,15 +1558,17 @@ public Transpose transpose(Operand x, * of each inner-most matrix is assumed to be zero and not accessed. * If `lower` is False then the strictly lower triangular part of each inner-most * matrix is assumed to be zero and not accessed. - * `rhs` is a tensor of shape `[..., M, K]`. + * `rhs` is a tensor of shape `[..., M, N]`. *

- * The output is a tensor of shape `[..., M, K]`. If `adjoint` is + * The output is a tensor of shape `[..., M, N]`. If `adjoint` is * `True` then the innermost matrices in `output` satisfy matrix equations * `matrix[..., :, :] * output[..., :, :] = rhs[..., :, :]`. * If `adjoint` is `False` then the strictly then the innermost matrices in * `output` satisfy matrix equations * `adjoint(matrix[..., i, k]) * output[..., k, j] = rhs[..., i, j]`. *

+ * Note, the batch shapes for the inputs only need to broadcast. + *

* Example: *

{@code
    *  a = tf.constant([[3,  0,  0,  0],
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/MathOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/MathOps.java
index 874c695fa93..55f447d5ebd 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/MathOps.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/MathOps.java
@@ -39,7 +39,6 @@
 import org.tensorflow.op.math.Betainc;
 import org.tensorflow.op.math.Bincount;
 import org.tensorflow.op.math.Ceil;
-import org.tensorflow.op.math.CheckNumerics;
 import org.tensorflow.op.math.CompareAndBitpack;
 import org.tensorflow.op.math.ComplexAbs;
 import org.tensorflow.op.math.Conj;
@@ -120,6 +119,7 @@
 import org.tensorflow.op.math.UnsortedSegmentProd;
 import org.tensorflow.op.math.UnsortedSegmentSum;
 import org.tensorflow.op.math.Xdivy;
+import org.tensorflow.op.math.Xlog1py;
 import org.tensorflow.op.math.Xlogy;
 import org.tensorflow.op.math.Zeta;
 import org.tensorflow.op.math.erfinv;
@@ -423,7 +423,7 @@ public  ArgMin argMin(
    *  The `tf.math.asin` operation returns the inverse of `tf.math.sin`, such that
    *  if `y = tf.math.sin(x)` then, `x = tf.math.asin(y)`.
    *  

- * Note: The output of `tf.math.asin` will lie within the invertible range + * Note: The output of `tf.math.asin` will lie within the invertible range * of sine, i.e [-pi/2, pi/2]. *

* For example: @@ -469,7 +469,7 @@ public Asinh asinh(Operand x) { * The `tf.math.atan` operation returns the inverse of `tf.math.tan`, such that * if `y = tf.math.tan(x)` then, `x = tf.math.atan(y)`. *

- * Note: The output of `tf.math.atan` will lie within the invertible range + * Note: The output of `tf.math.atan` will lie within the invertible range * of tan, i.e (-pi/2, pi/2). *

* For example: @@ -620,21 +620,6 @@ public Ceil ceil(Operand x) { return Ceil.create(scope, x); } - /** - * Checks a tensor for NaN and Inf values. - *

- * When run, reports an `InvalidArgument` error if `tensor` has any values - * that are not a number (NaN) or infinity (Inf). Otherwise, passes `tensor` as-is. - * - * @param data type for {@code output()} output - * @param tensor - * @param message Prefix of the error message. - * @return a new instance of CheckNumerics - */ - public CheckNumerics checkNumerics(Operand tensor, String message) { - return CheckNumerics.create(scope, tensor, message); - } - /** * Compare values of `input` to `threshold` and pack resulting bits into a `uint8`. *

@@ -1408,9 +1393,9 @@ public LogicalAnd logicalAnd(Operand x, Operand y) { } /** - * Returns the truth value of NOT x element-wise. + * Returns the truth value of `NOT x` element-wise. * - * @param x + * @param x A `Tensor` of type `bool`. * @return a new instance of LogicalNot */ public LogicalNot logicalNot(Operand x) { @@ -2375,6 +2360,18 @@ public Xdivy xdivy(Operand x, Operand y) { return Xdivy.create(scope, x, y); } + /** + * Returns 0 if x == 0, and x * log1p(y) otherwise, elementwise. + * + * @param data type for {@code z()} output + * @param x + * @param y + * @return a new instance of Xlog1py + */ + public Xlog1py xlog1py(Operand x, Operand y) { + return Xlog1py.create(scope, x, y); + } + /** * Returns 0 if x == 0, and x * log(y) otherwise, elementwise. * diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java index 16982b062ac..0c76b961cf4 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java @@ -520,7 +520,7 @@ public CtcLoss ctcLoss(Operand inputs, Operand * biases: the canonical form of biases that can be used for saving * and restoration. They are more likely to be compatible across different * generations. - * num_params_weigths: number of weight parameter matrix for all layers. + * num_params_weights: number of weight parameter matrix for all layers. * num_params_biases: number of bias parameter vector for all layers. * rnn_mode: Indicates the type of the RNN model. * input_mode: Indicate whether there is a linear projection between the input and @@ -564,7 +564,7 @@ public CudnnRNNCanonicalToParams cudnnRNNCanonicalToParam * num_layers: Specifies the number of layers in the RNN model. * num_units: Specifies the size of the hidden state. * input_size: Specifies the size of the input state. - * num_params_weigths: number of weight parameter matrix for all layers. + * num_params_weights: number of weight parameter matrix for all layers. * num_params_biases: number of bias parameter vector for all layers. * weights: the canonical form of weights that can be used for saving * and restoration. They are more likely to be compatible across different diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java index f0f1a4074b8..b108cffd33a 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java @@ -6418,7 +6418,7 @@ public TensorListFromTensor tensorListFromT * Creates a Tensor by indexing into the TensorList. *

* Each row in the produced Tensor corresponds to the element in the TensorList - * specified by the given index (see `tf.gather`). + * specified by the given index (see `tf.gather`). *

* input_handle: The input tensor list. * indices: The indices used to index into the list. @@ -6830,38 +6830,42 @@ public TensorScatterNdSub tensorScatterN * *

* In Python, this scatter operation would look like this: - *

{@code
-   *      indices = tf.constant([[4], [3], [1], [7]])
-   *      updates = tf.constant([9, 10, 11, 12])
-   *      tensor = tf.ones([8], dtype=tf.int32)
-   *      updated = tf.tensor_scatter_nd_update(tensor, indices, updates)
-   *      print(updated)
-   *  }
- * The resulting tensor would look like this: *

- * [1, 11, 1, 10, 9, 1, 1, 12] + * >>> indices = tf.constant([[4], [3], [1], [7]]) + * >>> updates = tf.constant([9, 10, 11, 12]) + * >>> tensor = tf.ones([8], dtype=tf.int32) + * >>> print(tf.tensor_scatter_nd_update(tensor, indices, updates)) + * tf.Tensor([ 1 11 1 10 9 1 1 12], shape=(8,), dtype=int32) *

* We can also, insert entire slices of a higher rank tensor all at once. For * example, if we wanted to insert two slices in the first dimension of a * rank-3 tensor with two matrices of new values. *

* In Python, this scatter operation would look like this: - *

{@code
-   *      indices = tf.constant([[0], [2]])
-   *      updates = tf.constant([[[5, 5, 5, 5], [6, 6, 6, 6],
-   *                              [7, 7, 7, 7], [8, 8, 8, 8]],
-   *                             [[5, 5, 5, 5], [6, 6, 6, 6],
-   *                              [7, 7, 7, 7], [8, 8, 8, 8]]])
-   *      tensor = tf.ones([4, 4, 4],dtype=tf.int32)
-   *      updated = tf.tensor_scatter_nd_update(tensor, indices, updates)
-   *      print(updated)
-   *  }
- * The resulting tensor would look like this: *

- * [[[5, 5, 5, 5], [6, 6, 6, 6], [7, 7, 7, 7], [8, 8, 8, 8]], - * [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]], - * [[5, 5, 5, 5], [6, 6, 6, 6], [7, 7, 7, 7], [8, 8, 8, 8]], - * [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]] + * >>> indices = tf.constant([[0], [2]]) + * >>> updates = tf.constant([[[5, 5, 5, 5], [6, 6, 6, 6], + * ... [7, 7, 7, 7], [8, 8, 8, 8]], + * ... [[5, 5, 5, 5], [6, 6, 6, 6], + * ... [7, 7, 7, 7], [8, 8, 8, 8]]]) + * >>> tensor = tf.ones([4, 4, 4], dtype=tf.int32) + * >>> print(tf.tensor_scatter_nd_update(tensor, indices, updates).numpy()) + * [[[5 5 5 5] + * [6 6 6 6] + * [7 7 7 7] + * [8 8 8 8]] + * [[1 1 1 1] + * [1 1 1 1] + * [1 1 1 1] + * [1 1 1 1]] + * [[5 5 5 5] + * [6 6 6 6] + * [7 7 7 7] + * [8 8 8 8]] + * [[1 1 1 1] + * [1 1 1 1] + * [1 1 1 1] + * [1 1 1 1]]] *

* Note that on CPU, if an out of bound index is found, an error is returned. * On GPU, if an out of bound index is found, the index is ignored. diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/QuantizationOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/QuantizationOps.java index a76b3fd0444..7a78cd2f011 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/QuantizationOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/QuantizationOps.java @@ -50,7 +50,7 @@ public final class QuantizationOps { } /** - * Dequantize the 'input' tensor into a float Tensor. + * Dequantize the 'input' tensor into a float or bfloat16 Tensor. *

* [min_range, max_range] are scalar floats that specify the range for * the output. The 'mode' attribute controls exactly which calculations are @@ -100,17 +100,84 @@ public final class QuantizationOps { * max_range / max_expected_T); * }

* + * @param data type for {@code output()} output * @param input * @param minRange The minimum scalar value possibly produced for the input. * @param maxRange The maximum scalar value possibly produced for the input. * @param options carries optional attributes values * @return a new instance of Dequantize */ - public Dequantize dequantize(Operand input, Operand minRange, - Operand maxRange, Dequantize.Options... options) { + public Dequantize dequantize(Operand input, + Operand minRange, Operand maxRange, Dequantize.Options... options) { return Dequantize.create(scope, input, minRange, maxRange, options); } + /** + * Dequantize the 'input' tensor into a float or bfloat16 Tensor. + *

+ * [min_range, max_range] are scalar floats that specify the range for + * the output. The 'mode' attribute controls exactly which calculations are + * used to convert the float values to their quantized equivalents. + *

+ * In 'MIN_COMBINED' mode, each value of the tensor will undergo the following: + *

{@code
+   *  if T == qint8: in[i] += (range(T) + 1)/ 2.0
+   *  out[i] = min_range + (in[i]* (max_range - min_range) / range(T))
+   *  }
+ * here `range(T) = numeric_limits::max() - numeric_limits::min()` + *

+ * MIN_COMBINED Mode Example + *

+ * If the input comes from a QuantizedRelu6, the output type is + * quint8 (range of 0-255) but the possible range of QuantizedRelu6 is + * 0-6. The min_range and max_range values are therefore 0.0 and 6.0. + * Dequantize on quint8 will take each value, cast to float, and multiply + * by 6 / 255. + * Note that if quantizedtype is qint8, the operation will additionally add + * each value by 128 prior to casting. + *

+ * If the mode is 'MIN_FIRST', then this approach is used: + *

{@code
+   *  num_discrete_values = 1 << (# of bits in T)
+   *  range_adjust = num_discrete_values / (num_discrete_values - 1)
+   *  range = (range_max - range_min) * range_adjust
+   *  range_scale = range / num_discrete_values
+   *  const double offset_input = static_cast(input) - lowest_quantized;
+   *  result = range_min + ((input - numeric_limits::min()) * range_scale)
+   *  }
+ * If the mode is `SCALED`, dequantization is performed by multiplying each + * input value by a scaling_factor. (Thus an input of 0 always maps to 0.0). + *

+ * The scaling_factor is determined from `min_range`, `max_range`, and + * `narrow_range` in a way that is compatible with `QuantizeAndDequantize{V2|V3}` + * and `QuantizeV2`, using the following algorithm: + *

{@code
+   *    const int min_expected_T = std::numeric_limits::min() +
+   *      (narrow_range ? 1 : 0);
+   *    const int max_expected_T = std::numeric_limits::max();
+   *    const float max_expected_T = std::numeric_limits::max();
+   *
+   *    const float scale_factor =
+   *      (std::numeric_limits::min() == 0) ? (max_range / max_expected_T)
+   *                                           : std::max(min_range / min_expected_T,
+   *                                                      max_range / max_expected_T);
+   *  }
+ * + * @param data type for {@code output()} output + * @param input + * @param minRange The minimum scalar value possibly produced for the input. + * @param maxRange The maximum scalar value possibly produced for the input. + * @param dtype Type of the output tensor. Currently Dequantize supports float and bfloat16. + * If 'dtype' is 'bfloat16', it only supports 'MIN_COMBINED' mode. + * @param options carries optional attributes values + * @return a new instance of Dequantize + */ + public Dequantize dequantize(Operand input, + Operand minRange, Operand maxRange, DataType dtype, + Dequantize.Options... options) { + return Dequantize.create(scope, input, minRange, maxRange, dtype, options); + } + /** * Fake-quantize the 'inputs' tensor, type float to 'outputs' tensor of same type. *

diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/StringsOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/StringsOps.java index f25dd96b4a5..75659ed60be 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/StringsOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/StringsOps.java @@ -60,6 +60,12 @@ public final class StringsOps { * Joins the strings in the given list of string tensors into one tensor; *

* with the given separator (default is an empty separator). + *

+ * Examples: + *

+ * >>> s = ["hello", "world", "tensorflow"] + * >>> tf.strings.join(s, " ") + * * * @param inputs A list of string tensors. The tensors must all have the same shape, * or be scalars. Scalars may be mixed in; these will be broadcast to the shape @@ -72,6 +78,12 @@ public Join join(Iterable> inputs, Join.Options... options) { } /** + * Converts all uppercase characters into their respective lowercase replacements. + *

+ * Example: + *

+ * >>> tf.strings.lower("CamelCase string and ALL CAPS") + * * * @param input * @param options carries optional attributes values @@ -128,6 +140,13 @@ public ReduceJoin reduceJoin(Operand inputs, Operand reductionI * if the input matches the regex pattern provided. *

* The pattern follows the re2 syntax (https://github.com/google/re2/wiki/Syntax) + *

+ * Examples: + *

+ * >>> tf.strings.regex_full_match(["TF lib", "lib TF"], ".*lib$") + * + * >>> tf.strings.regex_full_match(["TF lib", "lib TF"], ".*TF$") + * * * @param input A string tensor of the text to be processed. * @param pattern A scalar string tensor containing the regular expression to match the input. @@ -172,8 +191,14 @@ public StringFormat stringFormat(Iterable> inputs, StringFormat.Optio * String lengths of `input`. *

* Computes the length of each string given in the input tensor. + *

+ * >>> strings = tf.constant(['Hello','TensorFlow', '\U0001F642']) + * >>> tf.strings.length(strings).numpy() # default counts bytes + * array([ 5, 10, 4], dtype=int32) + * >>> tf.strings.length(strings, unit="UTF8_CHAR").numpy() + * array([ 5, 10, 1], dtype=int32) * - * @param input The string for which to compute the length. + * @param input The strings for which to compute the length for each element. * @param options carries optional attributes values * @return a new instance of StringLength */ @@ -329,6 +354,12 @@ public Strip strip(Operand input) { * * output = [b'hir', b'ee', b'n'] * } + * Raises: + *

+ * `ValueError`: If the first argument cannot be converted to a + * Tensor of `dtype string`. + * `InvalidArgumentError`: If indicies are out of range. + * `ValueError`: If `pos` and `len` are not the same shape. * * @param input Tensor of strings * @param pos Scalar defining the position of first character in each substring @@ -368,6 +399,11 @@ public ToHashBucket toHashBucket(Operand stringTensor, Long numBuckets) * unimportant. There is a risk of adversaries constructing inputs that all hash * to the same bucket. To prevent this problem, use a strong hash function with * `tf.string_to_hash_bucket_strong`. + *

+ * Examples: + *

+ * >>> tf.strings.to_hash_bucket_fast(["Hello", "TensorFlow", "2.x"], 3).numpy() + * array([0, 2, 2]) * * @param input The strings to assign a hash bucket. * @param numBuckets The number of buckets. @@ -393,6 +429,11 @@ public ToHashBucketFast toHashBucketFast(Operand input, Long numBuckets *

* The additional robustness comes at a cost of roughly 4x higher compute * time than `tf.string_to_hash_bucket_fast`. + *

+ * Examples: + *

+ * >>> tf.strings.to_hash_bucket_strong(["Hello", "TF"], 3, [1, 2]).numpy() + * array([2, 0]) * * @param input The strings to assign a hash bucket. * @param numBuckets The number of buckets. @@ -410,6 +451,12 @@ public ToHashBucketStrong toHashBucketStrong(Operand input, Long numBuc *

* (Note that int32 overflow results in an error while float overflow * results in a rounded value.) + *

+ * Example: + *

+ * >>> strings = ["5.0", "3.0", "7.0"] + * >>> tf.strings.to_number(strings) + * * * @param data type for {@code output()} output * @param stringTensor @@ -424,6 +471,12 @@ public ToNumber toNumber(Operand stringTensor) { *

* (Note that int32 overflow results in an error while float overflow * results in a rounded value.) + *

+ * Example: + *

+ * >>> strings = ["5.0", "3.0", "7.0"] + * >>> tf.strings.to_number(strings) + * * * @param data type for {@code output()} output * @param stringTensor @@ -443,6 +496,11 @@ public ToNumber toNumber(Operand stringTensor, * Unicode (ICU) UScriptCode values. See http://icu-project.org/apiref/icu4c/uscript_8h.html. * Returns -1 (USCRIPT_INVALID_CODE) for invalid codepoints. Output shape will * match input shape. + *

+ * Examples: + *

+ * >>> tf.strings.unicode_script([1, 31, 38]) + * * * @param input A Tensor of int32 Unicode code points. * @return a new instance of UnicodeScript @@ -478,6 +536,16 @@ public UnicodeScript unicodeScript(Operand input) { * transcoding is faithful to all codepoints in the source. If it is not marked * with an explicit endianness, the BOM is not considered part of the string itself * but as metadata, and so is not preserved in the output. + *

+ * Examples: + *

+ * >>> tf.strings.unicode_transcode(["Hello", "TensorFlow", "2.x"], "UTF-8", "UTF-16-BE") + * + * >>> tf.strings.unicode_transcode(["A", "B", "C"], "US ASCII", "UTF-8").numpy() + * array([b'A', b'B', b'C'], dtype=object) * * @param input The text to be processed. Can have any shape. * @param inputEncoding Text encoding of the input strings. This is any of the encodings supported @@ -535,6 +603,12 @@ public UnsortedSegmentJoin unsortedSegmen } /** + * Converts all lowercase characters into their respective uppercase replacements. + *

+ * Example: + *

+ * >>> tf.strings.upper("CamelCase string and ALL CAPS") + * * * @param input * @param options carries optional attributes values diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/TrainOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/TrainOps.java index ceb41b201dc..c92af43b1fd 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/TrainOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/TrainOps.java @@ -340,8 +340,8 @@ public ApplyCenteredRmsProp applyCenteredRmsProp(Operand * @param linear Should be from a Variable(). * @param grad The gradient. * @param lr Scaling factor. Must be a scalar. - * @param l1 L1 regulariation. Must be a scalar. - * @param l2 L2 shrinkage regulariation. Must be a scalar. + * @param l1 L1 regularization. Must be a scalar. + * @param l2 L2 shrinkage regularization. Must be a scalar. * @param l2Shrinkage * @param lrPower Scaling factor. Must be a scalar. * @param options carries optional attributes values @@ -369,9 +369,9 @@ public ApplyGradientDescent applyGradientDescent(Operand } /** - * Update '*var' according to the momentum scheme. Set use_nesterov = True if you + * Update '*var' according to the momentum scheme. *

- * want to use Nesterov momentum. + * Set use_nesterov = True if you want to use Nesterov momentum. *

* accum = accum * momentum + grad * var -= lr * accum @@ -702,10 +702,10 @@ public ResourceApplyAdagradDa resourceApplyAdagradDa(Operand - * $$lr_t := \text{learning\_rate} * \sqrt{1 - beta_2^t} / (1 - beta_1^t)$$ - * $$m_t := beta_1 * m_{t-1} + (1 - beta_1) * g$$ - * $$v_t := beta_2 * v_{t-1} + (1 - beta_2) * g * g$$ - * $$variable := variable - lr_t * m_t / (\sqrt{v_t} + \epsilon)$$ + * $$\text{lr}_t := \mathrm{learning_rate} * \sqrt{1 - \beta_2^t} / (1 - \beta_1^t)$$ + * $$m_t := \beta_1 * m_{t-1} + (1 - \beta_1) * g$$ + * $$v_t := \beta_2 * v_{t-1} + (1 - \beta_2) * g * g$$ + * $$\text{variable} := \text{variable} - \text{lr}_t * m_t / (\sqrt{v_t} + \epsilon)$$ * * @param var Should be from a Variable(). * @param m Should be from a Variable(). @@ -729,11 +729,11 @@ public ResourceApplyAdam resourceApplyAdam(Operand var, Ope /** * Update '*var' according to the Adam algorithm. *

- * $$lr_t := \text{learning\_rate} * \sqrt{1 - beta_2^t} / (1 - beta_1^t)$$ - * $$m_t := beta_1 * m_{t-1} + (1 - beta_1) * g$$ - * $$v_t := beta_2 * v_{t-1} + (1 - beta_2) * g * g$$ - * $$vhat_t := max{vhat_{t-1}, v_t}$$ - * $$variable := variable - lr_t * m_t / (\sqrt{vhat_t} + \epsilon)$$ + * $$\text{lr}_t := \mathrm{learning_rate} * \sqrt{1 - \beta_2^t} / (1 - \beta_1^t)$$ + * $$m_t := \beta_1 * m_{t-1} + (1 - \beta_1) * g$$ + * $$v_t := \beta_2 * v_{t-1} + (1 - \beta_2) * g * g$$ + * $$\hat{v}_t := max{\hat{v}_{t-1}, v_t}$$ + * $$\text{variable} := \text{variable} - \text{lr}_t * m_t / (\sqrt{\hat{v}_t} + \epsilon)$$ * * @param var Should be from a Variable(). * @param m Should be from a Variable(). @@ -836,8 +836,8 @@ public ResourceApplyCenteredRmsProp resourceApplyCenteredRmsPr * @param linear Should be from a Variable(). * @param grad The gradient. * @param lr Scaling factor. Must be a scalar. - * @param l1 L1 regulariation. Must be a scalar. - * @param l2 L2 shrinkage regulariation. Must be a scalar. + * @param l1 L1 regularization. Must be a scalar. + * @param l2 L2 shrinkage regularization. Must be a scalar. * @param l2Shrinkage * @param lrPower Scaling factor. Must be a scalar. * @param options carries optional attributes values @@ -864,9 +864,9 @@ public ResourceApplyGradientDescent resourceApplyGradientDesce } /** - * Update '*var' according to the momentum scheme. Set use_nesterov = True if you + * Update '*var' according to the momentum scheme. *

- * want to use Nesterov momentum. + * Set use_nesterov = True if you want to use Nesterov momentum. *

* accum = accum * momentum - lr * grad * var += accum @@ -1126,7 +1126,7 @@ public ResourceSparseApplyCenteredRmsProp r * @param indices A vector of indices into the first dimension of var and accum. * @param lr Scaling factor. Must be a scalar. * @param l1 L1 regularization. Must be a scalar. - * @param l2 L2 shrinkage regulariation. Must be a scalar. + * @param l2 L2 shrinkage regularization. Must be a scalar. * @param l2Shrinkage * @param lrPower Scaling factor. Must be a scalar. * @param options carries optional attributes values @@ -1521,7 +1521,7 @@ public SparseApplyCenteredRmsProp sparse * @param indices A vector of indices into the first dimension of var and accum. * @param lr Scaling factor. Must be a scalar. * @param l1 L1 regularization. Must be a scalar. - * @param l2 L2 shrinkage regulariation. Must be a scalar. + * @param l2 L2 shrinkage regularization. Must be a scalar. * @param l2Shrinkage * @param lrPower Scaling factor. Must be a scalar. * @param options carries optional attributes values diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/internal/c_api/global/tensorflow.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/internal/c_api/global/tensorflow.java index a7dbf6cddea..3fc8f1eda12 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/internal/c_api/global/tensorflow.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/internal/c_api/global/tensorflow.java @@ -3522,14 +3522,14 @@ public static native TFE_TensorHandle TFE_TensorHandleCopyToDevice( // error and nullptr is returned. This function can block till the operation // that produces `handle` has completed. public static native TFE_TensorDebugInfo TFE_TensorHandleTensorDebugInfo( - TFE_TensorHandle handle, TF_Status status); + TFE_TensorHandle h, TF_Status status); // Deletes `debug_info`. public static native void TFE_DeleteTensorDebugInfo( TFE_TensorDebugInfo debug_info); // Returns the number of dimensions used to represent the tensor on its device. -// The number of dimensions used to reprensent the tensor on device can be +// The number of dimensions used to represent the tensor on device can be // different from the number returned by TFE_TensorHandleNumDims. // The return value was current at the time of TFE_TensorDebugInfo creation. public static native int TFE_TensorDebugInfoOnDeviceNumDims( diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/AudioSpectrogram.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/AudioSpectrogram.java index 83251e8e833..6774323de4d 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/AudioSpectrogram.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/AudioSpectrogram.java @@ -39,8 +39,8 @@ * -1 to 1, together with a window width in samples, and a stride specifying how * far to move the window between slices. From this it generates a three * dimensional output. The first dimension is for the channels in the input, so a - * stereo audio input would have two here for example. The second dimension is time, - * with successive frequency slices. The third dimension has an amplitude value for + * stereo audio input would have two here for example. The second dimension is time, + * with successive frequency slices. The third dimension has an amplitude value for * each frequency during that time slice. *

* This means the layout when converted and saved as an image is rotated 90 degrees diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/LeftShift.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/LeftShift.java index c215b913646..bddf9269c42 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/LeftShift.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/LeftShift.java @@ -44,9 +44,9 @@ * for dtype in dtype_list: * lhs = tf.constant([-1, -5, -3, -14], dtype=dtype) * rhs = tf.constant([5, 0, 7, 11], dtype=dtype) - * + * * left_shift_result = bitwise_ops.left_shift(lhs, rhs) - * + * * print(left_shift_result) * * # This will print: diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/RightShift.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/RightShift.java index 0344a7779df..92487345d8c 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/RightShift.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/RightShift.java @@ -47,11 +47,11 @@ * for dtype in dtype_list: * lhs = tf.constant([-1, -5, -3, -14], dtype=dtype) * rhs = tf.constant([5, 0, 7, 11], dtype=dtype) - * + * * right_shift_result = bitwise_ops.right_shift(lhs, rhs) - * + * * print(right_shift_result) - * + * * # This will print: * # tf.Tensor([-1 -5 -1 -1], shape=(4,), dtype=int8) * # tf.Tensor([-1 -5 -1 -1], shape=(4,), dtype=int16) diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/BroadcastRecv.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/BroadcastRecv.java index 3b8867aea1f..f80595eeb61 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/BroadcastRecv.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/BroadcastRecv.java @@ -27,7 +27,6 @@ import org.tensorflow.op.annotation.Endpoint; import org.tensorflow.op.annotation.Operator; import org.tensorflow.tools.Shape; -import org.tensorflow.types.family.TNumber; import org.tensorflow.types.family.TType; /** @@ -35,7 +34,7 @@ * * @param data type for {@code output()} output */ -public final class BroadcastRecv extends RawOp implements Operand { +public final class BroadcastRecv extends RawOp implements Operand { /** * Optional attributes for {@link org.tensorflow.op.collective.BroadcastRecv} @@ -69,7 +68,7 @@ private Options() { * @return a new instance of BroadcastRecv */ @Endpoint(describeByClass = true) - public static BroadcastRecv create(Scope scope, DataType T, Long groupSize, Long groupKey, Long instanceKey, Shape shape, Options... options) { + public static BroadcastRecv create(Scope scope, DataType T, Long groupSize, Long groupKey, Long instanceKey, Shape shape, Options... options) { OperationBuilder opBuilder = scope.env().opBuilder("CollectiveBcastRecv", scope.makeOpName("BroadcastRecv")); opBuilder = scope.applyControlDependencies(opBuilder); opBuilder.setAttr("T", T); diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/BroadcastSend.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/BroadcastSend.java index 609c477198c..4da9076ed23 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/BroadcastSend.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/BroadcastSend.java @@ -26,7 +26,6 @@ import org.tensorflow.op.annotation.Endpoint; import org.tensorflow.op.annotation.Operator; import org.tensorflow.tools.Shape; -import org.tensorflow.types.family.TNumber; import org.tensorflow.types.family.TType; /** @@ -34,7 +33,7 @@ * * @param data type for {@code output()} output */ -public final class BroadcastSend extends RawOp implements Operand { +public final class BroadcastSend extends RawOp implements Operand { /** * Optional attributes for {@link org.tensorflow.op.collective.BroadcastSend} @@ -68,7 +67,7 @@ private Options() { * @return a new instance of BroadcastSend */ @Endpoint(describeByClass = true) - public static BroadcastSend create(Scope scope, Operand input, Long groupSize, Long groupKey, Long instanceKey, Shape shape, Options... options) { + public static BroadcastSend create(Scope scope, Operand input, Long groupSize, Long groupKey, Long instanceKey, Shape shape, Options... options) { OperationBuilder opBuilder = scope.env().opBuilder("CollectiveBcastSend", scope.makeOpName("BroadcastSend")); opBuilder.addInput(input.asOutput()); opBuilder = scope.applyControlDependencies(opBuilder); diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugIdentity.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugIdentity.java deleted file mode 100644 index 370c556462b..00000000000 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugIdentity.java +++ /dev/null @@ -1,180 +0,0 @@ -/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -=======================================================================*/ - -// This class has been generated, DO NOT EDIT! - -package org.tensorflow.op.core; - -import java.util.List; -import org.tensorflow.Operand; -import org.tensorflow.Operation; -import org.tensorflow.OperationBuilder; -import org.tensorflow.Output; -import org.tensorflow.op.RawOp; -import org.tensorflow.op.Scope; -import org.tensorflow.op.annotation.Endpoint; -import org.tensorflow.op.annotation.Operator; -import org.tensorflow.types.family.TType; - -/** - * Provides an identity mapping of the non-Ref type input tensor for debugging. - *

- * Provides an identity mapping of the non-Ref type input tensor for debugging. - * - * @param data type for {@code output()} output - */ -public final class DebugIdentity extends RawOp implements Operand { - - /** - * Optional attributes for {@link org.tensorflow.op.core.DebugIdentity} - */ - public static class Options { - - /** - * @param deviceName Name of the device on which the tensor resides. - */ - public Options deviceName(String deviceName) { - this.deviceName = deviceName; - return this; - } - - /** - * @param tensorName Name of the input tensor. - */ - public Options tensorName(String tensorName) { - this.tensorName = tensorName; - return this; - } - - /** - * @param debugUrls List of URLs to debug targets, e.g., - * file:///foo/tfdbg_dump, grpc:://localhost:11011 - */ - public Options debugUrls(List debugUrls) { - this.debugUrls = debugUrls; - return this; - } - - /** - * @param gatedGrpc Whether this op will be gated. If any of the debug_urls of this - * debug node is of the grpc:// scheme, when the value of this attribute is set - * to True, the data will not actually be sent via the grpc stream unless this - * debug op has been enabled at the debug_url. If all of the debug_urls of this - * debug node are of the grpc:// scheme and the debug op is enabled at none of - * them, the output will be an empty Tensor. - */ - public Options gatedGrpc(Boolean gatedGrpc) { - this.gatedGrpc = gatedGrpc; - return this; - } - - private String deviceName; - private String tensorName; - private List debugUrls; - private Boolean gatedGrpc; - - private Options() { - } - } - - /** - * Factory method to create a class wrapping a new DebugIdentity operation. - * - * @param scope current scope - * @param input Input tensor, non-Reference type - * @param options carries optional attributes values - * @return a new instance of DebugIdentity - */ - @Endpoint(describeByClass = true) - public static DebugIdentity create(Scope scope, Operand input, Options... options) { - OperationBuilder opBuilder = scope.env().opBuilder("DebugIdentity", scope.makeOpName("DebugIdentity")); - opBuilder.addInput(input.asOutput()); - opBuilder = scope.applyControlDependencies(opBuilder); - if (options != null) { - for (Options opts : options) { - if (opts.deviceName != null) { - opBuilder.setAttr("device_name", opts.deviceName); - } - if (opts.tensorName != null) { - opBuilder.setAttr("tensor_name", opts.tensorName); - } - if (opts.debugUrls != null) { - String[] debugUrlsArray = new String[opts.debugUrls.size()]; - for (int i = 0; i < debugUrlsArray.length; ++i) { - debugUrlsArray[i] = opts.debugUrls.get(i); - } - opBuilder.setAttr("debug_urls", debugUrlsArray); - } - if (opts.gatedGrpc != null) { - opBuilder.setAttr("gated_grpc", opts.gatedGrpc); - } - } - } - return new DebugIdentity(opBuilder.build()); - } - - /** - * @param deviceName Name of the device on which the tensor resides. - */ - public static Options deviceName(String deviceName) { - return new Options().deviceName(deviceName); - } - - /** - * @param tensorName Name of the input tensor. - */ - public static Options tensorName(String tensorName) { - return new Options().tensorName(tensorName); - } - - /** - * @param debugUrls List of URLs to debug targets, e.g., - * file:///foo/tfdbg_dump, grpc:://localhost:11011 - */ - public static Options debugUrls(List debugUrls) { - return new Options().debugUrls(debugUrls); - } - - /** - * @param gatedGrpc Whether this op will be gated. If any of the debug_urls of this - * debug node is of the grpc:// scheme, when the value of this attribute is set - * to True, the data will not actually be sent via the grpc stream unless this - * debug op has been enabled at the debug_url. If all of the debug_urls of this - * debug node are of the grpc:// scheme and the debug op is enabled at none of - * them, the output will be an empty Tensor. - */ - public static Options gatedGrpc(Boolean gatedGrpc) { - return new Options().gatedGrpc(gatedGrpc); - } - - /** - */ - public Output output() { - return output; - } - - @Override - public Output asOutput() { - return output; - } - - private Output output; - - private DebugIdentity(Operation operation) { - super(operation); - int outputIdx = 0; - output = operation.output(outputIdx++); - } -} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugNumericSummary.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugNumericSummary.java deleted file mode 100644 index 4c10d3b3dcb..00000000000 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugNumericSummary.java +++ /dev/null @@ -1,273 +0,0 @@ -/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -=======================================================================*/ - -// This class has been generated, DO NOT EDIT! - -package org.tensorflow.op.core; - -import java.util.List; -import org.tensorflow.Operand; -import org.tensorflow.Operation; -import org.tensorflow.OperationBuilder; -import org.tensorflow.Output; -import org.tensorflow.op.RawOp; -import org.tensorflow.op.Scope; -import org.tensorflow.op.annotation.Endpoint; -import org.tensorflow.op.annotation.Operator; -import org.tensorflow.types.TFloat64; -import org.tensorflow.types.family.TType; - -/** - * Debug Numeric Summary Op. - *

- * Provide a basic summary of numeric value types, range and distribution. - *

- * output: A double tensor of shape [14 + nDimensions], where nDimensions is the - * the number of dimensions of the tensor's shape. The elements of output are: - * [0]: is initialized (1.0) or not (0.0). - * [1]: total number of elements - * [2]: NaN element count - * [3]: generalized -inf count: elements <= lower_bound. lower_bound is -inf by - * default. - * [4]: negative element count (excluding -inf), if lower_bound is the default - * -inf. Otherwise, this is the count of elements > lower_bound and < 0. - * [5]: zero element count - * [6]: positive element count (excluding +inf), if upper_bound is the default - * -inf. Otherwise, this is the count of elements < upper_bound and > 0. - * [7]: generalized +inf count, elements >= upper_bound. upper_bound is +inf by - * default. - * Output elements [1:8] are all zero, if the tensor is uninitialized. - * [8]: minimum of all non-inf and non-NaN elements. - * If uninitialized or no such element exists: +inf. - * [9]: maximum of all non-inf and non-NaN elements. - * If uninitialized or no such element exists: -inf. - * [10]: mean of all non-inf and non-NaN elements. - * If uninitialized or no such element exists: NaN. - * [11]: variance of all non-inf and non-NaN elements. - * If uninitialized or no such element exists: NaN. - * [12]: Data type of the tensor encoded as an enum integer. See the DataType - * proto for more details. - * [13]: Number of dimensions of the tensor (ndims). - * [14+]: Sizes of the dimensions. - * - */ -public final class DebugNumericSummary extends RawOp implements Operand { - - /** - * Optional attributes for {@link org.tensorflow.op.core.DebugNumericSummary} - */ - public static class Options { - - /** - * @param deviceName - */ - public Options deviceName(String deviceName) { - this.deviceName = deviceName; - return this; - } - - /** - * @param tensorName Name of the input tensor. - */ - public Options tensorName(String tensorName) { - this.tensorName = tensorName; - return this; - } - - /** - * @param debugUrls List of URLs to debug targets, e.g., - * file:///foo/tfdbg_dump, grpc:://localhost:11011. - */ - public Options debugUrls(List debugUrls) { - this.debugUrls = debugUrls; - return this; - } - - /** - * @param lowerBound (float) The lower bound <= which values will be included in the - * generalized -inf count. Default: -inf. - */ - public Options lowerBound(Float lowerBound) { - this.lowerBound = lowerBound; - return this; - } - - /** - * @param upperBound (float) The upper bound >= which values will be included in the - * generalized +inf count. Default: +inf. - */ - public Options upperBound(Float upperBound) { - this.upperBound = upperBound; - return this; - } - - /** - * @param muteIfHealthy (bool) Do not send data to the debug URLs unless at least one - * of elements [2], [3] and [7] (i.e., the nan count and the generalized -inf and - * inf counts) is non-zero. - */ - public Options muteIfHealthy(Boolean muteIfHealthy) { - this.muteIfHealthy = muteIfHealthy; - return this; - } - - /** - * @param gatedGrpc Whether this op will be gated. If any of the debug_urls of this - * debug node is of the grpc:// scheme, when the value of this attribute is set - * to True, the data will not actually be sent via the grpc stream unless this - * debug op has been enabled at the debug_url. If all of the debug_urls of this - * debug node are of the grpc:// scheme and the debug op is enabled at none of - * them, the output will be an empty Tensor. - */ - public Options gatedGrpc(Boolean gatedGrpc) { - this.gatedGrpc = gatedGrpc; - return this; - } - - private String deviceName; - private String tensorName; - private List debugUrls; - private Float lowerBound; - private Float upperBound; - private Boolean muteIfHealthy; - private Boolean gatedGrpc; - - private Options() { - } - } - - /** - * Factory method to create a class wrapping a new DebugNumericSummary operation. - * - * @param scope current scope - * @param input Input tensor, non-Reference type. - * @param options carries optional attributes values - * @return a new instance of DebugNumericSummary - */ - @Endpoint(describeByClass = true) - public static DebugNumericSummary create(Scope scope, Operand input, Options... options) { - OperationBuilder opBuilder = scope.env().opBuilder("DebugNumericSummary", scope.makeOpName("DebugNumericSummary")); - opBuilder.addInput(input.asOutput()); - opBuilder = scope.applyControlDependencies(opBuilder); - if (options != null) { - for (Options opts : options) { - if (opts.deviceName != null) { - opBuilder.setAttr("device_name", opts.deviceName); - } - if (opts.tensorName != null) { - opBuilder.setAttr("tensor_name", opts.tensorName); - } - if (opts.debugUrls != null) { - String[] debugUrlsArray = new String[opts.debugUrls.size()]; - for (int i = 0; i < debugUrlsArray.length; ++i) { - debugUrlsArray[i] = opts.debugUrls.get(i); - } - opBuilder.setAttr("debug_urls", debugUrlsArray); - } - if (opts.lowerBound != null) { - opBuilder.setAttr("lower_bound", opts.lowerBound); - } - if (opts.upperBound != null) { - opBuilder.setAttr("upper_bound", opts.upperBound); - } - if (opts.muteIfHealthy != null) { - opBuilder.setAttr("mute_if_healthy", opts.muteIfHealthy); - } - if (opts.gatedGrpc != null) { - opBuilder.setAttr("gated_grpc", opts.gatedGrpc); - } - } - } - return new DebugNumericSummary(opBuilder.build()); - } - - /** - * @param deviceName - */ - public static Options deviceName(String deviceName) { - return new Options().deviceName(deviceName); - } - - /** - * @param tensorName Name of the input tensor. - */ - public static Options tensorName(String tensorName) { - return new Options().tensorName(tensorName); - } - - /** - * @param debugUrls List of URLs to debug targets, e.g., - * file:///foo/tfdbg_dump, grpc:://localhost:11011. - */ - public static Options debugUrls(List debugUrls) { - return new Options().debugUrls(debugUrls); - } - - /** - * @param lowerBound (float) The lower bound <= which values will be included in the - * generalized -inf count. Default: -inf. - */ - public static Options lowerBound(Float lowerBound) { - return new Options().lowerBound(lowerBound); - } - - /** - * @param upperBound (float) The upper bound >= which values will be included in the - * generalized +inf count. Default: +inf. - */ - public static Options upperBound(Float upperBound) { - return new Options().upperBound(upperBound); - } - - /** - * @param muteIfHealthy (bool) Do not send data to the debug URLs unless at least one - * of elements [2], [3] and [7] (i.e., the nan count and the generalized -inf and - * inf counts) is non-zero. - */ - public static Options muteIfHealthy(Boolean muteIfHealthy) { - return new Options().muteIfHealthy(muteIfHealthy); - } - - /** - * @param gatedGrpc Whether this op will be gated. If any of the debug_urls of this - * debug node is of the grpc:// scheme, when the value of this attribute is set - * to True, the data will not actually be sent via the grpc stream unless this - * debug op has been enabled at the debug_url. If all of the debug_urls of this - * debug node are of the grpc:// scheme and the debug op is enabled at none of - * them, the output will be an empty Tensor. - */ - public static Options gatedGrpc(Boolean gatedGrpc) { - return new Options().gatedGrpc(gatedGrpc); - } - - /** - */ - public Output output() { - return output; - } - - @Override - public Output asOutput() { - return output; - } - - private Output output; - - private DebugNumericSummary(Operation operation) { - super(operation); - int outputIdx = 0; - output = operation.output(outputIdx++); - } -} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugNumericSummaryV2.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugNumericSummaryV2.java deleted file mode 100644 index 423f8dacb2f..00000000000 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugNumericSummaryV2.java +++ /dev/null @@ -1,144 +0,0 @@ -/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -=======================================================================*/ - -// This class has been generated, DO NOT EDIT! - -package org.tensorflow.op.core; - -import org.tensorflow.Operand; -import org.tensorflow.Operation; -import org.tensorflow.OperationBuilder; -import org.tensorflow.Output; -import org.tensorflow.op.RawOp; -import org.tensorflow.op.Scope; -import org.tensorflow.op.annotation.Endpoint; -import org.tensorflow.op.annotation.Operator; -import org.tensorflow.types.TFloat32; -import org.tensorflow.types.family.TType; - -/** - * Debug Numeric Summary V2 Op. - *

- * Computes a numeric summary of the input tensor. The shape of the output - * depends on the tensor_debug_mode attribute. - * This op is used internally by TensorFlow Debugger (tfdbg) v2. - */ -public final class DebugNumericSummaryV2 extends RawOp implements Operand { - - /** - * Optional attributes for {@link org.tensorflow.op.core.DebugNumericSummaryV2} - */ - public static class Options { - - /** - * @param tensorDebugMode Tensor debug mode: the mode in which the input tensor is summarized - * by the op. See the TensorDebugMode enum in - * tensorflow/core/protobuf/debug_event.proto for details. - *

- * Supported values: - * 8 (REDUCE_INF_NAN_THREE_SLOTS): Output a float32 tensor of shape - * [3]. The 1st element is -inf if any elements of the input tensor - * is -inf, or zero otherwise. The 2nd element is +inf if any elements - * of the input tensor is +inf, or zero otherwise. The 3rd element is - * nan if any element of the input tensor is nan, or zero otherwise - */ - public Options tensorDebugMode(Long tensorDebugMode) { - this.tensorDebugMode = tensorDebugMode; - return this; - } - - /** - * @param tensorId Optional. An integer identifier for the tensor being summarized by this op. - */ - public Options tensorId(Long tensorId) { - this.tensorId = tensorId; - return this; - } - - private Long tensorDebugMode; - private Long tensorId; - - private Options() { - } - } - - /** - * Factory method to create a class wrapping a new DebugNumericSummaryV2 operation. - * - * @param scope current scope - * @param input Input tensor, to be summarized by the op. - * @param options carries optional attributes values - * @return a new instance of DebugNumericSummaryV2 - */ - @Endpoint(describeByClass = true) - public static DebugNumericSummaryV2 create(Scope scope, Operand input, Options... options) { - OperationBuilder opBuilder = scope.env().opBuilder("DebugNumericSummaryV2", scope.makeOpName("DebugNumericSummaryV2")); - opBuilder.addInput(input.asOutput()); - opBuilder = scope.applyControlDependencies(opBuilder); - if (options != null) { - for (Options opts : options) { - if (opts.tensorDebugMode != null) { - opBuilder.setAttr("tensor_debug_mode", opts.tensorDebugMode); - } - if (opts.tensorId != null) { - opBuilder.setAttr("tensor_id", opts.tensorId); - } - } - } - return new DebugNumericSummaryV2(opBuilder.build()); - } - - /** - * @param tensorDebugMode Tensor debug mode: the mode in which the input tensor is summarized - * by the op. See the TensorDebugMode enum in - * tensorflow/core/protobuf/debug_event.proto for details. - *

- * Supported values: - * 8 (REDUCE_INF_NAN_THREE_SLOTS): Output a float32 tensor of shape - * [3]. The 1st element is -inf if any elements of the input tensor - * is -inf, or zero otherwise. The 2nd element is +inf if any elements - * of the input tensor is +inf, or zero otherwise. The 3rd element is - * nan if any element of the input tensor is nan, or zero otherwise - */ - public static Options tensorDebugMode(Long tensorDebugMode) { - return new Options().tensorDebugMode(tensorDebugMode); - } - - /** - * @param tensorId Optional. An integer identifier for the tensor being summarized by this op. - */ - public static Options tensorId(Long tensorId) { - return new Options().tensorId(tensorId); - } - - /** - */ - public Output output() { - return output; - } - - @Override - public Output asOutput() { - return output; - } - - private Output output; - - private DebugNumericSummaryV2(Operation operation) { - super(operation); - int outputIdx = 0; - output = operation.output(outputIdx++); - } -} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/LowerBound.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/LowerBound.java index db36ee86241..dfce8ac4d1f 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/LowerBound.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/LowerBound.java @@ -37,7 +37,7 @@ * independently. The resulting row is the equivalent of calling * `np.searchsorted(sorted_inputs, values, side='left')`. *

- * The result is not a global index to the entire + * The result is not a global index to the entire * `Tensor`, but rather just the index in the last dimension. *

* A 2-D example: diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/TensorListGather.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/TensorListGather.java index 4c78f491a1a..b1c4aa520fb 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/TensorListGather.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/TensorListGather.java @@ -33,7 +33,7 @@ * Creates a Tensor by indexing into the TensorList. *

* Each row in the produced Tensor corresponds to the element in the TensorList - * specified by the given index (see `tf.gather`). + * specified by the given index (see `tf.gather`). *

* input_handle: The input tensor list. * indices: The indices used to index into the list. diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/TensorScatterNdUpdate.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/TensorScatterNdUpdate.java index 500bc416f1c..ac7d0635b66 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/TensorScatterNdUpdate.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/TensorScatterNdUpdate.java @@ -65,38 +65,42 @@ * *

* In Python, this scatter operation would look like this: - *

{@code
- *     indices = tf.constant([[4], [3], [1], [7]])
- *     updates = tf.constant([9, 10, 11, 12])
- *     tensor = tf.ones([8], dtype=tf.int32)
- *     updated = tf.tensor_scatter_nd_update(tensor, indices, updates)
- *     print(updated)
- * }
- * The resulting tensor would look like this: *

- * [1, 11, 1, 10, 9, 1, 1, 12] + * >>> indices = tf.constant([[4], [3], [1], [7]]) + * >>> updates = tf.constant([9, 10, 11, 12]) + * >>> tensor = tf.ones([8], dtype=tf.int32) + * >>> print(tf.tensor_scatter_nd_update(tensor, indices, updates)) + * tf.Tensor([ 1 11 1 10 9 1 1 12], shape=(8,), dtype=int32) *

* We can also, insert entire slices of a higher rank tensor all at once. For * example, if we wanted to insert two slices in the first dimension of a * rank-3 tensor with two matrices of new values. *

* In Python, this scatter operation would look like this: - *

{@code
- *     indices = tf.constant([[0], [2]])
- *     updates = tf.constant([[[5, 5, 5, 5], [6, 6, 6, 6],
- *                             [7, 7, 7, 7], [8, 8, 8, 8]],
- *                            [[5, 5, 5, 5], [6, 6, 6, 6],
- *                             [7, 7, 7, 7], [8, 8, 8, 8]]])
- *     tensor = tf.ones([4, 4, 4],dtype=tf.int32)
- *     updated = tf.tensor_scatter_nd_update(tensor, indices, updates)
- *     print(updated)
- * }
- * The resulting tensor would look like this: *

- * [[[5, 5, 5, 5], [6, 6, 6, 6], [7, 7, 7, 7], [8, 8, 8, 8]], - * [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]], - * [[5, 5, 5, 5], [6, 6, 6, 6], [7, 7, 7, 7], [8, 8, 8, 8]], - * [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]] + * >>> indices = tf.constant([[0], [2]]) + * >>> updates = tf.constant([[[5, 5, 5, 5], [6, 6, 6, 6], + * ... [7, 7, 7, 7], [8, 8, 8, 8]], + * ... [[5, 5, 5, 5], [6, 6, 6, 6], + * ... [7, 7, 7, 7], [8, 8, 8, 8]]]) + * >>> tensor = tf.ones([4, 4, 4], dtype=tf.int32) + * >>> print(tf.tensor_scatter_nd_update(tensor, indices, updates).numpy()) + * [[[5 5 5 5] + * [6 6 6 6] + * [7 7 7 7] + * [8 8 8 8]] + * [[1 1 1 1] + * [1 1 1 1] + * [1 1 1 1] + * [1 1 1 1]] + * [[5 5 5 5] + * [6 6 6 6] + * [7 7 7 7] + * [8 8 8 8]] + * [[1 1 1 1] + * [1 1 1 1] + * [1 1 1 1] + * [1 1 1 1]]] *

* Note that on CPU, if an out of bound index is found, an error is returned. * On GPU, if an out of bound index is found, the index is ignored. diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/UpperBound.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/UpperBound.java index 375c26ae867..7f978707572 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/UpperBound.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/UpperBound.java @@ -37,7 +37,7 @@ * independently. The resulting row is the equivalent of calling * `np.searchsorted(sorted_inputs, values, side='right')`. *

- * The result is not a global index to the entire + * The result is not a global index to the entire * `Tensor`, but rather just the index in the last dimension. *

* A 2-D example: diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/RandomDataset.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/RandomDataset.java index ec548730254..2e62c89d4da 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/RandomDataset.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/RandomDataset.java @@ -37,7 +37,7 @@ * Creates a Dataset that returns a stream of uniformly distributed * pseudorandom 64-bit signed integers. *

- * In the TensorFlow Python API, you can instantiate this dataset via the + * In the TensorFlow Python API, you can instantiate this dataset via the * class `tf.data.experimental.RandomDataset`. *

* Instances of this dataset are also created as a result of the diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/SamplingDataset.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/SamplingDataset.java index 617e3395199..656226c6c67 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/SamplingDataset.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/SamplingDataset.java @@ -48,7 +48,7 @@ public final class SamplingDataset extends RawOp implements Operand { * * @param scope current scope * @param inputDataset - * @param rate A scalar representing the sample rate. Each element of `input_dataset` is + * @param rate A scalar representing the sample rate. Each element of `input_dataset` is * retained with this probability, independent of all other elements. * @param seed A scalar representing seed of random number generator. * @param seed2 A scalar representing seed2 of random number generator. diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/SerializeIterator.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/SerializeIterator.java index 0f65886aa83..8dc271706f3 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/SerializeIterator.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/SerializeIterator.java @@ -33,21 +33,55 @@ @Operator(group = "data") public final class SerializeIterator extends RawOp implements Operand { + /** + * Optional attributes for {@link org.tensorflow.op.data.SerializeIterator} + */ + public static class Options { + + /** + * @param externalStatePolicy + */ + public Options externalStatePolicy(Long externalStatePolicy) { + this.externalStatePolicy = externalStatePolicy; + return this; + } + + private Long externalStatePolicy; + + private Options() { + } + } + /** * Factory method to create a class wrapping a new SerializeIterator operation. * * @param scope current scope * @param resourceHandle A handle to an iterator resource. + * @param options carries optional attributes values * @return a new instance of SerializeIterator */ @Endpoint(describeByClass = true) - public static SerializeIterator create(Scope scope, Operand resourceHandle) { + public static SerializeIterator create(Scope scope, Operand resourceHandle, Options... options) { OperationBuilder opBuilder = scope.env().opBuilder("SerializeIterator", scope.makeOpName("SerializeIterator")); opBuilder.addInput(resourceHandle.asOutput()); opBuilder = scope.applyControlDependencies(opBuilder); + if (options != null) { + for (Options opts : options) { + if (opts.externalStatePolicy != null) { + opBuilder.setAttr("external_state_policy", opts.externalStatePolicy); + } + } + } return new SerializeIterator(opBuilder.build()); } + /** + * @param externalStatePolicy + */ + public static Options externalStatePolicy(Long externalStatePolicy) { + return new Options().externalStatePolicy(externalStatePolicy); + } + /** * A variant tensor storing the state of the iterator contained in the * resource. diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/SnapshotDataset.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/SnapshotDataset.java index 104484e195f..d5e89cb047e 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/SnapshotDataset.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/SnapshotDataset.java @@ -142,6 +142,22 @@ public Options seed2(Long seed2) { return this; } + /** + * @param mode + */ + public Options mode(String mode) { + this.mode = mode; + return this; + } + + /** + * @param snapshotName + */ + public Options snapshotName(String snapshotName) { + this.snapshotName = snapshotName; + return this; + } + private String compression; private String readerPathPrefix; private String writerPathPrefix; @@ -154,6 +170,8 @@ public Options seed2(Long seed2) { private Boolean shuffleOnRead; private Long seed; private Long seed2; + private String mode; + private String snapshotName; private Options() { } @@ -224,6 +242,12 @@ public static SnapshotDataset create(Scope scope, Operand inputDataset, Opera if (opts.seed2 != null) { opBuilder.setAttr("seed2", opts.seed2); } + if (opts.mode != null) { + opBuilder.setAttr("mode", opts.mode); + } + if (opts.snapshotName != null) { + opBuilder.setAttr("snapshot_name", opts.snapshotName); + } } } return new SnapshotDataset(opBuilder.build()); @@ -313,6 +337,20 @@ public static Options seed2(Long seed2) { return new Options().seed2(seed2); } + /** + * @param mode + */ + public static Options mode(String mode) { + return new Options().mode(mode); + } + + /** + * @param snapshotName + */ + public static Options snapshotName(String snapshotName) { + return new Options().snapshotName(snapshotName); + } + /** */ public Output handle() { diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/WindowDataset.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/WindowDataset.java index c6a537f5053..ed0d2045427 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/WindowDataset.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/WindowDataset.java @@ -33,7 +33,48 @@ import org.tensorflow.types.family.TType; /** - * A dataset that creates window datasets from the input dataset. + * Combines (nests of) input elements into a dataset of (nests of) windows. + *

+ * A "window" is a finite dataset of flat elements of size `size` (or possibly + * fewer if there are not enough input elements to fill the window and + * `drop_remainder` evaluates to false). + *

+ * The `shift` argument determines the number of input elements by which + * the window moves on each iteration. The first element in the `k`th window + * will be element + *

+ *

{@code
+ *   1 + (k-1) * shift
+ *   }
+ * of the input dataset. In particular, the first element of the first window + * will always be the first element of the input dataset. + *

+ * If the `stride` parameter is greater than 1, then each window will skip + * `(stride - 1)` input elements between each element that appears in the + * window. Output windows will still contain `size` elements regardless of + * the value of `stride`. + *

+ * The `stride` argument determines the stride of the input elements, and the + * `shift` argument determines the shift of the window. + *

+ * For example, letting `{...}` to represent a Dataset: + *

+ * - `tf.data.Dataset.range(7).window(2)` produces + * `{{0, 1}, {2, 3}, {4, 5}, {6}}` + * - `tf.data.Dataset.range(7).window(3, 2, 1, True)` produces + * `{{0, 1, 2}, {2, 3, 4}, {4, 5, 6}}` + * - `tf.data.Dataset.range(7).window(3, 1, 2, True)` produces + * `{{0, 2, 4}, {1, 3, 5}, {2, 4, 6}}` + *

+ * Note that when the `window` transformation is applied to a dataset of + * nested elements, it produces a dataset of nested windows. + *

+ * For example: + *

+ * - `tf.data.Dataset.from_tensor_slices((range(4), range(4))).window(2)` + * produces `{({0, 1}, {0, 1}), ({2, 3}, {2, 3})}` + * - `tf.data.Dataset.from_tensor_slices({"a": range(4)}).window(2)` + * produces `{{"a": {0, 1}}, {"a": {2, 3}}}` */ public final class WindowDataset extends RawOp implements Operand { @@ -42,13 +83,16 @@ public final class WindowDataset extends RawOp implements Operand { * * @param scope current scope * @param inputDataset - * @param size A scalar representing the number of elements to accumulate in a window. - * @param shift A scalar representing the steps moving the sliding window forward in one - * iteration. It must be positive. - * @param stride A scalar representing the stride of the input elements of the sliding window. - * It must be positive. - * @param dropRemainder A scalar representing whether a window should be dropped in case its size is - * smaller than desired. + * @param size An integer scalar, representing the number of elements + * of the input dataset to combine into a window. Must be positive. + * @param shift An integer scalar, representing the number of input elements + * by which the window moves in each iteration. Defaults to `size`. + * Must be positive. + * @param stride An integer scalar, representing the stride of the input elements + * in the sliding window. Must be positive. The default value of 1 means + * "retain every input element". + * @param dropRemainder A Boolean scalar, representing whether the last window should be + * dropped if its size is smaller than `window_size`. * @param outputTypes * @param outputShapes * @return a new instance of WindowDataset diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/ZipDataset.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/ZipDataset.java index 729942f48db..da9dd273ec6 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/ZipDataset.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/ZipDataset.java @@ -34,7 +34,7 @@ /** * Creates a dataset that zips together `input_datasets`. *

- * The elements of the resulting dataset are created by zipping corresponding + * The elements of the resulting dataset are created by zipping corresponding * elements from each of the input datasets. *

* The size of the resulting dataset will match the size of the smallest input diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/experimental/AssertCardinalityDataset.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/experimental/AssertCardinalityDataset.java new file mode 100644 index 00000000000..ede9e620c85 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/experimental/AssertCardinalityDataset.java @@ -0,0 +1,86 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.data.experimental; + +import java.util.List; +import org.tensorflow.DataType; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.tools.Shape; +import org.tensorflow.types.TInt64; +import org.tensorflow.types.family.TType; + +/** + */ +public final class AssertCardinalityDataset extends RawOp implements Operand { + + /** + * Factory method to create a class wrapping a new AssertCardinalityDataset operation. + * + * @param scope current scope + * @param inputDataset + * @param cardinality + * @param outputTypes + * @param outputShapes + * @return a new instance of AssertCardinalityDataset + */ + @Endpoint(describeByClass = true) + public static AssertCardinalityDataset create(Scope scope, Operand inputDataset, Operand cardinality, List> outputTypes, List outputShapes) { + OperationBuilder opBuilder = scope.env().opBuilder("AssertCardinalityDataset", scope.makeOpName("AssertCardinalityDataset")); + opBuilder.addInput(inputDataset.asOutput()); + opBuilder.addInput(cardinality.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + DataType[] outputTypesArray = new DataType[outputTypes.size()]; + for (int i = 0; i < outputTypesArray.length; ++i) { + outputTypesArray[i] = outputTypes.get(i); + } + opBuilder.setAttr("output_types", outputTypesArray); + Shape[] outputShapesArray = new Shape[outputShapes.size()]; + for (int i = 0; i < outputShapesArray.length; ++i) { + outputShapesArray[i] = outputShapes.get(i); + } + opBuilder.setAttr("output_shapes", outputShapesArray); + return new AssertCardinalityDataset(opBuilder.build()); + } + + /** + */ + public Output handle() { + return handle; + } + + @Override + @SuppressWarnings("unchecked") + public Output asOutput() { + return (Output) handle; + } + + private Output handle; + + private AssertCardinalityDataset(Operation operation) { + super(operation); + int outputIdx = 0; + handle = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/experimental/ParseExampleDataset.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/experimental/ParseExampleDataset.java index dc7496ba65d..2c838fe74df 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/experimental/ParseExampleDataset.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/experimental/ParseExampleDataset.java @@ -30,6 +30,7 @@ import org.tensorflow.op.annotation.Operator; import org.tensorflow.tools.Shape; import org.tensorflow.types.TInt64; +import org.tensorflow.types.family.TNumber; import org.tensorflow.types.family.TType; /** @@ -43,14 +44,27 @@ public final class ParseExampleDataset extends RawOp implements Operand { public static class Options { /** - * @param sloppy + * @param deterministic A string indicating the op-level determinism to use. Deterministic controls + * whether the dataset is allowed to return elements out of order if the next + * element to be returned isn't available, but a later element is. Options are + * "true", "false", and "default". "default" indicates that determinism should be + * decided by the `experimental_deterministic` parameter of `tf.data.Options`. */ - public Options sloppy(Boolean sloppy) { - this.sloppy = sloppy; + public Options deterministic(String deterministic) { + this.deterministic = deterministic; return this; } - private Boolean sloppy; + /** + * @param raggedKeys + */ + public Options raggedKeys(List raggedKeys) { + this.raggedKeys = raggedKeys; + return this; + } + + private String deterministic; + private List raggedKeys; private Options() { } @@ -82,12 +96,14 @@ private Options() { * given feature along this dimension. * @param outputTypes The type list for the return values. * @param outputShapes The list of shapes being produced. + * @param raggedValueTypes + * @param raggedSplitTypes * @param options carries optional attributes values * @return a new instance of ParseExampleDataset */ @Endpoint(describeByClass = true) - public static ParseExampleDataset create(Scope scope, Operand inputDataset, Operand numParallelCalls, Iterable> denseDefaults, List sparseKeys, List denseKeys, List> sparseTypes, List denseShapes, List> outputTypes, List outputShapes, Options... options) { - OperationBuilder opBuilder = scope.env().opBuilder("ExperimentalParseExampleDataset", scope.makeOpName("ParseExampleDataset")); + public static ParseExampleDataset create(Scope scope, Operand inputDataset, Operand numParallelCalls, Iterable> denseDefaults, List sparseKeys, List denseKeys, List> sparseTypes, List denseShapes, List> outputTypes, List outputShapes, List> raggedValueTypes, List> raggedSplitTypes, Options... options) { + OperationBuilder opBuilder = scope.env().opBuilder("ParseExampleDatasetV2", scope.makeOpName("ParseExampleDataset")); opBuilder.addInput(inputDataset.asOutput()); opBuilder.addInput(numParallelCalls.asOutput()); opBuilder.addInputList(Operands.asOutputs(denseDefaults)); @@ -122,10 +138,27 @@ public static ParseExampleDataset create(Scope scope, Operand inputDataset, O outputShapesArray[i] = outputShapes.get(i); } opBuilder.setAttr("output_shapes", outputShapesArray); + DataType[] raggedValueTypesArray = new DataType[raggedValueTypes.size()]; + for (int i = 0; i < raggedValueTypesArray.length; ++i) { + raggedValueTypesArray[i] = raggedValueTypes.get(i); + } + opBuilder.setAttr("ragged_value_types", raggedValueTypesArray); + DataType[] raggedSplitTypesArray = new DataType[raggedSplitTypes.size()]; + for (int i = 0; i < raggedSplitTypesArray.length; ++i) { + raggedSplitTypesArray[i] = raggedSplitTypes.get(i); + } + opBuilder.setAttr("ragged_split_types", raggedSplitTypesArray); if (options != null) { for (Options opts : options) { - if (opts.sloppy != null) { - opBuilder.setAttr("sloppy", opts.sloppy); + if (opts.deterministic != null) { + opBuilder.setAttr("deterministic", opts.deterministic); + } + if (opts.raggedKeys != null) { + String[] raggedKeysArray = new String[opts.raggedKeys.size()]; + for (int i = 0; i < raggedKeysArray.length; ++i) { + raggedKeysArray[i] = opts.raggedKeys.get(i); + } + opBuilder.setAttr("ragged_keys", raggedKeysArray); } } } @@ -133,10 +166,21 @@ public static ParseExampleDataset create(Scope scope, Operand inputDataset, O } /** - * @param sloppy + * @param deterministic A string indicating the op-level determinism to use. Deterministic controls + * whether the dataset is allowed to return elements out of order if the next + * element to be returned isn't available, but a later element is. Options are + * "true", "false", and "default". "default" indicates that determinism should be + * decided by the `experimental_deterministic` parameter of `tf.data.Options`. + */ + public static Options deterministic(String deterministic) { + return new Options().deterministic(deterministic); + } + + /** + * @param raggedKeys */ - public static Options sloppy(Boolean sloppy) { - return new Options().sloppy(sloppy); + public static Options raggedKeys(List raggedKeys) { + return new Options().raggedKeys(raggedKeys); } /** diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/CheckNumerics.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/CheckNumerics.java similarity index 91% rename from tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/CheckNumerics.java rename to tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/CheckNumerics.java index aec047668e9..1124b625a73 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/CheckNumerics.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/CheckNumerics.java @@ -15,7 +15,7 @@ // This class has been generated, DO NOT EDIT! -package org.tensorflow.op.math; +package org.tensorflow.op.debugging; import org.tensorflow.Operand; import org.tensorflow.Operation; @@ -29,14 +29,15 @@ import org.tensorflow.types.family.TType; /** - * Checks a tensor for NaN and Inf values. + * Checks a tensor for NaN, -Inf and +Inf values. *

* When run, reports an `InvalidArgument` error if `tensor` has any values * that are not a number (NaN) or infinity (Inf). Otherwise, passes `tensor` as-is. + * Unlike CheckNumerics (V1), CheckNumericsV2 distinguishes -Inf and +Inf in the + * errors it throws. * * @param data type for {@code output()} output */ -@Operator(group = "math") public final class CheckNumerics extends RawOp implements Operand { /** @@ -49,7 +50,7 @@ public final class CheckNumerics extends RawOp implements Ope */ @Endpoint(describeByClass = true) public static CheckNumerics create(Scope scope, Operand tensor, String message) { - OperationBuilder opBuilder = scope.env().opBuilder("CheckNumerics", scope.makeOpName("CheckNumerics")); + OperationBuilder opBuilder = scope.env().opBuilder("CheckNumericsV2", scope.makeOpName("CheckNumerics")); opBuilder.addInput(tensor.asOutput()); opBuilder = scope.applyControlDependencies(opBuilder); opBuilder.setAttr("message", message); diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugGradientIdentity.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugGradientIdentity.java similarity index 98% rename from tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugGradientIdentity.java rename to tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugGradientIdentity.java index b8626aa0527..9840b9b1607 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugGradientIdentity.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugGradientIdentity.java @@ -15,7 +15,7 @@ // This class has been generated, DO NOT EDIT! -package org.tensorflow.op.core; +package org.tensorflow.op.debugging; import org.tensorflow.Operand; import org.tensorflow.Operation; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugGradientRefIdentity.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugGradientRefIdentity.java similarity index 98% rename from tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugGradientRefIdentity.java rename to tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugGradientRefIdentity.java index ede36ae9554..3746e4891f7 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugGradientRefIdentity.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugGradientRefIdentity.java @@ -15,7 +15,7 @@ // This class has been generated, DO NOT EDIT! -package org.tensorflow.op.core; +package org.tensorflow.op.debugging; import org.tensorflow.Operand; import org.tensorflow.Operation; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugIdentityV2.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugIdentity.java similarity index 91% rename from tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugIdentityV2.java rename to tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugIdentity.java index 50c96d03efd..cf3503ffca3 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugIdentityV2.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugIdentity.java @@ -15,7 +15,7 @@ // This class has been generated, DO NOT EDIT! -package org.tensorflow.op.core; +package org.tensorflow.op.debugging; import java.util.List; import org.tensorflow.Operand; @@ -43,10 +43,10 @@ * * @param data type for {@code output()} output */ -public final class DebugIdentityV2 extends RawOp implements Operand { +public final class DebugIdentity extends RawOp implements Operand { /** - * Optional attributes for {@link org.tensorflow.op.core.DebugIdentityV2} + * Optional attributes for {@link org.tensorflow.op.debugging.DebugIdentity} */ public static class Options { @@ -104,16 +104,16 @@ private Options() { } /** - * Factory method to create a class wrapping a new DebugIdentityV2 operation. + * Factory method to create a class wrapping a new DebugIdentity operation. * * @param scope current scope * @param input Input tensor, non-Reference type * @param options carries optional attributes values - * @return a new instance of DebugIdentityV2 + * @return a new instance of DebugIdentity */ @Endpoint(describeByClass = true) - public static DebugIdentityV2 create(Scope scope, Operand input, Options... options) { - OperationBuilder opBuilder = scope.env().opBuilder("DebugIdentityV2", scope.makeOpName("DebugIdentityV2")); + public static DebugIdentity create(Scope scope, Operand input, Options... options) { + OperationBuilder opBuilder = scope.env().opBuilder("DebugIdentityV2", scope.makeOpName("DebugIdentity")); opBuilder.addInput(input.asOutput()); opBuilder = scope.applyControlDependencies(opBuilder); if (options != null) { @@ -139,7 +139,7 @@ public static DebugIdentityV2 create(Scope scope, Operand(opBuilder.build()); + return new DebugIdentity(opBuilder.build()); } /** @@ -193,7 +193,7 @@ public Output asOutput() { private Output output; - private DebugIdentityV2(Operation operation) { + private DebugIdentity(Operation operation) { super(operation); int outputIdx = 0; output = operation.output(outputIdx++); diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugNanCount.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugNanCount.java similarity index 97% rename from tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugNanCount.java rename to tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugNanCount.java index 9ce13c0084a..12e011c67ac 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DebugNanCount.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugNanCount.java @@ -15,7 +15,7 @@ // This class has been generated, DO NOT EDIT! -package org.tensorflow.op.core; +package org.tensorflow.op.debugging; import java.util.List; import org.tensorflow.Operand; @@ -37,7 +37,7 @@ public final class DebugNanCount extends RawOp implements Operand { /** - * Optional attributes for {@link org.tensorflow.op.core.DebugNanCount} + * Optional attributes for {@link org.tensorflow.op.debugging.DebugNanCount} */ public static class Options { diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugNumericsSummary.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugNumericsSummary.java new file mode 100644 index 00000000000..32e3291a909 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugNumericsSummary.java @@ -0,0 +1,251 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.debugging; + +import org.tensorflow.DataType; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.TFloat32; +import org.tensorflow.types.family.TNumber; +import org.tensorflow.types.family.TType; + +/** + * Debug Numeric Summary V2 Op. + *

+ * Computes a numeric summary of the input tensor. The shape of the output + * depends on the tensor_debug_mode attribute. + * This op is used internally by TensorFlow Debugger (tfdbg) v2. + * + * @param data type for {@code output()} output + */ +public final class DebugNumericsSummary extends RawOp implements Operand { + + /** + * Optional attributes for {@link org.tensorflow.op.debugging.DebugNumericsSummary} + */ + public static class Options { + + /** + * @param tensorDebugMode Tensor debug mode: the mode in which the input tensor is summarized + * by the op. See the TensorDebugMode enum in + * tensorflow/core/protobuf/debug_event.proto for details. + *

+ * Supported values: + * 2 (CURT_HEALTH): Output a float32/64 tensor of shape [2]. The 1st + * element is the tensor_id, if provided, and -1 otherwise. The 2nd + * element is a bit which is set to 1 if the input tensor has an + * infinity or nan value, or zero otherwise. + *

+ * 3 (CONCISE_HEALTH): Output a float32/64 tensor of shape [5]. The 1st + * element is the tensor_id, if provided, and -1 otherwise. The + * remaining four slots are the total number of elements, -infs, + * +infs, and nans in the input tensor respectively. + *

+ * 4 (FULL_HEALTH): Output a float32/64 tensor of shape [11]. The 1st + * element is the tensor_id, if provided, and -1 otherwise. The 2nd + * element is the device_id, if provided, and -1 otherwise. The 3rd + * element holds the datatype value of the input tensor as according + * to the enumerated type in tensorflow/core/framework/types.proto. + * The remaining elements hold the total number of elements, -infs, + * +infs, nans, negative finite numbers, zeros, and positive finite + * numbers in the input tensor respectively. + *

+ * 5 (SHAPE): Output a float32/64 tensor of shape [10]. The 1st + * element is the tensor_id, if provided, and -1 otherwise. The 2nd + * element holds the datatype value of the input tensor as according + * to the enumerated type in tensorflow/core/framework/types.proto. + * The 3rd element holds the rank of the tensor. The 4th element holds + * the number of elements within the tensor. Finally the remaining 6 + * elements hold the shape of the tensor. If the rank of the tensor + * is lower than 6, the shape is right padded with zeros. If the rank + * is greater than 6, the head of the shape is truncated. + *

+ * 6 (FULL_NUMERICS): Output a float32/64 tensor of shape [22]. The 1st + * element is the tensor_id, if provided, and -1 otherwise. The 2nd + * element is the device_id, if provided, and -1 otherwise. The 3rd + * element holds the datatype value of the input tensor as according + * to the enumerated type in tensorflow/core/framework/types.proto. + * The 4th element holds the rank of the tensor. The 5th to 11th + * elements hold the shape of the tensor. If the rank of the tensor + * is lower than 6, the shape is right padded with zeros. If the rank + * is greater than 6, the head of the shape is truncated. The 12th to + * 18th elements hold the number of elements, -infs, +infs, nans, + * denormal floats, negative finite numbers, zeros, and positive + * finite numbers in the input tensor respectively. The final four + * elements hold the min value, max value, mean, and variance of the + * input tensor. + *

+ * 8 (REDUCE_INF_NAN_THREE_SLOTS): Output a float32/64 tensor of shape + * [3]. The 1st element is -inf if any elements of the input tensor + * is -inf, or zero otherwise. The 2nd element is +inf if any elements + * of the input tensor is +inf, or zero otherwise. The 3rd element is + * nan if any element of the input tensor is nan, or zero otherwise. + */ + public Options tensorDebugMode(Long tensorDebugMode) { + this.tensorDebugMode = tensorDebugMode; + return this; + } + + /** + * @param tensorId Optional. An integer identifier for the tensor being summarized by this op. + */ + public Options tensorId(Long tensorId) { + this.tensorId = tensorId; + return this; + } + + private Long tensorDebugMode; + private Long tensorId; + + private Options() { + } + } + + /** + * Factory method to create a class wrapping a new DebugNumericsSummary operation. + * + * @param scope current scope + * @param input Input tensor, to be summarized by the op. + * @param outputDtype Optional. The type of the output. Can be float32 or float64 (default: float32). + * @param options carries optional attributes values + * @return a new instance of DebugNumericsSummary + */ + @Endpoint(describeByClass = true) + public static DebugNumericsSummary create(Scope scope, Operand input, DataType outputDtype, Options... options) { + OperationBuilder opBuilder = scope.env().opBuilder("DebugNumericSummaryV2", scope.makeOpName("DebugNumericsSummary")); + opBuilder.addInput(input.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + opBuilder.setAttr("output_dtype", outputDtype); + if (options != null) { + for (Options opts : options) { + if (opts.tensorDebugMode != null) { + opBuilder.setAttr("tensor_debug_mode", opts.tensorDebugMode); + } + if (opts.tensorId != null) { + opBuilder.setAttr("tensor_id", opts.tensorId); + } + } + } + return new DebugNumericsSummary(opBuilder.build()); + } + + /** + * Factory method to create a class wrapping a new DebugNumericsSummary operation using default output types. + * + * @param scope current scope + * @param input Input tensor, to be summarized by the op. + * @param options carries optional attributes values + * @return a new instance of DebugNumericsSummary + */ + @Endpoint(describeByClass = true) + public static DebugNumericsSummary create(Scope scope, Operand input, Options... options) { + return create(scope, input, TFloat32.DTYPE, options); + } + + /** + * @param tensorDebugMode Tensor debug mode: the mode in which the input tensor is summarized + * by the op. See the TensorDebugMode enum in + * tensorflow/core/protobuf/debug_event.proto for details. + *

+ * Supported values: + * 2 (CURT_HEALTH): Output a float32/64 tensor of shape [2]. The 1st + * element is the tensor_id, if provided, and -1 otherwise. The 2nd + * element is a bit which is set to 1 if the input tensor has an + * infinity or nan value, or zero otherwise. + *

+ * 3 (CONCISE_HEALTH): Output a float32/64 tensor of shape [5]. The 1st + * element is the tensor_id, if provided, and -1 otherwise. The + * remaining four slots are the total number of elements, -infs, + * +infs, and nans in the input tensor respectively. + *

+ * 4 (FULL_HEALTH): Output a float32/64 tensor of shape [11]. The 1st + * element is the tensor_id, if provided, and -1 otherwise. The 2nd + * element is the device_id, if provided, and -1 otherwise. The 3rd + * element holds the datatype value of the input tensor as according + * to the enumerated type in tensorflow/core/framework/types.proto. + * The remaining elements hold the total number of elements, -infs, + * +infs, nans, negative finite numbers, zeros, and positive finite + * numbers in the input tensor respectively. + *

+ * 5 (SHAPE): Output a float32/64 tensor of shape [10]. The 1st + * element is the tensor_id, if provided, and -1 otherwise. The 2nd + * element holds the datatype value of the input tensor as according + * to the enumerated type in tensorflow/core/framework/types.proto. + * The 3rd element holds the rank of the tensor. The 4th element holds + * the number of elements within the tensor. Finally the remaining 6 + * elements hold the shape of the tensor. If the rank of the tensor + * is lower than 6, the shape is right padded with zeros. If the rank + * is greater than 6, the head of the shape is truncated. + *

+ * 6 (FULL_NUMERICS): Output a float32/64 tensor of shape [22]. The 1st + * element is the tensor_id, if provided, and -1 otherwise. The 2nd + * element is the device_id, if provided, and -1 otherwise. The 3rd + * element holds the datatype value of the input tensor as according + * to the enumerated type in tensorflow/core/framework/types.proto. + * The 4th element holds the rank of the tensor. The 5th to 11th + * elements hold the shape of the tensor. If the rank of the tensor + * is lower than 6, the shape is right padded with zeros. If the rank + * is greater than 6, the head of the shape is truncated. The 12th to + * 18th elements hold the number of elements, -infs, +infs, nans, + * denormal floats, negative finite numbers, zeros, and positive + * finite numbers in the input tensor respectively. The final four + * elements hold the min value, max value, mean, and variance of the + * input tensor. + *

+ * 8 (REDUCE_INF_NAN_THREE_SLOTS): Output a float32/64 tensor of shape + * [3]. The 1st element is -inf if any elements of the input tensor + * is -inf, or zero otherwise. The 2nd element is +inf if any elements + * of the input tensor is +inf, or zero otherwise. The 3rd element is + * nan if any element of the input tensor is nan, or zero otherwise. + */ + public static Options tensorDebugMode(Long tensorDebugMode) { + return new Options().tensorDebugMode(tensorDebugMode); + } + + /** + * @param tensorId Optional. An integer identifier for the tensor being summarized by this op. + */ + public static Options tensorId(Long tensorId) { + return new Options().tensorId(tensorId); + } + + /** + */ + public Output output() { + return output; + } + + @Override + public Output asOutput() { + return output; + } + + private Output output; + + private DebugNumericsSummary(Operation operation) { + super(operation); + int outputIdx = 0; + output = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/dtypes/AsString.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/dtypes/AsString.java index bf4c6dcc989..6a3cac82067 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/dtypes/AsString.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/dtypes/AsString.java @@ -36,6 +36,13 @@ * For Unicode, see the * [https://www.tensorflow.org/tutorials/representation/unicode](Working with Unicode text) * tutorial. + *

+ * Examples: + *

+ * >>> tf.strings.as_string([3, 2]) + * + * >>> tf.strings.as_string([3.1415926, 2.71828], precision=2).numpy() + * array([b'3.14', b'2.72'], dtype=object) */ @Operator(group = "dtypes") public final class AsString extends RawOp implements Operand { diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/dtypes/ToBool.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/dtypes/ToBool.java new file mode 100644 index 00000000000..2130c1279a6 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/dtypes/ToBool.java @@ -0,0 +1,82 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.dtypes; + +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.TBool; +import org.tensorflow.types.family.TType; + +/** + * Converts a tensor to a scalar predicate. + *

+ * Converts a tensor to a scalar predicate with the following rules: + *

+ * - For 0D tensors, truthiness is determined by comparing against a "zero" + * value. For numerical types it is the obvious zero. For strings it is the + * empty string. + *

+ * - For >0D tensors, truthiness is determined by looking at the number of + * elements. If has zero elements, then the result is false. Otherwise the + * result is true. + *

+ * This matches the behavior of If and While for determining if a tensor counts + * as true/false for a branch condition. + */ +public final class ToBool extends RawOp implements Operand { + + /** + * Factory method to create a class wrapping a new ToBool operation. + * + * @param scope current scope + * @param input + * @return a new instance of ToBool + */ + @Endpoint(describeByClass = true) + public static ToBool create(Scope scope, Operand input) { + OperationBuilder opBuilder = scope.env().opBuilder("ToBool", scope.makeOpName("ToBool")); + opBuilder.addInput(input.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + return new ToBool(opBuilder.build()); + } + + /** + */ + public Output output() { + return output; + } + + @Override + public Output asOutput() { + return output; + } + + private Output output; + + private ToBool(Operation operation) { + super(operation); + int outputIdx = 0; + output = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesCalculateBestFeatureSplit.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesCalculateBestFeatureSplit.java index 795acc395ec..20de330cd53 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesCalculateBestFeatureSplit.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesCalculateBestFeatureSplit.java @@ -71,7 +71,7 @@ private Options() { * @param l1 l1 regularization factor on leaf weights, per instance based. * @param l2 l2 regularization factor on leaf weights, per instance based. * @param treeComplexity adjustment to the gain, per leaf based. - * @param minNodeWeight mininum avg of hessians in a node before required for the node to be considered for splitting. + * @param minNodeWeight minimum avg of hessians in a node before required for the node to be considered for splitting. * @param logitsDimension The dimension of logit, i.e., number of classes. * @param options carries optional attributes values * @return a new instance of BoostedTreesCalculateBestFeatureSplit diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesCalculateBestFeatureSplitV2.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesCalculateBestFeatureSplitV2.java new file mode 100644 index 00000000000..69fe748a5cd --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesCalculateBestFeatureSplitV2.java @@ -0,0 +1,156 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.estimator; + +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.Operands; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.TFloat32; +import org.tensorflow.types.TInt32; +import org.tensorflow.types.TString; + +/** + * Calculates gains for each feature and returns the best possible split information for each node. However, if no split is found, then no split information is returned for that node. + *

+ * The split information is the best threshold (bucket id), gains and left/right node contributions per node for each feature. + *

+ * It is possible that not all nodes can be split on each feature. Hence, the list of possible nodes can differ between the features. Therefore, we return `node_ids_list` for each feature, containing the list of nodes that this feature can be used to split. + *

+ * In this manner, the output is the best split per features and per node, so that it needs to be combined later to produce the best split for each node (among all possible features). + *

+ * The output shapes are compatible in a way that the first dimension of all tensors are the same and equal to the number of possible split nodes for each feature. + */ +public final class BoostedTreesCalculateBestFeatureSplitV2 extends RawOp { + + /** + * Factory method to create a class wrapping a new BoostedTreesCalculateBestFeatureSplitV2 operation. + * + * @param scope current scope + * @param nodeIdRange A Rank 1 tensor (shape=[2]) to specify the range [first, last) of node ids to process within `stats_summary_list`. The nodes are iterated between the two nodes specified by the tensor, as like `for node_id in range(node_id_range[0], node_id_range[1])` (Note that the last index node_id_range[1] is exclusive). + * @param statsSummariesList A list of Rank 4 tensor (#shape=[max_splits, feature_dims, bucket, stats_dims]) for accumulated stats summary (gradient/hessian) per node, per dimension, per buckets for each feature. + * The first dimension of the tensor is the maximum number of splits, and thus not all elements of it will be used, but only the indexes specified by node_ids will be used. + * @param splitTypes A Rank 1 tensor indicating if this Op should perform inequality split or equality split per feature. + * @param candidateFeatureIds Rank 1 tensor with ids for each feature. This is the real id of the feature. + * @param l1 l1 regularization factor on leaf weights, per instance based. + * @param l2 l2 regularization factor on leaf weights, per instance based. + * @param treeComplexity adjustment to the gain, per leaf based. + * @param minNodeWeight mininum avg of hessians in a node before required for the node to be considered for splitting. + * @param logitsDimension The dimension of logit, i.e., number of classes. + * @return a new instance of BoostedTreesCalculateBestFeatureSplitV2 + */ + @Endpoint(describeByClass = true) + public static BoostedTreesCalculateBestFeatureSplitV2 create(Scope scope, Operand nodeIdRange, Iterable> statsSummariesList, Operand splitTypes, Operand candidateFeatureIds, Operand l1, Operand l2, Operand treeComplexity, Operand minNodeWeight, Long logitsDimension) { + OperationBuilder opBuilder = scope.env().opBuilder("BoostedTreesCalculateBestFeatureSplitV2", scope.makeOpName("BoostedTreesCalculateBestFeatureSplitV2")); + opBuilder.addInput(nodeIdRange.asOutput()); + opBuilder.addInputList(Operands.asOutputs(statsSummariesList)); + opBuilder.addInput(splitTypes.asOutput()); + opBuilder.addInput(candidateFeatureIds.asOutput()); + opBuilder.addInput(l1.asOutput()); + opBuilder.addInput(l2.asOutput()); + opBuilder.addInput(treeComplexity.asOutput()); + opBuilder.addInput(minNodeWeight.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + opBuilder.setAttr("logits_dimension", logitsDimension); + return new BoostedTreesCalculateBestFeatureSplitV2(opBuilder.build()); + } + + /** + * A Rank 1 tensors indicating possible split node ids for each feature. The length of the list is num_features, but each tensor has different size as each feature provides different possible nodes. See above for details like shapes and sizes. + */ + public Output nodeIds() { + return nodeIds; + } + + /** + * A Rank 1 tensor indicating the best gains for each feature to split for certain nodes. See above for details like shapes and sizes. + */ + public Output gains() { + return gains; + } + + /** + * A Rank 1 tensors indicating the best feature id for each node. See above for details like shapes and sizes. + */ + public Output featureIds() { + return featureIds; + } + + /** + * A Rank 1 tensors indicating the best feature dimension for each feature to split for certain nodes if the feature is multi-dimension. See above for details like shapes and sizes. + */ + public Output featureDimensions() { + return featureDimensions; + } + + /** + * A Rank 1 tensors indicating the bucket id to compare with (as a threshold) for split in each node. See above for details like shapes and sizes. + */ + public Output thresholds() { + return thresholds; + } + + /** + * A Rank 2 tensors indicating the contribution of the left nodes when branching from parent nodes (given by the tensor element in the output node_ids_list) to the left direction by the given threshold for each feature. This value will be used to make the left node value by adding to the parent node value. Second dimension size is 1 for 1-dimensional logits, but would be larger for multi-class problems. See above for details like shapes and sizes. + */ + public Output leftNodeContribs() { + return leftNodeContribs; + } + + /** + * A Rank 2 tensors, with the same shape/conditions as left_node_contribs_list, but just that the value is for the right node. + */ + public Output rightNodeContribs() { + return rightNodeContribs; + } + + /** + * A Rank 1 tensors indicating the which direction to go if data is missing. See above for details like shapes and sizes. + * Inequality with default left returns 0, inequality with default right returns 1, equality with default right returns 2. + */ + public Output splitWithDefaultDirections() { + return splitWithDefaultDirections; + } + + private Output nodeIds; + private Output gains; + private Output featureIds; + private Output featureDimensions; + private Output thresholds; + private Output leftNodeContribs; + private Output rightNodeContribs; + private Output splitWithDefaultDirections; + + private BoostedTreesCalculateBestFeatureSplitV2(Operation operation) { + super(operation); + int outputIdx = 0; + nodeIds = operation.output(outputIdx++); + gains = operation.output(outputIdx++); + featureIds = operation.output(outputIdx++); + featureDimensions = operation.output(outputIdx++); + thresholds = operation.output(outputIdx++); + leftNodeContribs = operation.output(outputIdx++); + rightNodeContribs = operation.output(outputIdx++); + splitWithDefaultDirections = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesCalculateBestGainsPerFeature.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesCalculateBestGainsPerFeature.java index 8525c94641f..fdf87628efb 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesCalculateBestGainsPerFeature.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesCalculateBestGainsPerFeature.java @@ -54,7 +54,7 @@ public final class BoostedTreesCalculateBestGainsPerFeature extends RawOp { * @param l1 l1 regularization factor on leaf weights, per instance based. * @param l2 l2 regularization factor on leaf weights, per instance based. * @param treeComplexity adjustment to the gain, per leaf based. - * @param minNodeWeight mininum avg of hessians in a node before required for the node to be considered for splitting. + * @param minNodeWeight minimum avg of hessians in a node before required for the node to be considered for splitting. * @param maxSplits the number of nodes that can be split in the whole tree. Used as a dimension of output tensors. * @return a new instance of BoostedTreesCalculateBestGainsPerFeature */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesExampleDebugOutputs.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesExampleDebugOutputs.java index 0abe526d221..4902a23c9eb 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesExampleDebugOutputs.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesExampleDebugOutputs.java @@ -32,7 +32,7 @@ /** * Debugging/model interpretability outputs for each example. *

- * It traverses all the trees and computes debug metrics for individual examples, + * It traverses all the trees and computes debug metrics for individual examples, * such as getting split feature ids and logits after each split along the decision * path used to compute directional feature contributions. */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesFlushQuantileSummaries.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesFlushQuantileSummaries.java index 83191ca1a6a..d520766a041 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesFlushQuantileSummaries.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesFlushQuantileSummaries.java @@ -34,7 +34,7 @@ * Flush the quantile summaries from each quantile stream resource. *

* An op that outputs a list of quantile summaries of a quantile stream resource. - * Each summary Tensor is rank 2, containing summaries (value, weight, min_rank, + * Each summary Tensor is rank 2, containing summaries (value, weight, min_rank, * max_rank) for a single feature. */ public final class BoostedTreesFlushQuantileSummaries extends RawOp implements Iterable> { diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesSparseCalculateBestFeatureSplit.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesSparseCalculateBestFeatureSplit.java index 4fd95330a53..48afc375b67 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesSparseCalculateBestFeatureSplit.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesSparseCalculateBestFeatureSplit.java @@ -73,7 +73,7 @@ private Options() { * @param l1 l1 regularization factor on leaf weights, per instance based. * @param l2 l2 regularization factor on leaf weights, per instance based. * @param treeComplexity adjustment to the gain, per leaf based. - * @param minNodeWeight mininum avg of hessians in a node before required for the node to be considered for splitting. + * @param minNodeWeight minimum avg of hessians in a node before required for the node to be considered for splitting. * @param logitsDimension The dimension of logit, i.e., number of classes. * @param options carries optional attributes values * @return a new instance of BoostedTreesSparseCalculateBestFeatureSplit diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesUpdateEnsembleV2.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesUpdateEnsembleV2.java index e1d6bb59e1b..0e7c81ed3a1 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesUpdateEnsembleV2.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesUpdateEnsembleV2.java @@ -83,10 +83,10 @@ private Options() { * @return a new instance of BoostedTreesUpdateEnsembleV2 */ @Endpoint(describeByClass = true) - public static BoostedTreesUpdateEnsembleV2 create(Scope scope, Operand treeEnsembleHandle, Operand featureIds, Iterable> dimensionIds, Iterable> nodeIds, Iterable> gains, Iterable> thresholds, Iterable> leftNodeContribs, Iterable> rightNodeContribs, Iterable> splitTypes, Operand maxDepth, Operand learningRate, Operand pruningMode, Options... options) { + public static BoostedTreesUpdateEnsembleV2 create(Scope scope, Operand treeEnsembleHandle, Iterable> featureIds, Iterable> dimensionIds, Iterable> nodeIds, Iterable> gains, Iterable> thresholds, Iterable> leftNodeContribs, Iterable> rightNodeContribs, Iterable> splitTypes, Operand maxDepth, Operand learningRate, Operand pruningMode, Options... options) { OperationBuilder opBuilder = scope.env().opBuilder("BoostedTreesUpdateEnsembleV2", scope.makeOpName("BoostedTreesUpdateEnsembleV2")); opBuilder.addInput(treeEnsembleHandle.asOutput()); - opBuilder.addInput(featureIds.asOutput()); + opBuilder.addInputList(Operands.asOutputs(featureIds)); opBuilder.addInputList(Operands.asOutputs(dimensionIds)); opBuilder.addInputList(Operands.asOutputs(nodeIds)); opBuilder.addInputList(Operands.asOutputs(gains)); diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/IsBoostedTreesEnsembleInitialized.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/IsBoostedTreesEnsembleInitialized.java index 7a42dc4434f..f7f78393822 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/IsBoostedTreesEnsembleInitialized.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/IsBoostedTreesEnsembleInitialized.java @@ -36,7 +36,7 @@ public final class IsBoostedTreesEnsembleInitialized extends RawOp implements Op * Factory method to create a class wrapping a new IsBoostedTreesEnsembleInitialized operation. * * @param scope current scope - * @param treeEnsembleHandle Handle to the tree ensemble resouce. + * @param treeEnsembleHandle Handle to the tree ensemble resource. * @return a new instance of IsBoostedTreesEnsembleInitialized */ @Endpoint(describeByClass = true) diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/CombinedNonMaxSuppression.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/CombinedNonMaxSuppression.java index 6b8ef483c90..1f1926163fc 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/CombinedNonMaxSuppression.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/CombinedNonMaxSuppression.java @@ -86,12 +86,12 @@ private Options() { * Factory method to create a class wrapping a new CombinedNonMaxSuppression operation. * * @param scope current scope - * @param boxes A 4-D float tensor of shape `[batch_size, num_boxes, q, 4]`. If `q` is 1 then - * same boxes are used for all classes otherwise, if `q` is equal to number of + * @param boxes A 4-D float tensor of shape `[batch_size, num_boxes, q, 4]`. If `q` is 1 then + * same boxes are used for all classes otherwise, if `q` is equal to number of * classes, class-specific boxes are used. * @param scores A 3-D float tensor of shape `[batch_size, num_boxes, num_classes]` * representing a single score corresponding to each box (each row of boxes). - * @param maxOutputSizePerClass A scalar integer tensor representing the maximum number of + * @param maxOutputSizePerClass A scalar integer tensor representing the maximum number of * boxes to be selected by non max suppression per class * @param maxTotalSize A scalar representing maximum number of boxes retained over all classes. * @param iouThreshold A 0-D float tensor representing the threshold for deciding whether @@ -145,7 +145,7 @@ public static Options clipBoxes(Boolean clipBoxes) { } /** - * A [batch_size, max_detections, 4] float32 tensor + * A [batch_size, max_detections, 4] float32 tensor * containing the non-max suppressed boxes. */ public Output nmsedBoxes() { @@ -153,7 +153,7 @@ public Output nmsedBoxes() { } /** - * A [batch_size, max_detections] float32 tensor + * A [batch_size, max_detections] float32 tensor * containing the scores for the boxes. */ public Output nmsedScores() { @@ -161,7 +161,7 @@ public Output nmsedScores() { } /** - * A [batch_size, max_detections] float32 tensor + * A [batch_size, max_detections] float32 tensor * containing the classes for the boxes. */ public Output nmsedClasses() { diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/ExtractImagePatches.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/ExtractImagePatches.java index 0ea0b7b5049..59b3af03fbb 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/ExtractImagePatches.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/ExtractImagePatches.java @@ -26,7 +26,6 @@ import org.tensorflow.op.Scope; import org.tensorflow.op.annotation.Endpoint; import org.tensorflow.op.annotation.Operator; -import org.tensorflow.types.family.TNumber; import org.tensorflow.types.family.TType; /** @@ -35,7 +34,7 @@ * @param data type for {@code patches()} output */ @Operator(group = "image") -public final class ExtractImagePatches extends RawOp implements Operand { +public final class ExtractImagePatches extends RawOp implements Operand { /** * Factory method to create a class wrapping a new ExtractImagePatches operation. @@ -55,7 +54,7 @@ public final class ExtractImagePatches extends RawOp implemen * @return a new instance of ExtractImagePatches */ @Endpoint(describeByClass = true) - public static ExtractImagePatches create(Scope scope, Operand images, List ksizes, List strides, List rates, String padding) { + public static ExtractImagePatches create(Scope scope, Operand images, List ksizes, List strides, List rates, String padding) { OperationBuilder opBuilder = scope.env().opBuilder("ExtractImagePatches", scope.makeOpName("ExtractImagePatches")); opBuilder.addInput(images.asOutput()); opBuilder = scope.applyControlDependencies(opBuilder); diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/ImageProjectiveTransformV2.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/ImageProjectiveTransformV2.java new file mode 100644 index 00000000000..478d41f7943 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/ImageProjectiveTransformV2.java @@ -0,0 +1,123 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.image; + +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.TFloat32; +import org.tensorflow.types.TInt32; +import org.tensorflow.types.family.TNumber; +import org.tensorflow.types.family.TType; + +/** + * Applies the given transform to each of the images. + *

+ * If one row of `transforms` is `[a0, a1, a2, b0, b1, b2, c0, c1]`, then it maps + * the output point `(x, y)` to a transformed input point + * `(x', y') = ((a0 x + a1 y + a2) / k, (b0 x + b1 y + b2) / k)`, where + * `k = c0 x + c1 y + 1`. If the transformed point lays outside of the input + * image, the output pixel is set to 0. + * + * @param data type for {@code transformedImages()} output + */ +public final class ImageProjectiveTransformV2 extends RawOp implements Operand { + + /** + * Optional attributes for {@link org.tensorflow.op.image.ImageProjectiveTransformV2} + */ + public static class Options { + + /** + * @param fillMode Fill mode, "REFLECT", "WRAP", or "CONSTANT". + */ + public Options fillMode(String fillMode) { + this.fillMode = fillMode; + return this; + } + + private String fillMode; + + private Options() { + } + } + + /** + * Factory method to create a class wrapping a new ImageProjectiveTransformV2 operation. + * + * @param scope current scope + * @param images 4-D with shape `[batch, height, width, channels]`. + * @param transforms 2-D Tensor, `[batch, 8]` or `[1, 8]` matrix, where each row corresponds to a 3 x 3 + * projective transformation matrix, with the last entry assumed to be 1. If there + * is one row, the same transformation will be applied to all images. + * @param outputShape 1-D Tensor [new_height, new_width]. + * @param interpolation Interpolation method, "NEAREST" or "BILINEAR". + * @param options carries optional attributes values + * @return a new instance of ImageProjectiveTransformV2 + */ + @Endpoint(describeByClass = true) + public static ImageProjectiveTransformV2 create(Scope scope, Operand images, Operand transforms, Operand outputShape, String interpolation, Options... options) { + OperationBuilder opBuilder = scope.env().opBuilder("ImageProjectiveTransformV2", scope.makeOpName("ImageProjectiveTransformV2")); + opBuilder.addInput(images.asOutput()); + opBuilder.addInput(transforms.asOutput()); + opBuilder.addInput(outputShape.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + opBuilder.setAttr("interpolation", interpolation); + if (options != null) { + for (Options opts : options) { + if (opts.fillMode != null) { + opBuilder.setAttr("fill_mode", opts.fillMode); + } + } + } + return new ImageProjectiveTransformV2(opBuilder.build()); + } + + /** + * @param fillMode Fill mode, "REFLECT", "WRAP", or "CONSTANT". + */ + public static Options fillMode(String fillMode) { + return new Options().fillMode(fillMode); + } + + /** + * 4-D with shape + * `[batch, new_height, new_width, channels]`. + */ + public Output transformedImages() { + return transformedImages; + } + + @Override + public Output asOutput() { + return transformedImages; + } + + private Output transformedImages; + + private ImageProjectiveTransformV2(Operation operation) { + super(operation); + int outputIdx = 0; + transformedImages = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/RgbToHsv.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/RgbToHsv.java index 55f5a3c5045..a0fdcc30ff8 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/RgbToHsv.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/RgbToHsv.java @@ -38,6 +38,18 @@ * `output[..., 0]` contains hue, `output[..., 1]` contains saturation, and * `output[..., 2]` contains value. All HSV values are in `[0,1]`. A hue of 0 * corresponds to pure red, hue 1/3 is pure green, and 2/3 is pure blue. + *

+ * Usage Example: + *

+ * >>> blue_image = tf.stack([ + * ... tf.zeros([5,5]), + * ... tf.zeros([5,5]), + * ... tf.ones([5,5])], + * ... axis=-1) + * >>> blue_hsv_image = tf.image.rgb_to_hsv(blue_image) + * >>> blue_hsv_image[0,0].numpy() + * array([0.6666667, 1. , 1. ], dtype=float32) + * * * @param data type for {@code output()} output */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/Einsum.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/Einsum.java index 2fcb505b7bf..7471e13882c 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/Einsum.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/Einsum.java @@ -73,7 +73,7 @@ * Considering the batch matrix multiplication equation again * (`bij,bjk->bik`), the contracted axis label is `j`. *

- * (e) Expand Diagonal: If the output subcripts contain repeated (explicit) axis + * (e) Expand Diagonal: If the output subscripts contain repeated (explicit) axis * labels, the opposite operation of (a) is applied. For example, in the * equation `i->iii`, and input shape `[3]`, the output of shape `[3, 3, 3]` * are all zeros, except for the (generalized) diagonal which is populated @@ -81,7 +81,7 @@ * Note: This operation is not supported by `np.einsum` or `tf.einsum`; it is * provided to enable computing the symbolic gradient of `tf.einsum`. *

- * The output subcripts must contain only labels appearing in at least one of the + * The output subscripts must contain only labels appearing in at least one of the * input subscripts. Furthermore, all dimensions mapping to the same axis label * must be equal. *

@@ -93,7 +93,7 @@ *

* The broadcasted dimensions are placed in the corresponding location of the * ellipsis in the output subscript. If the broadcasted dimensions are non-empty - * and the output subcripts do not contain ellipsis, then an InvalidArgument error + * and the output subscripts do not contain ellipsis, then an InvalidArgument error * is raised. *

* @compatibility(numpy) diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/MatrixDiagPartV3.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/MatrixDiagPartV3.java new file mode 100644 index 00000000000..d4c9adcf553 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/MatrixDiagPartV3.java @@ -0,0 +1,225 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.linalg; + +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.TInt32; +import org.tensorflow.types.family.TType; + +/** + * Returns the batched diagonal part of a batched tensor. + *

+ * Returns a tensor with the `k[0]`-th to `k[1]`-th diagonals of the batched + * `input`. + *

+ * Assume `input` has `r` dimensions `[I, J, ..., L, M, N]`. + * Let `max_diag_len` be the maximum length among all diagonals to be extracted, + * `max_diag_len = min(M + min(k[1], 0), N + min(-k[0], 0))` + * Let `num_diags` be the number of diagonals to extract, + * `num_diags = k[1] - k[0] + 1`. + *

+ * If `num_diags == 1`, the output tensor is of rank `r - 1` with shape + * `[I, J, ..., L, max_diag_len]` and values: + *

{@code
+ * diagonal[i, j, ..., l, n]
+ *   = input[i, j, ..., l, n+y, n+x] ; if 0 <= n+y < M and 0 <= n+x < N,
+ *     padding_value                 ; otherwise.
+ * }
+ * where `y = max(-k[1], 0)`, `x = max(k[1], 0)`. + *

+ * Otherwise, the output tensor has rank `r` with dimensions + * `[I, J, ..., L, num_diags, max_diag_len]` with values: + *

{@code
+ * diagonal[i, j, ..., l, m, n]
+ *   = input[i, j, ..., l, n+y, n+x] ; if 0 <= n+y < M and 0 <= n+x < N,
+ *     padding_value                 ; otherwise.
+ * }
+ * where `d = k[1] - m`, `y = max(-d, 0) - offset`, and `x = max(d, 0) - offset`. + *

+ * `offset` is zero except when the alignment of the diagonal is to the right. + *

{@code
+ * offset = max_diag_len - diag_len(d) ; if (`align` in {RIGHT_LEFT, RIGHT_RIGHT}
+ *                                            and `d >= 0`) or
+ *                                          (`align` in {LEFT_RIGHT, RIGHT_RIGHT}
+ *                                            and `d <= 0`)
+ *          0                          ; otherwise
+ * }
+ * where `diag_len(d) = min(cols - max(d, 0), rows + min(d, 0))`. + *

+ * The input must be at least a matrix. + *

+ * For example: + *

{@code
+ * input = np.array([[[1, 2, 3, 4],  # Input shape: (2, 3, 4)
+ *                    [5, 6, 7, 8],
+ *                    [9, 8, 7, 6]],
+ *                   [[5, 4, 3, 2],
+ *                    [1, 2, 3, 4],
+ *                    [5, 6, 7, 8]]])
+ * 
+ * # A main diagonal from each batch.
+ * tf.matrix_diag_part(input) ==> [[1, 6, 7],  # Output shape: (2, 3)
+ *                                 [5, 2, 7]]
+ * 
+ * # A superdiagonal from each batch.
+ * tf.matrix_diag_part(input, k = 1)
+ *   ==> [[2, 7, 6],  # Output shape: (2, 3)
+ *        [4, 3, 8]]
+ * 
+ * # A band from each batch.
+ * tf.matrix_diag_part(input, k = (-1, 2))
+ *   ==> [[[0, 3, 8],  # Output shape: (2, 4, 3)
+ *         [2, 7, 6],
+ *         [1, 6, 7],
+ *         [5, 8, 0]],
+ *        [[0, 3, 4],
+ *         [4, 3, 8],
+ *         [5, 2, 7],
+ *         [1, 6, 0]]]
+ * 
+ * # LEFT_RIGHT alignment.
+ * tf.matrix_diag_part(input, k = (-1, 2), align="LEFT_RIGHT")
+ *   ==> [[[3, 8, 0],  # Output shape: (2, 4, 3)
+ *         [2, 7, 6],
+ *         [1, 6, 7],
+ *         [0, 5, 8]],
+ *        [[3, 4, 0],
+ *         [4, 3, 8],
+ *         [5, 2, 7],
+ *         [0, 1, 6]]]
+ * 
+ * # max_diag_len can be shorter than the main diagonal.
+ * tf.matrix_diag_part(input, k = (-2, -1))
+ *   ==> [[[5, 8],
+ *         [9, 0]],
+ *        [[1, 6],
+ *         [5, 0]]]
+ * 
+ * # padding_value = 9
+ * tf.matrix_diag_part(input, k = (1, 3), padding_value = 9)
+ *   ==> [[[9, 9, 4],  # Output shape: (2, 3, 3)
+ *         [9, 3, 8],
+ *         [2, 7, 6]],
+ *        [[9, 9, 2],
+ *         [9, 3, 4],
+ *         [4, 3, 8]]]
+ * 
+ * }
+ * + * + * @param data type for {@code diagonal()} output + */ +@Operator(group = "linalg") +public final class MatrixDiagPartV3 extends RawOp implements Operand { + + /** + * Optional attributes for {@link org.tensorflow.op.linalg.MatrixDiagPartV3} + */ + public static class Options { + + /** + * @param align Some diagonals are shorter than `max_diag_len` and need to be padded. `align` is + * a string specifying how superdiagonals and subdiagonals should be aligned, + * respectively. There are four possible alignments: "RIGHT_LEFT" (default), + * "LEFT_RIGHT", "LEFT_LEFT", and "RIGHT_RIGHT". "RIGHT_LEFT" aligns superdiagonals + * to the right (left-pads the row) and subdiagonals to the left (right-pads the + * row). It is the packing format LAPACK uses. cuSPARSE uses "LEFT_RIGHT", which is + * the opposite alignment. + */ + public Options align(String align) { + this.align = align; + return this; + } + + private String align; + + private Options() { + } + } + + /** + * Factory method to create a class wrapping a new MatrixDiagPartV3 operation. + * + * @param scope current scope + * @param input Rank `r` tensor where `r >= 2`. + * @param k Diagonal offset(s). Positive value means superdiagonal, 0 refers to the main + * diagonal, and negative value means subdiagonals. `k` can be a single integer + * (for a single diagonal) or a pair of integers specifying the low and high ends + * of a matrix band. `k[0]` must not be larger than `k[1]`. + * @param paddingValue The value to fill the area outside the specified diagonal band with. + * Default is 0. + * @param options carries optional attributes values + * @return a new instance of MatrixDiagPartV3 + */ + @Endpoint(describeByClass = true) + public static MatrixDiagPartV3 create(Scope scope, Operand input, Operand k, Operand paddingValue, Options... options) { + OperationBuilder opBuilder = scope.env().opBuilder("MatrixDiagPartV3", scope.makeOpName("MatrixDiagPartV3")); + opBuilder.addInput(input.asOutput()); + opBuilder.addInput(k.asOutput()); + opBuilder.addInput(paddingValue.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + if (options != null) { + for (Options opts : options) { + if (opts.align != null) { + opBuilder.setAttr("align", opts.align); + } + } + } + return new MatrixDiagPartV3(opBuilder.build()); + } + + /** + * @param align Some diagonals are shorter than `max_diag_len` and need to be padded. `align` is + * a string specifying how superdiagonals and subdiagonals should be aligned, + * respectively. There are four possible alignments: "RIGHT_LEFT" (default), + * "LEFT_RIGHT", "LEFT_LEFT", and "RIGHT_RIGHT". "RIGHT_LEFT" aligns superdiagonals + * to the right (left-pads the row) and subdiagonals to the left (right-pads the + * row). It is the packing format LAPACK uses. cuSPARSE uses "LEFT_RIGHT", which is + * the opposite alignment. + */ + public static Options align(String align) { + return new Options().align(align); + } + + /** + * The extracted diagonal(s). + */ + public Output diagonal() { + return diagonal; + } + + @Override + public Output asOutput() { + return diagonal; + } + + private Output diagonal; + + private MatrixDiagPartV3(Operation operation) { + super(operation); + int outputIdx = 0; + diagonal = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/MatrixDiagV3.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/MatrixDiagV3.java new file mode 100644 index 00000000000..ef16e3195da --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/MatrixDiagV3.java @@ -0,0 +1,249 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.linalg; + +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.TInt32; +import org.tensorflow.types.family.TType; + +/** + * Returns a batched diagonal tensor with given batched diagonal values. + *

+ * Returns a tensor with the contents in `diagonal` as `k[0]`-th to `k[1]`-th + * diagonals of a matrix, with everything else padded with `padding`. `num_rows` + * and `num_cols` specify the dimension of the innermost matrix of the output. If + * both are not specified, the op assumes the innermost matrix is square and infers + * its size from `k` and the innermost dimension of `diagonal`. If only one of them + * is specified, the op assumes the unspecified value is the smallest possible + * based on other criteria. + *

+ * Let `diagonal` have `r` dimensions `[I, J, ..., L, M, N]`. The output tensor has + * rank `r+1` with shape `[I, J, ..., L, M, num_rows, num_cols]` when only one + * diagonal is given (`k` is an integer or `k[0] == k[1]`). Otherwise, it has rank + * `r` with shape `[I, J, ..., L, num_rows, num_cols]`. + *

+ * The second innermost dimension of `diagonal` has double meaning. + * When `k` is scalar or `k[0] == k[1]`, `M` is part of the batch size + * [I, J, ..., M], and the output tensor is: + *

{@code
+ * output[i, j, ..., l, m, n]
+ *   = diagonal[i, j, ..., l, n-max(d_upper, 0)] ; if n - m == d_upper
+ *     padding_value                             ; otherwise
+ * }
+ * Otherwise, `M` is treated as the number of diagonals for the matrix in the + * same batch (`M = k[1]-k[0]+1`), and the output tensor is: + *
{@code
+ * output[i, j, ..., l, m, n]
+ *   = diagonal[i, j, ..., l, diag_index, index_in_diag] ; if k[0] <= d <= k[1]
+ *     padding_value                                     ; otherwise
+ * }
+ * where `d = n - m`, `diag_index = [k] - d`, and + * `index_in_diag = n - max(d, 0) + offset`. + *

+ * `offset` is zero except when the alignment of the diagonal is to the right. + *

{@code
+ * offset = max_diag_len - diag_len(d) ; if (`align` in {RIGHT_LEFT, RIGHT_RIGHT}
+ *                                            and `d >= 0`) or
+ *                                          (`align` in {LEFT_RIGHT, RIGHT_RIGHT}
+ *                                            and `d <= 0`)
+ *          0                          ; otherwise
+ * }
+ * where `diag_len(d) = min(cols - max(d, 0), rows + min(d, 0))`. + *

+ * For example: + *

{@code
+ * # The main diagonal.
+ * diagonal = np.array([[1, 2, 3, 4],            # Input shape: (2, 4)
+ *                      [5, 6, 7, 8]])
+ * tf.matrix_diag(diagonal) ==> [[[1, 0, 0, 0],  # Output shape: (2, 4, 4)
+ *                                [0, 2, 0, 0],
+ *                                [0, 0, 3, 0],
+ *                                [0, 0, 0, 4]],
+ *                               [[5, 0, 0, 0],
+ *                                [0, 6, 0, 0],
+ *                                [0, 0, 7, 0],
+ *                                [0, 0, 0, 8]]]
+ * 
+ * # A superdiagonal (per batch).
+ * diagonal = np.array([[1, 2, 3],  # Input shape: (2, 3)
+ *                      [4, 5, 6]])
+ * tf.matrix_diag(diagonal, k = 1)
+ *   ==> [[[0, 1, 0, 0],  # Output shape: (2, 4, 4)
+ *         [0, 0, 2, 0],
+ *         [0, 0, 0, 3],
+ *         [0, 0, 0, 0]],
+ *        [[0, 4, 0, 0],
+ *         [0, 0, 5, 0],
+ *         [0, 0, 0, 6],
+ *         [0, 0, 0, 0]]]
+ * 
+ * # A tridiagonal band (per batch).
+ * diagonals = np.array([[[0, 8, 9],  # Input shape: (2, 2, 3)
+ *                        [1, 2, 3],
+ *                        [4, 5, 0]],
+ *                       [[0, 2, 3],
+ *                        [6, 7, 9],
+ *                        [9, 1, 0]]])
+ * tf.matrix_diag(diagonals, k = (-1, 1))
+ *   ==> [[[1, 8, 0],  # Output shape: (2, 3, 3)
+ *         [4, 2, 9],
+ *         [0, 5, 3]],
+ *        [[6, 2, 0],
+ *         [9, 7, 3],
+ *         [0, 1, 9]]]
+ * 
+ * # LEFT_RIGHT alignment.
+ * diagonals = np.array([[[8, 9, 0],  # Input shape: (2, 2, 3)
+ *                        [1, 2, 3],
+ *                        [0, 4, 5]],
+ *                       [[2, 3, 0],
+ *                        [6, 7, 9],
+ *                        [0, 9, 1]]])
+ * tf.matrix_diag(diagonals, k = (-1, 1), align="LEFT_RIGHT")
+ *   ==> [[[1, 8, 0],  # Output shape: (2, 3, 3)
+ *         [4, 2, 9],
+ *         [0, 5, 3]],
+ *        [[6, 2, 0],
+ *         [9, 7, 3],
+ *         [0, 1, 9]]]
+ * 
+ * # Rectangular matrix.
+ * diagonal = np.array([1, 2])  # Input shape: (2)
+ * tf.matrix_diag(diagonal, k = -1, num_rows = 3, num_cols = 4)
+ *   ==> [[0, 0, 0, 0],  # Output shape: (3, 4)
+ *        [1, 0, 0, 0],
+ *        [0, 2, 0, 0]]
+ * 
+ * # Rectangular matrix with inferred num_cols and padding_value = 9.
+ * tf.matrix_diag(diagonal, k = -1, num_rows = 3, padding_value = 9)
+ *   ==> [[9, 9],  # Output shape: (3, 2)
+ *        [1, 9],
+ *        [9, 2]]
+ * 
+ * }
+ * + * + * @param data type for {@code output()} output + */ +@Operator(group = "linalg") +public final class MatrixDiagV3 extends RawOp implements Operand { + + /** + * Optional attributes for {@link org.tensorflow.op.linalg.MatrixDiagV3} + */ + public static class Options { + + /** + * @param align Some diagonals are shorter than `max_diag_len` and need to be padded. `align` is + * a string specifying how superdiagonals and subdiagonals should be aligned, + * respectively. There are four possible alignments: "RIGHT_LEFT" (default), + * "LEFT_RIGHT", "LEFT_LEFT", and "RIGHT_RIGHT". "RIGHT_LEFT" aligns superdiagonals + * to the right (left-pads the row) and subdiagonals to the left (right-pads the + * row). It is the packing format LAPACK uses. cuSPARSE uses "LEFT_RIGHT", which is + * the opposite alignment. + */ + public Options align(String align) { + this.align = align; + return this; + } + + private String align; + + private Options() { + } + } + + /** + * Factory method to create a class wrapping a new MatrixDiagV3 operation. + * + * @param scope current scope + * @param diagonal Rank `r`, where `r >= 1` + * @param k Diagonal offset(s). Positive value means superdiagonal, 0 refers to the main + * diagonal, and negative value means subdiagonals. `k` can be a single integer + * (for a single diagonal) or a pair of integers specifying the low and high ends + * of a matrix band. `k[0]` must not be larger than `k[1]`. + * @param numRows The number of rows of the output matrix. If it is not provided, the op assumes + * the output matrix is a square matrix and infers the matrix size from k and the + * innermost dimension of `diagonal`. + * @param numCols The number of columns of the output matrix. If it is not provided, the op + * assumes the output matrix is a square matrix and infers the matrix size from + * k and the innermost dimension of `diagonal`. + * @param paddingValue The number to fill the area outside the specified diagonal band with. + * Default is 0. + * @param options carries optional attributes values + * @return a new instance of MatrixDiagV3 + */ + @Endpoint(describeByClass = true) + public static MatrixDiagV3 create(Scope scope, Operand diagonal, Operand k, Operand numRows, Operand numCols, Operand paddingValue, Options... options) { + OperationBuilder opBuilder = scope.env().opBuilder("MatrixDiagV3", scope.makeOpName("MatrixDiagV3")); + opBuilder.addInput(diagonal.asOutput()); + opBuilder.addInput(k.asOutput()); + opBuilder.addInput(numRows.asOutput()); + opBuilder.addInput(numCols.asOutput()); + opBuilder.addInput(paddingValue.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + if (options != null) { + for (Options opts : options) { + if (opts.align != null) { + opBuilder.setAttr("align", opts.align); + } + } + } + return new MatrixDiagV3(opBuilder.build()); + } + + /** + * @param align Some diagonals are shorter than `max_diag_len` and need to be padded. `align` is + * a string specifying how superdiagonals and subdiagonals should be aligned, + * respectively. There are four possible alignments: "RIGHT_LEFT" (default), + * "LEFT_RIGHT", "LEFT_LEFT", and "RIGHT_RIGHT". "RIGHT_LEFT" aligns superdiagonals + * to the right (left-pads the row) and subdiagonals to the left (right-pads the + * row). It is the packing format LAPACK uses. cuSPARSE uses "LEFT_RIGHT", which is + * the opposite alignment. + */ + public static Options align(String align) { + return new Options().align(align); + } + + /** + * Has rank `r+1` when `k` is an integer or `k[0] == k[1]`, rank `r` otherwise. + */ + public Output output() { + return output; + } + + @Override + public Output asOutput() { + return output; + } + + private Output output; + + private MatrixDiagV3(Operation operation) { + super(operation); + int outputIdx = 0; + output = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/MatrixSetDiag.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/MatrixSetDiag.java index e96e8dc678c..fe7c7b42d35 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/MatrixSetDiag.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/MatrixSetDiag.java @@ -55,7 +55,18 @@ * = diagonal[i, j, ..., l, diag_index, index_in_diag] ; if k[0] <= d <= k[1] * input[i, j, ..., l, m, n] ; otherwise * } - * where `d = n - m`, `diag_index = k[1] - d`, and `index_in_diag = n - max(d, 0)`. + * where `d = n - m`, `diag_index = k[1] - d`, and + * `index_in_diag = n - max(d, 0) + offset`. + *

+ * `offset` is zero except when the alignment of the diagonal is to the right. + *

{@code
+ * offset = max_diag_len - diag_len(d) ; if (`align` in {RIGHT_LEFT, RIGHT_RIGHT}
+ *                                            and `d >= 0`) or
+ *                                          (`align` in {LEFT_RIGHT, RIGHT_RIGHT}
+ *                                            and `d <= 0`)
+ *          0                          ; otherwise
+ * }
+ * where `diag_len(d) = min(cols - max(d, 0), rows + min(d, 0))`. *

* For example: *

{@code
@@ -68,15 +79,16 @@
  *                    [7, 7, 7, 7]]])
  * diagonal = np.array([[1, 2, 3],               # Diagonal shape: (2, 3)
  *                      [4, 5, 6]])
- * tf.matrix_set_diag(diagonal) ==> [[[1, 7, 7, 7],  # Output shape: (2, 3, 4)
- *                                    [7, 2, 7, 7],
- *                                    [7, 7, 3, 7]],
- *                                   [[4, 7, 7, 7],
- *                                    [7, 5, 7, 7],
- *                                    [7, 7, 6, 7]]]
+ * tf.matrix_set_diag(input, diagonal)
+ *   ==> [[[1, 7, 7, 7],  # Output shape: (2, 3, 4)
+ *         [7, 2, 7, 7],
+ *         [7, 7, 3, 7]],
+ *        [[4, 7, 7, 7],
+ *         [7, 5, 7, 7],
+ *         [7, 7, 6, 7]]]
  * 
  * # A superdiagonal (per batch).
- * tf.matrix_set_diag(diagonal, k = 1)
+ * tf.matrix_set_diag(input, diagonal, k = 1)
  *   ==> [[[7, 1, 7, 7],  # Output shape: (2, 3, 4)
  *         [7, 7, 2, 7],
  *         [7, 7, 7, 3]],
@@ -85,17 +97,38 @@
  *         [7, 7, 7, 6]]]
  * 
  * # A band of diagonals.
- * diagonals = np.array([[[1, 2, 3],  # Diagonal shape: (2, 2, 3)
+ * diagonals = np.array([[[0, 9, 1],  # Diagonal shape: (2, 4, 3)
+ *                        [6, 5, 8],
+ *                        [1, 2, 3],
  *                        [4, 5, 0]],
- *                       [[6, 1, 2],
+ *                       [[0, 1, 2],
+ *                        [5, 6, 4],
+ *                        [6, 1, 2],
  *                        [3, 4, 0]]])
- * tf.matrix_set_diag(diagonals, k = (-1, 0))
- *   ==> [[[1, 7, 7, 7],  # Output shape: (2, 3, 4)
- *         [4, 2, 7, 7],
- *         [0, 5, 3, 7]],
- *        [[6, 7, 7, 7],
- *         [3, 1, 7, 7],
- *         [7, 4, 2, 7]]]
+ * tf.matrix_set_diag(input, diagonals, k = (-1, 2))
+ *   ==> [[[1, 6, 9, 7],  # Output shape: (2, 3, 4)
+ *         [4, 2, 5, 1],
+ *         [7, 5, 3, 8]],
+ *        [[6, 5, 1, 7],
+ *         [3, 1, 6, 2],
+ *         [7, 4, 2, 4]]]
+ * 
+ * # LEFT_RIGHT alignment.
+ * diagonals = np.array([[[9, 1, 0],  # Diagonal shape: (2, 4, 3)
+ *                        [6, 5, 8],
+ *                        [1, 2, 3],
+ *                        [0, 4, 5]],
+ *                       [[1, 2, 0],
+ *                        [5, 6, 4],
+ *                        [6, 1, 2],
+ *                        [0, 3, 4]]])
+ * tf.matrix_set_diag(input, diagonals, k = (-1, 2), align="LEFT_RIGHT")
+ *   ==> [[[1, 6, 9, 7],  # Output shape: (2, 3, 4)
+ *         [4, 2, 5, 1],
+ *         [7, 5, 3, 8]],
+ *        [[6, 5, 1, 7],
+ *         [3, 1, 6, 2],
+ *         [7, 4, 2, 4]]]
  * 
  * }
* @@ -105,6 +138,31 @@ @Operator(group = "linalg") public final class MatrixSetDiag extends RawOp implements Operand { + /** + * Optional attributes for {@link org.tensorflow.op.linalg.MatrixSetDiag} + */ + public static class Options { + + /** + * @param align Some diagonals are shorter than `max_diag_len` and need to be padded. `align` is + * a string specifying how superdiagonals and subdiagonals should be aligned, + * respectively. There are four possible alignments: "RIGHT_LEFT" (default), + * "LEFT_RIGHT", "LEFT_LEFT", and "RIGHT_RIGHT". "RIGHT_LEFT" aligns superdiagonals + * to the right (left-pads the row) and subdiagonals to the left (right-pads the + * row). It is the packing format LAPACK uses. cuSPARSE uses "LEFT_RIGHT", which is + * the opposite alignment. + */ + public Options align(String align) { + this.align = align; + return this; + } + + private String align; + + private Options() { + } + } + /** * Factory method to create a class wrapping a new MatrixSetDiag operation. * @@ -116,18 +174,39 @@ public final class MatrixSetDiag extends RawOp implements Opera * diagonal, and negative value means subdiagonals. `k` can be a single integer * (for a single diagonal) or a pair of integers specifying the low and high ends * of a matrix band. `k[0]` must not be larger than `k[1]`. + * @param options carries optional attributes values * @return a new instance of MatrixSetDiag */ @Endpoint(describeByClass = true) - public static MatrixSetDiag create(Scope scope, Operand input, Operand diagonal, Operand k) { - OperationBuilder opBuilder = scope.env().opBuilder("MatrixSetDiagV2", scope.makeOpName("MatrixSetDiag")); + public static MatrixSetDiag create(Scope scope, Operand input, Operand diagonal, Operand k, Options... options) { + OperationBuilder opBuilder = scope.env().opBuilder("MatrixSetDiagV3", scope.makeOpName("MatrixSetDiag")); opBuilder.addInput(input.asOutput()); opBuilder.addInput(diagonal.asOutput()); opBuilder.addInput(k.asOutput()); opBuilder = scope.applyControlDependencies(opBuilder); + if (options != null) { + for (Options opts : options) { + if (opts.align != null) { + opBuilder.setAttr("align", opts.align); + } + } + } return new MatrixSetDiag(opBuilder.build()); } + /** + * @param align Some diagonals are shorter than `max_diag_len` and need to be padded. `align` is + * a string specifying how superdiagonals and subdiagonals should be aligned, + * respectively. There are four possible alignments: "RIGHT_LEFT" (default), + * "LEFT_RIGHT", "LEFT_LEFT", and "RIGHT_RIGHT". "RIGHT_LEFT" aligns superdiagonals + * to the right (left-pads the row) and subdiagonals to the left (right-pads the + * row). It is the packing format LAPACK uses. cuSPARSE uses "LEFT_RIGHT", which is + * the opposite alignment. + */ + public static Options align(String align) { + return new Options().align(align); + } + /** * Rank `r+1`, with `output.shape = input.shape`. */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/MatrixSolveLs.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/MatrixSolveLs.java index cf4f910788a..3ed8ddf95d3 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/MatrixSolveLs.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/MatrixSolveLs.java @@ -50,7 +50,7 @@ * If `fast` is `True`, then the solution is computed by solving the normal * equations using Cholesky decomposition. Specifically, if \\(m \ge n\\) then * \\(X = (A^H A + \lambda I)^{-1} A^H B\\), which solves the least-squares - * problem \\(X = \mathrm{argmin}_{Z \in \Re^{n \times k} } ||A Z - B||_F^2 + \lambda ||Z||_F^2\\). + * problem \\(X = \mathrm{argmin}_{Z \in \Re^{n \times k} } ||A Z - B||_F^2 + \lambda ||Z||_F^2\\). * If \\(m \lt n\\) then `output` is computed as * \\(X = A^H (A A^H + \lambda I)^{-1} B\\), which (for \\(\lambda = 0\\)) is the * minimum-norm solution to the under-determined linear system, i.e. diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/Sqrtm.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/Sqrtm.java index 865732f0d16..86d747a81a5 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/Sqrtm.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/Sqrtm.java @@ -36,10 +36,10 @@ * have no eigenvalues which are real and negative (pairs of complex conjugate * eigenvalues are allowed). *

- * The matrix square root is computed by first reducing the matrix to - * quasi-triangular form with the real Schur decomposition. The square root - * of the quasi-triangular matrix is then computed directly. Details of - * the algorithm can be found in: Nicholas J. Higham, "Computing real + * The matrix square root is computed by first reducing the matrix to + * quasi-triangular form with the real Schur decomposition. The square root + * of the quasi-triangular matrix is then computed directly. Details of + * the algorithm can be found in: Nicholas J. Higham, "Computing real * square roots of a real matrix", Linear Algebra Appl., 1987. *

* The input is a tensor of shape `[..., M, M]` whose inner-most 2 dimensions diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/TriangularSolve.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/TriangularSolve.java index a8c647dda72..ba5ce4f65c2 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/TriangularSolve.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/TriangularSolve.java @@ -36,15 +36,17 @@ * of each inner-most matrix is assumed to be zero and not accessed. * If `lower` is False then the strictly lower triangular part of each inner-most * matrix is assumed to be zero and not accessed. - * `rhs` is a tensor of shape `[..., M, K]`. + * `rhs` is a tensor of shape `[..., M, N]`. *

- * The output is a tensor of shape `[..., M, K]`. If `adjoint` is + * The output is a tensor of shape `[..., M, N]`. If `adjoint` is * `True` then the innermost matrices in `output` satisfy matrix equations * `matrix[..., :, :] * output[..., :, :] = rhs[..., :, :]`. * If `adjoint` is `False` then the strictly then the innermost matrices in * `output` satisfy matrix equations * `adjoint(matrix[..., i, k]) * output[..., k, j] = rhs[..., i, j]`. *

+ * Note, the batch shapes for the inputs only need to broadcast. + *

* Example: *

{@code
  * a = tf.constant([[3,  0,  0,  0],
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/TridiagonalMatMul.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/TridiagonalMatMul.java
index 219e9305eaa..7fb782724f9 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/TridiagonalMatMul.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/TridiagonalMatMul.java
@@ -41,11 +41,11 @@ public final class TridiagonalMatMul extends RawOp implements O
    * 
    * @param scope current scope
    * @param superdiag Tensor of shape `[..., 1, M]`, representing superdiagonals of
-   * tri-diagonal matrices to the left of multiplication. Last element is ingored.
+   * tri-diagonal matrices to the left of multiplication. Last element is ignored.
    * @param maindiag Tensor of shape `[..., 1, M]`, representing main diagonals of tri-diagonal
    * matrices to the left of multiplication.
    * @param subdiag Tensor of shape `[..., 1, M]`, representing subdiagonals of tri-diagonal
-   * matrices to the left of multiplication. First element is ingored.
+   * matrices to the left of multiplication. First element is ignored.
    * @param rhs Tensor of shape `[..., M, N]`, representing MxN matrices to the right of
    * multiplication.
    * @return a new instance of TridiagonalMatMul
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/CSRSparseMatrixToSparseTensor.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/CSRSparseMatrixToSparseTensor.java
index 2a3ec8c2c71..c9796bf7573 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/CSRSparseMatrixToSparseTensor.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/CSRSparseMatrixToSparseTensor.java
@@ -34,7 +34,6 @@
  * 
  * @param  data type for {@code values()} output
  */
-@Operator(group = "linalg.sparse")
 public final class CSRSparseMatrixToSparseTensor extends RawOp {
   
   /**
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/DenseToCSRSparseMatrix.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/DenseToCSRSparseMatrix.java
index 032f2f82cb6..93414b7e7f6 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/DenseToCSRSparseMatrix.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/DenseToCSRSparseMatrix.java
@@ -31,7 +31,6 @@
 /**
  * Converts a dense tensor to a (possibly batched) CSRSparseMatrix.
  */
-@Operator(group = "linalg.sparse")
 public final class DenseToCSRSparseMatrix extends RawOp implements Operand {
   
   /**
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixAdd.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixAdd.java
index 41815f021c0..2e7b03b0fb6 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixAdd.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixAdd.java
@@ -33,7 +33,6 @@
  * The gradients of SparseMatrixAdd outputs with respect to alpha and beta are not
  * currently defined (TensorFlow will return zeros for these entries).
  */
-@Operator(group = "linalg.sparse")
 public final class SparseMatrixAdd extends RawOp implements Operand {
   
   /**
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixMatMul.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixMatMul.java
index ea5bb99ff6b..999afbb7a1a 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixMatMul.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixMatMul.java
@@ -57,7 +57,6 @@
  * 
  * @param  data type for {@code output()} output
  */
-@Operator(group = "linalg.sparse")
 public final class SparseMatrixMatMul extends RawOp implements Operand {
   
   /**
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixMul.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixMul.java
index 94fb2a9bb62..cc6f936e661 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixMul.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixMul.java
@@ -39,7 +39,6 @@
  * NOTE even if `b` is zero, the sparsity structure of the output does not
  * change.
  */
-@Operator(group = "linalg.sparse")
 public final class SparseMatrixMul extends RawOp implements Operand {
   
   /**
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixNNZ.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixNNZ.java
index 3c52da6f99f..613228d6272 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixNNZ.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixNNZ.java
@@ -30,7 +30,6 @@
 /**
  * Returns the number of nonzeroes of `sparse_matrix`.
  */
-@Operator(group = "linalg.sparse")
 public final class SparseMatrixNNZ extends RawOp implements Operand {
   
   /**
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixOrderingAMD.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixOrderingAMD.java
index 9a21a20a1be..9acf649aa94 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixOrderingAMD.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixOrderingAMD.java
@@ -78,7 +78,6 @@
  * 

* input: A `CSRSparseMatrix`. */ -@Operator(group = "linalg.sparse") public final class SparseMatrixOrderingAMD extends RawOp implements Operand { /** diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixSoftmax.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixSoftmax.java index 6fc71595b7d..2d62bbb6899 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixSoftmax.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixSoftmax.java @@ -38,7 +38,6 @@ * the output has the same sparsity structure as the input (though missing values * in the output may now be treated as having probability zero). */ -@Operator(group = "linalg.sparse") public final class SparseMatrixSoftmax extends RawOp implements Operand { /** diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixSoftmaxGrad.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixSoftmaxGrad.java index 7dbb04a18a2..0a698bb7929 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixSoftmaxGrad.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixSoftmaxGrad.java @@ -32,7 +32,6 @@ /** * Calculates the gradient of the SparseMatrixSoftmax op. */ -@Operator(group = "linalg.sparse") public final class SparseMatrixSoftmaxGrad extends RawOp implements Operand { /** diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixSparseCholesky.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixSparseCholesky.java index 6373992e173..603e4e30c9f 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixSparseCholesky.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixSparseCholesky.java @@ -103,7 +103,6 @@ * permutation: A `Tensor`. * type: The type of `input`. */ -@Operator(group = "linalg.sparse") public final class SparseMatrixSparseCholesky extends RawOp implements Operand { /** diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixSparseMatMul.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixSparseMatMul.java index ba2d0f175f5..2e8bafb9b0b 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixSparseMatMul.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixSparseMatMul.java @@ -104,7 +104,6 @@ * adjoint_a: If True, `a` adjointed before multiplication. * adjoint_b: If True, `b` adjointed before multiplication. */ -@Operator(group = "linalg.sparse") public final class SparseMatrixSparseMatMul extends RawOp implements Operand { /** diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixTranspose.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixTranspose.java index 42e75dea97e..6801b45dd6d 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixTranspose.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixTranspose.java @@ -34,7 +34,6 @@ * Transposes the inner (matrix) dimensions of a SparseMatrix and optionally * conjugates its values. */ -@Operator(group = "linalg.sparse") public final class SparseMatrixTranspose extends RawOp implements Operand { /** diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixZeros.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixZeros.java index 0ef578d31f9..eab0d59e8c2 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixZeros.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseMatrixZeros.java @@ -32,7 +32,6 @@ /** * Creates an all-zeros CSRSparseMatrix with shape `dense_shape`. */ -@Operator(group = "linalg.sparse") public final class SparseMatrixZeros extends RawOp implements Operand { /** diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseTensorToCSRSparseMatrix.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseTensorToCSRSparseMatrix.java index 69af2004b6f..a14a09c9433 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseTensorToCSRSparseMatrix.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/linalg/sparse/SparseTensorToCSRSparseMatrix.java @@ -31,7 +31,6 @@ /** * Converts a SparseTensor to a (possibly batched) CSRSparseMatrix. */ -@Operator(group = "linalg.sparse") public final class SparseTensorToCSRSparseMatrix extends RawOp implements Operand { /** diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/Asin.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/Asin.java index 7825bb02a6a..6dd53582f63 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/Asin.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/Asin.java @@ -33,7 +33,7 @@ * The `tf.math.asin` operation returns the inverse of `tf.math.sin`, such that * if `y = tf.math.sin(x)` then, `x = tf.math.asin(y)`. *

- * Note: The output of `tf.math.asin` will lie within the invertible range + * Note: The output of `tf.math.asin` will lie within the invertible range * of sine, i.e [-pi/2, pi/2]. *

* For example: diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/Atan.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/Atan.java index d09ac0f625e..ae1c0de475b 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/Atan.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/Atan.java @@ -33,7 +33,7 @@ * The `tf.math.atan` operation returns the inverse of `tf.math.tan`, such that * if `y = tf.math.tan(x)` then, `x = tf.math.atan(y)`. *

- * Note: The output of `tf.math.atan` will lie within the invertible range + * Note: The output of `tf.math.atan` will lie within the invertible range * of tan, i.e (-pi/2, pi/2). *

* For example: diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/LogicalNot.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/LogicalNot.java index d159d01f88c..643af8caa45 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/LogicalNot.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/LogicalNot.java @@ -28,7 +28,7 @@ import org.tensorflow.types.TBool; /** - * Returns the truth value of NOT x element-wise. + * Returns the truth value of `NOT x` element-wise. */ @Operator(group = "math") public final class LogicalNot extends RawOp implements Operand { @@ -37,7 +37,7 @@ public final class LogicalNot extends RawOp implements Operand { * Factory method to create a class wrapping a new LogicalNot operation. * * @param scope current scope - * @param x + * @param x A `Tensor` of type `bool`. * @return a new instance of LogicalNot */ @Endpoint(describeByClass = true) @@ -49,6 +49,7 @@ public static LogicalNot create(Scope scope, Operand x) { } /** + * A `Tensor` of type `bool` with the same shape as `x`. The logical negation of `x`. */ public Output y() { return y; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/RequantizationRangePerChannel.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/RequantizationRangePerChannel.java index 4eb2021ca17..659dae182cf 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/RequantizationRangePerChannel.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/RequantizationRangePerChannel.java @@ -41,7 +41,7 @@ public final class RequantizationRangePerChannel extends RawOp { * @param inputMin The minimum value of the input tensor * @param inputMax The maximum value of the input tensor. * @param clipValueMax The maximum value of the output that needs to be clipped. - * Example: set this to 6 for Relu6. + * Example: set this to 6 for Relu6. * @return a new instance of RequantizationRangePerChannel */ @Endpoint(describeByClass = true) diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/SobolSample.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/SobolSample.java new file mode 100644 index 00000000000..d66475e2071 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/SobolSample.java @@ -0,0 +1,102 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.math; + +import org.tensorflow.DataType; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.TFloat32; +import org.tensorflow.types.TInt32; +import org.tensorflow.types.family.TNumber; +import org.tensorflow.types.family.TType; + +/** + * Generates points from the Sobol sequence. + *

+ * Creates a Sobol sequence with `num_results` samples. Each sample has dimension + * `dim`. Skips the first `skip` samples. + * + * @param data type for {@code samples()} output + */ +public final class SobolSample extends RawOp implements Operand { + + /** + * Factory method to create a class wrapping a new SobolSample operation. + * + * @param scope current scope + * @param dim Positive scalar `Tensor` representing each sample's dimension. + * @param numResults Positive scalar `Tensor` of dtype int32. The number of Sobol points to return + * in the output. + * @param skip Positive scalar `Tensor` of dtype int32. The number of initial points of the + * Sobol sequence to skip. + * @param dtype The type of the sample. One of: `float32` or `float64`. + * @return a new instance of SobolSample + */ + @Endpoint(describeByClass = true) + public static SobolSample create(Scope scope, Operand dim, Operand numResults, Operand skip, DataType dtype) { + OperationBuilder opBuilder = scope.env().opBuilder("SobolSample", scope.makeOpName("SobolSample")); + opBuilder.addInput(dim.asOutput()); + opBuilder.addInput(numResults.asOutput()); + opBuilder.addInput(skip.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + opBuilder.setAttr("dtype", dtype); + return new SobolSample(opBuilder.build()); + } + + /** + * Factory method to create a class wrapping a new SobolSample operation using default output types. + * + * @param scope current scope + * @param dim Positive scalar `Tensor` representing each sample's dimension. + * @param numResults Positive scalar `Tensor` of dtype int32. The number of Sobol points to return + * in the output. + * @param skip Positive scalar `Tensor` of dtype int32. The number of initial points of the + * Sobol sequence to skip. + * @return a new instance of SobolSample + */ + @Endpoint(describeByClass = true) + public static SobolSample create(Scope scope, Operand dim, Operand numResults, Operand skip) { + return create(scope, dim, numResults, skip, TFloat32.DTYPE); + } + + /** + * `Tensor` of samples from Sobol sequence with `shape` [num_results, dim]. + */ + public Output samples() { + return samples; + } + + @Override + public Output asOutput() { + return samples; + } + + private Output samples; + + private SobolSample(Operation operation) { + super(operation); + int outputIdx = 0; + samples = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/Xlog1py.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/Xlog1py.java new file mode 100644 index 00000000000..f0586582e8c --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/Xlog1py.java @@ -0,0 +1,73 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.math; + +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.family.TType; + +/** + * Returns 0 if x == 0, and x * log1p(y) otherwise, elementwise. + * + * @param data type for {@code z()} output + */ +@Operator(group = "math") +public final class Xlog1py extends RawOp implements Operand { + + /** + * Factory method to create a class wrapping a new Xlog1py operation. + * + * @param scope current scope + * @param x + * @param y + * @return a new instance of Xlog1py + */ + @Endpoint(describeByClass = true) + public static Xlog1py create(Scope scope, Operand x, Operand y) { + OperationBuilder opBuilder = scope.env().opBuilder("Xlog1py", scope.makeOpName("Xlog1py")); + opBuilder.addInput(x.asOutput()); + opBuilder.addInput(y.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + return new Xlog1py(opBuilder.build()); + } + + /** + */ + public Output z() { + return z; + } + + @Override + public Output asOutput() { + return z; + } + + private Output z; + + private Xlog1py(Operation operation) { + super(operation); + int outputIdx = 0; + z = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/special/Dawsn.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/special/Dawsn.java new file mode 100644 index 00000000000..0855403368a --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/special/Dawsn.java @@ -0,0 +1,69 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.math.special; + +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.family.TNumber; +import org.tensorflow.types.family.TType; + +/** + * @param data type for {@code y()} output + */ +public final class Dawsn extends RawOp implements Operand { + + /** + * Factory method to create a class wrapping a new Dawsn operation. + * + * @param scope current scope + * @param x + * @return a new instance of Dawsn + */ + @Endpoint(describeByClass = true) + public static Dawsn create(Scope scope, Operand x) { + OperationBuilder opBuilder = scope.env().opBuilder("Dawsn", scope.makeOpName("Dawsn")); + opBuilder.addInput(x.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + return new Dawsn(opBuilder.build()); + } + + /** + */ + public Output y() { + return y; + } + + @Override + public Output asOutput() { + return y; + } + + private Output y; + + private Dawsn(Operation operation) { + super(operation); + int outputIdx = 0; + y = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/special/Expint.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/special/Expint.java new file mode 100644 index 00000000000..1d2aa725fce --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/special/Expint.java @@ -0,0 +1,69 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.math.special; + +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.family.TNumber; +import org.tensorflow.types.family.TType; + +/** + * @param data type for {@code y()} output + */ +public final class Expint extends RawOp implements Operand { + + /** + * Factory method to create a class wrapping a new Expint operation. + * + * @param scope current scope + * @param x + * @return a new instance of Expint + */ + @Endpoint(describeByClass = true) + public static Expint create(Scope scope, Operand x) { + OperationBuilder opBuilder = scope.env().opBuilder("Expint", scope.makeOpName("Expint")); + opBuilder.addInput(x.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + return new Expint(opBuilder.build()); + } + + /** + */ + public Output y() { + return y; + } + + @Override + public Output asOutput() { + return y; + } + + private Output y; + + private Expint(Operation operation) { + super(operation); + int outputIdx = 0; + y = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/special/FresnelCos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/special/FresnelCos.java new file mode 100644 index 00000000000..732cfb1ac20 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/special/FresnelCos.java @@ -0,0 +1,69 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.math.special; + +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.family.TNumber; +import org.tensorflow.types.family.TType; + +/** + * @param data type for {@code y()} output + */ +public final class FresnelCos extends RawOp implements Operand { + + /** + * Factory method to create a class wrapping a new FresnelCos operation. + * + * @param scope current scope + * @param x + * @return a new instance of FresnelCos + */ + @Endpoint(describeByClass = true) + public static FresnelCos create(Scope scope, Operand x) { + OperationBuilder opBuilder = scope.env().opBuilder("FresnelCos", scope.makeOpName("FresnelCos")); + opBuilder.addInput(x.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + return new FresnelCos(opBuilder.build()); + } + + /** + */ + public Output y() { + return y; + } + + @Override + public Output asOutput() { + return y; + } + + private Output y; + + private FresnelCos(Operation operation) { + super(operation); + int outputIdx = 0; + y = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/special/FresnelSin.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/special/FresnelSin.java new file mode 100644 index 00000000000..cab6e46cba8 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/special/FresnelSin.java @@ -0,0 +1,69 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.math.special; + +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.family.TNumber; +import org.tensorflow.types.family.TType; + +/** + * @param data type for {@code y()} output + */ +public final class FresnelSin extends RawOp implements Operand { + + /** + * Factory method to create a class wrapping a new FresnelSin operation. + * + * @param scope current scope + * @param x + * @return a new instance of FresnelSin + */ + @Endpoint(describeByClass = true) + public static FresnelSin create(Scope scope, Operand x) { + OperationBuilder opBuilder = scope.env().opBuilder("FresnelSin", scope.makeOpName("FresnelSin")); + opBuilder.addInput(x.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + return new FresnelSin(opBuilder.build()); + } + + /** + */ + public Output y() { + return y; + } + + @Override + public Output asOutput() { + return y; + } + + private Output y; + + private FresnelSin(Operation operation) { + super(operation); + int outputIdx = 0; + y = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/special/Spence.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/special/Spence.java new file mode 100644 index 00000000000..c313fb84aee --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/special/Spence.java @@ -0,0 +1,69 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.math.special; + +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.family.TNumber; +import org.tensorflow.types.family.TType; + +/** + * @param data type for {@code y()} output + */ +public final class Spence extends RawOp implements Operand { + + /** + * Factory method to create a class wrapping a new Spence operation. + * + * @param scope current scope + * @param x + * @return a new instance of Spence + */ + @Endpoint(describeByClass = true) + public static Spence create(Scope scope, Operand x) { + OperationBuilder opBuilder = scope.env().opBuilder("Spence", scope.makeOpName("Spence")); + opBuilder.addInput(x.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + return new Spence(opBuilder.build()); + } + + /** + */ + public Output y() { + return y; + } + + @Override + public Output asOutput() { + return y; + } + + private Output y; + + private Spence(Operation operation) { + super(operation); + int outputIdx = 0; + y = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/BlockLSTM.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/BlockLSTM.java index 1c00e74311f..22f0d16f540 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/BlockLSTM.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/BlockLSTM.java @@ -48,7 +48,7 @@ * h.append(h1) * return pack(i), pack(cs), pack(f), pack(o), pack(ci), pack(ch), pack(h) * - * Note that unlike LSTMBlockCell (and BlockLSTM) which uses ICFO gate layout, + * Note that unlike LSTMBlockCell (and BlockLSTM) which uses ICFO gate layout, * this op uses IFCO. So in order for the following snippet to be equivalent * all gate-related outputs should be reordered. * }

diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/CTCLossV2.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/CTCLossV2.java new file mode 100644 index 00000000000..918230851c3 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/CTCLossV2.java @@ -0,0 +1,170 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.nn; + +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.TFloat32; +import org.tensorflow.types.TInt32; +import org.tensorflow.types.TInt64; + +/** + * Calculates the CTC Loss (log probability) for each batch entry. Also calculates + *

+ * the gradient. This class performs the softmax operation for you, so inputs + * should be e.g. linear projections of outputs by an LSTM. + */ +public final class CTCLossV2 extends RawOp { + + /** + * Optional attributes for {@link org.tensorflow.op.nn.CTCLossV2} + */ + public static class Options { + + /** + * @param preprocessCollapseRepeated Scalar, if true then repeated labels are + * collapsed prior to the CTC calculation. + */ + public Options preprocessCollapseRepeated(Boolean preprocessCollapseRepeated) { + this.preprocessCollapseRepeated = preprocessCollapseRepeated; + return this; + } + + /** + * @param ctcMergeRepeated Scalar. If set to false, during CTC calculation + * repeated non-blank labels will not be merged and are interpreted as + * individual labels. This is a simplified version of CTC. + */ + public Options ctcMergeRepeated(Boolean ctcMergeRepeated) { + this.ctcMergeRepeated = ctcMergeRepeated; + return this; + } + + /** + * @param ignoreLongerOutputsThanInputs Scalar. If set to true, during CTC + * calculation, items that have longer output sequences than input sequences + * are skipped: they don't contribute to the loss term and have zero-gradient. + */ + public Options ignoreLongerOutputsThanInputs(Boolean ignoreLongerOutputsThanInputs) { + this.ignoreLongerOutputsThanInputs = ignoreLongerOutputsThanInputs; + return this; + } + + private Boolean preprocessCollapseRepeated; + private Boolean ctcMergeRepeated; + private Boolean ignoreLongerOutputsThanInputs; + + private Options() { + } + } + + /** + * Factory method to create a class wrapping a new CTCLossV2 operation. + * + * @param scope current scope + * @param inputs 3-D, shape: `(max_time x batch_size x num_classes)`, the logits. Default blank + * label is 0 rather num_classes - 1. + * @param labelsIndices The indices of a `SparseTensor`. + * `labels_indices(i, :) == [b, t]` means `labels_values(i)` stores the id for + * `(batch b, time t)`. + * @param labelsValues The values (labels) associated with the given batch and time. + * @param sequenceLength A vector containing sequence lengths (batch). + * @param options carries optional attributes values + * @return a new instance of CTCLossV2 + */ + @Endpoint(describeByClass = true) + public static CTCLossV2 create(Scope scope, Operand inputs, Operand labelsIndices, Operand labelsValues, Operand sequenceLength, Options... options) { + OperationBuilder opBuilder = scope.env().opBuilder("CTCLossV2", scope.makeOpName("CTCLossV2")); + opBuilder.addInput(inputs.asOutput()); + opBuilder.addInput(labelsIndices.asOutput()); + opBuilder.addInput(labelsValues.asOutput()); + opBuilder.addInput(sequenceLength.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + if (options != null) { + for (Options opts : options) { + if (opts.preprocessCollapseRepeated != null) { + opBuilder.setAttr("preprocess_collapse_repeated", opts.preprocessCollapseRepeated); + } + if (opts.ctcMergeRepeated != null) { + opBuilder.setAttr("ctc_merge_repeated", opts.ctcMergeRepeated); + } + if (opts.ignoreLongerOutputsThanInputs != null) { + opBuilder.setAttr("ignore_longer_outputs_than_inputs", opts.ignoreLongerOutputsThanInputs); + } + } + } + return new CTCLossV2(opBuilder.build()); + } + + /** + * @param preprocessCollapseRepeated Scalar, if true then repeated labels are + * collapsed prior to the CTC calculation. + */ + public static Options preprocessCollapseRepeated(Boolean preprocessCollapseRepeated) { + return new Options().preprocessCollapseRepeated(preprocessCollapseRepeated); + } + + /** + * @param ctcMergeRepeated Scalar. If set to false, during CTC calculation + * repeated non-blank labels will not be merged and are interpreted as + * individual labels. This is a simplified version of CTC. + */ + public static Options ctcMergeRepeated(Boolean ctcMergeRepeated) { + return new Options().ctcMergeRepeated(ctcMergeRepeated); + } + + /** + * @param ignoreLongerOutputsThanInputs Scalar. If set to true, during CTC + * calculation, items that have longer output sequences than input sequences + * are skipped: they don't contribute to the loss term and have zero-gradient. + */ + public static Options ignoreLongerOutputsThanInputs(Boolean ignoreLongerOutputsThanInputs) { + return new Options().ignoreLongerOutputsThanInputs(ignoreLongerOutputsThanInputs); + } + + /** + * A vector (batch) containing log-probabilities. + */ + public Output loss() { + return loss; + } + + /** + * The gradient of `loss`. 3-D, shape: + * `(max_time x batch_size x num_classes)`. + */ + public Output gradient() { + return gradient; + } + + private Output loss; + private Output gradient; + + private CTCLossV2(Operation operation) { + super(operation); + int outputIdx = 0; + loss = operation.output(outputIdx++); + gradient = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/CudnnRNNCanonicalToParams.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/CudnnRNNCanonicalToParams.java index 1b1c51f056a..945fdacdf62 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/CudnnRNNCanonicalToParams.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/CudnnRNNCanonicalToParams.java @@ -49,7 +49,7 @@ * biases: the canonical form of biases that can be used for saving * and restoration. They are more likely to be compatible across different * generations. - * num_params_weigths: number of weight parameter matrix for all layers. + * num_params_weights: number of weight parameter matrix for all layers. * num_params_biases: number of bias parameter vector for all layers. * rnn_mode: Indicates the type of the RNN model. * input_mode: Indicate whether there is a linear projection between the input and diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/CudnnRNNParamsToCanonical.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/CudnnRNNParamsToCanonical.java index 2db3c22e373..e7fbeebf99f 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/CudnnRNNParamsToCanonical.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/CudnnRNNParamsToCanonical.java @@ -44,7 +44,7 @@ * num_layers: Specifies the number of layers in the RNN model. * num_units: Specifies the size of the hidden state. * input_size: Specifies the size of the input state. - * num_params_weigths: number of weight parameter matrix for all layers. + * num_params_weights: number of weight parameter matrix for all layers. * num_params_biases: number of bias parameter vector for all layers. * weights: the canonical form of weights that can be used for saving * and restoration. They are more likely to be compatible across different diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/FusedBatchNorm.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/FusedBatchNorm.java index c3940dc9378..464ae92f2ae 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/FusedBatchNorm.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/FusedBatchNorm.java @@ -53,6 +53,14 @@ public Options epsilon(Float epsilon) { return this; } + /** + * @param exponentialAvgFactor + */ + public Options exponentialAvgFactor(Float exponentialAvgFactor) { + this.exponentialAvgFactor = exponentialAvgFactor; + return this; + } + /** * @param dataFormat The data format for x and y. Either "NHWC" (default) or "NCHW". */ @@ -71,6 +79,7 @@ public Options isTraining(Boolean isTraining) { } private Float epsilon; + private Float exponentialAvgFactor; private String dataFormat; private Boolean isTraining; @@ -106,6 +115,9 @@ public static FusedBatchNorm create if (opts.epsilon != null) { opBuilder.setAttr("epsilon", opts.epsilon); } + if (opts.exponentialAvgFactor != null) { + opBuilder.setAttr("exponential_avg_factor", opts.exponentialAvgFactor); + } if (opts.dataFormat != null) { opBuilder.setAttr("data_format", opts.dataFormat); } @@ -124,6 +136,13 @@ public static Options epsilon(Float epsilon) { return new Options().epsilon(epsilon); } + /** + * @param exponentialAvgFactor + */ + public static Options exponentialAvgFactor(Float exponentialAvgFactor) { + return new Options().exponentialAvgFactor(exponentialAvgFactor); + } + /** * @param dataFormat The data format for x and y. Either "NHWC" (default) or "NCHW". */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/QuantizedDepthwiseConv2DWithBiasAndRelu.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/QuantizedDepthwiseConv2DWithBiasAndRelu.java index c7d755f9594..46e628f2c29 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/QuantizedDepthwiseConv2DWithBiasAndRelu.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/QuantizedDepthwiseConv2DWithBiasAndRelu.java @@ -50,7 +50,16 @@ public Options dilations(List dilations) { return this; } + /** + * @param paddingList + */ + public Options paddingList(List paddingList) { + this.paddingList = paddingList; + return this; + } + private List dilations; + private List paddingList; private Options() { } @@ -100,6 +109,13 @@ public static QuantizedDepth } opBuilder.setAttr("dilations", dilationsArray); } + if (opts.paddingList != null) { + long[] paddingListArray = new long[opts.paddingList.size()]; + for (int i = 0; i < paddingListArray.length; ++i) { + paddingListArray[i] = opts.paddingList.get(i); + } + opBuilder.setAttr("padding_list", paddingListArray); + } } } return new QuantizedDepthwiseConv2DWithBiasAndRelu(opBuilder.build()); @@ -112,6 +128,13 @@ public static Options dilations(List dilations) { return new Options().dilations(dilations); } + /** + * @param paddingList + */ + public static Options paddingList(List paddingList) { + return new Options().paddingList(paddingList); + } + /** * The output tensor. */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize.java index dd5844cee3a..3a13eaaa567 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize.java @@ -50,7 +50,16 @@ public Options dilations(List dilations) { return this; } + /** + * @param paddingList + */ + public Options paddingList(List paddingList) { + this.paddingList = paddingList; + return this; + } + private List dilations; + private List paddingList; private Options() { } @@ -104,6 +113,13 @@ public static (opBuilder.build()); @@ -116,6 +132,13 @@ public static Options dilations(List dilations) { return new Options().dilations(dilations); } + /** + * @param paddingList + */ + public static Options paddingList(List paddingList) { + return new Options().paddingList(paddingList); + } + /** * The output tensor. */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/Dequantize.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/Dequantize.java index aaf1fdee6b3..f759acb0a51 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/Dequantize.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/Dequantize.java @@ -17,6 +17,7 @@ package org.tensorflow.op.quantization; +import org.tensorflow.DataType; import org.tensorflow.Operand; import org.tensorflow.Operation; import org.tensorflow.OperationBuilder; @@ -26,10 +27,11 @@ import org.tensorflow.op.annotation.Endpoint; import org.tensorflow.op.annotation.Operator; import org.tensorflow.types.TFloat32; +import org.tensorflow.types.family.TNumber; import org.tensorflow.types.family.TType; /** - * Dequantize the 'input' tensor into a float Tensor. + * Dequantize the 'input' tensor into a float or bfloat16 Tensor. *

* [min_range, max_range] are scalar floats that specify the range for * the output. The 'mode' attribute controls exactly which calculations are @@ -79,9 +81,11 @@ * max_range / max_expected_T); * } * + * + * @param data type for {@code output()} output */ @Operator(group = "quantization") -public final class Dequantize extends RawOp implements Operand { +public final class Dequantize extends RawOp implements Operand { /** * Optional attributes for {@link org.tensorflow.op.quantization.Dequantize} @@ -127,16 +131,19 @@ private Options() { * @param input * @param minRange The minimum scalar value possibly produced for the input. * @param maxRange The maximum scalar value possibly produced for the input. + * @param dtype Type of the output tensor. Currently Dequantize supports float and bfloat16. + * If 'dtype' is 'bfloat16', it only supports 'MIN_COMBINED' mode. * @param options carries optional attributes values * @return a new instance of Dequantize */ @Endpoint(describeByClass = true) - public static Dequantize create(Scope scope, Operand input, Operand minRange, Operand maxRange, Options... options) { + public static Dequantize create(Scope scope, Operand input, Operand minRange, Operand maxRange, DataType dtype, Options... options) { OperationBuilder opBuilder = scope.env().opBuilder("Dequantize", scope.makeOpName("Dequantize")); opBuilder.addInput(input.asOutput()); opBuilder.addInput(minRange.asOutput()); opBuilder.addInput(maxRange.asOutput()); opBuilder = scope.applyControlDependencies(opBuilder); + opBuilder.setAttr("dtype", dtype); if (options != null) { for (Options opts : options) { if (opts.mode != null) { @@ -150,7 +157,22 @@ public static Dequantize create(Scope scope, Operand input, } } } - return new Dequantize(opBuilder.build()); + return new Dequantize(opBuilder.build()); + } + + /** + * Factory method to create a class wrapping a new Dequantize operation using default output types. + * + * @param scope current scope + * @param input + * @param minRange The minimum scalar value possibly produced for the input. + * @param maxRange The maximum scalar value possibly produced for the input. + * @param options carries optional attributes values + * @return a new instance of Dequantize + */ + @Endpoint(describeByClass = true) + public static Dequantize create(Scope scope, Operand input, Operand minRange, Operand maxRange, Options... options) { + return create(scope, input, minRange, maxRange, TFloat32.DTYPE, options); } /** @@ -176,16 +198,16 @@ public static Options axis(Long axis) { /** */ - public Output output() { + public Output output() { return output; } @Override - public Output asOutput() { + public Output asOutput() { return output; } - private Output output; + private Output output; private Dequantize(Operation operation) { super(operation); diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/QuantizedMatMulWithBiasAndDequantize.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/QuantizedMatMulWithBiasAndDequantize.java new file mode 100644 index 00000000000..42da8ab044f --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/QuantizedMatMulWithBiasAndDequantize.java @@ -0,0 +1,161 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.quantization; + +import org.tensorflow.DataType; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.TFloat32; +import org.tensorflow.types.family.TNumber; +import org.tensorflow.types.family.TType; + +/** + * @param data type for {@code out()} output + */ +public final class QuantizedMatMulWithBiasAndDequantize extends RawOp implements Operand { + + /** + * Optional attributes for {@link org.tensorflow.op.quantization.QuantizedMatMulWithBiasAndDequantize} + */ + public static class Options { + + /** + * @param transposeA + */ + public Options transposeA(Boolean transposeA) { + this.transposeA = transposeA; + return this; + } + + /** + * @param transposeB + */ + public Options transposeB(Boolean transposeB) { + this.transposeB = transposeB; + return this; + } + + /** + * @param inputQuantMode + */ + public Options inputQuantMode(String inputQuantMode) { + this.inputQuantMode = inputQuantMode; + return this; + } + + private Boolean transposeA; + private Boolean transposeB; + private String inputQuantMode; + + private Options() { + } + } + + /** + * Factory method to create a class wrapping a new QuantizedMatMulWithBiasAndDequantize operation. + * + * @param scope current scope + * @param a + * @param b + * @param bias + * @param minA + * @param maxA + * @param minB + * @param maxB + * @param minFreezedOutput + * @param maxFreezedOutput + * @param Toutput + * @param options carries optional attributes values + * @return a new instance of QuantizedMatMulWithBiasAndDequantize + */ + @Endpoint(describeByClass = true) + public static QuantizedMatMulWithBiasAndDequantize create(Scope scope, Operand a, Operand b, Operand bias, Operand minA, Operand maxA, Operand minB, Operand maxB, Operand minFreezedOutput, Operand maxFreezedOutput, DataType Toutput, Options... options) { + OperationBuilder opBuilder = scope.env().opBuilder("QuantizedMatMulWithBiasAndDequantize", scope.makeOpName("QuantizedMatMulWithBiasAndDequantize")); + opBuilder.addInput(a.asOutput()); + opBuilder.addInput(b.asOutput()); + opBuilder.addInput(bias.asOutput()); + opBuilder.addInput(minA.asOutput()); + opBuilder.addInput(maxA.asOutput()); + opBuilder.addInput(minB.asOutput()); + opBuilder.addInput(maxB.asOutput()); + opBuilder.addInput(minFreezedOutput.asOutput()); + opBuilder.addInput(maxFreezedOutput.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + opBuilder.setAttr("Toutput", Toutput); + if (options != null) { + for (Options opts : options) { + if (opts.transposeA != null) { + opBuilder.setAttr("transpose_a", opts.transposeA); + } + if (opts.transposeB != null) { + opBuilder.setAttr("transpose_b", opts.transposeB); + } + if (opts.inputQuantMode != null) { + opBuilder.setAttr("input_quant_mode", opts.inputQuantMode); + } + } + } + return new QuantizedMatMulWithBiasAndDequantize(opBuilder.build()); + } + + /** + * @param transposeA + */ + public static Options transposeA(Boolean transposeA) { + return new Options().transposeA(transposeA); + } + + /** + * @param transposeB + */ + public static Options transposeB(Boolean transposeB) { + return new Options().transposeB(transposeB); + } + + /** + * @param inputQuantMode + */ + public static Options inputQuantMode(String inputQuantMode) { + return new Options().inputQuantMode(inputQuantMode); + } + + /** + */ + public Output out() { + return out; + } + + @Override + public Output asOutput() { + return out; + } + + private Output out; + + private QuantizedMatMulWithBiasAndDequantize(Operation operation) { + super(operation); + int outputIdx = 0; + out = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/QuantizedMatMulWithBiasAndRequantize.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/QuantizedMatMulWithBiasAndRequantize.java new file mode 100644 index 00000000000..a3ececf8fb3 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/QuantizedMatMulWithBiasAndRequantize.java @@ -0,0 +1,171 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.quantization; + +import org.tensorflow.DataType; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.TFloat32; +import org.tensorflow.types.family.TType; + +/** + * @param data type for {@code out()} output + */ +public final class QuantizedMatMulWithBiasAndRequantize extends RawOp { + + /** + * Optional attributes for {@link org.tensorflow.op.quantization.QuantizedMatMulWithBiasAndRequantize} + */ + public static class Options { + + /** + * @param transposeA + */ + public Options transposeA(Boolean transposeA) { + this.transposeA = transposeA; + return this; + } + + /** + * @param transposeB + */ + public Options transposeB(Boolean transposeB) { + this.transposeB = transposeB; + return this; + } + + /** + * @param inputQuantMode + */ + public Options inputQuantMode(String inputQuantMode) { + this.inputQuantMode = inputQuantMode; + return this; + } + + private Boolean transposeA; + private Boolean transposeB; + private String inputQuantMode; + + private Options() { + } + } + + /** + * Factory method to create a class wrapping a new QuantizedMatMulWithBiasAndRequantize operation. + * + * @param scope current scope + * @param a + * @param b + * @param bias + * @param minA + * @param maxA + * @param minB + * @param maxB + * @param minFreezedOutput + * @param maxFreezedOutput + * @param Toutput + * @param options carries optional attributes values + * @return a new instance of QuantizedMatMulWithBiasAndRequantize + */ + @Endpoint(describeByClass = true) + public static QuantizedMatMulWithBiasAndRequantize create(Scope scope, Operand a, Operand b, Operand bias, Operand minA, Operand maxA, Operand minB, Operand maxB, Operand minFreezedOutput, Operand maxFreezedOutput, DataType Toutput, Options... options) { + OperationBuilder opBuilder = scope.env().opBuilder("QuantizedMatMulWithBiasAndRequantize", scope.makeOpName("QuantizedMatMulWithBiasAndRequantize")); + opBuilder.addInput(a.asOutput()); + opBuilder.addInput(b.asOutput()); + opBuilder.addInput(bias.asOutput()); + opBuilder.addInput(minA.asOutput()); + opBuilder.addInput(maxA.asOutput()); + opBuilder.addInput(minB.asOutput()); + opBuilder.addInput(maxB.asOutput()); + opBuilder.addInput(minFreezedOutput.asOutput()); + opBuilder.addInput(maxFreezedOutput.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + opBuilder.setAttr("Toutput", Toutput); + if (options != null) { + for (Options opts : options) { + if (opts.transposeA != null) { + opBuilder.setAttr("transpose_a", opts.transposeA); + } + if (opts.transposeB != null) { + opBuilder.setAttr("transpose_b", opts.transposeB); + } + if (opts.inputQuantMode != null) { + opBuilder.setAttr("input_quant_mode", opts.inputQuantMode); + } + } + } + return new QuantizedMatMulWithBiasAndRequantize(opBuilder.build()); + } + + /** + * @param transposeA + */ + public static Options transposeA(Boolean transposeA) { + return new Options().transposeA(transposeA); + } + + /** + * @param transposeB + */ + public static Options transposeB(Boolean transposeB) { + return new Options().transposeB(transposeB); + } + + /** + * @param inputQuantMode + */ + public static Options inputQuantMode(String inputQuantMode) { + return new Options().inputQuantMode(inputQuantMode); + } + + /** + */ + public Output out() { + return out; + } + + /** + */ + public Output minOut() { + return minOut; + } + + /** + */ + public Output maxOut() { + return maxOut; + } + + private Output out; + private Output minOut; + private Output maxOut; + + private QuantizedMatMulWithBiasAndRequantize(Operation operation) { + super(operation); + int outputIdx = 0; + out = operation.output(outputIdx++); + minOut = operation.output(outputIdx++); + maxOut = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/RngSkip.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/RngSkip.java index 11c45bbeb2a..af9e90226b4 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/RngSkip.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/RngSkip.java @@ -32,7 +32,7 @@ * The state of the RNG after * `rng_skip(n)` will be the same as that after `stateful_uniform([n])` * (or any other distribution). The actual increment added to the - * counter is an unspecified implementation detail. + * counter is an unspecified implementation detail. */ public final class RngSkip extends RawOp { diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatefulUniformFullInt.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatefulUniformFullInt.java index b5dc3921dd8..e234af42486 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatefulUniformFullInt.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatefulUniformFullInt.java @@ -32,7 +32,7 @@ /** * Outputs random integers from a uniform distribution. *

- * The generated values are uniform integers covering the whole range of `dtype`. + * The generated values are uniform integers covering the whole range of `dtype`. * * @param data type for {@code output()} output */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatelessRandomBinomial.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatelessRandomBinomial.java new file mode 100644 index 00000000000..9629ee7620e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatelessRandomBinomial.java @@ -0,0 +1,105 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.random; + +import org.tensorflow.DataType; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.TInt64; +import org.tensorflow.types.family.TNumber; +import org.tensorflow.types.family.TType; + +/** + * Outputs deterministic pseudorandom random numbers from a binomial distribution. + *

+ * Outputs random values from a binomial distribution. + *

+ * The outputs are a deterministic function of `shape`, `seed`, `counts`, and `probs`. + * + * @param data type for {@code output()} output + */ +public final class StatelessRandomBinomial extends RawOp implements Operand { + + /** + * Factory method to create a class wrapping a new StatelessRandomBinomial operation. + * + * @param scope current scope + * @param shape The shape of the output tensor. + * @param seed 2 seeds (shape [2]). + * @param counts The counts of the binomial distribution. Must be broadcastable with `probs`, + * and broadcastable with the rightmost dimensions of `shape`. + * @param probs The probability of success for the binomial distribution. Must be broadcastable + * with `counts` and broadcastable with the rightmost dimensions of `shape`. + * @param dtype The type of the output. + * @return a new instance of StatelessRandomBinomial + */ + @Endpoint(describeByClass = true) + public static StatelessRandomBinomial create(Scope scope, Operand shape, Operand seed, Operand counts, Operand probs, DataType dtype) { + OperationBuilder opBuilder = scope.env().opBuilder("StatelessRandomBinomial", scope.makeOpName("StatelessRandomBinomial")); + opBuilder.addInput(shape.asOutput()); + opBuilder.addInput(seed.asOutput()); + opBuilder.addInput(counts.asOutput()); + opBuilder.addInput(probs.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + opBuilder.setAttr("dtype", dtype); + return new StatelessRandomBinomial(opBuilder.build()); + } + + /** + * Factory method to create a class wrapping a new StatelessRandomBinomial operation using default output types. + * + * @param scope current scope + * @param shape The shape of the output tensor. + * @param seed 2 seeds (shape [2]). + * @param counts The counts of the binomial distribution. Must be broadcastable with `probs`, + * and broadcastable with the rightmost dimensions of `shape`. + * @param probs The probability of success for the binomial distribution. Must be broadcastable + * with `counts` and broadcastable with the rightmost dimensions of `shape`. + * @return a new instance of StatelessRandomBinomial + */ + @Endpoint(describeByClass = true) + public static StatelessRandomBinomial create(Scope scope, Operand shape, Operand seed, Operand counts, Operand probs) { + return create(scope, shape, seed, counts, probs, TInt64.DTYPE); + } + + /** + * Random values with specified shape. + */ + public Output output() { + return output; + } + + @Override + public Output asOutput() { + return output; + } + + private Output output; + + private StatelessRandomBinomial(Operation operation) { + super(operation); + int outputIdx = 0; + output = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatelessRandomGamma.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatelessRandomGamma.java new file mode 100644 index 00000000000..815e4b8c1ad --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatelessRandomGamma.java @@ -0,0 +1,81 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.random; + +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.family.TNumber; +import org.tensorflow.types.family.TType; + +/** + * Outputs deterministic pseudorandom random numbers from a gamma distribution. + *

+ * Outputs random values from a gamma distribution. + *

+ * The outputs are a deterministic function of `shape`, `seed`, and `alpha`. + * + * @param data type for {@code output()} output + */ +public final class StatelessRandomGamma extends RawOp implements Operand { + + /** + * Factory method to create a class wrapping a new StatelessRandomGamma operation. + * + * @param scope current scope + * @param shape The shape of the output tensor. + * @param seed 2 seeds (shape [2]). + * @param alpha The concentration of the gamma distribution. Shape must match the rightmost + * dimensions of `shape`. + * @return a new instance of StatelessRandomGamma + */ + @Endpoint(describeByClass = true) + public static StatelessRandomGamma create(Scope scope, Operand shape, Operand seed, Operand alpha) { + OperationBuilder opBuilder = scope.env().opBuilder("StatelessRandomGammaV2", scope.makeOpName("StatelessRandomGamma")); + opBuilder.addInput(shape.asOutput()); + opBuilder.addInput(seed.asOutput()); + opBuilder.addInput(alpha.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + return new StatelessRandomGamma(opBuilder.build()); + } + + /** + * Random values with specified shape. + */ + public Output output() { + return output; + } + + @Override + public Output asOutput() { + return output; + } + + private Output output; + + private StatelessRandomGamma(Operation operation) { + super(operation); + int outputIdx = 0; + output = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatelessRandomPoisson.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatelessRandomPoisson.java new file mode 100644 index 00000000000..e0c7e949dd3 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatelessRandomPoisson.java @@ -0,0 +1,84 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.random; + +import org.tensorflow.DataType; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.family.TNumber; +import org.tensorflow.types.family.TType; + +/** + * Outputs deterministic pseudorandom random numbers from a Poisson distribution. + *

+ * Outputs random values from a Poisson distribution. + *

+ * The outputs are a deterministic function of `shape`, `seed`, and `lam`. + * + * @param data type for {@code output()} output + */ +public final class StatelessRandomPoisson extends RawOp implements Operand { + + /** + * Factory method to create a class wrapping a new StatelessRandomPoisson operation. + * + * @param scope current scope + * @param shape The shape of the output tensor. + * @param seed 2 seeds (shape [2]). + * @param lam The rate of the Poisson distribution. Shape must match the rightmost dimensions + * of `shape`. + * @param dtype The type of the output. + * @return a new instance of StatelessRandomPoisson + */ + @Endpoint(describeByClass = true) + public static StatelessRandomPoisson create(Scope scope, Operand shape, Operand seed, Operand lam, DataType dtype) { + OperationBuilder opBuilder = scope.env().opBuilder("StatelessRandomPoisson", scope.makeOpName("StatelessRandomPoisson")); + opBuilder.addInput(shape.asOutput()); + opBuilder.addInput(seed.asOutput()); + opBuilder.addInput(lam.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + opBuilder.setAttr("dtype", dtype); + return new StatelessRandomPoisson(opBuilder.build()); + } + + /** + * Random values with specified shape. + */ + public Output output() { + return output; + } + + @Override + public Output asOutput() { + return output; + } + + private Output output; + + private StatelessRandomPoisson(Operation operation) { + super(operation); + int outputIdx = 0; + output = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatelessRandomUniformFullInt.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatelessRandomUniformFullInt.java new file mode 100644 index 00000000000..657153d3098 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/StatelessRandomUniformFullInt.java @@ -0,0 +1,81 @@ +/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.random; + +import org.tensorflow.DataType; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.family.TNumber; +import org.tensorflow.types.family.TType; + +/** + * Outputs deterministic pseudorandom random integers from a uniform distribution. + *

+ * The generated values are uniform integers covering the whole range of `dtype`. + *

+ * The outputs are a deterministic function of `shape` and `seed`. + * + * @param data type for {@code output()} output + */ +public final class StatelessRandomUniformFullInt extends RawOp implements Operand { + + /** + * Factory method to create a class wrapping a new StatelessRandomUniformFullInt operation. + * + * @param scope current scope + * @param shape The shape of the output tensor. + * @param seed 2 seeds (shape [2]). + * @param dtype The type of the output. + * @return a new instance of StatelessRandomUniformFullInt + */ + @Endpoint(describeByClass = true) + public static StatelessRandomUniformFullInt create(Scope scope, Operand shape, Operand seed, DataType dtype) { + OperationBuilder opBuilder = scope.env().opBuilder("StatelessRandomUniformFullInt", scope.makeOpName("StatelessRandomUniformFullInt")); + opBuilder.addInput(shape.asOutput()); + opBuilder.addInput(seed.asOutput()); + opBuilder = scope.applyControlDependencies(opBuilder); + opBuilder.setAttr("dtype", dtype); + return new StatelessRandomUniformFullInt(opBuilder.build()); + } + + /** + * Random values with specified shape. + */ + public Output output() { + return output; + } + + @Override + public Output asOutput() { + return output; + } + + private Output output; + + private StatelessRandomUniformFullInt(Operation operation) { + super(operation); + int outputIdx = 0; + output = operation.output(outputIdx++); + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Join.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Join.java index 87306bd9239..448a161166b 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Join.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Join.java @@ -32,6 +32,12 @@ * Joins the strings in the given list of string tensors into one tensor; *

* with the given separator (default is an empty separator). + *

+ * Examples: + *

+ * >>> s = ["hello", "world", "tensorflow"] + * >>> tf.strings.join(s, " ") + * */ @Operator(group = "strings") public final class Join extends RawOp implements Operand { diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Lower.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Lower.java index 7f32962685e..14ac2b2a660 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Lower.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Lower.java @@ -28,6 +28,13 @@ import org.tensorflow.types.TString; /** + * Converts all uppercase characters into their respective lowercase replacements. + *

+ * Example: + *

+ * >>> tf.strings.lower("CamelCase string and ALL CAPS") + * + * */ @Operator(group = "strings") public final class Lower extends RawOp implements Operand { diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/RegexFullMatch.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/RegexFullMatch.java index bb03576fd0d..62923005059 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/RegexFullMatch.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/RegexFullMatch.java @@ -37,6 +37,13 @@ * if the input matches the regex pattern provided. *

* The pattern follows the re2 syntax (https://github.com/google/re2/wiki/Syntax) + *

+ * Examples: + *

+ * >>> tf.strings.regex_full_match(["TF lib", "lib TF"], ".*lib$") + * + * >>> tf.strings.regex_full_match(["TF lib", "lib TF"], ".*TF$") + * */ @Operator(group = "strings") public final class RegexFullMatch extends RawOp implements Operand { diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/StringLength.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/StringLength.java index 421e16555d1..ff820abbea3 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/StringLength.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/StringLength.java @@ -32,6 +32,13 @@ * String lengths of `input`. *

* Computes the length of each string given in the input tensor. + *

+ * >>> strings = tf.constant(['Hello','TensorFlow', '\U0001F642']) + * >>> tf.strings.length(strings).numpy() # default counts bytes + * array([ 5, 10, 4], dtype=int32) + * >>> tf.strings.length(strings, unit="UTF8_CHAR").numpy() + * array([ 5, 10, 1], dtype=int32) + * */ @Operator(group = "strings") public final class StringLength extends RawOp implements Operand { @@ -63,7 +70,7 @@ private Options() { * Factory method to create a class wrapping a new StringLength operation. * * @param scope current scope - * @param input The string for which to compute the length. + * @param input The strings for which to compute the length for each element. * @param options carries optional attributes values * @return a new instance of StringLength */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Strip.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Strip.java index 9c1d8f39b41..eb8f1a23a4a 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Strip.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Strip.java @@ -50,6 +50,11 @@ public static Strip create(Scope scope, Operand input) { /** * A string `Tensor` of the same shape as the input. + *

+ * Examples: + *

+ * >>> tf.strings.strip(["\nTensorFlow", " The python library "]).numpy() + * array([b'TensorFlow', b'The python library'], dtype=object) */ public Output output() { return output; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Substr.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Substr.java index 725344f3eea..9d6e21cbafc 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Substr.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Substr.java @@ -100,6 +100,12 @@ * * output = [b'hir', b'ee', b'n'] * } + * Raises: + *

+ * * `ValueError`: If the first argument cannot be converted to a + * Tensor of `dtype string`. + * * `InvalidArgumentError`: If indicies are out of range. + * * `ValueError`: If `pos` and `len` are not the same shape. * */ @Operator(group = "strings") diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/ToHashBucketFast.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/ToHashBucketFast.java index e8483cf0c6c..62737da0d0d 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/ToHashBucketFast.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/ToHashBucketFast.java @@ -37,6 +37,11 @@ * unimportant. There is a risk of adversaries constructing inputs that all hash * to the same bucket. To prevent this problem, use a strong hash function with * `tf.string_to_hash_bucket_strong`. + *

+ * Examples: + *

+ * >>> tf.strings.to_hash_bucket_fast(["Hello", "TensorFlow", "2.x"], 3).numpy() + * array([0, 2, 2]) */ @Operator(group = "strings") public final class ToHashBucketFast extends RawOp implements Operand { diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/ToHashBucketStrong.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/ToHashBucketStrong.java index fdb57ca8238..c27d7053165 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/ToHashBucketStrong.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/ToHashBucketStrong.java @@ -45,6 +45,11 @@ *

* The additional robustness comes at a cost of roughly 4x higher compute * time than `tf.string_to_hash_bucket_fast`. + *

+ * Examples: + *

+ * >>> tf.strings.to_hash_bucket_strong(["Hello", "TF"], 3, [1, 2]).numpy() + * array([2, 0]) */ @Operator(group = "strings") public final class ToHashBucketStrong extends RawOp implements Operand { diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/ToNumber.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/ToNumber.java index 7b22dd5673d..8c0751ea782 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/ToNumber.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/ToNumber.java @@ -36,6 +36,13 @@ *

* (Note that int32 overflow results in an error while float overflow * results in a rounded value.) + *

+ * Example: + *

+ * >>> strings = ["5.0", "3.0", "7.0"] + * >>> tf.strings.to_number(strings) + * + * * * @param data type for {@code output()} output */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/UnicodeScript.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/UnicodeScript.java index 92b93e1a9fd..3da3bac675c 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/UnicodeScript.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/UnicodeScript.java @@ -35,6 +35,11 @@ * Unicode (ICU) UScriptCode values. See http://icu-project.org/apiref/icu4c/uscript_8h.html. * Returns -1 (USCRIPT_INVALID_CODE) for invalid codepoints. Output shape will * match input shape. + *

+ * Examples: + *

+ * >>> tf.strings.unicode_script([1, 31, 38]) + * */ @Operator(group = "strings") public final class UnicodeScript extends RawOp implements Operand { diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/UnicodeTranscode.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/UnicodeTranscode.java index a1e4ba33314..4b4e03fda8d 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/UnicodeTranscode.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/UnicodeTranscode.java @@ -54,6 +54,16 @@ * transcoding is faithful to all codepoints in the source. If it is not marked * with an explicit endianness, the BOM is not considered part of the string itself * but as metadata, and so is not preserved in the output. + *

+ * Examples: + *

+ * >>> tf.strings.unicode_transcode(["Hello", "TensorFlow", "2.x"], "UTF-8", "UTF-16-BE") + * + * >>> tf.strings.unicode_transcode(["A", "B", "C"], "US ASCII", "UTF-8").numpy() + * array([b'A', b'B', b'C'], dtype=object) */ @Operator(group = "strings") public final class UnicodeTranscode extends RawOp implements Operand { diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Upper.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Upper.java index 26647ba792c..343e4c58d5d 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Upper.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/Upper.java @@ -28,6 +28,13 @@ import org.tensorflow.types.TString; /** + * Converts all lowercase characters into their respective uppercase replacements. + *

+ * Example: + *

+ * >>> tf.strings.upper("CamelCase string and ALL CAPS") + * + * */ @Operator(group = "strings") public final class Upper extends RawOp implements Operand { diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/TPUReplicatedInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/TPUReplicatedInput.java index 29a79de8da3..157cb366d65 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/TPUReplicatedInput.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/TPUReplicatedInput.java @@ -30,6 +30,18 @@ /** * Connects N inputs to an N-way replicated TPU computation. + *

+ * This operation holds a replicated input to a `tpu.replicate()` computation subgraph. + * Each replicated input has the same shape and type alongside the output. + *

+ * For example: + *

{@code
+ * %a = "tf.opA"()
+ * %b = "tf.opB"()
+ * %replicated_input = "tf.TPUReplicatedInput"(%a, %b)
+ * %computation = "tf.Computation"(%replicated_input)
+ * }
+ * The above computation has a replicated input of two replicas. * * @param data type for {@code output()} output */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/TPUReplicatedOutput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/TPUReplicatedOutput.java index 17c0b5b7cf9..0c169b3008d 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/TPUReplicatedOutput.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/TPUReplicatedOutput.java @@ -31,7 +31,17 @@ import org.tensorflow.types.family.TType; /** - * Connects outputs of an N-way replicated computation to N outputs. + * Connects N outputs from an N-way replicated TPU computation. + *

+ * This operation holds a replicated output from a `tpu.replicate()` computation subgraph. + * Each replicated output has the same shape and type alongside the input. + *

+ * For example: + *

{@code
+ * %computation = "tf.Computation"()
+ * %replicated_output:2 = "tf.TPUReplicatedOutput"(%computation)
+ * }
+ * The above computation has a replicated output of two replicas. * * @param data type for {@code outputs()} output */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ApplyFtrl.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ApplyFtrl.java index be5d7128ff8..54c9cab7494 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ApplyFtrl.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ApplyFtrl.java @@ -73,8 +73,8 @@ private Options() { * @param linear Should be from a Variable(). * @param grad The gradient. * @param lr Scaling factor. Must be a scalar. - * @param l1 L1 regulariation. Must be a scalar. - * @param l2 L2 shrinkage regulariation. Must be a scalar. + * @param l1 L1 regularization. Must be a scalar. + * @param l2 L2 shrinkage regularization. Must be a scalar. * @param l2Shrinkage * @param lrPower Scaling factor. Must be a scalar. * @param options carries optional attributes values diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ApplyMomentum.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ApplyMomentum.java index e342d49d607..dbd26f4eb9c 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ApplyMomentum.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ApplyMomentum.java @@ -28,9 +28,9 @@ import org.tensorflow.types.family.TType; /** - * Update '*var' according to the momentum scheme. Set use_nesterov = True if you + * Update '*var' according to the momentum scheme. *

- * want to use Nesterov momentum. + * Set use_nesterov = True if you want to use Nesterov momentum. *

* accum = accum * momentum + grad * var -= lr * accum diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceApplyAdam.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceApplyAdam.java index 602eea7707d..8c68669fc92 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceApplyAdam.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceApplyAdam.java @@ -29,10 +29,10 @@ /** * Update '*var' according to the Adam algorithm. *

- * $$lr_t := \text{learning\_rate} * \sqrt{1 - beta_2^t} / (1 - beta_1^t)$$ - * $$m_t := beta_1 * m_{t-1} + (1 - beta_1) * g$$ - * $$v_t := beta_2 * v_{t-1} + (1 - beta_2) * g * g$$ - * $$variable := variable - lr_t * m_t / (\sqrt{v_t} + \epsilon)$$ + * $$\text{lr}_t := \mathrm{learning_rate} * \sqrt{1 - \beta_2^t} / (1 - \beta_1^t)$$ + * $$m_t := \beta_1 * m_{t-1} + (1 - \beta_1) * g$$ + * $$v_t := \beta_2 * v_{t-1} + (1 - \beta_2) * g * g$$ + * $$\text{variable} := \text{variable} - \text{lr}_t * m_t / (\sqrt{v_t} + \epsilon)$$ */ @Operator(group = "train") public final class ResourceApplyAdam extends RawOp { diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceApplyAdamWithAmsgrad.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceApplyAdamWithAmsgrad.java index 2bd92cb0ea0..86dcc2d06ef 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceApplyAdamWithAmsgrad.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceApplyAdamWithAmsgrad.java @@ -29,11 +29,11 @@ /** * Update '*var' according to the Adam algorithm. *

- * $$lr_t := \text{learning\_rate} * \sqrt{1 - beta_2^t} / (1 - beta_1^t)$$ - * $$m_t := beta_1 * m_{t-1} + (1 - beta_1) * g$$ - * $$v_t := beta_2 * v_{t-1} + (1 - beta_2) * g * g$$ - * $$vhat_t := max{vhat_{t-1}, v_t}$$ - * $$variable := variable - lr_t * m_t / (\sqrt{vhat_t} + \epsilon)$$ + * $$\text{lr}_t := \mathrm{learning_rate} * \sqrt{1 - \beta_2^t} / (1 - \beta_1^t)$$ + * $$m_t := \beta_1 * m_{t-1} + (1 - \beta_1) * g$$ + * $$v_t := \beta_2 * v_{t-1} + (1 - \beta_2) * g * g$$ + * $$\hat{v}_t := max{\hat{v}_{t-1}, v_t}$$ + * $$\text{variable} := \text{variable} - \text{lr}_t * m_t / (\sqrt{\hat{v}_t} + \epsilon)$$ */ @Operator(group = "train") public final class ResourceApplyAdamWithAmsgrad extends RawOp { diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceApplyFtrl.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceApplyFtrl.java index fcd57ba714b..7add86848c9 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceApplyFtrl.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceApplyFtrl.java @@ -70,8 +70,8 @@ private Options() { * @param linear Should be from a Variable(). * @param grad The gradient. * @param lr Scaling factor. Must be a scalar. - * @param l1 L1 regulariation. Must be a scalar. - * @param l2 L2 shrinkage regulariation. Must be a scalar. + * @param l1 L1 regularization. Must be a scalar. + * @param l2 L2 shrinkage regularization. Must be a scalar. * @param l2Shrinkage * @param lrPower Scaling factor. Must be a scalar. * @param options carries optional attributes values diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceApplyKerasMomentum.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceApplyKerasMomentum.java index 883a688581c..e58fd2150cd 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceApplyKerasMomentum.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceApplyKerasMomentum.java @@ -27,9 +27,9 @@ import org.tensorflow.types.family.TType; /** - * Update '*var' according to the momentum scheme. Set use_nesterov = True if you + * Update '*var' according to the momentum scheme. *

- * want to use Nesterov momentum. + * Set use_nesterov = True if you want to use Nesterov momentum. *

* accum = accum * momentum - lr * grad * var += accum diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceSparseApplyFtrl.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceSparseApplyFtrl.java index 872dc72055e..07f2e12f9b0 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceSparseApplyFtrl.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/ResourceSparseApplyFtrl.java @@ -74,7 +74,7 @@ private Options() { * @param indices A vector of indices into the first dimension of var and accum. * @param lr Scaling factor. Must be a scalar. * @param l1 L1 regularization. Must be a scalar. - * @param l2 L2 shrinkage regulariation. Must be a scalar. + * @param l2 L2 shrinkage regularization. Must be a scalar. * @param l2Shrinkage * @param lrPower Scaling factor. Must be a scalar. * @param options carries optional attributes values diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/SparseApplyFtrl.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/SparseApplyFtrl.java index 1e794a18788..defb68856e6 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/SparseApplyFtrl.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/SparseApplyFtrl.java @@ -77,7 +77,7 @@ private Options() { * @param indices A vector of indices into the first dimension of var and accum. * @param lr Scaling factor. Must be a scalar. * @param l1 L1 regularization. Must be a scalar. - * @param l2 L2 shrinkage regulariation. Must be a scalar. + * @param l2 L2 shrinkage regularization. Must be a scalar. * @param l2Shrinkage * @param lrPower Scaling factor. Must be a scalar. * @param options carries optional attributes values diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ClusterDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ClusterDef.java new file mode 100644 index 00000000000..f796e47d02f --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ClusterDef.java @@ -0,0 +1,865 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/cluster.proto + +package org.tensorflow.proto.distruntime; + +/** + *

+ * Defines a TensorFlow cluster as a set of jobs.
+ * 
+ * + * Protobuf type {@code tensorflow.ClusterDef} + */ +public final class ClusterDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ClusterDef) + ClusterDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use ClusterDef.newBuilder() to construct. + private ClusterDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ClusterDef() { + job_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ClusterDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ClusterDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + job_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + job_.add( + input.readMessage(org.tensorflow.proto.distruntime.JobDef.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + job_ = java.util.Collections.unmodifiableList(job_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.distruntime.ClusterProtos.internal_static_tensorflow_ClusterDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.distruntime.ClusterProtos.internal_static_tensorflow_ClusterDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.distruntime.ClusterDef.class, org.tensorflow.proto.distruntime.ClusterDef.Builder.class); + } + + public static final int JOB_FIELD_NUMBER = 1; + private java.util.List job_; + /** + *
+   * The jobs that comprise the cluster.
+   * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public java.util.List getJobList() { + return job_; + } + /** + *
+   * The jobs that comprise the cluster.
+   * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public java.util.List + getJobOrBuilderList() { + return job_; + } + /** + *
+   * The jobs that comprise the cluster.
+   * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public int getJobCount() { + return job_.size(); + } + /** + *
+   * The jobs that comprise the cluster.
+   * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public org.tensorflow.proto.distruntime.JobDef getJob(int index) { + return job_.get(index); + } + /** + *
+   * The jobs that comprise the cluster.
+   * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public org.tensorflow.proto.distruntime.JobDefOrBuilder getJobOrBuilder( + int index) { + return job_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < job_.size(); i++) { + output.writeMessage(1, job_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < job_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, job_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.distruntime.ClusterDef)) { + return super.equals(obj); + } + org.tensorflow.proto.distruntime.ClusterDef other = (org.tensorflow.proto.distruntime.ClusterDef) obj; + + if (!getJobList() + .equals(other.getJobList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getJobCount() > 0) { + hash = (37 * hash) + JOB_FIELD_NUMBER; + hash = (53 * hash) + getJobList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.distruntime.ClusterDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.ClusterDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.ClusterDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.ClusterDef 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.proto.distruntime.ClusterDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.ClusterDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.ClusterDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.ClusterDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.ClusterDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.ClusterDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.ClusterDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.ClusterDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.distruntime.ClusterDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Defines a TensorFlow cluster as a set of jobs.
+   * 
+ * + * Protobuf type {@code tensorflow.ClusterDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ClusterDef) + org.tensorflow.proto.distruntime.ClusterDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.distruntime.ClusterProtos.internal_static_tensorflow_ClusterDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.distruntime.ClusterProtos.internal_static_tensorflow_ClusterDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.distruntime.ClusterDef.class, org.tensorflow.proto.distruntime.ClusterDef.Builder.class); + } + + // Construct using org.tensorflow.proto.distruntime.ClusterDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getJobFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (jobBuilder_ == null) { + job_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + jobBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.distruntime.ClusterProtos.internal_static_tensorflow_ClusterDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.ClusterDef getDefaultInstanceForType() { + return org.tensorflow.proto.distruntime.ClusterDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.ClusterDef build() { + org.tensorflow.proto.distruntime.ClusterDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.ClusterDef buildPartial() { + org.tensorflow.proto.distruntime.ClusterDef result = new org.tensorflow.proto.distruntime.ClusterDef(this); + int from_bitField0_ = bitField0_; + if (jobBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + job_ = java.util.Collections.unmodifiableList(job_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.job_ = job_; + } else { + result.job_ = jobBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.distruntime.ClusterDef) { + return mergeFrom((org.tensorflow.proto.distruntime.ClusterDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.distruntime.ClusterDef other) { + if (other == org.tensorflow.proto.distruntime.ClusterDef.getDefaultInstance()) return this; + if (jobBuilder_ == null) { + if (!other.job_.isEmpty()) { + if (job_.isEmpty()) { + job_ = other.job_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureJobIsMutable(); + job_.addAll(other.job_); + } + onChanged(); + } + } else { + if (!other.job_.isEmpty()) { + if (jobBuilder_.isEmpty()) { + jobBuilder_.dispose(); + jobBuilder_ = null; + job_ = other.job_; + bitField0_ = (bitField0_ & ~0x00000001); + jobBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getJobFieldBuilder() : null; + } else { + jobBuilder_.addAllMessages(other.job_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.distruntime.ClusterDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.distruntime.ClusterDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List job_ = + java.util.Collections.emptyList(); + private void ensureJobIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + job_ = new java.util.ArrayList(job_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.distruntime.JobDef, org.tensorflow.proto.distruntime.JobDef.Builder, org.tensorflow.proto.distruntime.JobDefOrBuilder> jobBuilder_; + + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public java.util.List getJobList() { + if (jobBuilder_ == null) { + return java.util.Collections.unmodifiableList(job_); + } else { + return jobBuilder_.getMessageList(); + } + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public int getJobCount() { + if (jobBuilder_ == null) { + return job_.size(); + } else { + return jobBuilder_.getCount(); + } + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public org.tensorflow.proto.distruntime.JobDef getJob(int index) { + if (jobBuilder_ == null) { + return job_.get(index); + } else { + return jobBuilder_.getMessage(index); + } + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public Builder setJob( + int index, org.tensorflow.proto.distruntime.JobDef value) { + if (jobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobIsMutable(); + job_.set(index, value); + onChanged(); + } else { + jobBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public Builder setJob( + int index, org.tensorflow.proto.distruntime.JobDef.Builder builderForValue) { + if (jobBuilder_ == null) { + ensureJobIsMutable(); + job_.set(index, builderForValue.build()); + onChanged(); + } else { + jobBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public Builder addJob(org.tensorflow.proto.distruntime.JobDef value) { + if (jobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobIsMutable(); + job_.add(value); + onChanged(); + } else { + jobBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public Builder addJob( + int index, org.tensorflow.proto.distruntime.JobDef value) { + if (jobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobIsMutable(); + job_.add(index, value); + onChanged(); + } else { + jobBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public Builder addJob( + org.tensorflow.proto.distruntime.JobDef.Builder builderForValue) { + if (jobBuilder_ == null) { + ensureJobIsMutable(); + job_.add(builderForValue.build()); + onChanged(); + } else { + jobBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public Builder addJob( + int index, org.tensorflow.proto.distruntime.JobDef.Builder builderForValue) { + if (jobBuilder_ == null) { + ensureJobIsMutable(); + job_.add(index, builderForValue.build()); + onChanged(); + } else { + jobBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public Builder addAllJob( + java.lang.Iterable values) { + if (jobBuilder_ == null) { + ensureJobIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, job_); + onChanged(); + } else { + jobBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public Builder clearJob() { + if (jobBuilder_ == null) { + job_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + jobBuilder_.clear(); + } + return this; + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public Builder removeJob(int index) { + if (jobBuilder_ == null) { + ensureJobIsMutable(); + job_.remove(index); + onChanged(); + } else { + jobBuilder_.remove(index); + } + return this; + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public org.tensorflow.proto.distruntime.JobDef.Builder getJobBuilder( + int index) { + return getJobFieldBuilder().getBuilder(index); + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public org.tensorflow.proto.distruntime.JobDefOrBuilder getJobOrBuilder( + int index) { + if (jobBuilder_ == null) { + return job_.get(index); } else { + return jobBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public java.util.List + getJobOrBuilderList() { + if (jobBuilder_ != null) { + return jobBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(job_); + } + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public org.tensorflow.proto.distruntime.JobDef.Builder addJobBuilder() { + return getJobFieldBuilder().addBuilder( + org.tensorflow.proto.distruntime.JobDef.getDefaultInstance()); + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public org.tensorflow.proto.distruntime.JobDef.Builder addJobBuilder( + int index) { + return getJobFieldBuilder().addBuilder( + index, org.tensorflow.proto.distruntime.JobDef.getDefaultInstance()); + } + /** + *
+     * The jobs that comprise the cluster.
+     * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + public java.util.List + getJobBuilderList() { + return getJobFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.distruntime.JobDef, org.tensorflow.proto.distruntime.JobDef.Builder, org.tensorflow.proto.distruntime.JobDefOrBuilder> + getJobFieldBuilder() { + if (jobBuilder_ == null) { + jobBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.distruntime.JobDef, org.tensorflow.proto.distruntime.JobDef.Builder, org.tensorflow.proto.distruntime.JobDefOrBuilder>( + job_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + job_ = null; + } + return jobBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ClusterDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ClusterDef) + private static final org.tensorflow.proto.distruntime.ClusterDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.distruntime.ClusterDef(); + } + + public static org.tensorflow.proto.distruntime.ClusterDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClusterDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ClusterDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.ClusterDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ClusterDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ClusterDefOrBuilder.java new file mode 100644 index 00000000000..8cecd262cc2 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ClusterDefOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/cluster.proto + +package org.tensorflow.proto.distruntime; + +public interface ClusterDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ClusterDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The jobs that comprise the cluster.
+   * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + java.util.List + getJobList(); + /** + *
+   * The jobs that comprise the cluster.
+   * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + org.tensorflow.proto.distruntime.JobDef getJob(int index); + /** + *
+   * The jobs that comprise the cluster.
+   * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + int getJobCount(); + /** + *
+   * The jobs that comprise the cluster.
+   * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + java.util.List + getJobOrBuilderList(); + /** + *
+   * The jobs that comprise the cluster.
+   * 
+ * + * repeated .tensorflow.JobDef job = 1; + */ + org.tensorflow.proto.distruntime.JobDefOrBuilder getJobOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ClusterDeviceFilters.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ClusterDeviceFilters.java new file mode 100644 index 00000000000..f9684c7e0e8 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ClusterDeviceFilters.java @@ -0,0 +1,773 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/device_filters.proto + +package org.tensorflow.proto.distruntime; + +/** + *
+ * Defines the device filters for jobs in a cluster.
+ * 
+ * + * Protobuf type {@code tensorflow.ClusterDeviceFilters} + */ +public final class ClusterDeviceFilters extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ClusterDeviceFilters) + ClusterDeviceFiltersOrBuilder { +private static final long serialVersionUID = 0L; + // Use ClusterDeviceFilters.newBuilder() to construct. + private ClusterDeviceFilters(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ClusterDeviceFilters() { + jobs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ClusterDeviceFilters(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ClusterDeviceFilters( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + jobs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + jobs_.add( + input.readMessage(org.tensorflow.proto.distruntime.JobDeviceFilters.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + jobs_ = java.util.Collections.unmodifiableList(jobs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.distruntime.DeviceFiltersProtos.internal_static_tensorflow_ClusterDeviceFilters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.distruntime.DeviceFiltersProtos.internal_static_tensorflow_ClusterDeviceFilters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.distruntime.ClusterDeviceFilters.class, org.tensorflow.proto.distruntime.ClusterDeviceFilters.Builder.class); + } + + public static final int JOBS_FIELD_NUMBER = 1; + private java.util.List jobs_; + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public java.util.List getJobsList() { + return jobs_; + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public java.util.List + getJobsOrBuilderList() { + return jobs_; + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public int getJobsCount() { + return jobs_.size(); + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public org.tensorflow.proto.distruntime.JobDeviceFilters getJobs(int index) { + return jobs_.get(index); + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public org.tensorflow.proto.distruntime.JobDeviceFiltersOrBuilder getJobsOrBuilder( + int index) { + return jobs_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < jobs_.size(); i++) { + output.writeMessage(1, jobs_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < jobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, jobs_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.distruntime.ClusterDeviceFilters)) { + return super.equals(obj); + } + org.tensorflow.proto.distruntime.ClusterDeviceFilters other = (org.tensorflow.proto.distruntime.ClusterDeviceFilters) obj; + + if (!getJobsList() + .equals(other.getJobsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getJobsCount() > 0) { + hash = (37 * hash) + JOBS_FIELD_NUMBER; + hash = (53 * hash) + getJobsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.distruntime.ClusterDeviceFilters parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.ClusterDeviceFilters parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.ClusterDeviceFilters parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.ClusterDeviceFilters 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.proto.distruntime.ClusterDeviceFilters parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.ClusterDeviceFilters parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.ClusterDeviceFilters parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.ClusterDeviceFilters parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.ClusterDeviceFilters parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.ClusterDeviceFilters parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.ClusterDeviceFilters parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.ClusterDeviceFilters parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.distruntime.ClusterDeviceFilters prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Defines the device filters for jobs in a cluster.
+   * 
+ * + * Protobuf type {@code tensorflow.ClusterDeviceFilters} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ClusterDeviceFilters) + org.tensorflow.proto.distruntime.ClusterDeviceFiltersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.distruntime.DeviceFiltersProtos.internal_static_tensorflow_ClusterDeviceFilters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.distruntime.DeviceFiltersProtos.internal_static_tensorflow_ClusterDeviceFilters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.distruntime.ClusterDeviceFilters.class, org.tensorflow.proto.distruntime.ClusterDeviceFilters.Builder.class); + } + + // Construct using org.tensorflow.proto.distruntime.ClusterDeviceFilters.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getJobsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (jobsBuilder_ == null) { + jobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + jobsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.distruntime.DeviceFiltersProtos.internal_static_tensorflow_ClusterDeviceFilters_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.ClusterDeviceFilters getDefaultInstanceForType() { + return org.tensorflow.proto.distruntime.ClusterDeviceFilters.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.ClusterDeviceFilters build() { + org.tensorflow.proto.distruntime.ClusterDeviceFilters result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.ClusterDeviceFilters buildPartial() { + org.tensorflow.proto.distruntime.ClusterDeviceFilters result = new org.tensorflow.proto.distruntime.ClusterDeviceFilters(this); + int from_bitField0_ = bitField0_; + if (jobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + jobs_ = java.util.Collections.unmodifiableList(jobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.jobs_ = jobs_; + } else { + result.jobs_ = jobsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.distruntime.ClusterDeviceFilters) { + return mergeFrom((org.tensorflow.proto.distruntime.ClusterDeviceFilters)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.distruntime.ClusterDeviceFilters other) { + if (other == org.tensorflow.proto.distruntime.ClusterDeviceFilters.getDefaultInstance()) return this; + if (jobsBuilder_ == null) { + if (!other.jobs_.isEmpty()) { + if (jobs_.isEmpty()) { + jobs_ = other.jobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureJobsIsMutable(); + jobs_.addAll(other.jobs_); + } + onChanged(); + } + } else { + if (!other.jobs_.isEmpty()) { + if (jobsBuilder_.isEmpty()) { + jobsBuilder_.dispose(); + jobsBuilder_ = null; + jobs_ = other.jobs_; + bitField0_ = (bitField0_ & ~0x00000001); + jobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getJobsFieldBuilder() : null; + } else { + jobsBuilder_.addAllMessages(other.jobs_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.distruntime.ClusterDeviceFilters parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.distruntime.ClusterDeviceFilters) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List jobs_ = + java.util.Collections.emptyList(); + private void ensureJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + jobs_ = new java.util.ArrayList(jobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.distruntime.JobDeviceFilters, org.tensorflow.proto.distruntime.JobDeviceFilters.Builder, org.tensorflow.proto.distruntime.JobDeviceFiltersOrBuilder> jobsBuilder_; + + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public java.util.List getJobsList() { + if (jobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(jobs_); + } else { + return jobsBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public int getJobsCount() { + if (jobsBuilder_ == null) { + return jobs_.size(); + } else { + return jobsBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public org.tensorflow.proto.distruntime.JobDeviceFilters getJobs(int index) { + if (jobsBuilder_ == null) { + return jobs_.get(index); + } else { + return jobsBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public Builder setJobs( + int index, org.tensorflow.proto.distruntime.JobDeviceFilters value) { + if (jobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.set(index, value); + onChanged(); + } else { + jobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public Builder setJobs( + int index, org.tensorflow.proto.distruntime.JobDeviceFilters.Builder builderForValue) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.set(index, builderForValue.build()); + onChanged(); + } else { + jobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public Builder addJobs(org.tensorflow.proto.distruntime.JobDeviceFilters value) { + if (jobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.add(value); + onChanged(); + } else { + jobsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public Builder addJobs( + int index, org.tensorflow.proto.distruntime.JobDeviceFilters value) { + if (jobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.add(index, value); + onChanged(); + } else { + jobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public Builder addJobs( + org.tensorflow.proto.distruntime.JobDeviceFilters.Builder builderForValue) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.add(builderForValue.build()); + onChanged(); + } else { + jobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public Builder addJobs( + int index, org.tensorflow.proto.distruntime.JobDeviceFilters.Builder builderForValue) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.add(index, builderForValue.build()); + onChanged(); + } else { + jobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public Builder addAllJobs( + java.lang.Iterable values) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, jobs_); + onChanged(); + } else { + jobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public Builder clearJobs() { + if (jobsBuilder_ == null) { + jobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + jobsBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public Builder removeJobs(int index) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.remove(index); + onChanged(); + } else { + jobsBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public org.tensorflow.proto.distruntime.JobDeviceFilters.Builder getJobsBuilder( + int index) { + return getJobsFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public org.tensorflow.proto.distruntime.JobDeviceFiltersOrBuilder getJobsOrBuilder( + int index) { + if (jobsBuilder_ == null) { + return jobs_.get(index); } else { + return jobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public java.util.List + getJobsOrBuilderList() { + if (jobsBuilder_ != null) { + return jobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(jobs_); + } + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public org.tensorflow.proto.distruntime.JobDeviceFilters.Builder addJobsBuilder() { + return getJobsFieldBuilder().addBuilder( + org.tensorflow.proto.distruntime.JobDeviceFilters.getDefaultInstance()); + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public org.tensorflow.proto.distruntime.JobDeviceFilters.Builder addJobsBuilder( + int index) { + return getJobsFieldBuilder().addBuilder( + index, org.tensorflow.proto.distruntime.JobDeviceFilters.getDefaultInstance()); + } + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + public java.util.List + getJobsBuilderList() { + return getJobsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.distruntime.JobDeviceFilters, org.tensorflow.proto.distruntime.JobDeviceFilters.Builder, org.tensorflow.proto.distruntime.JobDeviceFiltersOrBuilder> + getJobsFieldBuilder() { + if (jobsBuilder_ == null) { + jobsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.distruntime.JobDeviceFilters, org.tensorflow.proto.distruntime.JobDeviceFilters.Builder, org.tensorflow.proto.distruntime.JobDeviceFiltersOrBuilder>( + jobs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + jobs_ = null; + } + return jobsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ClusterDeviceFilters) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ClusterDeviceFilters) + private static final org.tensorflow.proto.distruntime.ClusterDeviceFilters DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.distruntime.ClusterDeviceFilters(); + } + + public static org.tensorflow.proto.distruntime.ClusterDeviceFilters getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClusterDeviceFilters parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ClusterDeviceFilters(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.ClusterDeviceFilters getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ClusterDeviceFiltersOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ClusterDeviceFiltersOrBuilder.java new file mode 100644 index 00000000000..eaaf1635eec --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ClusterDeviceFiltersOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/device_filters.proto + +package org.tensorflow.proto.distruntime; + +public interface ClusterDeviceFiltersOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ClusterDeviceFilters) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + java.util.List + getJobsList(); + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + org.tensorflow.proto.distruntime.JobDeviceFilters getJobs(int index); + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + int getJobsCount(); + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + java.util.List + getJobsOrBuilderList(); + /** + * repeated .tensorflow.JobDeviceFilters jobs = 1; + */ + org.tensorflow.proto.distruntime.JobDeviceFiltersOrBuilder getJobsOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ClusterProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ClusterProtos.java new file mode 100644 index 00000000000..06aa24f0049 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ClusterProtos.java @@ -0,0 +1,76 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/cluster.proto + +package org.tensorflow.proto.distruntime; + +public final class ClusterProtos { + private ClusterProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_JobDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_JobDef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_JobDef_TasksEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_JobDef_TasksEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ClusterDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ClusterDef_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/protobuf/cluster.proto" + + "\022\ntensorflow\"r\n\006JobDef\022\014\n\004name\030\001 \001(\t\022,\n\005" + + "tasks\030\002 \003(\0132\035.tensorflow.JobDef.TasksEnt" + + "ry\032,\n\nTasksEntry\022\013\n\003key\030\001 \001(\005\022\r\n\005value\030\002" + + " \001(\t:\0028\001\"-\n\nClusterDef\022\037\n\003job\030\001 \003(\0132\022.te" + + "nsorflow.JobDefB\200\001\n org.tensorflow.proto" + + ".distruntimeB\rClusterProtosP\001ZHgithub.co" + + "m/tensorflow/tensorflow/tensorflow/go/co" + + "re/core_protos_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tensorflow_JobDef_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_JobDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_JobDef_descriptor, + new java.lang.String[] { "Name", "Tasks", }); + internal_static_tensorflow_JobDef_TasksEntry_descriptor = + internal_static_tensorflow_JobDef_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_JobDef_TasksEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_JobDef_TasksEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_ClusterDef_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_ClusterDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ClusterDef_descriptor, + new java.lang.String[] { "Job", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/DeviceFiltersProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/DeviceFiltersProtos.java new file mode 100644 index 00000000000..254d82a2a2a --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/DeviceFiltersProtos.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/device_filters.proto + +package org.tensorflow.proto.distruntime; + +public final class DeviceFiltersProtos { + private DeviceFiltersProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_TaskDeviceFilters_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_TaskDeviceFilters_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_JobDeviceFilters_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_JobDeviceFilters_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_JobDeviceFilters_TasksEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_JobDeviceFilters_TasksEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ClusterDeviceFilters_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ClusterDeviceFilters_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/protobuf/device_filter" + + "s.proto\022\ntensorflow\"+\n\021TaskDeviceFilters" + + "\022\026\n\016device_filters\030\001 \003(\t\"\245\001\n\020JobDeviceFi" + + "lters\022\014\n\004name\030\001 \001(\t\0226\n\005tasks\030\002 \003(\0132\'.ten" + + "sorflow.JobDeviceFilters.TasksEntry\032K\n\nT" + + "asksEntry\022\013\n\003key\030\001 \001(\005\022,\n\005value\030\002 \001(\0132\035." + + "tensorflow.TaskDeviceFilters:\0028\001\"B\n\024Clus" + + "terDeviceFilters\022*\n\004jobs\030\001 \003(\0132\034.tensorf" + + "low.JobDeviceFiltersB\206\001\n org.tensorflow." + + "proto.distruntimeB\023DeviceFiltersProtosP\001" + + "ZHgithub.com/tensorflow/tensorflow/tenso" + + "rflow/go/core/core_protos_go_proto\370\001\001b\006p" + + "roto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tensorflow_TaskDeviceFilters_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_TaskDeviceFilters_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_TaskDeviceFilters_descriptor, + new java.lang.String[] { "DeviceFilters", }); + internal_static_tensorflow_JobDeviceFilters_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_JobDeviceFilters_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_JobDeviceFilters_descriptor, + new java.lang.String[] { "Name", "Tasks", }); + internal_static_tensorflow_JobDeviceFilters_TasksEntry_descriptor = + internal_static_tensorflow_JobDeviceFilters_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_JobDeviceFilters_TasksEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_JobDeviceFilters_TasksEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_ClusterDeviceFilters_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_tensorflow_ClusterDeviceFilters_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ClusterDeviceFilters_descriptor, + new java.lang.String[] { "Jobs", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/JobDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/JobDef.java new file mode 100644 index 00000000000..c6766412507 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/JobDef.java @@ -0,0 +1,935 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/cluster.proto + +package org.tensorflow.proto.distruntime; + +/** + *
+ * Defines a single job in a TensorFlow cluster.
+ * 
+ * + * Protobuf type {@code tensorflow.JobDef} + */ +public final class JobDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.JobDef) + JobDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use JobDef.newBuilder() to construct. + private JobDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private JobDef() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new JobDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private JobDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + tasks_ = com.google.protobuf.MapField.newMapField( + TasksDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + tasks__ = input.readMessage( + TasksDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + tasks_.getMutableMap().put( + tasks__.getKey(), tasks__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.distruntime.ClusterProtos.internal_static_tensorflow_JobDef_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetTasks(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.distruntime.ClusterProtos.internal_static_tensorflow_JobDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.distruntime.JobDef.class, org.tensorflow.proto.distruntime.JobDef.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The name of this job.
+   * 
+ * + * 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; + } + } + /** + *
+   * The name of this job.
+   * 
+ * + * 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 TASKS_FIELD_NUMBER = 2; + private static final class TasksDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.distruntime.ClusterProtos.internal_static_tensorflow_JobDef_TasksEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.String> tasks_; + private com.google.protobuf.MapField + internalGetTasks() { + if (tasks_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TasksDefaultEntryHolder.defaultEntry); + } + return tasks_; + } + + public int getTasksCount() { + return internalGetTasks().getMap().size(); + } + /** + *
+   * Mapping from task ID to "hostname:port" string.
+   * If the `name` field contains "worker", and the `tasks` map contains a
+   * mapping from 7 to "example.org:2222", then the device prefix
+   * "/job:worker/task:7" will be assigned to "example.org:2222".
+   * 
+ * + * map<int32, string> tasks = 2; + */ + + public boolean containsTasks( + int key) { + + return internalGetTasks().getMap().containsKey(key); + } + /** + * Use {@link #getTasksMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getTasks() { + return getTasksMap(); + } + /** + *
+   * Mapping from task ID to "hostname:port" string.
+   * If the `name` field contains "worker", and the `tasks` map contains a
+   * mapping from 7 to "example.org:2222", then the device prefix
+   * "/job:worker/task:7" will be assigned to "example.org:2222".
+   * 
+ * + * map<int32, string> tasks = 2; + */ + + public java.util.Map getTasksMap() { + return internalGetTasks().getMap(); + } + /** + *
+   * Mapping from task ID to "hostname:port" string.
+   * If the `name` field contains "worker", and the `tasks` map contains a
+   * mapping from 7 to "example.org:2222", then the device prefix
+   * "/job:worker/task:7" will be assigned to "example.org:2222".
+   * 
+ * + * map<int32, string> tasks = 2; + */ + + public java.lang.String getTasksOrDefault( + int key, + java.lang.String defaultValue) { + + java.util.Map map = + internalGetTasks().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Mapping from task ID to "hostname:port" string.
+   * If the `name` field contains "worker", and the `tasks` map contains a
+   * mapping from 7 to "example.org:2222", then the device prefix
+   * "/job:worker/task:7" will be assigned to "example.org:2222".
+   * 
+ * + * map<int32, string> tasks = 2; + */ + + public java.lang.String getTasksOrThrow( + int key) { + + java.util.Map map = + internalGetTasks().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetTasks(), + TasksDefaultEntryHolder.defaultEntry, + 2); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (java.util.Map.Entry entry + : internalGetTasks().getMap().entrySet()) { + com.google.protobuf.MapEntry + tasks__ = TasksDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, tasks__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.distruntime.JobDef)) { + return super.equals(obj); + } + org.tensorflow.proto.distruntime.JobDef other = (org.tensorflow.proto.distruntime.JobDef) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!internalGetTasks().equals( + other.internalGetTasks())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (!internalGetTasks().getMap().isEmpty()) { + hash = (37 * hash) + TASKS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTasks().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.distruntime.JobDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.JobDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.JobDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.JobDef 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.proto.distruntime.JobDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.JobDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.JobDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.JobDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.JobDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.JobDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.JobDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.JobDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.distruntime.JobDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Defines a single job in a TensorFlow cluster.
+   * 
+ * + * Protobuf type {@code tensorflow.JobDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.JobDef) + org.tensorflow.proto.distruntime.JobDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.distruntime.ClusterProtos.internal_static_tensorflow_JobDef_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetTasks(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableTasks(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.distruntime.ClusterProtos.internal_static_tensorflow_JobDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.distruntime.JobDef.class, org.tensorflow.proto.distruntime.JobDef.Builder.class); + } + + // Construct using org.tensorflow.proto.distruntime.JobDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + internalGetMutableTasks().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.distruntime.ClusterProtos.internal_static_tensorflow_JobDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.JobDef getDefaultInstanceForType() { + return org.tensorflow.proto.distruntime.JobDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.JobDef build() { + org.tensorflow.proto.distruntime.JobDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.JobDef buildPartial() { + org.tensorflow.proto.distruntime.JobDef result = new org.tensorflow.proto.distruntime.JobDef(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.tasks_ = internalGetTasks(); + result.tasks_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.distruntime.JobDef) { + return mergeFrom((org.tensorflow.proto.distruntime.JobDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.distruntime.JobDef other) { + if (other == org.tensorflow.proto.distruntime.JobDef.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + internalGetMutableTasks().mergeFrom( + other.internalGetTasks()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.distruntime.JobDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.distruntime.JobDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of this job.
+     * 
+ * + * 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; + } + } + /** + *
+     * The name of this job.
+     * 
+ * + * 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; + } + } + /** + *
+     * The name of this job.
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The name of this job.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The name of this job.
+     * 
+ * + * 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.Integer, java.lang.String> tasks_; + private com.google.protobuf.MapField + internalGetTasks() { + if (tasks_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TasksDefaultEntryHolder.defaultEntry); + } + return tasks_; + } + private com.google.protobuf.MapField + internalGetMutableTasks() { + onChanged();; + if (tasks_ == null) { + tasks_ = com.google.protobuf.MapField.newMapField( + TasksDefaultEntryHolder.defaultEntry); + } + if (!tasks_.isMutable()) { + tasks_ = tasks_.copy(); + } + return tasks_; + } + + public int getTasksCount() { + return internalGetTasks().getMap().size(); + } + /** + *
+     * Mapping from task ID to "hostname:port" string.
+     * If the `name` field contains "worker", and the `tasks` map contains a
+     * mapping from 7 to "example.org:2222", then the device prefix
+     * "/job:worker/task:7" will be assigned to "example.org:2222".
+     * 
+ * + * map<int32, string> tasks = 2; + */ + + public boolean containsTasks( + int key) { + + return internalGetTasks().getMap().containsKey(key); + } + /** + * Use {@link #getTasksMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getTasks() { + return getTasksMap(); + } + /** + *
+     * Mapping from task ID to "hostname:port" string.
+     * If the `name` field contains "worker", and the `tasks` map contains a
+     * mapping from 7 to "example.org:2222", then the device prefix
+     * "/job:worker/task:7" will be assigned to "example.org:2222".
+     * 
+ * + * map<int32, string> tasks = 2; + */ + + public java.util.Map getTasksMap() { + return internalGetTasks().getMap(); + } + /** + *
+     * Mapping from task ID to "hostname:port" string.
+     * If the `name` field contains "worker", and the `tasks` map contains a
+     * mapping from 7 to "example.org:2222", then the device prefix
+     * "/job:worker/task:7" will be assigned to "example.org:2222".
+     * 
+ * + * map<int32, string> tasks = 2; + */ + + public java.lang.String getTasksOrDefault( + int key, + java.lang.String defaultValue) { + + java.util.Map map = + internalGetTasks().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Mapping from task ID to "hostname:port" string.
+     * If the `name` field contains "worker", and the `tasks` map contains a
+     * mapping from 7 to "example.org:2222", then the device prefix
+     * "/job:worker/task:7" will be assigned to "example.org:2222".
+     * 
+ * + * map<int32, string> tasks = 2; + */ + + public java.lang.String getTasksOrThrow( + int key) { + + java.util.Map map = + internalGetTasks().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTasks() { + internalGetMutableTasks().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Mapping from task ID to "hostname:port" string.
+     * If the `name` field contains "worker", and the `tasks` map contains a
+     * mapping from 7 to "example.org:2222", then the device prefix
+     * "/job:worker/task:7" will be assigned to "example.org:2222".
+     * 
+ * + * map<int32, string> tasks = 2; + */ + + public Builder removeTasks( + int key) { + + internalGetMutableTasks().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableTasks() { + return internalGetMutableTasks().getMutableMap(); + } + /** + *
+     * Mapping from task ID to "hostname:port" string.
+     * If the `name` field contains "worker", and the `tasks` map contains a
+     * mapping from 7 to "example.org:2222", then the device prefix
+     * "/job:worker/task:7" will be assigned to "example.org:2222".
+     * 
+ * + * map<int32, string> tasks = 2; + */ + public Builder putTasks( + int key, + java.lang.String value) { + + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableTasks().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Mapping from task ID to "hostname:port" string.
+     * If the `name` field contains "worker", and the `tasks` map contains a
+     * mapping from 7 to "example.org:2222", then the device prefix
+     * "/job:worker/task:7" will be assigned to "example.org:2222".
+     * 
+ * + * map<int32, string> tasks = 2; + */ + + public Builder putAllTasks( + java.util.Map values) { + internalGetMutableTasks().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.JobDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.JobDef) + private static final org.tensorflow.proto.distruntime.JobDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.distruntime.JobDef(); + } + + public static org.tensorflow.proto.distruntime.JobDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JobDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new JobDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.JobDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/JobDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/JobDefOrBuilder.java new file mode 100644 index 00000000000..a9c24b98a74 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/JobDefOrBuilder.java @@ -0,0 +1,96 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/cluster.proto + +package org.tensorflow.proto.distruntime; + +public interface JobDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.JobDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of this job.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * The name of this job.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Mapping from task ID to "hostname:port" string.
+   * If the `name` field contains "worker", and the `tasks` map contains a
+   * mapping from 7 to "example.org:2222", then the device prefix
+   * "/job:worker/task:7" will be assigned to "example.org:2222".
+   * 
+ * + * map<int32, string> tasks = 2; + */ + int getTasksCount(); + /** + *
+   * Mapping from task ID to "hostname:port" string.
+   * If the `name` field contains "worker", and the `tasks` map contains a
+   * mapping from 7 to "example.org:2222", then the device prefix
+   * "/job:worker/task:7" will be assigned to "example.org:2222".
+   * 
+ * + * map<int32, string> tasks = 2; + */ + boolean containsTasks( + int key); + /** + * Use {@link #getTasksMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getTasks(); + /** + *
+   * Mapping from task ID to "hostname:port" string.
+   * If the `name` field contains "worker", and the `tasks` map contains a
+   * mapping from 7 to "example.org:2222", then the device prefix
+   * "/job:worker/task:7" will be assigned to "example.org:2222".
+   * 
+ * + * map<int32, string> tasks = 2; + */ + java.util.Map + getTasksMap(); + /** + *
+   * Mapping from task ID to "hostname:port" string.
+   * If the `name` field contains "worker", and the `tasks` map contains a
+   * mapping from 7 to "example.org:2222", then the device prefix
+   * "/job:worker/task:7" will be assigned to "example.org:2222".
+   * 
+ * + * map<int32, string> tasks = 2; + */ + + java.lang.String getTasksOrDefault( + int key, + java.lang.String defaultValue); + /** + *
+   * Mapping from task ID to "hostname:port" string.
+   * If the `name` field contains "worker", and the `tasks` map contains a
+   * mapping from 7 to "example.org:2222", then the device prefix
+   * "/job:worker/task:7" will be assigned to "example.org:2222".
+   * 
+ * + * map<int32, string> tasks = 2; + */ + + java.lang.String getTasksOrThrow( + int key); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/JobDeviceFilters.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/JobDeviceFilters.java new file mode 100644 index 00000000000..bbc7a6542be --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/JobDeviceFilters.java @@ -0,0 +1,902 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/device_filters.proto + +package org.tensorflow.proto.distruntime; + +/** + *
+ * Defines the device filters for tasks in a job.
+ * 
+ * + * Protobuf type {@code tensorflow.JobDeviceFilters} + */ +public final class JobDeviceFilters extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.JobDeviceFilters) + JobDeviceFiltersOrBuilder { +private static final long serialVersionUID = 0L; + // Use JobDeviceFilters.newBuilder() to construct. + private JobDeviceFilters(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private JobDeviceFilters() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new JobDeviceFilters(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private JobDeviceFilters( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + tasks_ = com.google.protobuf.MapField.newMapField( + TasksDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + tasks__ = input.readMessage( + TasksDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + tasks_.getMutableMap().put( + tasks__.getKey(), tasks__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.distruntime.DeviceFiltersProtos.internal_static_tensorflow_JobDeviceFilters_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetTasks(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.distruntime.DeviceFiltersProtos.internal_static_tensorflow_JobDeviceFilters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.distruntime.JobDeviceFilters.class, org.tensorflow.proto.distruntime.JobDeviceFilters.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The name of this job.
+   * 
+ * + * 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; + } + } + /** + *
+   * The name of this job.
+   * 
+ * + * 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 TASKS_FIELD_NUMBER = 2; + private static final class TasksDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, org.tensorflow.proto.distruntime.TaskDeviceFilters> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.distruntime.DeviceFiltersProtos.internal_static_tensorflow_JobDeviceFilters_TasksEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.distruntime.TaskDeviceFilters.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.Integer, org.tensorflow.proto.distruntime.TaskDeviceFilters> tasks_; + private com.google.protobuf.MapField + internalGetTasks() { + if (tasks_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TasksDefaultEntryHolder.defaultEntry); + } + return tasks_; + } + + public int getTasksCount() { + return internalGetTasks().getMap().size(); + } + /** + *
+   * Mapping from task ID to task device filters.
+   * 
+ * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + + public boolean containsTasks( + int key) { + + return internalGetTasks().getMap().containsKey(key); + } + /** + * Use {@link #getTasksMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getTasks() { + return getTasksMap(); + } + /** + *
+   * Mapping from task ID to task device filters.
+   * 
+ * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + + public java.util.Map getTasksMap() { + return internalGetTasks().getMap(); + } + /** + *
+   * Mapping from task ID to task device filters.
+   * 
+ * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + + public org.tensorflow.proto.distruntime.TaskDeviceFilters getTasksOrDefault( + int key, + org.tensorflow.proto.distruntime.TaskDeviceFilters defaultValue) { + + java.util.Map map = + internalGetTasks().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Mapping from task ID to task device filters.
+   * 
+ * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + + public org.tensorflow.proto.distruntime.TaskDeviceFilters getTasksOrThrow( + int key) { + + java.util.Map map = + internalGetTasks().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetTasks(), + TasksDefaultEntryHolder.defaultEntry, + 2); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (java.util.Map.Entry entry + : internalGetTasks().getMap().entrySet()) { + com.google.protobuf.MapEntry + tasks__ = TasksDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, tasks__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.distruntime.JobDeviceFilters)) { + return super.equals(obj); + } + org.tensorflow.proto.distruntime.JobDeviceFilters other = (org.tensorflow.proto.distruntime.JobDeviceFilters) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!internalGetTasks().equals( + other.internalGetTasks())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (!internalGetTasks().getMap().isEmpty()) { + hash = (37 * hash) + TASKS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTasks().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.distruntime.JobDeviceFilters parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.JobDeviceFilters parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.JobDeviceFilters parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.JobDeviceFilters 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.proto.distruntime.JobDeviceFilters parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.JobDeviceFilters parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.JobDeviceFilters parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.JobDeviceFilters parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.JobDeviceFilters parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.JobDeviceFilters parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.JobDeviceFilters parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.JobDeviceFilters parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.distruntime.JobDeviceFilters prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Defines the device filters for tasks in a job.
+   * 
+ * + * Protobuf type {@code tensorflow.JobDeviceFilters} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.JobDeviceFilters) + org.tensorflow.proto.distruntime.JobDeviceFiltersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.distruntime.DeviceFiltersProtos.internal_static_tensorflow_JobDeviceFilters_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetTasks(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableTasks(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.distruntime.DeviceFiltersProtos.internal_static_tensorflow_JobDeviceFilters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.distruntime.JobDeviceFilters.class, org.tensorflow.proto.distruntime.JobDeviceFilters.Builder.class); + } + + // Construct using org.tensorflow.proto.distruntime.JobDeviceFilters.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + internalGetMutableTasks().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.distruntime.DeviceFiltersProtos.internal_static_tensorflow_JobDeviceFilters_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.JobDeviceFilters getDefaultInstanceForType() { + return org.tensorflow.proto.distruntime.JobDeviceFilters.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.JobDeviceFilters build() { + org.tensorflow.proto.distruntime.JobDeviceFilters result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.JobDeviceFilters buildPartial() { + org.tensorflow.proto.distruntime.JobDeviceFilters result = new org.tensorflow.proto.distruntime.JobDeviceFilters(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.tasks_ = internalGetTasks(); + result.tasks_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.distruntime.JobDeviceFilters) { + return mergeFrom((org.tensorflow.proto.distruntime.JobDeviceFilters)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.distruntime.JobDeviceFilters other) { + if (other == org.tensorflow.proto.distruntime.JobDeviceFilters.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + internalGetMutableTasks().mergeFrom( + other.internalGetTasks()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.distruntime.JobDeviceFilters parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.distruntime.JobDeviceFilters) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of this job.
+     * 
+ * + * 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; + } + } + /** + *
+     * The name of this job.
+     * 
+ * + * 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; + } + } + /** + *
+     * The name of this job.
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The name of this job.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The name of this job.
+     * 
+ * + * 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.Integer, org.tensorflow.proto.distruntime.TaskDeviceFilters> tasks_; + private com.google.protobuf.MapField + internalGetTasks() { + if (tasks_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TasksDefaultEntryHolder.defaultEntry); + } + return tasks_; + } + private com.google.protobuf.MapField + internalGetMutableTasks() { + onChanged();; + if (tasks_ == null) { + tasks_ = com.google.protobuf.MapField.newMapField( + TasksDefaultEntryHolder.defaultEntry); + } + if (!tasks_.isMutable()) { + tasks_ = tasks_.copy(); + } + return tasks_; + } + + public int getTasksCount() { + return internalGetTasks().getMap().size(); + } + /** + *
+     * Mapping from task ID to task device filters.
+     * 
+ * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + + public boolean containsTasks( + int key) { + + return internalGetTasks().getMap().containsKey(key); + } + /** + * Use {@link #getTasksMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getTasks() { + return getTasksMap(); + } + /** + *
+     * Mapping from task ID to task device filters.
+     * 
+ * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + + public java.util.Map getTasksMap() { + return internalGetTasks().getMap(); + } + /** + *
+     * Mapping from task ID to task device filters.
+     * 
+ * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + + public org.tensorflow.proto.distruntime.TaskDeviceFilters getTasksOrDefault( + int key, + org.tensorflow.proto.distruntime.TaskDeviceFilters defaultValue) { + + java.util.Map map = + internalGetTasks().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Mapping from task ID to task device filters.
+     * 
+ * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + + public org.tensorflow.proto.distruntime.TaskDeviceFilters getTasksOrThrow( + int key) { + + java.util.Map map = + internalGetTasks().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTasks() { + internalGetMutableTasks().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Mapping from task ID to task device filters.
+     * 
+ * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + + public Builder removeTasks( + int key) { + + internalGetMutableTasks().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableTasks() { + return internalGetMutableTasks().getMutableMap(); + } + /** + *
+     * Mapping from task ID to task device filters.
+     * 
+ * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + public Builder putTasks( + int key, + org.tensorflow.proto.distruntime.TaskDeviceFilters value) { + + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableTasks().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Mapping from task ID to task device filters.
+     * 
+ * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + + public Builder putAllTasks( + java.util.Map values) { + internalGetMutableTasks().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.JobDeviceFilters) + } + + // @@protoc_insertion_point(class_scope:tensorflow.JobDeviceFilters) + private static final org.tensorflow.proto.distruntime.JobDeviceFilters DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.distruntime.JobDeviceFilters(); + } + + public static org.tensorflow.proto.distruntime.JobDeviceFilters getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JobDeviceFilters parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new JobDeviceFilters(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.JobDeviceFilters getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/JobDeviceFiltersOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/JobDeviceFiltersOrBuilder.java new file mode 100644 index 00000000000..92c3ba82935 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/JobDeviceFiltersOrBuilder.java @@ -0,0 +1,81 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/device_filters.proto + +package org.tensorflow.proto.distruntime; + +public interface JobDeviceFiltersOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.JobDeviceFilters) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of this job.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * The name of this job.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Mapping from task ID to task device filters.
+   * 
+ * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + int getTasksCount(); + /** + *
+   * Mapping from task ID to task device filters.
+   * 
+ * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + boolean containsTasks( + int key); + /** + * Use {@link #getTasksMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getTasks(); + /** + *
+   * Mapping from task ID to task device filters.
+   * 
+ * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + java.util.Map + getTasksMap(); + /** + *
+   * Mapping from task ID to task device filters.
+   * 
+ * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + + org.tensorflow.proto.distruntime.TaskDeviceFilters getTasksOrDefault( + int key, + org.tensorflow.proto.distruntime.TaskDeviceFilters defaultValue); + /** + *
+   * Mapping from task ID to task device filters.
+   * 
+ * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + + org.tensorflow.proto.distruntime.TaskDeviceFilters getTasksOrThrow( + int key); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ServerDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ServerDef.java new file mode 100644 index 00000000000..068264c171e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ServerDef.java @@ -0,0 +1,1611 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/tensorflow_server.proto + +package org.tensorflow.proto.distruntime; + +/** + *
+ * Defines the configuration of a single TensorFlow server.
+ * 
+ * + * Protobuf type {@code tensorflow.ServerDef} + */ +public final class ServerDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ServerDef) + ServerDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use ServerDef.newBuilder() to construct. + private ServerDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ServerDef() { + jobName_ = ""; + protocol_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ServerDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ServerDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.tensorflow.proto.distruntime.ClusterDef.Builder subBuilder = null; + if (cluster_ != null) { + subBuilder = cluster_.toBuilder(); + } + cluster_ = input.readMessage(org.tensorflow.proto.distruntime.ClusterDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cluster_); + cluster_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + jobName_ = s; + break; + } + case 24: { + + taskIndex_ = input.readInt32(); + break; + } + case 34: { + org.tensorflow.proto.framework.ConfigProto.Builder subBuilder = null; + if (defaultSessionConfig_ != null) { + subBuilder = defaultSessionConfig_.toBuilder(); + } + defaultSessionConfig_ = input.readMessage(org.tensorflow.proto.framework.ConfigProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(defaultSessionConfig_); + defaultSessionConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + protocol_ = s; + break; + } + case 48: { + + port_ = input.readInt32(); + break; + } + case 58: { + org.tensorflow.proto.distruntime.ClusterDeviceFilters.Builder subBuilder = null; + if (clusterDeviceFilters_ != null) { + subBuilder = clusterDeviceFilters_.toBuilder(); + } + clusterDeviceFilters_ = input.readMessage(org.tensorflow.proto.distruntime.ClusterDeviceFilters.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(clusterDeviceFilters_); + clusterDeviceFilters_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.distruntime.ServerProtos.internal_static_tensorflow_ServerDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.distruntime.ServerProtos.internal_static_tensorflow_ServerDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.distruntime.ServerDef.class, org.tensorflow.proto.distruntime.ServerDef.Builder.class); + } + + public static final int CLUSTER_FIELD_NUMBER = 1; + private org.tensorflow.proto.distruntime.ClusterDef cluster_; + /** + *
+   * The cluster of which this server is a member.
+   * 
+ * + * .tensorflow.ClusterDef cluster = 1; + */ + public boolean hasCluster() { + return cluster_ != null; + } + /** + *
+   * The cluster of which this server is a member.
+   * 
+ * + * .tensorflow.ClusterDef cluster = 1; + */ + public org.tensorflow.proto.distruntime.ClusterDef getCluster() { + return cluster_ == null ? org.tensorflow.proto.distruntime.ClusterDef.getDefaultInstance() : cluster_; + } + /** + *
+   * The cluster of which this server is a member.
+   * 
+ * + * .tensorflow.ClusterDef cluster = 1; + */ + public org.tensorflow.proto.distruntime.ClusterDefOrBuilder getClusterOrBuilder() { + return getCluster(); + } + + public static final int JOB_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object jobName_; + /** + *
+   * The name of the job of which this server is a member.
+   * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
+   * that matches this name.
+   * 
+ * + * string job_name = 2; + */ + public java.lang.String getJobName() { + java.lang.Object ref = jobName_; + 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(); + jobName_ = s; + return s; + } + } + /** + *
+   * The name of the job of which this server is a member.
+   * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
+   * that matches this name.
+   * 
+ * + * string job_name = 2; + */ + public com.google.protobuf.ByteString + getJobNameBytes() { + java.lang.Object ref = jobName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jobName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TASK_INDEX_FIELD_NUMBER = 3; + private int taskIndex_; + /** + *
+   * The task index of this server in its job.
+   * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
+   * and a mapping in its `tasks` field for this index.
+   * 
+ * + * int32 task_index = 3; + */ + public int getTaskIndex() { + return taskIndex_; + } + + public static final int DEFAULT_SESSION_CONFIG_FIELD_NUMBER = 4; + private org.tensorflow.proto.framework.ConfigProto defaultSessionConfig_; + /** + *
+   * The default configuration for sessions that run on this server.
+   * 
+ * + * .tensorflow.ConfigProto default_session_config = 4; + */ + public boolean hasDefaultSessionConfig() { + return defaultSessionConfig_ != null; + } + /** + *
+   * The default configuration for sessions that run on this server.
+   * 
+ * + * .tensorflow.ConfigProto default_session_config = 4; + */ + public org.tensorflow.proto.framework.ConfigProto getDefaultSessionConfig() { + return defaultSessionConfig_ == null ? org.tensorflow.proto.framework.ConfigProto.getDefaultInstance() : defaultSessionConfig_; + } + /** + *
+   * The default configuration for sessions that run on this server.
+   * 
+ * + * .tensorflow.ConfigProto default_session_config = 4; + */ + public org.tensorflow.proto.framework.ConfigProtoOrBuilder getDefaultSessionConfigOrBuilder() { + return getDefaultSessionConfig(); + } + + public static final int PROTOCOL_FIELD_NUMBER = 5; + private volatile java.lang.Object protocol_; + /** + *
+   * The protocol to be used by this server.
+   * Acceptable values include: "grpc", "grpc+verbs".
+   * 
+ * + * string protocol = 5; + */ + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + 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(); + protocol_ = s; + return s; + } + } + /** + *
+   * The protocol to be used by this server.
+   * Acceptable values include: "grpc", "grpc+verbs".
+   * 
+ * + * string protocol = 5; + */ + public com.google.protobuf.ByteString + getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 6; + private int port_; + /** + *
+   * The server port. If not set, then we identify the port from the job_name.
+   * 
+ * + * int32 port = 6; + */ + public int getPort() { + return port_; + } + + public static final int CLUSTER_DEVICE_FILTERS_FIELD_NUMBER = 7; + private org.tensorflow.proto.distruntime.ClusterDeviceFilters clusterDeviceFilters_; + /** + *
+   * Device filters for remote tasks in the cluster.
+   * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
+   * 
+ * + * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; + */ + public boolean hasClusterDeviceFilters() { + return clusterDeviceFilters_ != null; + } + /** + *
+   * Device filters for remote tasks in the cluster.
+   * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
+   * 
+ * + * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; + */ + public org.tensorflow.proto.distruntime.ClusterDeviceFilters getClusterDeviceFilters() { + return clusterDeviceFilters_ == null ? org.tensorflow.proto.distruntime.ClusterDeviceFilters.getDefaultInstance() : clusterDeviceFilters_; + } + /** + *
+   * Device filters for remote tasks in the cluster.
+   * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
+   * 
+ * + * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; + */ + public org.tensorflow.proto.distruntime.ClusterDeviceFiltersOrBuilder getClusterDeviceFiltersOrBuilder() { + return getClusterDeviceFilters(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (cluster_ != null) { + output.writeMessage(1, getCluster()); + } + if (!getJobNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobName_); + } + if (taskIndex_ != 0) { + output.writeInt32(3, taskIndex_); + } + if (defaultSessionConfig_ != null) { + output.writeMessage(4, getDefaultSessionConfig()); + } + if (!getProtocolBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, protocol_); + } + if (port_ != 0) { + output.writeInt32(6, port_); + } + if (clusterDeviceFilters_ != null) { + output.writeMessage(7, getClusterDeviceFilters()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cluster_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCluster()); + } + if (!getJobNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobName_); + } + if (taskIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, taskIndex_); + } + if (defaultSessionConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getDefaultSessionConfig()); + } + if (!getProtocolBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, protocol_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, port_); + } + if (clusterDeviceFilters_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getClusterDeviceFilters()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.distruntime.ServerDef)) { + return super.equals(obj); + } + org.tensorflow.proto.distruntime.ServerDef other = (org.tensorflow.proto.distruntime.ServerDef) obj; + + if (hasCluster() != other.hasCluster()) return false; + if (hasCluster()) { + if (!getCluster() + .equals(other.getCluster())) return false; + } + if (!getJobName() + .equals(other.getJobName())) return false; + if (getTaskIndex() + != other.getTaskIndex()) return false; + if (hasDefaultSessionConfig() != other.hasDefaultSessionConfig()) return false; + if (hasDefaultSessionConfig()) { + if (!getDefaultSessionConfig() + .equals(other.getDefaultSessionConfig())) return false; + } + if (!getProtocol() + .equals(other.getProtocol())) return false; + if (getPort() + != other.getPort()) return false; + if (hasClusterDeviceFilters() != other.hasClusterDeviceFilters()) return false; + if (hasClusterDeviceFilters()) { + if (!getClusterDeviceFilters() + .equals(other.getClusterDeviceFilters())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCluster()) { + hash = (37 * hash) + CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getCluster().hashCode(); + } + hash = (37 * hash) + JOB_NAME_FIELD_NUMBER; + hash = (53 * hash) + getJobName().hashCode(); + hash = (37 * hash) + TASK_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getTaskIndex(); + if (hasDefaultSessionConfig()) { + hash = (37 * hash) + DEFAULT_SESSION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDefaultSessionConfig().hashCode(); + } + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + if (hasClusterDeviceFilters()) { + hash = (37 * hash) + CLUSTER_DEVICE_FILTERS_FIELD_NUMBER; + hash = (53 * hash) + getClusterDeviceFilters().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.distruntime.ServerDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.ServerDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.ServerDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.ServerDef 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.proto.distruntime.ServerDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.ServerDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.ServerDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.ServerDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.ServerDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.ServerDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.ServerDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.ServerDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.distruntime.ServerDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Defines the configuration of a single TensorFlow server.
+   * 
+ * + * Protobuf type {@code tensorflow.ServerDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ServerDef) + org.tensorflow.proto.distruntime.ServerDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.distruntime.ServerProtos.internal_static_tensorflow_ServerDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.distruntime.ServerProtos.internal_static_tensorflow_ServerDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.distruntime.ServerDef.class, org.tensorflow.proto.distruntime.ServerDef.Builder.class); + } + + // Construct using org.tensorflow.proto.distruntime.ServerDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (clusterBuilder_ == null) { + cluster_ = null; + } else { + cluster_ = null; + clusterBuilder_ = null; + } + jobName_ = ""; + + taskIndex_ = 0; + + if (defaultSessionConfigBuilder_ == null) { + defaultSessionConfig_ = null; + } else { + defaultSessionConfig_ = null; + defaultSessionConfigBuilder_ = null; + } + protocol_ = ""; + + port_ = 0; + + if (clusterDeviceFiltersBuilder_ == null) { + clusterDeviceFilters_ = null; + } else { + clusterDeviceFilters_ = null; + clusterDeviceFiltersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.distruntime.ServerProtos.internal_static_tensorflow_ServerDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.ServerDef getDefaultInstanceForType() { + return org.tensorflow.proto.distruntime.ServerDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.ServerDef build() { + org.tensorflow.proto.distruntime.ServerDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.ServerDef buildPartial() { + org.tensorflow.proto.distruntime.ServerDef result = new org.tensorflow.proto.distruntime.ServerDef(this); + if (clusterBuilder_ == null) { + result.cluster_ = cluster_; + } else { + result.cluster_ = clusterBuilder_.build(); + } + result.jobName_ = jobName_; + result.taskIndex_ = taskIndex_; + if (defaultSessionConfigBuilder_ == null) { + result.defaultSessionConfig_ = defaultSessionConfig_; + } else { + result.defaultSessionConfig_ = defaultSessionConfigBuilder_.build(); + } + result.protocol_ = protocol_; + result.port_ = port_; + if (clusterDeviceFiltersBuilder_ == null) { + result.clusterDeviceFilters_ = clusterDeviceFilters_; + } else { + result.clusterDeviceFilters_ = clusterDeviceFiltersBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.distruntime.ServerDef) { + return mergeFrom((org.tensorflow.proto.distruntime.ServerDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.distruntime.ServerDef other) { + if (other == org.tensorflow.proto.distruntime.ServerDef.getDefaultInstance()) return this; + if (other.hasCluster()) { + mergeCluster(other.getCluster()); + } + if (!other.getJobName().isEmpty()) { + jobName_ = other.jobName_; + onChanged(); + } + if (other.getTaskIndex() != 0) { + setTaskIndex(other.getTaskIndex()); + } + if (other.hasDefaultSessionConfig()) { + mergeDefaultSessionConfig(other.getDefaultSessionConfig()); + } + if (!other.getProtocol().isEmpty()) { + protocol_ = other.protocol_; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + if (other.hasClusterDeviceFilters()) { + mergeClusterDeviceFilters(other.getClusterDeviceFilters()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.distruntime.ServerDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.distruntime.ServerDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private org.tensorflow.proto.distruntime.ClusterDef cluster_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.distruntime.ClusterDef, org.tensorflow.proto.distruntime.ClusterDef.Builder, org.tensorflow.proto.distruntime.ClusterDefOrBuilder> clusterBuilder_; + /** + *
+     * The cluster of which this server is a member.
+     * 
+ * + * .tensorflow.ClusterDef cluster = 1; + */ + public boolean hasCluster() { + return clusterBuilder_ != null || cluster_ != null; + } + /** + *
+     * The cluster of which this server is a member.
+     * 
+ * + * .tensorflow.ClusterDef cluster = 1; + */ + public org.tensorflow.proto.distruntime.ClusterDef getCluster() { + if (clusterBuilder_ == null) { + return cluster_ == null ? org.tensorflow.proto.distruntime.ClusterDef.getDefaultInstance() : cluster_; + } else { + return clusterBuilder_.getMessage(); + } + } + /** + *
+     * The cluster of which this server is a member.
+     * 
+ * + * .tensorflow.ClusterDef cluster = 1; + */ + public Builder setCluster(org.tensorflow.proto.distruntime.ClusterDef value) { + if (clusterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cluster_ = value; + onChanged(); + } else { + clusterBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The cluster of which this server is a member.
+     * 
+ * + * .tensorflow.ClusterDef cluster = 1; + */ + public Builder setCluster( + org.tensorflow.proto.distruntime.ClusterDef.Builder builderForValue) { + if (clusterBuilder_ == null) { + cluster_ = builderForValue.build(); + onChanged(); + } else { + clusterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The cluster of which this server is a member.
+     * 
+ * + * .tensorflow.ClusterDef cluster = 1; + */ + public Builder mergeCluster(org.tensorflow.proto.distruntime.ClusterDef value) { + if (clusterBuilder_ == null) { + if (cluster_ != null) { + cluster_ = + org.tensorflow.proto.distruntime.ClusterDef.newBuilder(cluster_).mergeFrom(value).buildPartial(); + } else { + cluster_ = value; + } + onChanged(); + } else { + clusterBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The cluster of which this server is a member.
+     * 
+ * + * .tensorflow.ClusterDef cluster = 1; + */ + public Builder clearCluster() { + if (clusterBuilder_ == null) { + cluster_ = null; + onChanged(); + } else { + cluster_ = null; + clusterBuilder_ = null; + } + + return this; + } + /** + *
+     * The cluster of which this server is a member.
+     * 
+ * + * .tensorflow.ClusterDef cluster = 1; + */ + public org.tensorflow.proto.distruntime.ClusterDef.Builder getClusterBuilder() { + + onChanged(); + return getClusterFieldBuilder().getBuilder(); + } + /** + *
+     * The cluster of which this server is a member.
+     * 
+ * + * .tensorflow.ClusterDef cluster = 1; + */ + public org.tensorflow.proto.distruntime.ClusterDefOrBuilder getClusterOrBuilder() { + if (clusterBuilder_ != null) { + return clusterBuilder_.getMessageOrBuilder(); + } else { + return cluster_ == null ? + org.tensorflow.proto.distruntime.ClusterDef.getDefaultInstance() : cluster_; + } + } + /** + *
+     * The cluster of which this server is a member.
+     * 
+ * + * .tensorflow.ClusterDef cluster = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.distruntime.ClusterDef, org.tensorflow.proto.distruntime.ClusterDef.Builder, org.tensorflow.proto.distruntime.ClusterDefOrBuilder> + getClusterFieldBuilder() { + if (clusterBuilder_ == null) { + clusterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.distruntime.ClusterDef, org.tensorflow.proto.distruntime.ClusterDef.Builder, org.tensorflow.proto.distruntime.ClusterDefOrBuilder>( + getCluster(), + getParentForChildren(), + isClean()); + cluster_ = null; + } + return clusterBuilder_; + } + + private java.lang.Object jobName_ = ""; + /** + *
+     * The name of the job of which this server is a member.
+     * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
+     * that matches this name.
+     * 
+ * + * string job_name = 2; + */ + public java.lang.String getJobName() { + java.lang.Object ref = jobName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the job of which this server is a member.
+     * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
+     * that matches this name.
+     * 
+ * + * string job_name = 2; + */ + public com.google.protobuf.ByteString + getJobNameBytes() { + java.lang.Object ref = jobName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jobName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the job of which this server is a member.
+     * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
+     * that matches this name.
+     * 
+ * + * string job_name = 2; + */ + public Builder setJobName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jobName_ = value; + onChanged(); + return this; + } + /** + *
+     * The name of the job of which this server is a member.
+     * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
+     * that matches this name.
+     * 
+ * + * string job_name = 2; + */ + public Builder clearJobName() { + + jobName_ = getDefaultInstance().getJobName(); + onChanged(); + return this; + } + /** + *
+     * The name of the job of which this server is a member.
+     * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
+     * that matches this name.
+     * 
+ * + * string job_name = 2; + */ + public Builder setJobNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jobName_ = value; + onChanged(); + return this; + } + + private int taskIndex_ ; + /** + *
+     * The task index of this server in its job.
+     * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
+     * and a mapping in its `tasks` field for this index.
+     * 
+ * + * int32 task_index = 3; + */ + public int getTaskIndex() { + return taskIndex_; + } + /** + *
+     * The task index of this server in its job.
+     * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
+     * and a mapping in its `tasks` field for this index.
+     * 
+ * + * int32 task_index = 3; + */ + public Builder setTaskIndex(int value) { + + taskIndex_ = value; + onChanged(); + return this; + } + /** + *
+     * The task index of this server in its job.
+     * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
+     * and a mapping in its `tasks` field for this index.
+     * 
+ * + * int32 task_index = 3; + */ + public Builder clearTaskIndex() { + + taskIndex_ = 0; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.ConfigProto defaultSessionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.ConfigProto, org.tensorflow.proto.framework.ConfigProto.Builder, org.tensorflow.proto.framework.ConfigProtoOrBuilder> defaultSessionConfigBuilder_; + /** + *
+     * The default configuration for sessions that run on this server.
+     * 
+ * + * .tensorflow.ConfigProto default_session_config = 4; + */ + public boolean hasDefaultSessionConfig() { + return defaultSessionConfigBuilder_ != null || defaultSessionConfig_ != null; + } + /** + *
+     * The default configuration for sessions that run on this server.
+     * 
+ * + * .tensorflow.ConfigProto default_session_config = 4; + */ + public org.tensorflow.proto.framework.ConfigProto getDefaultSessionConfig() { + if (defaultSessionConfigBuilder_ == null) { + return defaultSessionConfig_ == null ? org.tensorflow.proto.framework.ConfigProto.getDefaultInstance() : defaultSessionConfig_; + } else { + return defaultSessionConfigBuilder_.getMessage(); + } + } + /** + *
+     * The default configuration for sessions that run on this server.
+     * 
+ * + * .tensorflow.ConfigProto default_session_config = 4; + */ + public Builder setDefaultSessionConfig(org.tensorflow.proto.framework.ConfigProto value) { + if (defaultSessionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + defaultSessionConfig_ = value; + onChanged(); + } else { + defaultSessionConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The default configuration for sessions that run on this server.
+     * 
+ * + * .tensorflow.ConfigProto default_session_config = 4; + */ + public Builder setDefaultSessionConfig( + org.tensorflow.proto.framework.ConfigProto.Builder builderForValue) { + if (defaultSessionConfigBuilder_ == null) { + defaultSessionConfig_ = builderForValue.build(); + onChanged(); + } else { + defaultSessionConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The default configuration for sessions that run on this server.
+     * 
+ * + * .tensorflow.ConfigProto default_session_config = 4; + */ + public Builder mergeDefaultSessionConfig(org.tensorflow.proto.framework.ConfigProto value) { + if (defaultSessionConfigBuilder_ == null) { + if (defaultSessionConfig_ != null) { + defaultSessionConfig_ = + org.tensorflow.proto.framework.ConfigProto.newBuilder(defaultSessionConfig_).mergeFrom(value).buildPartial(); + } else { + defaultSessionConfig_ = value; + } + onChanged(); + } else { + defaultSessionConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The default configuration for sessions that run on this server.
+     * 
+ * + * .tensorflow.ConfigProto default_session_config = 4; + */ + public Builder clearDefaultSessionConfig() { + if (defaultSessionConfigBuilder_ == null) { + defaultSessionConfig_ = null; + onChanged(); + } else { + defaultSessionConfig_ = null; + defaultSessionConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * The default configuration for sessions that run on this server.
+     * 
+ * + * .tensorflow.ConfigProto default_session_config = 4; + */ + public org.tensorflow.proto.framework.ConfigProto.Builder getDefaultSessionConfigBuilder() { + + onChanged(); + return getDefaultSessionConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The default configuration for sessions that run on this server.
+     * 
+ * + * .tensorflow.ConfigProto default_session_config = 4; + */ + public org.tensorflow.proto.framework.ConfigProtoOrBuilder getDefaultSessionConfigOrBuilder() { + if (defaultSessionConfigBuilder_ != null) { + return defaultSessionConfigBuilder_.getMessageOrBuilder(); + } else { + return defaultSessionConfig_ == null ? + org.tensorflow.proto.framework.ConfigProto.getDefaultInstance() : defaultSessionConfig_; + } + } + /** + *
+     * The default configuration for sessions that run on this server.
+     * 
+ * + * .tensorflow.ConfigProto default_session_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.ConfigProto, org.tensorflow.proto.framework.ConfigProto.Builder, org.tensorflow.proto.framework.ConfigProtoOrBuilder> + getDefaultSessionConfigFieldBuilder() { + if (defaultSessionConfigBuilder_ == null) { + defaultSessionConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.ConfigProto, org.tensorflow.proto.framework.ConfigProto.Builder, org.tensorflow.proto.framework.ConfigProtoOrBuilder>( + getDefaultSessionConfig(), + getParentForChildren(), + isClean()); + defaultSessionConfig_ = null; + } + return defaultSessionConfigBuilder_; + } + + private java.lang.Object protocol_ = ""; + /** + *
+     * The protocol to be used by this server.
+     * Acceptable values include: "grpc", "grpc+verbs".
+     * 
+ * + * string protocol = 5; + */ + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The protocol to be used by this server.
+     * Acceptable values include: "grpc", "grpc+verbs".
+     * 
+ * + * string protocol = 5; + */ + public com.google.protobuf.ByteString + getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The protocol to be used by this server.
+     * Acceptable values include: "grpc", "grpc+verbs".
+     * 
+ * + * string protocol = 5; + */ + public Builder setProtocol( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + protocol_ = value; + onChanged(); + return this; + } + /** + *
+     * The protocol to be used by this server.
+     * Acceptable values include: "grpc", "grpc+verbs".
+     * 
+ * + * string protocol = 5; + */ + public Builder clearProtocol() { + + protocol_ = getDefaultInstance().getProtocol(); + onChanged(); + return this; + } + /** + *
+     * The protocol to be used by this server.
+     * Acceptable values include: "grpc", "grpc+verbs".
+     * 
+ * + * string protocol = 5; + */ + public Builder setProtocolBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + protocol_ = value; + onChanged(); + return this; + } + + private int port_ ; + /** + *
+     * The server port. If not set, then we identify the port from the job_name.
+     * 
+ * + * int32 port = 6; + */ + public int getPort() { + return port_; + } + /** + *
+     * The server port. If not set, then we identify the port from the job_name.
+     * 
+ * + * int32 port = 6; + */ + public Builder setPort(int value) { + + port_ = value; + onChanged(); + return this; + } + /** + *
+     * The server port. If not set, then we identify the port from the job_name.
+     * 
+ * + * int32 port = 6; + */ + public Builder clearPort() { + + port_ = 0; + onChanged(); + return this; + } + + private org.tensorflow.proto.distruntime.ClusterDeviceFilters clusterDeviceFilters_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.distruntime.ClusterDeviceFilters, org.tensorflow.proto.distruntime.ClusterDeviceFilters.Builder, org.tensorflow.proto.distruntime.ClusterDeviceFiltersOrBuilder> clusterDeviceFiltersBuilder_; + /** + *
+     * Device filters for remote tasks in the cluster.
+     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
+     * 
+ * + * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; + */ + public boolean hasClusterDeviceFilters() { + return clusterDeviceFiltersBuilder_ != null || clusterDeviceFilters_ != null; + } + /** + *
+     * Device filters for remote tasks in the cluster.
+     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
+     * 
+ * + * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; + */ + public org.tensorflow.proto.distruntime.ClusterDeviceFilters getClusterDeviceFilters() { + if (clusterDeviceFiltersBuilder_ == null) { + return clusterDeviceFilters_ == null ? org.tensorflow.proto.distruntime.ClusterDeviceFilters.getDefaultInstance() : clusterDeviceFilters_; + } else { + return clusterDeviceFiltersBuilder_.getMessage(); + } + } + /** + *
+     * Device filters for remote tasks in the cluster.
+     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
+     * 
+ * + * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; + */ + public Builder setClusterDeviceFilters(org.tensorflow.proto.distruntime.ClusterDeviceFilters value) { + if (clusterDeviceFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clusterDeviceFilters_ = value; + onChanged(); + } else { + clusterDeviceFiltersBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Device filters for remote tasks in the cluster.
+     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
+     * 
+ * + * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; + */ + public Builder setClusterDeviceFilters( + org.tensorflow.proto.distruntime.ClusterDeviceFilters.Builder builderForValue) { + if (clusterDeviceFiltersBuilder_ == null) { + clusterDeviceFilters_ = builderForValue.build(); + onChanged(); + } else { + clusterDeviceFiltersBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Device filters for remote tasks in the cluster.
+     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
+     * 
+ * + * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; + */ + public Builder mergeClusterDeviceFilters(org.tensorflow.proto.distruntime.ClusterDeviceFilters value) { + if (clusterDeviceFiltersBuilder_ == null) { + if (clusterDeviceFilters_ != null) { + clusterDeviceFilters_ = + org.tensorflow.proto.distruntime.ClusterDeviceFilters.newBuilder(clusterDeviceFilters_).mergeFrom(value).buildPartial(); + } else { + clusterDeviceFilters_ = value; + } + onChanged(); + } else { + clusterDeviceFiltersBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Device filters for remote tasks in the cluster.
+     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
+     * 
+ * + * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; + */ + public Builder clearClusterDeviceFilters() { + if (clusterDeviceFiltersBuilder_ == null) { + clusterDeviceFilters_ = null; + onChanged(); + } else { + clusterDeviceFilters_ = null; + clusterDeviceFiltersBuilder_ = null; + } + + return this; + } + /** + *
+     * Device filters for remote tasks in the cluster.
+     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
+     * 
+ * + * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; + */ + public org.tensorflow.proto.distruntime.ClusterDeviceFilters.Builder getClusterDeviceFiltersBuilder() { + + onChanged(); + return getClusterDeviceFiltersFieldBuilder().getBuilder(); + } + /** + *
+     * Device filters for remote tasks in the cluster.
+     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
+     * 
+ * + * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; + */ + public org.tensorflow.proto.distruntime.ClusterDeviceFiltersOrBuilder getClusterDeviceFiltersOrBuilder() { + if (clusterDeviceFiltersBuilder_ != null) { + return clusterDeviceFiltersBuilder_.getMessageOrBuilder(); + } else { + return clusterDeviceFilters_ == null ? + org.tensorflow.proto.distruntime.ClusterDeviceFilters.getDefaultInstance() : clusterDeviceFilters_; + } + } + /** + *
+     * Device filters for remote tasks in the cluster.
+     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
+     * 
+ * + * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.distruntime.ClusterDeviceFilters, org.tensorflow.proto.distruntime.ClusterDeviceFilters.Builder, org.tensorflow.proto.distruntime.ClusterDeviceFiltersOrBuilder> + getClusterDeviceFiltersFieldBuilder() { + if (clusterDeviceFiltersBuilder_ == null) { + clusterDeviceFiltersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.distruntime.ClusterDeviceFilters, org.tensorflow.proto.distruntime.ClusterDeviceFilters.Builder, org.tensorflow.proto.distruntime.ClusterDeviceFiltersOrBuilder>( + getClusterDeviceFilters(), + getParentForChildren(), + isClean()); + clusterDeviceFilters_ = null; + } + return clusterDeviceFiltersBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ServerDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ServerDef) + private static final org.tensorflow.proto.distruntime.ServerDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.distruntime.ServerDef(); + } + + public static org.tensorflow.proto.distruntime.ServerDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServerDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ServerDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.ServerDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ServerDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ServerDefOrBuilder.java new file mode 100644 index 00000000000..6c1a12b002d --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ServerDefOrBuilder.java @@ -0,0 +1,149 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/tensorflow_server.proto + +package org.tensorflow.proto.distruntime; + +public interface ServerDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ServerDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The cluster of which this server is a member.
+   * 
+ * + * .tensorflow.ClusterDef cluster = 1; + */ + boolean hasCluster(); + /** + *
+   * The cluster of which this server is a member.
+   * 
+ * + * .tensorflow.ClusterDef cluster = 1; + */ + org.tensorflow.proto.distruntime.ClusterDef getCluster(); + /** + *
+   * The cluster of which this server is a member.
+   * 
+ * + * .tensorflow.ClusterDef cluster = 1; + */ + org.tensorflow.proto.distruntime.ClusterDefOrBuilder getClusterOrBuilder(); + + /** + *
+   * The name of the job of which this server is a member.
+   * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
+   * that matches this name.
+   * 
+ * + * string job_name = 2; + */ + java.lang.String getJobName(); + /** + *
+   * The name of the job of which this server is a member.
+   * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
+   * that matches this name.
+   * 
+ * + * string job_name = 2; + */ + com.google.protobuf.ByteString + getJobNameBytes(); + + /** + *
+   * The task index of this server in its job.
+   * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
+   * and a mapping in its `tasks` field for this index.
+   * 
+ * + * int32 task_index = 3; + */ + int getTaskIndex(); + + /** + *
+   * The default configuration for sessions that run on this server.
+   * 
+ * + * .tensorflow.ConfigProto default_session_config = 4; + */ + boolean hasDefaultSessionConfig(); + /** + *
+   * The default configuration for sessions that run on this server.
+   * 
+ * + * .tensorflow.ConfigProto default_session_config = 4; + */ + org.tensorflow.proto.framework.ConfigProto getDefaultSessionConfig(); + /** + *
+   * The default configuration for sessions that run on this server.
+   * 
+ * + * .tensorflow.ConfigProto default_session_config = 4; + */ + org.tensorflow.proto.framework.ConfigProtoOrBuilder getDefaultSessionConfigOrBuilder(); + + /** + *
+   * The protocol to be used by this server.
+   * Acceptable values include: "grpc", "grpc+verbs".
+   * 
+ * + * string protocol = 5; + */ + java.lang.String getProtocol(); + /** + *
+   * The protocol to be used by this server.
+   * Acceptable values include: "grpc", "grpc+verbs".
+   * 
+ * + * string protocol = 5; + */ + com.google.protobuf.ByteString + getProtocolBytes(); + + /** + *
+   * The server port. If not set, then we identify the port from the job_name.
+   * 
+ * + * int32 port = 6; + */ + int getPort(); + + /** + *
+   * Device filters for remote tasks in the cluster.
+   * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
+   * 
+ * + * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; + */ + boolean hasClusterDeviceFilters(); + /** + *
+   * Device filters for remote tasks in the cluster.
+   * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
+   * 
+ * + * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; + */ + org.tensorflow.proto.distruntime.ClusterDeviceFilters getClusterDeviceFilters(); + /** + *
+   * Device filters for remote tasks in the cluster.
+   * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
+   * 
+ * + * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; + */ + org.tensorflow.proto.distruntime.ClusterDeviceFiltersOrBuilder getClusterDeviceFiltersOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ServerProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ServerProtos.java new file mode 100644 index 00000000000..d5b21d1500d --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/ServerProtos.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/tensorflow_server.proto + +package org.tensorflow.proto.distruntime; + +public final class ServerProtos { + private ServerProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ServerDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ServerDef_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n0tensorflow/core/protobuf/tensorflow_se" + + "rver.proto\022\ntensorflow\032&tensorflow/core/" + + "protobuf/cluster.proto\032%tensorflow/core/" + + "protobuf/config.proto\032-tensorflow/core/p" + + "rotobuf/device_filters.proto\"\365\001\n\tServerD" + + "ef\022\'\n\007cluster\030\001 \001(\0132\026.tensorflow.Cluster" + + "Def\022\020\n\010job_name\030\002 \001(\t\022\022\n\ntask_index\030\003 \001(" + + "\005\0227\n\026default_session_config\030\004 \001(\0132\027.tens" + + "orflow.ConfigProto\022\020\n\010protocol\030\005 \001(\t\022\014\n\004" + + "port\030\006 \001(\005\022@\n\026cluster_device_filters\030\007 \001" + + "(\0132 .tensorflow.ClusterDeviceFiltersB\177\n " + + "org.tensorflow.proto.distruntimeB\014Server" + + "ProtosP\001ZHgithub.com/tensorflow/tensorfl" + + "ow/tensorflow/go/core/core_protos_go_pro" + + "to\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.distruntime.ClusterProtos.getDescriptor(), + org.tensorflow.proto.framework.ConfigProtos.getDescriptor(), + org.tensorflow.proto.distruntime.DeviceFiltersProtos.getDescriptor(), + }); + internal_static_tensorflow_ServerDef_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_ServerDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ServerDef_descriptor, + new java.lang.String[] { "Cluster", "JobName", "TaskIndex", "DefaultSessionConfig", "Protocol", "Port", "ClusterDeviceFilters", }); + org.tensorflow.proto.distruntime.ClusterProtos.getDescriptor(); + org.tensorflow.proto.framework.ConfigProtos.getDescriptor(); + org.tensorflow.proto.distruntime.DeviceFiltersProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/TaskDeviceFilters.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/TaskDeviceFilters.java new file mode 100644 index 00000000000..50bc759c880 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/TaskDeviceFilters.java @@ -0,0 +1,600 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/device_filters.proto + +package org.tensorflow.proto.distruntime; + +/** + *
+ * Defines the device filters for a remote task.
+ * 
+ * + * Protobuf type {@code tensorflow.TaskDeviceFilters} + */ +public final class TaskDeviceFilters extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.TaskDeviceFilters) + TaskDeviceFiltersOrBuilder { +private static final long serialVersionUID = 0L; + // Use TaskDeviceFilters.newBuilder() to construct. + private TaskDeviceFilters(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TaskDeviceFilters() { + deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TaskDeviceFilters(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TaskDeviceFilters( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + deviceFilters_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + deviceFilters_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + deviceFilters_ = deviceFilters_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.distruntime.DeviceFiltersProtos.internal_static_tensorflow_TaskDeviceFilters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.distruntime.DeviceFiltersProtos.internal_static_tensorflow_TaskDeviceFilters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.distruntime.TaskDeviceFilters.class, org.tensorflow.proto.distruntime.TaskDeviceFilters.Builder.class); + } + + public static final int DEVICE_FILTERS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList deviceFilters_; + /** + * repeated string device_filters = 1; + */ + public com.google.protobuf.ProtocolStringList + getDeviceFiltersList() { + return deviceFilters_; + } + /** + * repeated string device_filters = 1; + */ + public int getDeviceFiltersCount() { + return deviceFilters_.size(); + } + /** + * repeated string device_filters = 1; + */ + public java.lang.String getDeviceFilters(int index) { + return deviceFilters_.get(index); + } + /** + * repeated string device_filters = 1; + */ + public com.google.protobuf.ByteString + getDeviceFiltersBytes(int index) { + return deviceFilters_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < deviceFilters_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deviceFilters_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < deviceFilters_.size(); i++) { + dataSize += computeStringSizeNoTag(deviceFilters_.getRaw(i)); + } + size += dataSize; + size += 1 * getDeviceFiltersList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.distruntime.TaskDeviceFilters)) { + return super.equals(obj); + } + org.tensorflow.proto.distruntime.TaskDeviceFilters other = (org.tensorflow.proto.distruntime.TaskDeviceFilters) obj; + + if (!getDeviceFiltersList() + .equals(other.getDeviceFiltersList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDeviceFiltersCount() > 0) { + hash = (37 * hash) + DEVICE_FILTERS_FIELD_NUMBER; + hash = (53 * hash) + getDeviceFiltersList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.distruntime.TaskDeviceFilters parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.TaskDeviceFilters parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.TaskDeviceFilters parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.TaskDeviceFilters 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.proto.distruntime.TaskDeviceFilters parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.TaskDeviceFilters parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.TaskDeviceFilters parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.TaskDeviceFilters parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.TaskDeviceFilters parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.TaskDeviceFilters parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.TaskDeviceFilters parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.TaskDeviceFilters parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.distruntime.TaskDeviceFilters prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Defines the device filters for a remote task.
+   * 
+ * + * Protobuf type {@code tensorflow.TaskDeviceFilters} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.TaskDeviceFilters) + org.tensorflow.proto.distruntime.TaskDeviceFiltersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.distruntime.DeviceFiltersProtos.internal_static_tensorflow_TaskDeviceFilters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.distruntime.DeviceFiltersProtos.internal_static_tensorflow_TaskDeviceFilters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.distruntime.TaskDeviceFilters.class, org.tensorflow.proto.distruntime.TaskDeviceFilters.Builder.class); + } + + // Construct using org.tensorflow.proto.distruntime.TaskDeviceFilters.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.distruntime.DeviceFiltersProtos.internal_static_tensorflow_TaskDeviceFilters_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.TaskDeviceFilters getDefaultInstanceForType() { + return org.tensorflow.proto.distruntime.TaskDeviceFilters.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.TaskDeviceFilters build() { + org.tensorflow.proto.distruntime.TaskDeviceFilters result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.TaskDeviceFilters buildPartial() { + org.tensorflow.proto.distruntime.TaskDeviceFilters result = new org.tensorflow.proto.distruntime.TaskDeviceFilters(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + deviceFilters_ = deviceFilters_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deviceFilters_ = deviceFilters_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.distruntime.TaskDeviceFilters) { + return mergeFrom((org.tensorflow.proto.distruntime.TaskDeviceFilters)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.distruntime.TaskDeviceFilters other) { + if (other == org.tensorflow.proto.distruntime.TaskDeviceFilters.getDefaultInstance()) return this; + if (!other.deviceFilters_.isEmpty()) { + if (deviceFilters_.isEmpty()) { + deviceFilters_ = other.deviceFilters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeviceFiltersIsMutable(); + deviceFilters_.addAll(other.deviceFilters_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.distruntime.TaskDeviceFilters parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.distruntime.TaskDeviceFilters) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureDeviceFiltersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deviceFilters_ = new com.google.protobuf.LazyStringArrayList(deviceFilters_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string device_filters = 1; + */ + public com.google.protobuf.ProtocolStringList + getDeviceFiltersList() { + return deviceFilters_.getUnmodifiableView(); + } + /** + * repeated string device_filters = 1; + */ + public int getDeviceFiltersCount() { + return deviceFilters_.size(); + } + /** + * repeated string device_filters = 1; + */ + public java.lang.String getDeviceFilters(int index) { + return deviceFilters_.get(index); + } + /** + * repeated string device_filters = 1; + */ + public com.google.protobuf.ByteString + getDeviceFiltersBytes(int index) { + return deviceFilters_.getByteString(index); + } + /** + * repeated string device_filters = 1; + */ + 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 = 1; + */ + public Builder addDeviceFilters( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceFiltersIsMutable(); + deviceFilters_.add(value); + onChanged(); + return this; + } + /** + * repeated string device_filters = 1; + */ + public Builder addAllDeviceFilters( + java.lang.Iterable values) { + ensureDeviceFiltersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, deviceFilters_); + onChanged(); + return this; + } + /** + * repeated string device_filters = 1; + */ + public Builder clearDeviceFilters() { + deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string device_filters = 1; + */ + public Builder addDeviceFiltersBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDeviceFiltersIsMutable(); + deviceFilters_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.TaskDeviceFilters) + } + + // @@protoc_insertion_point(class_scope:tensorflow.TaskDeviceFilters) + private static final org.tensorflow.proto.distruntime.TaskDeviceFilters DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.distruntime.TaskDeviceFilters(); + } + + public static org.tensorflow.proto.distruntime.TaskDeviceFilters getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TaskDeviceFilters parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TaskDeviceFilters(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.TaskDeviceFilters getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/TaskDeviceFiltersOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/TaskDeviceFiltersOrBuilder.java new file mode 100644 index 00000000000..2c359e1e049 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/TaskDeviceFiltersOrBuilder.java @@ -0,0 +1,28 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/device_filters.proto + +package org.tensorflow.proto.distruntime; + +public interface TaskDeviceFiltersOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.TaskDeviceFilters) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string device_filters = 1; + */ + java.util.List + getDeviceFiltersList(); + /** + * repeated string device_filters = 1; + */ + int getDeviceFiltersCount(); + /** + * repeated string device_filters = 1; + */ + java.lang.String getDeviceFilters(int index); + /** + * repeated string device_filters = 1; + */ + com.google.protobuf.ByteString + getDeviceFiltersBytes(int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/TransportOptions.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/TransportOptions.java new file mode 100644 index 00000000000..f7498e56de5 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/distruntime/TransportOptions.java @@ -0,0 +1,635 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/transport_options.proto + +package org.tensorflow.proto.distruntime; + +public final class TransportOptions { + private TransportOptions() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface RecvBufRespExtraOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.RecvBufRespExtra) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated bytes tensor_content = 1; + */ + java.util.List getTensorContentList(); + /** + * repeated bytes tensor_content = 1; + */ + int getTensorContentCount(); + /** + * repeated bytes tensor_content = 1; + */ + com.google.protobuf.ByteString getTensorContent(int index); + } + /** + *
+   * Extra data needed on a non-RDMA RecvBufResponse.
+   * 
+ * + * Protobuf type {@code tensorflow.RecvBufRespExtra} + */ + public static final class RecvBufRespExtra extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.RecvBufRespExtra) + RecvBufRespExtraOrBuilder { + private static final long serialVersionUID = 0L; + // Use RecvBufRespExtra.newBuilder() to construct. + private RecvBufRespExtra(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RecvBufRespExtra() { + tensorContent_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RecvBufRespExtra(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RecvBufRespExtra( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + tensorContent_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + tensorContent_.add(input.readBytes()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + tensorContent_ = java.util.Collections.unmodifiableList(tensorContent_); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.distruntime.TransportOptions.internal_static_tensorflow_RecvBufRespExtra_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.distruntime.TransportOptions.internal_static_tensorflow_RecvBufRespExtra_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra.class, org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra.Builder.class); + } + + public static final int TENSOR_CONTENT_FIELD_NUMBER = 1; + private java.util.List tensorContent_; + /** + * repeated bytes tensor_content = 1; + */ + public java.util.List + getTensorContentList() { + return tensorContent_; + } + /** + * repeated bytes tensor_content = 1; + */ + public int getTensorContentCount() { + return tensorContent_.size(); + } + /** + * repeated bytes tensor_content = 1; + */ + public com.google.protobuf.ByteString getTensorContent(int index) { + return tensorContent_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < tensorContent_.size(); i++) { + output.writeBytes(1, tensorContent_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < tensorContent_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(tensorContent_.get(i)); + } + size += dataSize; + size += 1 * getTensorContentList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra)) { + return super.equals(obj); + } + org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra other = (org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra) obj; + + if (!getTensorContentList() + .equals(other.getTensorContentList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTensorContentCount() > 0) { + hash = (37 * hash) + TENSOR_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getTensorContentList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra 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.proto.distruntime.TransportOptions.RecvBufRespExtra parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Extra data needed on a non-RDMA RecvBufResponse.
+     * 
+ * + * Protobuf type {@code tensorflow.RecvBufRespExtra} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.RecvBufRespExtra) + org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtraOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.distruntime.TransportOptions.internal_static_tensorflow_RecvBufRespExtra_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.distruntime.TransportOptions.internal_static_tensorflow_RecvBufRespExtra_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra.class, org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra.Builder.class); + } + + // Construct using org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + tensorContent_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.distruntime.TransportOptions.internal_static_tensorflow_RecvBufRespExtra_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra getDefaultInstanceForType() { + return org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra build() { + org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra buildPartial() { + org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra result = new org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + tensorContent_ = java.util.Collections.unmodifiableList(tensorContent_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tensorContent_ = tensorContent_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra) { + return mergeFrom((org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra other) { + if (other == org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra.getDefaultInstance()) return this; + if (!other.tensorContent_.isEmpty()) { + if (tensorContent_.isEmpty()) { + tensorContent_ = other.tensorContent_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTensorContentIsMutable(); + tensorContent_.addAll(other.tensorContent_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List tensorContent_ = java.util.Collections.emptyList(); + private void ensureTensorContentIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tensorContent_ = new java.util.ArrayList(tensorContent_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated bytes tensor_content = 1; + */ + public java.util.List + getTensorContentList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(tensorContent_) : tensorContent_; + } + /** + * repeated bytes tensor_content = 1; + */ + public int getTensorContentCount() { + return tensorContent_.size(); + } + /** + * repeated bytes tensor_content = 1; + */ + public com.google.protobuf.ByteString getTensorContent(int index) { + return tensorContent_.get(index); + } + /** + * repeated bytes tensor_content = 1; + */ + public Builder setTensorContent( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTensorContentIsMutable(); + tensorContent_.set(index, value); + onChanged(); + return this; + } + /** + * repeated bytes tensor_content = 1; + */ + public Builder addTensorContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTensorContentIsMutable(); + tensorContent_.add(value); + onChanged(); + return this; + } + /** + * repeated bytes tensor_content = 1; + */ + public Builder addAllTensorContent( + java.lang.Iterable values) { + ensureTensorContentIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tensorContent_); + onChanged(); + return this; + } + /** + * repeated bytes tensor_content = 1; + */ + public Builder clearTensorContent() { + tensorContent_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.RecvBufRespExtra) + } + + // @@protoc_insertion_point(class_scope:tensorflow.RecvBufRespExtra) + private static final org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra(); + } + + public static org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecvBufRespExtra parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecvBufRespExtra(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.distruntime.TransportOptions.RecvBufRespExtra getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_RecvBufRespExtra_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_RecvBufRespExtra_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n0tensorflow/core/protobuf/transport_opt" + + "ions.proto\022\ntensorflow\"*\n\020RecvBufRespExt" + + "ra\022\026\n\016tensor_content\030\001 \003(\014Bl\n org.tensor" + + "flow.proto.distruntimeZHgithub.com/tenso" + + "rflow/tensorflow/tensorflow/go/core/core" + + "_protos_go_protob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tensorflow_RecvBufRespExtra_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_RecvBufRespExtra_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_RecvBufRespExtra_descriptor, + new java.lang.String[] { "TensorContent", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/BytesList.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/BytesList.java new file mode 100644 index 00000000000..d8158b11f38 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/BytesList.java @@ -0,0 +1,572 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/feature.proto + +package org.tensorflow.proto.example; + +/** + *
+ * Containers to hold repeated fundamental values.
+ * 
+ * + * Protobuf type {@code tensorflow.BytesList} + */ +public final class BytesList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.BytesList) + BytesListOrBuilder { +private static final long serialVersionUID = 0L; + // Use BytesList.newBuilder() to construct. + private BytesList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BytesList() { + value_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BytesList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BytesList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + value_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + value_.add(input.readBytes()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + value_ = java.util.Collections.unmodifiableList(value_); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_BytesList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_BytesList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.BytesList.class, org.tensorflow.proto.example.BytesList.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private java.util.List value_; + /** + * repeated bytes value = 1; + */ + public java.util.List + getValueList() { + return value_; + } + /** + * repeated bytes value = 1; + */ + public int getValueCount() { + return value_.size(); + } + /** + * repeated bytes value = 1; + */ + public com.google.protobuf.ByteString getValue(int index) { + return value_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < value_.size(); i++) { + output.writeBytes(1, value_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < value_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(value_.get(i)); + } + size += dataSize; + size += 1 * getValueList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.example.BytesList)) { + return super.equals(obj); + } + org.tensorflow.proto.example.BytesList other = (org.tensorflow.proto.example.BytesList) obj; + + if (!getValueList() + .equals(other.getValueList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValueCount() > 0) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValueList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.example.BytesList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.BytesList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.BytesList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.BytesList 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.proto.example.BytesList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.BytesList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.BytesList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.BytesList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.BytesList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.BytesList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.BytesList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.BytesList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.example.BytesList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Containers to hold repeated fundamental values.
+   * 
+ * + * Protobuf type {@code tensorflow.BytesList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.BytesList) + org.tensorflow.proto.example.BytesListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_BytesList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_BytesList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.BytesList.class, org.tensorflow.proto.example.BytesList.Builder.class); + } + + // Construct using org.tensorflow.proto.example.BytesList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + value_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_BytesList_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.example.BytesList getDefaultInstanceForType() { + return org.tensorflow.proto.example.BytesList.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.example.BytesList build() { + org.tensorflow.proto.example.BytesList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.example.BytesList buildPartial() { + org.tensorflow.proto.example.BytesList result = new org.tensorflow.proto.example.BytesList(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + value_ = java.util.Collections.unmodifiableList(value_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.value_ = value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.example.BytesList) { + return mergeFrom((org.tensorflow.proto.example.BytesList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.example.BytesList other) { + if (other == org.tensorflow.proto.example.BytesList.getDefaultInstance()) return this; + if (!other.value_.isEmpty()) { + if (value_.isEmpty()) { + value_ = other.value_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValueIsMutable(); + value_.addAll(other.value_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.example.BytesList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.example.BytesList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List value_ = java.util.Collections.emptyList(); + private void ensureValueIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + value_ = new java.util.ArrayList(value_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated bytes value = 1; + */ + public java.util.List + getValueList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(value_) : value_; + } + /** + * repeated bytes value = 1; + */ + public int getValueCount() { + return value_.size(); + } + /** + * repeated bytes value = 1; + */ + public com.google.protobuf.ByteString getValue(int index) { + return value_.get(index); + } + /** + * repeated bytes value = 1; + */ + public Builder setValue( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueIsMutable(); + value_.set(index, value); + onChanged(); + return this; + } + /** + * repeated bytes value = 1; + */ + public Builder addValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueIsMutable(); + value_.add(value); + onChanged(); + return this; + } + /** + * repeated bytes value = 1; + */ + public Builder addAllValue( + java.lang.Iterable values) { + ensureValueIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, value_); + onChanged(); + return this; + } + /** + * repeated bytes value = 1; + */ + public Builder clearValue() { + value_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.BytesList) + } + + // @@protoc_insertion_point(class_scope:tensorflow.BytesList) + private static final org.tensorflow.proto.example.BytesList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.example.BytesList(); + } + + public static org.tensorflow.proto.example.BytesList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BytesList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BytesList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.example.BytesList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/BytesListOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/BytesListOrBuilder.java new file mode 100644 index 00000000000..11151e1a947 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/BytesListOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/feature.proto + +package org.tensorflow.proto.example; + +public interface BytesListOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.BytesList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated bytes value = 1; + */ + java.util.List getValueList(); + /** + * repeated bytes value = 1; + */ + int getValueCount(); + /** + * repeated bytes value = 1; + */ + com.google.protobuf.ByteString getValue(int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/Example.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/Example.java new file mode 100644 index 00000000000..ea9d058e425 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/Example.java @@ -0,0 +1,600 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/example.proto + +package org.tensorflow.proto.example; + +/** + * Protobuf type {@code tensorflow.Example} + */ +public final class Example extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.Example) + ExampleOrBuilder { +private static final long serialVersionUID = 0L; + // Use Example.newBuilder() to construct. + private Example(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Example() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Example(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Example( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.tensorflow.proto.example.Features.Builder subBuilder = null; + if (features_ != null) { + subBuilder = features_.toBuilder(); + } + features_ = input.readMessage(org.tensorflow.proto.example.Features.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(features_); + features_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.ExampleProtos.internal_static_tensorflow_Example_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.ExampleProtos.internal_static_tensorflow_Example_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.Example.class, org.tensorflow.proto.example.Example.Builder.class); + } + + public static final int FEATURES_FIELD_NUMBER = 1; + private org.tensorflow.proto.example.Features features_; + /** + * .tensorflow.Features features = 1; + */ + public boolean hasFeatures() { + return features_ != null; + } + /** + * .tensorflow.Features features = 1; + */ + public org.tensorflow.proto.example.Features getFeatures() { + return features_ == null ? org.tensorflow.proto.example.Features.getDefaultInstance() : features_; + } + /** + * .tensorflow.Features features = 1; + */ + public org.tensorflow.proto.example.FeaturesOrBuilder getFeaturesOrBuilder() { + return getFeatures(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (features_ != null) { + output.writeMessage(1, getFeatures()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (features_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getFeatures()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.example.Example)) { + return super.equals(obj); + } + org.tensorflow.proto.example.Example other = (org.tensorflow.proto.example.Example) obj; + + if (hasFeatures() != other.hasFeatures()) return false; + if (hasFeatures()) { + if (!getFeatures() + .equals(other.getFeatures())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFeatures()) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getFeatures().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.example.Example parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.Example parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.Example parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.Example 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.proto.example.Example parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.Example parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.Example parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.Example parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.Example parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.Example parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.Example parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.Example parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.example.Example prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.Example} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.Example) + org.tensorflow.proto.example.ExampleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.ExampleProtos.internal_static_tensorflow_Example_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.ExampleProtos.internal_static_tensorflow_Example_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.Example.class, org.tensorflow.proto.example.Example.Builder.class); + } + + // Construct using org.tensorflow.proto.example.Example.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (featuresBuilder_ == null) { + features_ = null; + } else { + features_ = null; + featuresBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.example.ExampleProtos.internal_static_tensorflow_Example_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.example.Example getDefaultInstanceForType() { + return org.tensorflow.proto.example.Example.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.example.Example build() { + org.tensorflow.proto.example.Example result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.example.Example buildPartial() { + org.tensorflow.proto.example.Example result = new org.tensorflow.proto.example.Example(this); + if (featuresBuilder_ == null) { + result.features_ = features_; + } else { + result.features_ = featuresBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.example.Example) { + return mergeFrom((org.tensorflow.proto.example.Example)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.example.Example other) { + if (other == org.tensorflow.proto.example.Example.getDefaultInstance()) return this; + if (other.hasFeatures()) { + mergeFeatures(other.getFeatures()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.example.Example parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.example.Example) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private org.tensorflow.proto.example.Features features_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.Features, org.tensorflow.proto.example.Features.Builder, org.tensorflow.proto.example.FeaturesOrBuilder> featuresBuilder_; + /** + * .tensorflow.Features features = 1; + */ + public boolean hasFeatures() { + return featuresBuilder_ != null || features_ != null; + } + /** + * .tensorflow.Features features = 1; + */ + public org.tensorflow.proto.example.Features getFeatures() { + if (featuresBuilder_ == null) { + return features_ == null ? org.tensorflow.proto.example.Features.getDefaultInstance() : features_; + } else { + return featuresBuilder_.getMessage(); + } + } + /** + * .tensorflow.Features features = 1; + */ + public Builder setFeatures(org.tensorflow.proto.example.Features value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + features_ = value; + onChanged(); + } else { + featuresBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.Features features = 1; + */ + public Builder setFeatures( + org.tensorflow.proto.example.Features.Builder builderForValue) { + if (featuresBuilder_ == null) { + features_ = builderForValue.build(); + onChanged(); + } else { + featuresBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.Features features = 1; + */ + public Builder mergeFeatures(org.tensorflow.proto.example.Features value) { + if (featuresBuilder_ == null) { + if (features_ != null) { + features_ = + org.tensorflow.proto.example.Features.newBuilder(features_).mergeFrom(value).buildPartial(); + } else { + features_ = value; + } + onChanged(); + } else { + featuresBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.Features features = 1; + */ + public Builder clearFeatures() { + if (featuresBuilder_ == null) { + features_ = null; + onChanged(); + } else { + features_ = null; + featuresBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.Features features = 1; + */ + public org.tensorflow.proto.example.Features.Builder getFeaturesBuilder() { + + onChanged(); + return getFeaturesFieldBuilder().getBuilder(); + } + /** + * .tensorflow.Features features = 1; + */ + public org.tensorflow.proto.example.FeaturesOrBuilder getFeaturesOrBuilder() { + if (featuresBuilder_ != null) { + return featuresBuilder_.getMessageOrBuilder(); + } else { + return features_ == null ? + org.tensorflow.proto.example.Features.getDefaultInstance() : features_; + } + } + /** + * .tensorflow.Features features = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.Features, org.tensorflow.proto.example.Features.Builder, org.tensorflow.proto.example.FeaturesOrBuilder> + getFeaturesFieldBuilder() { + if (featuresBuilder_ == null) { + featuresBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.Features, org.tensorflow.proto.example.Features.Builder, org.tensorflow.proto.example.FeaturesOrBuilder>( + getFeatures(), + getParentForChildren(), + isClean()); + features_ = null; + } + return featuresBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.Example) + } + + // @@protoc_insertion_point(class_scope:tensorflow.Example) + private static final org.tensorflow.proto.example.Example DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.example.Example(); + } + + public static org.tensorflow.proto.example.Example getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Example parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Example(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.example.Example getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/ExampleOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/ExampleOrBuilder.java new file mode 100644 index 00000000000..2026bc24075 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/ExampleOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/example.proto + +package org.tensorflow.proto.example; + +public interface ExampleOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.Example) + com.google.protobuf.MessageOrBuilder { + + /** + * .tensorflow.Features features = 1; + */ + boolean hasFeatures(); + /** + * .tensorflow.Features features = 1; + */ + org.tensorflow.proto.example.Features getFeatures(); + /** + * .tensorflow.Features features = 1; + */ + org.tensorflow.proto.example.FeaturesOrBuilder getFeaturesOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/ExampleParserConfiguration.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/ExampleParserConfiguration.java new file mode 100644 index 00000000000..4829d13d8ff --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/ExampleParserConfiguration.java @@ -0,0 +1,695 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/example_parser_configuration.proto + +package org.tensorflow.proto.example; + +/** + * Protobuf type {@code tensorflow.ExampleParserConfiguration} + */ +public final class ExampleParserConfiguration extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ExampleParserConfiguration) + ExampleParserConfigurationOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExampleParserConfiguration.newBuilder() to construct. + private ExampleParserConfiguration(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExampleParserConfiguration() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExampleParserConfiguration(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ExampleParserConfiguration( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + featureMap_ = com.google.protobuf.MapField.newMapField( + FeatureMapDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + featureMap__ = input.readMessage( + FeatureMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + featureMap_.getMutableMap().put( + featureMap__.getKey(), featureMap__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_ExampleParserConfiguration_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetFeatureMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_ExampleParserConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.ExampleParserConfiguration.class, org.tensorflow.proto.example.ExampleParserConfiguration.Builder.class); + } + + public static final int FEATURE_MAP_FIELD_NUMBER = 1; + private static final class FeatureMapDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, org.tensorflow.proto.example.FeatureConfiguration> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_ExampleParserConfiguration_FeatureMapEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.example.FeatureConfiguration.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.example.FeatureConfiguration> featureMap_; + private com.google.protobuf.MapField + internalGetFeatureMap() { + if (featureMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FeatureMapDefaultEntryHolder.defaultEntry); + } + return featureMap_; + } + + public int getFeatureMapCount() { + return internalGetFeatureMap().getMap().size(); + } + /** + * map<string, .tensorflow.FeatureConfiguration> feature_map = 1; + */ + + public boolean containsFeatureMap( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFeatureMap().getMap().containsKey(key); + } + /** + * Use {@link #getFeatureMapMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getFeatureMap() { + return getFeatureMapMap(); + } + /** + * map<string, .tensorflow.FeatureConfiguration> feature_map = 1; + */ + + public java.util.Map getFeatureMapMap() { + return internalGetFeatureMap().getMap(); + } + /** + * map<string, .tensorflow.FeatureConfiguration> feature_map = 1; + */ + + public org.tensorflow.proto.example.FeatureConfiguration getFeatureMapOrDefault( + java.lang.String key, + org.tensorflow.proto.example.FeatureConfiguration defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFeatureMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .tensorflow.FeatureConfiguration> feature_map = 1; + */ + + public org.tensorflow.proto.example.FeatureConfiguration getFeatureMapOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFeatureMap().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetFeatureMap(), + FeatureMapDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetFeatureMap().getMap().entrySet()) { + com.google.protobuf.MapEntry + featureMap__ = FeatureMapDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, featureMap__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.example.ExampleParserConfiguration)) { + return super.equals(obj); + } + org.tensorflow.proto.example.ExampleParserConfiguration other = (org.tensorflow.proto.example.ExampleParserConfiguration) obj; + + if (!internalGetFeatureMap().equals( + other.internalGetFeatureMap())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetFeatureMap().getMap().isEmpty()) { + hash = (37 * hash) + FEATURE_MAP_FIELD_NUMBER; + hash = (53 * hash) + internalGetFeatureMap().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.example.ExampleParserConfiguration parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.ExampleParserConfiguration parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.ExampleParserConfiguration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.ExampleParserConfiguration 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.proto.example.ExampleParserConfiguration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.ExampleParserConfiguration parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.ExampleParserConfiguration parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.ExampleParserConfiguration parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.ExampleParserConfiguration parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.ExampleParserConfiguration parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.ExampleParserConfiguration parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.ExampleParserConfiguration parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.example.ExampleParserConfiguration prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.ExampleParserConfiguration} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ExampleParserConfiguration) + org.tensorflow.proto.example.ExampleParserConfigurationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_ExampleParserConfiguration_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetFeatureMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableFeatureMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_ExampleParserConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.ExampleParserConfiguration.class, org.tensorflow.proto.example.ExampleParserConfiguration.Builder.class); + } + + // Construct using org.tensorflow.proto.example.ExampleParserConfiguration.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableFeatureMap().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_ExampleParserConfiguration_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.example.ExampleParserConfiguration getDefaultInstanceForType() { + return org.tensorflow.proto.example.ExampleParserConfiguration.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.example.ExampleParserConfiguration build() { + org.tensorflow.proto.example.ExampleParserConfiguration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.example.ExampleParserConfiguration buildPartial() { + org.tensorflow.proto.example.ExampleParserConfiguration result = new org.tensorflow.proto.example.ExampleParserConfiguration(this); + int from_bitField0_ = bitField0_; + result.featureMap_ = internalGetFeatureMap(); + result.featureMap_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.example.ExampleParserConfiguration) { + return mergeFrom((org.tensorflow.proto.example.ExampleParserConfiguration)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.example.ExampleParserConfiguration other) { + if (other == org.tensorflow.proto.example.ExampleParserConfiguration.getDefaultInstance()) return this; + internalGetMutableFeatureMap().mergeFrom( + other.internalGetFeatureMap()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.example.ExampleParserConfiguration parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.example.ExampleParserConfiguration) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.example.FeatureConfiguration> featureMap_; + private com.google.protobuf.MapField + internalGetFeatureMap() { + if (featureMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FeatureMapDefaultEntryHolder.defaultEntry); + } + return featureMap_; + } + private com.google.protobuf.MapField + internalGetMutableFeatureMap() { + onChanged();; + if (featureMap_ == null) { + featureMap_ = com.google.protobuf.MapField.newMapField( + FeatureMapDefaultEntryHolder.defaultEntry); + } + if (!featureMap_.isMutable()) { + featureMap_ = featureMap_.copy(); + } + return featureMap_; + } + + public int getFeatureMapCount() { + return internalGetFeatureMap().getMap().size(); + } + /** + * map<string, .tensorflow.FeatureConfiguration> feature_map = 1; + */ + + public boolean containsFeatureMap( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFeatureMap().getMap().containsKey(key); + } + /** + * Use {@link #getFeatureMapMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getFeatureMap() { + return getFeatureMapMap(); + } + /** + * map<string, .tensorflow.FeatureConfiguration> feature_map = 1; + */ + + public java.util.Map getFeatureMapMap() { + return internalGetFeatureMap().getMap(); + } + /** + * map<string, .tensorflow.FeatureConfiguration> feature_map = 1; + */ + + public org.tensorflow.proto.example.FeatureConfiguration getFeatureMapOrDefault( + java.lang.String key, + org.tensorflow.proto.example.FeatureConfiguration defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFeatureMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .tensorflow.FeatureConfiguration> feature_map = 1; + */ + + public org.tensorflow.proto.example.FeatureConfiguration getFeatureMapOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFeatureMap().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearFeatureMap() { + internalGetMutableFeatureMap().getMutableMap() + .clear(); + return this; + } + /** + * map<string, .tensorflow.FeatureConfiguration> feature_map = 1; + */ + + public Builder removeFeatureMap( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFeatureMap().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableFeatureMap() { + return internalGetMutableFeatureMap().getMutableMap(); + } + /** + * map<string, .tensorflow.FeatureConfiguration> feature_map = 1; + */ + public Builder putFeatureMap( + java.lang.String key, + org.tensorflow.proto.example.FeatureConfiguration value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFeatureMap().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, .tensorflow.FeatureConfiguration> feature_map = 1; + */ + + public Builder putAllFeatureMap( + java.util.Map values) { + internalGetMutableFeatureMap().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ExampleParserConfiguration) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ExampleParserConfiguration) + private static final org.tensorflow.proto.example.ExampleParserConfiguration DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.example.ExampleParserConfiguration(); + } + + public static org.tensorflow.proto.example.ExampleParserConfiguration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExampleParserConfiguration parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExampleParserConfiguration(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.example.ExampleParserConfiguration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/ExampleParserConfigurationOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/ExampleParserConfigurationOrBuilder.java new file mode 100644 index 00000000000..33df2a31a5b --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/ExampleParserConfigurationOrBuilder.java @@ -0,0 +1,43 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/example_parser_configuration.proto + +package org.tensorflow.proto.example; + +public interface ExampleParserConfigurationOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ExampleParserConfiguration) + com.google.protobuf.MessageOrBuilder { + + /** + * map<string, .tensorflow.FeatureConfiguration> feature_map = 1; + */ + int getFeatureMapCount(); + /** + * map<string, .tensorflow.FeatureConfiguration> feature_map = 1; + */ + boolean containsFeatureMap( + java.lang.String key); + /** + * Use {@link #getFeatureMapMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getFeatureMap(); + /** + * map<string, .tensorflow.FeatureConfiguration> feature_map = 1; + */ + java.util.Map + getFeatureMapMap(); + /** + * map<string, .tensorflow.FeatureConfiguration> feature_map = 1; + */ + + org.tensorflow.proto.example.FeatureConfiguration getFeatureMapOrDefault( + java.lang.String key, + org.tensorflow.proto.example.FeatureConfiguration defaultValue); + /** + * map<string, .tensorflow.FeatureConfiguration> feature_map = 1; + */ + + org.tensorflow.proto.example.FeatureConfiguration getFeatureMapOrThrow( + java.lang.String key); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/ExampleParserConfigurationProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/ExampleParserConfigurationProtos.java new file mode 100644 index 00000000000..9bc45ea35c4 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/ExampleParserConfigurationProtos.java @@ -0,0 +1,123 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/example_parser_configuration.proto + +package org.tensorflow.proto.example; + +public final class ExampleParserConfigurationProtos { + private ExampleParserConfigurationProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_VarLenFeatureProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_VarLenFeatureProto_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_FixedLenFeatureProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_FixedLenFeatureProto_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_FeatureConfiguration_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_FeatureConfiguration_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ExampleParserConfiguration_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ExampleParserConfiguration_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ExampleParserConfiguration_FeatureMapEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ExampleParserConfiguration_FeatureMapEntry_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/example/example_parser" + + "_configuration.proto\022\ntensorflow\032&tensor" + + "flow/core/framework/tensor.proto\032,tensor" + + "flow/core/framework/tensor_shape.proto\032%" + + "tensorflow/core/framework/types.proto\"\243\001" + + "\n\022VarLenFeatureProto\022#\n\005dtype\030\001 \001(\0162\024.te" + + "nsorflow.DataType\022!\n\031values_output_tenso" + + "r_name\030\002 \001(\t\022\"\n\032indices_output_tensor_na" + + "me\030\003 \001(\t\022!\n\031shapes_output_tensor_name\030\004 " + + "\001(\t\"\273\001\n\024FixedLenFeatureProto\022#\n\005dtype\030\001 " + + "\001(\0162\024.tensorflow.DataType\022+\n\005shape\030\002 \001(\013" + + "2\034.tensorflow.TensorShapeProto\022.\n\rdefaul" + + "t_value\030\003 \001(\0132\027.tensorflow.TensorProto\022!" + + "\n\031values_output_tensor_name\030\004 \001(\t\"\232\001\n\024Fe" + + "atureConfiguration\022=\n\021fixed_len_feature\030" + + "\001 \001(\0132 .tensorflow.FixedLenFeatureProtoH" + + "\000\0229\n\017var_len_feature\030\002 \001(\0132\036.tensorflow." + + "VarLenFeatureProtoH\000B\010\n\006config\"\276\001\n\032Examp" + + "leParserConfiguration\022K\n\013feature_map\030\001 \003" + + "(\01326.tensorflow.ExampleParserConfigurati" + + "on.FeatureMapEntry\032S\n\017FeatureMapEntry\022\013\n" + + "\003key\030\001 \001(\t\022/\n\005value\030\002 \001(\0132 .tensorflow.F" + + "eatureConfiguration:\0028\001B\250\001\n\034org.tensorfl" + + "ow.proto.exampleB ExampleParserConfigura" + + "tionProtosP\001Zagithub.com/tensorflow/tens" + + "orflow/tensorflow/go/core/example/exampl" + + "e_parser_configuration_go_proto\370\001\001b\006prot" + + "o3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.TensorProtos.getDescriptor(), + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(), + org.tensorflow.proto.framework.TypesProtos.getDescriptor(), + }); + internal_static_tensorflow_VarLenFeatureProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_VarLenFeatureProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_VarLenFeatureProto_descriptor, + new java.lang.String[] { "Dtype", "ValuesOutputTensorName", "IndicesOutputTensorName", "ShapesOutputTensorName", }); + internal_static_tensorflow_FixedLenFeatureProto_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_FixedLenFeatureProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_FixedLenFeatureProto_descriptor, + new java.lang.String[] { "Dtype", "Shape", "DefaultValue", "ValuesOutputTensorName", }); + internal_static_tensorflow_FeatureConfiguration_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_tensorflow_FeatureConfiguration_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_FeatureConfiguration_descriptor, + new java.lang.String[] { "FixedLenFeature", "VarLenFeature", "Config", }); + internal_static_tensorflow_ExampleParserConfiguration_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_tensorflow_ExampleParserConfiguration_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ExampleParserConfiguration_descriptor, + new java.lang.String[] { "FeatureMap", }); + internal_static_tensorflow_ExampleParserConfiguration_FeatureMapEntry_descriptor = + internal_static_tensorflow_ExampleParserConfiguration_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_ExampleParserConfiguration_FeatureMapEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ExampleParserConfiguration_FeatureMapEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + org.tensorflow.proto.framework.TensorProtos.getDescriptor(); + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(); + org.tensorflow.proto.framework.TypesProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/ExampleProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/ExampleProtos.java new file mode 100644 index 00000000000..d5494a720c5 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/ExampleProtos.java @@ -0,0 +1,68 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/example.proto + +package org.tensorflow.proto.example; + +public final class ExampleProtos { + private ExampleProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_Example_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_Example_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SequenceExample_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SequenceExample_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/example/example.proto\022" + + "\ntensorflow\032%tensorflow/core/example/fea" + + "ture.proto\"1\n\007Example\022&\n\010features\030\001 \001(\0132" + + "\024.tensorflow.Features\"i\n\017SequenceExample" + + "\022%\n\007context\030\001 \001(\0132\024.tensorflow.Features\022" + + "/\n\rfeature_lists\030\002 \001(\0132\030.tensorflow.Feat" + + "ureListsB\207\001\n\034org.tensorflow.proto.exampl" + + "eB\rExampleProtosP\001ZSgithub.com/tensorflo" + + "w/tensorflow/tensorflow/go/core/example/" + + "example_protos_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.example.FeatureProtos.getDescriptor(), + }); + internal_static_tensorflow_Example_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_Example_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_Example_descriptor, + new java.lang.String[] { "Features", }); + internal_static_tensorflow_SequenceExample_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_SequenceExample_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SequenceExample_descriptor, + new java.lang.String[] { "Context", "FeatureLists", }); + org.tensorflow.proto.example.FeatureProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/Feature.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/Feature.java new file mode 100644 index 00000000000..a4aa0733f54 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/Feature.java @@ -0,0 +1,1105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/feature.proto + +package org.tensorflow.proto.example; + +/** + *
+ * Containers for non-sequential data.
+ * 
+ * + * Protobuf type {@code tensorflow.Feature} + */ +public final class Feature extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.Feature) + FeatureOrBuilder { +private static final long serialVersionUID = 0L; + // Use Feature.newBuilder() to construct. + private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Feature() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Feature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Feature( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.tensorflow.proto.example.BytesList.Builder subBuilder = null; + if (kindCase_ == 1) { + subBuilder = ((org.tensorflow.proto.example.BytesList) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.example.BytesList.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.example.BytesList) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 1; + break; + } + case 18: { + org.tensorflow.proto.example.FloatList.Builder subBuilder = null; + if (kindCase_ == 2) { + subBuilder = ((org.tensorflow.proto.example.FloatList) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.example.FloatList.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.example.FloatList) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 2; + break; + } + case 26: { + org.tensorflow.proto.example.Int64List.Builder subBuilder = null; + if (kindCase_ == 3) { + subBuilder = ((org.tensorflow.proto.example.Int64List) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.example.Int64List.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.example.Int64List) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 3; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_Feature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_Feature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.Feature.class, org.tensorflow.proto.example.Feature.Builder.class); + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + public enum KindCase + implements com.google.protobuf.Internal.EnumLite { + BYTES_LIST(1), + FLOAT_LIST(2), + INT64_LIST(3), + KIND_NOT_SET(0); + private final int value; + private KindCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static KindCase valueOf(int value) { + return forNumber(value); + } + + public static KindCase forNumber(int value) { + switch (value) { + case 1: return BYTES_LIST; + case 2: return FLOAT_LIST; + case 3: return INT64_LIST; + case 0: return KIND_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public KindCase + getKindCase() { + return KindCase.forNumber( + kindCase_); + } + + public static final int BYTES_LIST_FIELD_NUMBER = 1; + /** + * .tensorflow.BytesList bytes_list = 1; + */ + public boolean hasBytesList() { + return kindCase_ == 1; + } + /** + * .tensorflow.BytesList bytes_list = 1; + */ + public org.tensorflow.proto.example.BytesList getBytesList() { + if (kindCase_ == 1) { + return (org.tensorflow.proto.example.BytesList) kind_; + } + return org.tensorflow.proto.example.BytesList.getDefaultInstance(); + } + /** + * .tensorflow.BytesList bytes_list = 1; + */ + public org.tensorflow.proto.example.BytesListOrBuilder getBytesListOrBuilder() { + if (kindCase_ == 1) { + return (org.tensorflow.proto.example.BytesList) kind_; + } + return org.tensorflow.proto.example.BytesList.getDefaultInstance(); + } + + public static final int FLOAT_LIST_FIELD_NUMBER = 2; + /** + * .tensorflow.FloatList float_list = 2; + */ + public boolean hasFloatList() { + return kindCase_ == 2; + } + /** + * .tensorflow.FloatList float_list = 2; + */ + public org.tensorflow.proto.example.FloatList getFloatList() { + if (kindCase_ == 2) { + return (org.tensorflow.proto.example.FloatList) kind_; + } + return org.tensorflow.proto.example.FloatList.getDefaultInstance(); + } + /** + * .tensorflow.FloatList float_list = 2; + */ + public org.tensorflow.proto.example.FloatListOrBuilder getFloatListOrBuilder() { + if (kindCase_ == 2) { + return (org.tensorflow.proto.example.FloatList) kind_; + } + return org.tensorflow.proto.example.FloatList.getDefaultInstance(); + } + + public static final int INT64_LIST_FIELD_NUMBER = 3; + /** + * .tensorflow.Int64List int64_list = 3; + */ + public boolean hasInt64List() { + return kindCase_ == 3; + } + /** + * .tensorflow.Int64List int64_list = 3; + */ + public org.tensorflow.proto.example.Int64List getInt64List() { + if (kindCase_ == 3) { + return (org.tensorflow.proto.example.Int64List) kind_; + } + return org.tensorflow.proto.example.Int64List.getDefaultInstance(); + } + /** + * .tensorflow.Int64List int64_list = 3; + */ + public org.tensorflow.proto.example.Int64ListOrBuilder getInt64ListOrBuilder() { + if (kindCase_ == 3) { + return (org.tensorflow.proto.example.Int64List) kind_; + } + return org.tensorflow.proto.example.Int64List.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (kindCase_ == 1) { + output.writeMessage(1, (org.tensorflow.proto.example.BytesList) kind_); + } + if (kindCase_ == 2) { + output.writeMessage(2, (org.tensorflow.proto.example.FloatList) kind_); + } + if (kindCase_ == 3) { + output.writeMessage(3, (org.tensorflow.proto.example.Int64List) kind_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kindCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (org.tensorflow.proto.example.BytesList) kind_); + } + if (kindCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (org.tensorflow.proto.example.FloatList) kind_); + } + if (kindCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (org.tensorflow.proto.example.Int64List) kind_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.example.Feature)) { + return super.equals(obj); + } + org.tensorflow.proto.example.Feature other = (org.tensorflow.proto.example.Feature) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getBytesList() + .equals(other.getBytesList())) return false; + break; + case 2: + if (!getFloatList() + .equals(other.getFloatList())) return false; + break; + case 3: + if (!getInt64List() + .equals(other.getInt64List())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (kindCase_) { + case 1: + hash = (37 * hash) + BYTES_LIST_FIELD_NUMBER; + hash = (53 * hash) + getBytesList().hashCode(); + break; + case 2: + hash = (37 * hash) + FLOAT_LIST_FIELD_NUMBER; + hash = (53 * hash) + getFloatList().hashCode(); + break; + case 3: + hash = (37 * hash) + INT64_LIST_FIELD_NUMBER; + hash = (53 * hash) + getInt64List().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.example.Feature parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.Feature parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.Feature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.Feature 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.proto.example.Feature parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.Feature parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.Feature parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.Feature parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.Feature parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.Feature parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.Feature parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.Feature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.example.Feature prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Containers for non-sequential data.
+   * 
+ * + * Protobuf type {@code tensorflow.Feature} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.Feature) + org.tensorflow.proto.example.FeatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_Feature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_Feature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.Feature.class, org.tensorflow.proto.example.Feature.Builder.class); + } + + // Construct using org.tensorflow.proto.example.Feature.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_Feature_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.example.Feature getDefaultInstanceForType() { + return org.tensorflow.proto.example.Feature.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.example.Feature build() { + org.tensorflow.proto.example.Feature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.example.Feature buildPartial() { + org.tensorflow.proto.example.Feature result = new org.tensorflow.proto.example.Feature(this); + if (kindCase_ == 1) { + if (bytesListBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = bytesListBuilder_.build(); + } + } + if (kindCase_ == 2) { + if (floatListBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = floatListBuilder_.build(); + } + } + if (kindCase_ == 3) { + if (int64ListBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = int64ListBuilder_.build(); + } + } + result.kindCase_ = kindCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.example.Feature) { + return mergeFrom((org.tensorflow.proto.example.Feature)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.example.Feature other) { + if (other == org.tensorflow.proto.example.Feature.getDefaultInstance()) return this; + switch (other.getKindCase()) { + case BYTES_LIST: { + mergeBytesList(other.getBytesList()); + break; + } + case FLOAT_LIST: { + mergeFloatList(other.getFloatList()); + break; + } + case INT64_LIST: { + mergeInt64List(other.getInt64List()); + break; + } + case KIND_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.example.Feature parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.example.Feature) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int kindCase_ = 0; + private java.lang.Object kind_; + public KindCase + getKindCase() { + return KindCase.forNumber( + kindCase_); + } + + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.BytesList, org.tensorflow.proto.example.BytesList.Builder, org.tensorflow.proto.example.BytesListOrBuilder> bytesListBuilder_; + /** + * .tensorflow.BytesList bytes_list = 1; + */ + public boolean hasBytesList() { + return kindCase_ == 1; + } + /** + * .tensorflow.BytesList bytes_list = 1; + */ + public org.tensorflow.proto.example.BytesList getBytesList() { + if (bytesListBuilder_ == null) { + if (kindCase_ == 1) { + return (org.tensorflow.proto.example.BytesList) kind_; + } + return org.tensorflow.proto.example.BytesList.getDefaultInstance(); + } else { + if (kindCase_ == 1) { + return bytesListBuilder_.getMessage(); + } + return org.tensorflow.proto.example.BytesList.getDefaultInstance(); + } + } + /** + * .tensorflow.BytesList bytes_list = 1; + */ + public Builder setBytesList(org.tensorflow.proto.example.BytesList value) { + if (bytesListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + bytesListBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + /** + * .tensorflow.BytesList bytes_list = 1; + */ + public Builder setBytesList( + org.tensorflow.proto.example.BytesList.Builder builderForValue) { + if (bytesListBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + bytesListBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 1; + return this; + } + /** + * .tensorflow.BytesList bytes_list = 1; + */ + public Builder mergeBytesList(org.tensorflow.proto.example.BytesList value) { + if (bytesListBuilder_ == null) { + if (kindCase_ == 1 && + kind_ != org.tensorflow.proto.example.BytesList.getDefaultInstance()) { + kind_ = org.tensorflow.proto.example.BytesList.newBuilder((org.tensorflow.proto.example.BytesList) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 1) { + bytesListBuilder_.mergeFrom(value); + } + bytesListBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + /** + * .tensorflow.BytesList bytes_list = 1; + */ + public Builder clearBytesList() { + if (bytesListBuilder_ == null) { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + } + bytesListBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.BytesList bytes_list = 1; + */ + public org.tensorflow.proto.example.BytesList.Builder getBytesListBuilder() { + return getBytesListFieldBuilder().getBuilder(); + } + /** + * .tensorflow.BytesList bytes_list = 1; + */ + public org.tensorflow.proto.example.BytesListOrBuilder getBytesListOrBuilder() { + if ((kindCase_ == 1) && (bytesListBuilder_ != null)) { + return bytesListBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 1) { + return (org.tensorflow.proto.example.BytesList) kind_; + } + return org.tensorflow.proto.example.BytesList.getDefaultInstance(); + } + } + /** + * .tensorflow.BytesList bytes_list = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.BytesList, org.tensorflow.proto.example.BytesList.Builder, org.tensorflow.proto.example.BytesListOrBuilder> + getBytesListFieldBuilder() { + if (bytesListBuilder_ == null) { + if (!(kindCase_ == 1)) { + kind_ = org.tensorflow.proto.example.BytesList.getDefaultInstance(); + } + bytesListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.BytesList, org.tensorflow.proto.example.BytesList.Builder, org.tensorflow.proto.example.BytesListOrBuilder>( + (org.tensorflow.proto.example.BytesList) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 1; + onChanged();; + return bytesListBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.FloatList, org.tensorflow.proto.example.FloatList.Builder, org.tensorflow.proto.example.FloatListOrBuilder> floatListBuilder_; + /** + * .tensorflow.FloatList float_list = 2; + */ + public boolean hasFloatList() { + return kindCase_ == 2; + } + /** + * .tensorflow.FloatList float_list = 2; + */ + public org.tensorflow.proto.example.FloatList getFloatList() { + if (floatListBuilder_ == null) { + if (kindCase_ == 2) { + return (org.tensorflow.proto.example.FloatList) kind_; + } + return org.tensorflow.proto.example.FloatList.getDefaultInstance(); + } else { + if (kindCase_ == 2) { + return floatListBuilder_.getMessage(); + } + return org.tensorflow.proto.example.FloatList.getDefaultInstance(); + } + } + /** + * .tensorflow.FloatList float_list = 2; + */ + public Builder setFloatList(org.tensorflow.proto.example.FloatList value) { + if (floatListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + floatListBuilder_.setMessage(value); + } + kindCase_ = 2; + return this; + } + /** + * .tensorflow.FloatList float_list = 2; + */ + public Builder setFloatList( + org.tensorflow.proto.example.FloatList.Builder builderForValue) { + if (floatListBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + floatListBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 2; + return this; + } + /** + * .tensorflow.FloatList float_list = 2; + */ + public Builder mergeFloatList(org.tensorflow.proto.example.FloatList value) { + if (floatListBuilder_ == null) { + if (kindCase_ == 2 && + kind_ != org.tensorflow.proto.example.FloatList.getDefaultInstance()) { + kind_ = org.tensorflow.proto.example.FloatList.newBuilder((org.tensorflow.proto.example.FloatList) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 2) { + floatListBuilder_.mergeFrom(value); + } + floatListBuilder_.setMessage(value); + } + kindCase_ = 2; + return this; + } + /** + * .tensorflow.FloatList float_list = 2; + */ + public Builder clearFloatList() { + if (floatListBuilder_ == null) { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + } + floatListBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.FloatList float_list = 2; + */ + public org.tensorflow.proto.example.FloatList.Builder getFloatListBuilder() { + return getFloatListFieldBuilder().getBuilder(); + } + /** + * .tensorflow.FloatList float_list = 2; + */ + public org.tensorflow.proto.example.FloatListOrBuilder getFloatListOrBuilder() { + if ((kindCase_ == 2) && (floatListBuilder_ != null)) { + return floatListBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 2) { + return (org.tensorflow.proto.example.FloatList) kind_; + } + return org.tensorflow.proto.example.FloatList.getDefaultInstance(); + } + } + /** + * .tensorflow.FloatList float_list = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.FloatList, org.tensorflow.proto.example.FloatList.Builder, org.tensorflow.proto.example.FloatListOrBuilder> + getFloatListFieldBuilder() { + if (floatListBuilder_ == null) { + if (!(kindCase_ == 2)) { + kind_ = org.tensorflow.proto.example.FloatList.getDefaultInstance(); + } + floatListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.FloatList, org.tensorflow.proto.example.FloatList.Builder, org.tensorflow.proto.example.FloatListOrBuilder>( + (org.tensorflow.proto.example.FloatList) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 2; + onChanged();; + return floatListBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.Int64List, org.tensorflow.proto.example.Int64List.Builder, org.tensorflow.proto.example.Int64ListOrBuilder> int64ListBuilder_; + /** + * .tensorflow.Int64List int64_list = 3; + */ + public boolean hasInt64List() { + return kindCase_ == 3; + } + /** + * .tensorflow.Int64List int64_list = 3; + */ + public org.tensorflow.proto.example.Int64List getInt64List() { + if (int64ListBuilder_ == null) { + if (kindCase_ == 3) { + return (org.tensorflow.proto.example.Int64List) kind_; + } + return org.tensorflow.proto.example.Int64List.getDefaultInstance(); + } else { + if (kindCase_ == 3) { + return int64ListBuilder_.getMessage(); + } + return org.tensorflow.proto.example.Int64List.getDefaultInstance(); + } + } + /** + * .tensorflow.Int64List int64_list = 3; + */ + public Builder setInt64List(org.tensorflow.proto.example.Int64List value) { + if (int64ListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + int64ListBuilder_.setMessage(value); + } + kindCase_ = 3; + return this; + } + /** + * .tensorflow.Int64List int64_list = 3; + */ + public Builder setInt64List( + org.tensorflow.proto.example.Int64List.Builder builderForValue) { + if (int64ListBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + int64ListBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 3; + return this; + } + /** + * .tensorflow.Int64List int64_list = 3; + */ + public Builder mergeInt64List(org.tensorflow.proto.example.Int64List value) { + if (int64ListBuilder_ == null) { + if (kindCase_ == 3 && + kind_ != org.tensorflow.proto.example.Int64List.getDefaultInstance()) { + kind_ = org.tensorflow.proto.example.Int64List.newBuilder((org.tensorflow.proto.example.Int64List) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 3) { + int64ListBuilder_.mergeFrom(value); + } + int64ListBuilder_.setMessage(value); + } + kindCase_ = 3; + return this; + } + /** + * .tensorflow.Int64List int64_list = 3; + */ + public Builder clearInt64List() { + if (int64ListBuilder_ == null) { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + } + int64ListBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.Int64List int64_list = 3; + */ + public org.tensorflow.proto.example.Int64List.Builder getInt64ListBuilder() { + return getInt64ListFieldBuilder().getBuilder(); + } + /** + * .tensorflow.Int64List int64_list = 3; + */ + public org.tensorflow.proto.example.Int64ListOrBuilder getInt64ListOrBuilder() { + if ((kindCase_ == 3) && (int64ListBuilder_ != null)) { + return int64ListBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 3) { + return (org.tensorflow.proto.example.Int64List) kind_; + } + return org.tensorflow.proto.example.Int64List.getDefaultInstance(); + } + } + /** + * .tensorflow.Int64List int64_list = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.Int64List, org.tensorflow.proto.example.Int64List.Builder, org.tensorflow.proto.example.Int64ListOrBuilder> + getInt64ListFieldBuilder() { + if (int64ListBuilder_ == null) { + if (!(kindCase_ == 3)) { + kind_ = org.tensorflow.proto.example.Int64List.getDefaultInstance(); + } + int64ListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.Int64List, org.tensorflow.proto.example.Int64List.Builder, org.tensorflow.proto.example.Int64ListOrBuilder>( + (org.tensorflow.proto.example.Int64List) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 3; + onChanged();; + return int64ListBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.Feature) + } + + // @@protoc_insertion_point(class_scope:tensorflow.Feature) + private static final org.tensorflow.proto.example.Feature DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.example.Feature(); + } + + public static org.tensorflow.proto.example.Feature getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Feature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Feature(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.example.Feature getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureConfiguration.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureConfiguration.java new file mode 100644 index 00000000000..6034a97c93e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureConfiguration.java @@ -0,0 +1,893 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/example_parser_configuration.proto + +package org.tensorflow.proto.example; + +/** + * Protobuf type {@code tensorflow.FeatureConfiguration} + */ +public final class FeatureConfiguration extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.FeatureConfiguration) + FeatureConfigurationOrBuilder { +private static final long serialVersionUID = 0L; + // Use FeatureConfiguration.newBuilder() to construct. + private FeatureConfiguration(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FeatureConfiguration() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FeatureConfiguration(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FeatureConfiguration( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.tensorflow.proto.example.FixedLenFeatureProto.Builder subBuilder = null; + if (configCase_ == 1) { + subBuilder = ((org.tensorflow.proto.example.FixedLenFeatureProto) config_).toBuilder(); + } + config_ = + input.readMessage(org.tensorflow.proto.example.FixedLenFeatureProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.example.FixedLenFeatureProto) config_); + config_ = subBuilder.buildPartial(); + } + configCase_ = 1; + break; + } + case 18: { + org.tensorflow.proto.example.VarLenFeatureProto.Builder subBuilder = null; + if (configCase_ == 2) { + subBuilder = ((org.tensorflow.proto.example.VarLenFeatureProto) config_).toBuilder(); + } + config_ = + input.readMessage(org.tensorflow.proto.example.VarLenFeatureProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.example.VarLenFeatureProto) config_); + config_ = subBuilder.buildPartial(); + } + configCase_ = 2; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_FeatureConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_FeatureConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.FeatureConfiguration.class, org.tensorflow.proto.example.FeatureConfiguration.Builder.class); + } + + private int configCase_ = 0; + private java.lang.Object config_; + public enum ConfigCase + implements com.google.protobuf.Internal.EnumLite { + FIXED_LEN_FEATURE(1), + VAR_LEN_FEATURE(2), + CONFIG_NOT_SET(0); + private final int value; + private ConfigCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConfigCase valueOf(int value) { + return forNumber(value); + } + + public static ConfigCase forNumber(int value) { + switch (value) { + case 1: return FIXED_LEN_FEATURE; + case 2: return VAR_LEN_FEATURE; + case 0: return CONFIG_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ConfigCase + getConfigCase() { + return ConfigCase.forNumber( + configCase_); + } + + public static final int FIXED_LEN_FEATURE_FIELD_NUMBER = 1; + /** + * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1; + */ + public boolean hasFixedLenFeature() { + return configCase_ == 1; + } + /** + * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1; + */ + public org.tensorflow.proto.example.FixedLenFeatureProto getFixedLenFeature() { + if (configCase_ == 1) { + return (org.tensorflow.proto.example.FixedLenFeatureProto) config_; + } + return org.tensorflow.proto.example.FixedLenFeatureProto.getDefaultInstance(); + } + /** + * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1; + */ + public org.tensorflow.proto.example.FixedLenFeatureProtoOrBuilder getFixedLenFeatureOrBuilder() { + if (configCase_ == 1) { + return (org.tensorflow.proto.example.FixedLenFeatureProto) config_; + } + return org.tensorflow.proto.example.FixedLenFeatureProto.getDefaultInstance(); + } + + public static final int VAR_LEN_FEATURE_FIELD_NUMBER = 2; + /** + * .tensorflow.VarLenFeatureProto var_len_feature = 2; + */ + public boolean hasVarLenFeature() { + return configCase_ == 2; + } + /** + * .tensorflow.VarLenFeatureProto var_len_feature = 2; + */ + public org.tensorflow.proto.example.VarLenFeatureProto getVarLenFeature() { + if (configCase_ == 2) { + return (org.tensorflow.proto.example.VarLenFeatureProto) config_; + } + return org.tensorflow.proto.example.VarLenFeatureProto.getDefaultInstance(); + } + /** + * .tensorflow.VarLenFeatureProto var_len_feature = 2; + */ + public org.tensorflow.proto.example.VarLenFeatureProtoOrBuilder getVarLenFeatureOrBuilder() { + if (configCase_ == 2) { + return (org.tensorflow.proto.example.VarLenFeatureProto) config_; + } + return org.tensorflow.proto.example.VarLenFeatureProto.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (configCase_ == 1) { + output.writeMessage(1, (org.tensorflow.proto.example.FixedLenFeatureProto) config_); + } + if (configCase_ == 2) { + output.writeMessage(2, (org.tensorflow.proto.example.VarLenFeatureProto) config_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (configCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (org.tensorflow.proto.example.FixedLenFeatureProto) config_); + } + if (configCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (org.tensorflow.proto.example.VarLenFeatureProto) config_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.example.FeatureConfiguration)) { + return super.equals(obj); + } + org.tensorflow.proto.example.FeatureConfiguration other = (org.tensorflow.proto.example.FeatureConfiguration) obj; + + if (!getConfigCase().equals(other.getConfigCase())) return false; + switch (configCase_) { + case 1: + if (!getFixedLenFeature() + .equals(other.getFixedLenFeature())) return false; + break; + case 2: + if (!getVarLenFeature() + .equals(other.getVarLenFeature())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (configCase_) { + case 1: + hash = (37 * hash) + FIXED_LEN_FEATURE_FIELD_NUMBER; + hash = (53 * hash) + getFixedLenFeature().hashCode(); + break; + case 2: + hash = (37 * hash) + VAR_LEN_FEATURE_FIELD_NUMBER; + hash = (53 * hash) + getVarLenFeature().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.example.FeatureConfiguration parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.FeatureConfiguration parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.FeatureConfiguration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.FeatureConfiguration 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.proto.example.FeatureConfiguration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.FeatureConfiguration parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.FeatureConfiguration parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.FeatureConfiguration parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.FeatureConfiguration parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.FeatureConfiguration parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.FeatureConfiguration parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.FeatureConfiguration parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.example.FeatureConfiguration prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.FeatureConfiguration} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.FeatureConfiguration) + org.tensorflow.proto.example.FeatureConfigurationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_FeatureConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_FeatureConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.FeatureConfiguration.class, org.tensorflow.proto.example.FeatureConfiguration.Builder.class); + } + + // Construct using org.tensorflow.proto.example.FeatureConfiguration.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + configCase_ = 0; + config_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_FeatureConfiguration_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.example.FeatureConfiguration getDefaultInstanceForType() { + return org.tensorflow.proto.example.FeatureConfiguration.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.example.FeatureConfiguration build() { + org.tensorflow.proto.example.FeatureConfiguration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.example.FeatureConfiguration buildPartial() { + org.tensorflow.proto.example.FeatureConfiguration result = new org.tensorflow.proto.example.FeatureConfiguration(this); + if (configCase_ == 1) { + if (fixedLenFeatureBuilder_ == null) { + result.config_ = config_; + } else { + result.config_ = fixedLenFeatureBuilder_.build(); + } + } + if (configCase_ == 2) { + if (varLenFeatureBuilder_ == null) { + result.config_ = config_; + } else { + result.config_ = varLenFeatureBuilder_.build(); + } + } + result.configCase_ = configCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.example.FeatureConfiguration) { + return mergeFrom((org.tensorflow.proto.example.FeatureConfiguration)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.example.FeatureConfiguration other) { + if (other == org.tensorflow.proto.example.FeatureConfiguration.getDefaultInstance()) return this; + switch (other.getConfigCase()) { + case FIXED_LEN_FEATURE: { + mergeFixedLenFeature(other.getFixedLenFeature()); + break; + } + case VAR_LEN_FEATURE: { + mergeVarLenFeature(other.getVarLenFeature()); + break; + } + case CONFIG_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.example.FeatureConfiguration parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.example.FeatureConfiguration) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int configCase_ = 0; + private java.lang.Object config_; + public ConfigCase + getConfigCase() { + return ConfigCase.forNumber( + configCase_); + } + + public Builder clearConfig() { + configCase_ = 0; + config_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.FixedLenFeatureProto, org.tensorflow.proto.example.FixedLenFeatureProto.Builder, org.tensorflow.proto.example.FixedLenFeatureProtoOrBuilder> fixedLenFeatureBuilder_; + /** + * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1; + */ + public boolean hasFixedLenFeature() { + return configCase_ == 1; + } + /** + * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1; + */ + public org.tensorflow.proto.example.FixedLenFeatureProto getFixedLenFeature() { + if (fixedLenFeatureBuilder_ == null) { + if (configCase_ == 1) { + return (org.tensorflow.proto.example.FixedLenFeatureProto) config_; + } + return org.tensorflow.proto.example.FixedLenFeatureProto.getDefaultInstance(); + } else { + if (configCase_ == 1) { + return fixedLenFeatureBuilder_.getMessage(); + } + return org.tensorflow.proto.example.FixedLenFeatureProto.getDefaultInstance(); + } + } + /** + * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1; + */ + public Builder setFixedLenFeature(org.tensorflow.proto.example.FixedLenFeatureProto value) { + if (fixedLenFeatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + fixedLenFeatureBuilder_.setMessage(value); + } + configCase_ = 1; + return this; + } + /** + * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1; + */ + public Builder setFixedLenFeature( + org.tensorflow.proto.example.FixedLenFeatureProto.Builder builderForValue) { + if (fixedLenFeatureBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + fixedLenFeatureBuilder_.setMessage(builderForValue.build()); + } + configCase_ = 1; + return this; + } + /** + * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1; + */ + public Builder mergeFixedLenFeature(org.tensorflow.proto.example.FixedLenFeatureProto value) { + if (fixedLenFeatureBuilder_ == null) { + if (configCase_ == 1 && + config_ != org.tensorflow.proto.example.FixedLenFeatureProto.getDefaultInstance()) { + config_ = org.tensorflow.proto.example.FixedLenFeatureProto.newBuilder((org.tensorflow.proto.example.FixedLenFeatureProto) config_) + .mergeFrom(value).buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + if (configCase_ == 1) { + fixedLenFeatureBuilder_.mergeFrom(value); + } + fixedLenFeatureBuilder_.setMessage(value); + } + configCase_ = 1; + return this; + } + /** + * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1; + */ + public Builder clearFixedLenFeature() { + if (fixedLenFeatureBuilder_ == null) { + if (configCase_ == 1) { + configCase_ = 0; + config_ = null; + onChanged(); + } + } else { + if (configCase_ == 1) { + configCase_ = 0; + config_ = null; + } + fixedLenFeatureBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1; + */ + public org.tensorflow.proto.example.FixedLenFeatureProto.Builder getFixedLenFeatureBuilder() { + return getFixedLenFeatureFieldBuilder().getBuilder(); + } + /** + * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1; + */ + public org.tensorflow.proto.example.FixedLenFeatureProtoOrBuilder getFixedLenFeatureOrBuilder() { + if ((configCase_ == 1) && (fixedLenFeatureBuilder_ != null)) { + return fixedLenFeatureBuilder_.getMessageOrBuilder(); + } else { + if (configCase_ == 1) { + return (org.tensorflow.proto.example.FixedLenFeatureProto) config_; + } + return org.tensorflow.proto.example.FixedLenFeatureProto.getDefaultInstance(); + } + } + /** + * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.FixedLenFeatureProto, org.tensorflow.proto.example.FixedLenFeatureProto.Builder, org.tensorflow.proto.example.FixedLenFeatureProtoOrBuilder> + getFixedLenFeatureFieldBuilder() { + if (fixedLenFeatureBuilder_ == null) { + if (!(configCase_ == 1)) { + config_ = org.tensorflow.proto.example.FixedLenFeatureProto.getDefaultInstance(); + } + fixedLenFeatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.FixedLenFeatureProto, org.tensorflow.proto.example.FixedLenFeatureProto.Builder, org.tensorflow.proto.example.FixedLenFeatureProtoOrBuilder>( + (org.tensorflow.proto.example.FixedLenFeatureProto) config_, + getParentForChildren(), + isClean()); + config_ = null; + } + configCase_ = 1; + onChanged();; + return fixedLenFeatureBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.VarLenFeatureProto, org.tensorflow.proto.example.VarLenFeatureProto.Builder, org.tensorflow.proto.example.VarLenFeatureProtoOrBuilder> varLenFeatureBuilder_; + /** + * .tensorflow.VarLenFeatureProto var_len_feature = 2; + */ + public boolean hasVarLenFeature() { + return configCase_ == 2; + } + /** + * .tensorflow.VarLenFeatureProto var_len_feature = 2; + */ + public org.tensorflow.proto.example.VarLenFeatureProto getVarLenFeature() { + if (varLenFeatureBuilder_ == null) { + if (configCase_ == 2) { + return (org.tensorflow.proto.example.VarLenFeatureProto) config_; + } + return org.tensorflow.proto.example.VarLenFeatureProto.getDefaultInstance(); + } else { + if (configCase_ == 2) { + return varLenFeatureBuilder_.getMessage(); + } + return org.tensorflow.proto.example.VarLenFeatureProto.getDefaultInstance(); + } + } + /** + * .tensorflow.VarLenFeatureProto var_len_feature = 2; + */ + public Builder setVarLenFeature(org.tensorflow.proto.example.VarLenFeatureProto value) { + if (varLenFeatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + varLenFeatureBuilder_.setMessage(value); + } + configCase_ = 2; + return this; + } + /** + * .tensorflow.VarLenFeatureProto var_len_feature = 2; + */ + public Builder setVarLenFeature( + org.tensorflow.proto.example.VarLenFeatureProto.Builder builderForValue) { + if (varLenFeatureBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + varLenFeatureBuilder_.setMessage(builderForValue.build()); + } + configCase_ = 2; + return this; + } + /** + * .tensorflow.VarLenFeatureProto var_len_feature = 2; + */ + public Builder mergeVarLenFeature(org.tensorflow.proto.example.VarLenFeatureProto value) { + if (varLenFeatureBuilder_ == null) { + if (configCase_ == 2 && + config_ != org.tensorflow.proto.example.VarLenFeatureProto.getDefaultInstance()) { + config_ = org.tensorflow.proto.example.VarLenFeatureProto.newBuilder((org.tensorflow.proto.example.VarLenFeatureProto) config_) + .mergeFrom(value).buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + if (configCase_ == 2) { + varLenFeatureBuilder_.mergeFrom(value); + } + varLenFeatureBuilder_.setMessage(value); + } + configCase_ = 2; + return this; + } + /** + * .tensorflow.VarLenFeatureProto var_len_feature = 2; + */ + public Builder clearVarLenFeature() { + if (varLenFeatureBuilder_ == null) { + if (configCase_ == 2) { + configCase_ = 0; + config_ = null; + onChanged(); + } + } else { + if (configCase_ == 2) { + configCase_ = 0; + config_ = null; + } + varLenFeatureBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.VarLenFeatureProto var_len_feature = 2; + */ + public org.tensorflow.proto.example.VarLenFeatureProto.Builder getVarLenFeatureBuilder() { + return getVarLenFeatureFieldBuilder().getBuilder(); + } + /** + * .tensorflow.VarLenFeatureProto var_len_feature = 2; + */ + public org.tensorflow.proto.example.VarLenFeatureProtoOrBuilder getVarLenFeatureOrBuilder() { + if ((configCase_ == 2) && (varLenFeatureBuilder_ != null)) { + return varLenFeatureBuilder_.getMessageOrBuilder(); + } else { + if (configCase_ == 2) { + return (org.tensorflow.proto.example.VarLenFeatureProto) config_; + } + return org.tensorflow.proto.example.VarLenFeatureProto.getDefaultInstance(); + } + } + /** + * .tensorflow.VarLenFeatureProto var_len_feature = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.VarLenFeatureProto, org.tensorflow.proto.example.VarLenFeatureProto.Builder, org.tensorflow.proto.example.VarLenFeatureProtoOrBuilder> + getVarLenFeatureFieldBuilder() { + if (varLenFeatureBuilder_ == null) { + if (!(configCase_ == 2)) { + config_ = org.tensorflow.proto.example.VarLenFeatureProto.getDefaultInstance(); + } + varLenFeatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.VarLenFeatureProto, org.tensorflow.proto.example.VarLenFeatureProto.Builder, org.tensorflow.proto.example.VarLenFeatureProtoOrBuilder>( + (org.tensorflow.proto.example.VarLenFeatureProto) config_, + getParentForChildren(), + isClean()); + config_ = null; + } + configCase_ = 2; + onChanged();; + return varLenFeatureBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.FeatureConfiguration) + } + + // @@protoc_insertion_point(class_scope:tensorflow.FeatureConfiguration) + private static final org.tensorflow.proto.example.FeatureConfiguration DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.example.FeatureConfiguration(); + } + + public static org.tensorflow.proto.example.FeatureConfiguration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureConfiguration parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FeatureConfiguration(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.example.FeatureConfiguration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureConfigurationOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureConfigurationOrBuilder.java new file mode 100644 index 00000000000..917025caa25 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureConfigurationOrBuilder.java @@ -0,0 +1,37 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/example_parser_configuration.proto + +package org.tensorflow.proto.example; + +public interface FeatureConfigurationOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.FeatureConfiguration) + com.google.protobuf.MessageOrBuilder { + + /** + * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1; + */ + boolean hasFixedLenFeature(); + /** + * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1; + */ + org.tensorflow.proto.example.FixedLenFeatureProto getFixedLenFeature(); + /** + * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1; + */ + org.tensorflow.proto.example.FixedLenFeatureProtoOrBuilder getFixedLenFeatureOrBuilder(); + + /** + * .tensorflow.VarLenFeatureProto var_len_feature = 2; + */ + boolean hasVarLenFeature(); + /** + * .tensorflow.VarLenFeatureProto var_len_feature = 2; + */ + org.tensorflow.proto.example.VarLenFeatureProto getVarLenFeature(); + /** + * .tensorflow.VarLenFeatureProto var_len_feature = 2; + */ + org.tensorflow.proto.example.VarLenFeatureProtoOrBuilder getVarLenFeatureOrBuilder(); + + public org.tensorflow.proto.example.FeatureConfiguration.ConfigCase getConfigCase(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureList.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureList.java new file mode 100644 index 00000000000..6aa9f29864a --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureList.java @@ -0,0 +1,781 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/feature.proto + +package org.tensorflow.proto.example; + +/** + *
+ * Containers for sequential data.
+ * A FeatureList contains lists of Features.  These may hold zero or more
+ * Feature values.
+ * FeatureLists are organized into categories by name.  The FeatureLists message
+ * contains the mapping from name to FeatureList.
+ * 
+ * + * Protobuf type {@code tensorflow.FeatureList} + */ +public final class FeatureList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.FeatureList) + FeatureListOrBuilder { +private static final long serialVersionUID = 0L; + // Use FeatureList.newBuilder() to construct. + private FeatureList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FeatureList() { + feature_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FeatureList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FeatureList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + feature_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + feature_.add( + input.readMessage(org.tensorflow.proto.example.Feature.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + feature_ = java.util.Collections.unmodifiableList(feature_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_FeatureList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_FeatureList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.FeatureList.class, org.tensorflow.proto.example.FeatureList.Builder.class); + } + + public static final int FEATURE_FIELD_NUMBER = 1; + private java.util.List feature_; + /** + * repeated .tensorflow.Feature feature = 1; + */ + public java.util.List getFeatureList() { + return feature_; + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public java.util.List + getFeatureOrBuilderList() { + return feature_; + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public int getFeatureCount() { + return feature_.size(); + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public org.tensorflow.proto.example.Feature getFeature(int index) { + return feature_.get(index); + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public org.tensorflow.proto.example.FeatureOrBuilder getFeatureOrBuilder( + int index) { + return feature_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < feature_.size(); i++) { + output.writeMessage(1, feature_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < feature_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, feature_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.example.FeatureList)) { + return super.equals(obj); + } + org.tensorflow.proto.example.FeatureList other = (org.tensorflow.proto.example.FeatureList) obj; + + if (!getFeatureList() + .equals(other.getFeatureList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFeatureCount() > 0) { + hash = (37 * hash) + FEATURE_FIELD_NUMBER; + hash = (53 * hash) + getFeatureList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.example.FeatureList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.FeatureList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.FeatureList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.FeatureList 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.proto.example.FeatureList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.FeatureList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.FeatureList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.FeatureList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.FeatureList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.FeatureList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.FeatureList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.FeatureList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.example.FeatureList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Containers for sequential data.
+   * A FeatureList contains lists of Features.  These may hold zero or more
+   * Feature values.
+   * FeatureLists are organized into categories by name.  The FeatureLists message
+   * contains the mapping from name to FeatureList.
+   * 
+ * + * Protobuf type {@code tensorflow.FeatureList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.FeatureList) + org.tensorflow.proto.example.FeatureListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_FeatureList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_FeatureList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.FeatureList.class, org.tensorflow.proto.example.FeatureList.Builder.class); + } + + // Construct using org.tensorflow.proto.example.FeatureList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFeatureFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (featureBuilder_ == null) { + feature_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + featureBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_FeatureList_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.example.FeatureList getDefaultInstanceForType() { + return org.tensorflow.proto.example.FeatureList.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.example.FeatureList build() { + org.tensorflow.proto.example.FeatureList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.example.FeatureList buildPartial() { + org.tensorflow.proto.example.FeatureList result = new org.tensorflow.proto.example.FeatureList(this); + int from_bitField0_ = bitField0_; + if (featureBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + feature_ = java.util.Collections.unmodifiableList(feature_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.feature_ = feature_; + } else { + result.feature_ = featureBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.example.FeatureList) { + return mergeFrom((org.tensorflow.proto.example.FeatureList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.example.FeatureList other) { + if (other == org.tensorflow.proto.example.FeatureList.getDefaultInstance()) return this; + if (featureBuilder_ == null) { + if (!other.feature_.isEmpty()) { + if (feature_.isEmpty()) { + feature_ = other.feature_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeatureIsMutable(); + feature_.addAll(other.feature_); + } + onChanged(); + } + } else { + if (!other.feature_.isEmpty()) { + if (featureBuilder_.isEmpty()) { + featureBuilder_.dispose(); + featureBuilder_ = null; + feature_ = other.feature_; + bitField0_ = (bitField0_ & ~0x00000001); + featureBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFeatureFieldBuilder() : null; + } else { + featureBuilder_.addAllMessages(other.feature_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.example.FeatureList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.example.FeatureList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List feature_ = + java.util.Collections.emptyList(); + private void ensureFeatureIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + feature_ = new java.util.ArrayList(feature_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.example.Feature, org.tensorflow.proto.example.Feature.Builder, org.tensorflow.proto.example.FeatureOrBuilder> featureBuilder_; + + /** + * repeated .tensorflow.Feature feature = 1; + */ + public java.util.List getFeatureList() { + if (featureBuilder_ == null) { + return java.util.Collections.unmodifiableList(feature_); + } else { + return featureBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public int getFeatureCount() { + if (featureBuilder_ == null) { + return feature_.size(); + } else { + return featureBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public org.tensorflow.proto.example.Feature getFeature(int index) { + if (featureBuilder_ == null) { + return feature_.get(index); + } else { + return featureBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public Builder setFeature( + int index, org.tensorflow.proto.example.Feature value) { + if (featureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureIsMutable(); + feature_.set(index, value); + onChanged(); + } else { + featureBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public Builder setFeature( + int index, org.tensorflow.proto.example.Feature.Builder builderForValue) { + if (featureBuilder_ == null) { + ensureFeatureIsMutable(); + feature_.set(index, builderForValue.build()); + onChanged(); + } else { + featureBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public Builder addFeature(org.tensorflow.proto.example.Feature value) { + if (featureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureIsMutable(); + feature_.add(value); + onChanged(); + } else { + featureBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public Builder addFeature( + int index, org.tensorflow.proto.example.Feature value) { + if (featureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeatureIsMutable(); + feature_.add(index, value); + onChanged(); + } else { + featureBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public Builder addFeature( + org.tensorflow.proto.example.Feature.Builder builderForValue) { + if (featureBuilder_ == null) { + ensureFeatureIsMutable(); + feature_.add(builderForValue.build()); + onChanged(); + } else { + featureBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public Builder addFeature( + int index, org.tensorflow.proto.example.Feature.Builder builderForValue) { + if (featureBuilder_ == null) { + ensureFeatureIsMutable(); + feature_.add(index, builderForValue.build()); + onChanged(); + } else { + featureBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public Builder addAllFeature( + java.lang.Iterable values) { + if (featureBuilder_ == null) { + ensureFeatureIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, feature_); + onChanged(); + } else { + featureBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public Builder clearFeature() { + if (featureBuilder_ == null) { + feature_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featureBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public Builder removeFeature(int index) { + if (featureBuilder_ == null) { + ensureFeatureIsMutable(); + feature_.remove(index); + onChanged(); + } else { + featureBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public org.tensorflow.proto.example.Feature.Builder getFeatureBuilder( + int index) { + return getFeatureFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public org.tensorflow.proto.example.FeatureOrBuilder getFeatureOrBuilder( + int index) { + if (featureBuilder_ == null) { + return feature_.get(index); } else { + return featureBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public java.util.List + getFeatureOrBuilderList() { + if (featureBuilder_ != null) { + return featureBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(feature_); + } + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public org.tensorflow.proto.example.Feature.Builder addFeatureBuilder() { + return getFeatureFieldBuilder().addBuilder( + org.tensorflow.proto.example.Feature.getDefaultInstance()); + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public org.tensorflow.proto.example.Feature.Builder addFeatureBuilder( + int index) { + return getFeatureFieldBuilder().addBuilder( + index, org.tensorflow.proto.example.Feature.getDefaultInstance()); + } + /** + * repeated .tensorflow.Feature feature = 1; + */ + public java.util.List + getFeatureBuilderList() { + return getFeatureFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.example.Feature, org.tensorflow.proto.example.Feature.Builder, org.tensorflow.proto.example.FeatureOrBuilder> + getFeatureFieldBuilder() { + if (featureBuilder_ == null) { + featureBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.example.Feature, org.tensorflow.proto.example.Feature.Builder, org.tensorflow.proto.example.FeatureOrBuilder>( + feature_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + feature_ = null; + } + return featureBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.FeatureList) + } + + // @@protoc_insertion_point(class_scope:tensorflow.FeatureList) + private static final org.tensorflow.proto.example.FeatureList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.example.FeatureList(); + } + + public static org.tensorflow.proto.example.FeatureList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FeatureList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.example.FeatureList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureListOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureListOrBuilder.java new file mode 100644 index 00000000000..9302c3512db --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureListOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/feature.proto + +package org.tensorflow.proto.example; + +public interface FeatureListOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.FeatureList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .tensorflow.Feature feature = 1; + */ + java.util.List + getFeatureList(); + /** + * repeated .tensorflow.Feature feature = 1; + */ + org.tensorflow.proto.example.Feature getFeature(int index); + /** + * repeated .tensorflow.Feature feature = 1; + */ + int getFeatureCount(); + /** + * repeated .tensorflow.Feature feature = 1; + */ + java.util.List + getFeatureOrBuilderList(); + /** + * repeated .tensorflow.Feature feature = 1; + */ + org.tensorflow.proto.example.FeatureOrBuilder getFeatureOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureLists.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureLists.java new file mode 100644 index 00000000000..4b10f2b7d90 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureLists.java @@ -0,0 +1,739 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/feature.proto + +package org.tensorflow.proto.example; + +/** + * Protobuf type {@code tensorflow.FeatureLists} + */ +public final class FeatureLists extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.FeatureLists) + FeatureListsOrBuilder { +private static final long serialVersionUID = 0L; + // Use FeatureLists.newBuilder() to construct. + private FeatureLists(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FeatureLists() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FeatureLists(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FeatureLists( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + featureList_ = com.google.protobuf.MapField.newMapField( + FeatureListDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + featureList__ = input.readMessage( + FeatureListDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + featureList_.getMutableMap().put( + featureList__.getKey(), featureList__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_FeatureLists_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetFeatureList(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_FeatureLists_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.FeatureLists.class, org.tensorflow.proto.example.FeatureLists.Builder.class); + } + + public static final int FEATURE_LIST_FIELD_NUMBER = 1; + private static final class FeatureListDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, org.tensorflow.proto.example.FeatureList> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_FeatureLists_FeatureListEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.example.FeatureList.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.example.FeatureList> featureList_; + private com.google.protobuf.MapField + internalGetFeatureList() { + if (featureList_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FeatureListDefaultEntryHolder.defaultEntry); + } + return featureList_; + } + + public int getFeatureListCount() { + return internalGetFeatureList().getMap().size(); + } + /** + *
+   * Map from feature name to feature list.
+   * 
+ * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + + public boolean containsFeatureList( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFeatureList().getMap().containsKey(key); + } + /** + * Use {@link #getFeatureListMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getFeatureList() { + return getFeatureListMap(); + } + /** + *
+   * Map from feature name to feature list.
+   * 
+ * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + + public java.util.Map getFeatureListMap() { + return internalGetFeatureList().getMap(); + } + /** + *
+   * Map from feature name to feature list.
+   * 
+ * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + + public org.tensorflow.proto.example.FeatureList getFeatureListOrDefault( + java.lang.String key, + org.tensorflow.proto.example.FeatureList defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFeatureList().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Map from feature name to feature list.
+   * 
+ * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + + public org.tensorflow.proto.example.FeatureList getFeatureListOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFeatureList().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetFeatureList(), + FeatureListDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetFeatureList().getMap().entrySet()) { + com.google.protobuf.MapEntry + featureList__ = FeatureListDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, featureList__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.example.FeatureLists)) { + return super.equals(obj); + } + org.tensorflow.proto.example.FeatureLists other = (org.tensorflow.proto.example.FeatureLists) obj; + + if (!internalGetFeatureList().equals( + other.internalGetFeatureList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetFeatureList().getMap().isEmpty()) { + hash = (37 * hash) + FEATURE_LIST_FIELD_NUMBER; + hash = (53 * hash) + internalGetFeatureList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.example.FeatureLists parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.FeatureLists parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.FeatureLists parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.FeatureLists 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.proto.example.FeatureLists parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.FeatureLists parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.FeatureLists parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.FeatureLists parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.FeatureLists parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.FeatureLists parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.FeatureLists parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.FeatureLists parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.example.FeatureLists prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.FeatureLists} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.FeatureLists) + org.tensorflow.proto.example.FeatureListsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_FeatureLists_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetFeatureList(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableFeatureList(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_FeatureLists_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.FeatureLists.class, org.tensorflow.proto.example.FeatureLists.Builder.class); + } + + // Construct using org.tensorflow.proto.example.FeatureLists.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableFeatureList().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_FeatureLists_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.example.FeatureLists getDefaultInstanceForType() { + return org.tensorflow.proto.example.FeatureLists.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.example.FeatureLists build() { + org.tensorflow.proto.example.FeatureLists result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.example.FeatureLists buildPartial() { + org.tensorflow.proto.example.FeatureLists result = new org.tensorflow.proto.example.FeatureLists(this); + int from_bitField0_ = bitField0_; + result.featureList_ = internalGetFeatureList(); + result.featureList_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.example.FeatureLists) { + return mergeFrom((org.tensorflow.proto.example.FeatureLists)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.example.FeatureLists other) { + if (other == org.tensorflow.proto.example.FeatureLists.getDefaultInstance()) return this; + internalGetMutableFeatureList().mergeFrom( + other.internalGetFeatureList()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.example.FeatureLists parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.example.FeatureLists) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.example.FeatureList> featureList_; + private com.google.protobuf.MapField + internalGetFeatureList() { + if (featureList_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FeatureListDefaultEntryHolder.defaultEntry); + } + return featureList_; + } + private com.google.protobuf.MapField + internalGetMutableFeatureList() { + onChanged();; + if (featureList_ == null) { + featureList_ = com.google.protobuf.MapField.newMapField( + FeatureListDefaultEntryHolder.defaultEntry); + } + if (!featureList_.isMutable()) { + featureList_ = featureList_.copy(); + } + return featureList_; + } + + public int getFeatureListCount() { + return internalGetFeatureList().getMap().size(); + } + /** + *
+     * Map from feature name to feature list.
+     * 
+ * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + + public boolean containsFeatureList( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFeatureList().getMap().containsKey(key); + } + /** + * Use {@link #getFeatureListMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getFeatureList() { + return getFeatureListMap(); + } + /** + *
+     * Map from feature name to feature list.
+     * 
+ * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + + public java.util.Map getFeatureListMap() { + return internalGetFeatureList().getMap(); + } + /** + *
+     * Map from feature name to feature list.
+     * 
+ * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + + public org.tensorflow.proto.example.FeatureList getFeatureListOrDefault( + java.lang.String key, + org.tensorflow.proto.example.FeatureList defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFeatureList().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Map from feature name to feature list.
+     * 
+ * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + + public org.tensorflow.proto.example.FeatureList getFeatureListOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFeatureList().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearFeatureList() { + internalGetMutableFeatureList().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Map from feature name to feature list.
+     * 
+ * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + + public Builder removeFeatureList( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFeatureList().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableFeatureList() { + return internalGetMutableFeatureList().getMutableMap(); + } + /** + *
+     * Map from feature name to feature list.
+     * 
+ * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + public Builder putFeatureList( + java.lang.String key, + org.tensorflow.proto.example.FeatureList value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFeatureList().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Map from feature name to feature list.
+     * 
+ * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + + public Builder putAllFeatureList( + java.util.Map values) { + internalGetMutableFeatureList().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.FeatureLists) + } + + // @@protoc_insertion_point(class_scope:tensorflow.FeatureLists) + private static final org.tensorflow.proto.example.FeatureLists DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.example.FeatureLists(); + } + + public static org.tensorflow.proto.example.FeatureLists getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureLists parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FeatureLists(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.example.FeatureLists getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureListsOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureListsOrBuilder.java new file mode 100644 index 00000000000..9f582b998ce --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureListsOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/feature.proto + +package org.tensorflow.proto.example; + +public interface FeatureListsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.FeatureLists) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Map from feature name to feature list.
+   * 
+ * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + int getFeatureListCount(); + /** + *
+   * Map from feature name to feature list.
+   * 
+ * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + boolean containsFeatureList( + java.lang.String key); + /** + * Use {@link #getFeatureListMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getFeatureList(); + /** + *
+   * Map from feature name to feature list.
+   * 
+ * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + java.util.Map + getFeatureListMap(); + /** + *
+   * Map from feature name to feature list.
+   * 
+ * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + + org.tensorflow.proto.example.FeatureList getFeatureListOrDefault( + java.lang.String key, + org.tensorflow.proto.example.FeatureList defaultValue); + /** + *
+   * Map from feature name to feature list.
+   * 
+ * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + + org.tensorflow.proto.example.FeatureList getFeatureListOrThrow( + java.lang.String key); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureOrBuilder.java new file mode 100644 index 00000000000..92242bf9615 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureOrBuilder.java @@ -0,0 +1,50 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/feature.proto + +package org.tensorflow.proto.example; + +public interface FeatureOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.Feature) + com.google.protobuf.MessageOrBuilder { + + /** + * .tensorflow.BytesList bytes_list = 1; + */ + boolean hasBytesList(); + /** + * .tensorflow.BytesList bytes_list = 1; + */ + org.tensorflow.proto.example.BytesList getBytesList(); + /** + * .tensorflow.BytesList bytes_list = 1; + */ + org.tensorflow.proto.example.BytesListOrBuilder getBytesListOrBuilder(); + + /** + * .tensorflow.FloatList float_list = 2; + */ + boolean hasFloatList(); + /** + * .tensorflow.FloatList float_list = 2; + */ + org.tensorflow.proto.example.FloatList getFloatList(); + /** + * .tensorflow.FloatList float_list = 2; + */ + org.tensorflow.proto.example.FloatListOrBuilder getFloatListOrBuilder(); + + /** + * .tensorflow.Int64List int64_list = 3; + */ + boolean hasInt64List(); + /** + * .tensorflow.Int64List int64_list = 3; + */ + org.tensorflow.proto.example.Int64List getInt64List(); + /** + * .tensorflow.Int64List int64_list = 3; + */ + org.tensorflow.proto.example.Int64ListOrBuilder getInt64ListOrBuilder(); + + public org.tensorflow.proto.example.Feature.KindCase getKindCase(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureProtos.java new file mode 100644 index 00000000000..a03e3fecc50 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeatureProtos.java @@ -0,0 +1,153 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/feature.proto + +package org.tensorflow.proto.example; + +public final class FeatureProtos { + private FeatureProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_BytesList_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_BytesList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_FloatList_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_FloatList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_Int64List_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_Int64List_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_Feature_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_Feature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_Features_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_Features_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_Features_FeatureEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_Features_FeatureEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_FeatureList_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_FeatureList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_FeatureLists_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_FeatureLists_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_FeatureLists_FeatureListEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_FeatureLists_FeatureListEntry_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/example/feature.proto\022" + + "\ntensorflow\"\032\n\tBytesList\022\r\n\005value\030\001 \003(\014\"" + + "\036\n\tFloatList\022\021\n\005value\030\001 \003(\002B\002\020\001\"\036\n\tInt64" + + "List\022\021\n\005value\030\001 \003(\003B\002\020\001\"\230\001\n\007Feature\022+\n\nb" + + "ytes_list\030\001 \001(\0132\025.tensorflow.BytesListH\000" + + "\022+\n\nfloat_list\030\002 \001(\0132\025.tensorflow.FloatL" + + "istH\000\022+\n\nint64_list\030\003 \001(\0132\025.tensorflow.I" + + "nt64ListH\000B\006\n\004kind\"\203\001\n\010Features\0222\n\007featu" + + "re\030\001 \003(\0132!.tensorflow.Features.FeatureEn" + + "try\032C\n\014FeatureEntry\022\013\n\003key\030\001 \001(\t\022\"\n\005valu" + + "e\030\002 \001(\0132\023.tensorflow.Feature:\0028\001\"3\n\013Feat" + + "ureList\022$\n\007feature\030\001 \003(\0132\023.tensorflow.Fe" + + "ature\"\234\001\n\014FeatureLists\022?\n\014feature_list\030\001" + + " \003(\0132).tensorflow.FeatureLists.FeatureLi" + + "stEntry\032K\n\020FeatureListEntry\022\013\n\003key\030\001 \001(\t" + + "\022&\n\005value\030\002 \001(\0132\027.tensorflow.FeatureList" + + ":\0028\001B\207\001\n\034org.tensorflow.proto.exampleB\rF" + + "eatureProtosP\001ZSgithub.com/tensorflow/te" + + "nsorflow/tensorflow/go/core/example/exam" + + "ple_protos_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tensorflow_BytesList_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_BytesList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_BytesList_descriptor, + new java.lang.String[] { "Value", }); + internal_static_tensorflow_FloatList_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_FloatList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_FloatList_descriptor, + new java.lang.String[] { "Value", }); + internal_static_tensorflow_Int64List_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_tensorflow_Int64List_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_Int64List_descriptor, + new java.lang.String[] { "Value", }); + internal_static_tensorflow_Feature_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_tensorflow_Feature_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_Feature_descriptor, + new java.lang.String[] { "BytesList", "FloatList", "Int64List", "Kind", }); + internal_static_tensorflow_Features_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_tensorflow_Features_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_Features_descriptor, + new java.lang.String[] { "Feature", }); + internal_static_tensorflow_Features_FeatureEntry_descriptor = + internal_static_tensorflow_Features_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_Features_FeatureEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_Features_FeatureEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_FeatureList_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_tensorflow_FeatureList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_FeatureList_descriptor, + new java.lang.String[] { "Feature", }); + internal_static_tensorflow_FeatureLists_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_tensorflow_FeatureLists_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_FeatureLists_descriptor, + new java.lang.String[] { "FeatureList", }); + internal_static_tensorflow_FeatureLists_FeatureListEntry_descriptor = + internal_static_tensorflow_FeatureLists_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_FeatureLists_FeatureListEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_FeatureLists_FeatureListEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/Features.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/Features.java new file mode 100644 index 00000000000..0e47b04941f --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/Features.java @@ -0,0 +1,739 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/feature.proto + +package org.tensorflow.proto.example; + +/** + * Protobuf type {@code tensorflow.Features} + */ +public final class Features extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.Features) + FeaturesOrBuilder { +private static final long serialVersionUID = 0L; + // Use Features.newBuilder() to construct. + private Features(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Features() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Features(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Features( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + feature_ = com.google.protobuf.MapField.newMapField( + FeatureDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + feature__ = input.readMessage( + FeatureDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + feature_.getMutableMap().put( + feature__.getKey(), feature__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_Features_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetFeature(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_Features_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.Features.class, org.tensorflow.proto.example.Features.Builder.class); + } + + public static final int FEATURE_FIELD_NUMBER = 1; + private static final class FeatureDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, org.tensorflow.proto.example.Feature> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_Features_FeatureEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.example.Feature.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.example.Feature> feature_; + private com.google.protobuf.MapField + internalGetFeature() { + if (feature_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FeatureDefaultEntryHolder.defaultEntry); + } + return feature_; + } + + public int getFeatureCount() { + return internalGetFeature().getMap().size(); + } + /** + *
+   * Map from feature name to feature.
+   * 
+ * + * map<string, .tensorflow.Feature> feature = 1; + */ + + public boolean containsFeature( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFeature().getMap().containsKey(key); + } + /** + * Use {@link #getFeatureMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getFeature() { + return getFeatureMap(); + } + /** + *
+   * Map from feature name to feature.
+   * 
+ * + * map<string, .tensorflow.Feature> feature = 1; + */ + + public java.util.Map getFeatureMap() { + return internalGetFeature().getMap(); + } + /** + *
+   * Map from feature name to feature.
+   * 
+ * + * map<string, .tensorflow.Feature> feature = 1; + */ + + public org.tensorflow.proto.example.Feature getFeatureOrDefault( + java.lang.String key, + org.tensorflow.proto.example.Feature defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFeature().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Map from feature name to feature.
+   * 
+ * + * map<string, .tensorflow.Feature> feature = 1; + */ + + public org.tensorflow.proto.example.Feature getFeatureOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFeature().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetFeature(), + FeatureDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetFeature().getMap().entrySet()) { + com.google.protobuf.MapEntry + feature__ = FeatureDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, feature__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.example.Features)) { + return super.equals(obj); + } + org.tensorflow.proto.example.Features other = (org.tensorflow.proto.example.Features) obj; + + if (!internalGetFeature().equals( + other.internalGetFeature())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetFeature().getMap().isEmpty()) { + hash = (37 * hash) + FEATURE_FIELD_NUMBER; + hash = (53 * hash) + internalGetFeature().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.example.Features parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.Features parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.Features parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.Features 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.proto.example.Features parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.Features parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.Features parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.Features parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.Features parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.Features parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.Features parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.Features parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.example.Features prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.Features} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.Features) + org.tensorflow.proto.example.FeaturesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_Features_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetFeature(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableFeature(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_Features_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.Features.class, org.tensorflow.proto.example.Features.Builder.class); + } + + // Construct using org.tensorflow.proto.example.Features.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableFeature().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_Features_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.example.Features getDefaultInstanceForType() { + return org.tensorflow.proto.example.Features.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.example.Features build() { + org.tensorflow.proto.example.Features result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.example.Features buildPartial() { + org.tensorflow.proto.example.Features result = new org.tensorflow.proto.example.Features(this); + int from_bitField0_ = bitField0_; + result.feature_ = internalGetFeature(); + result.feature_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.example.Features) { + return mergeFrom((org.tensorflow.proto.example.Features)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.example.Features other) { + if (other == org.tensorflow.proto.example.Features.getDefaultInstance()) return this; + internalGetMutableFeature().mergeFrom( + other.internalGetFeature()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.example.Features parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.example.Features) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.example.Feature> feature_; + private com.google.protobuf.MapField + internalGetFeature() { + if (feature_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FeatureDefaultEntryHolder.defaultEntry); + } + return feature_; + } + private com.google.protobuf.MapField + internalGetMutableFeature() { + onChanged();; + if (feature_ == null) { + feature_ = com.google.protobuf.MapField.newMapField( + FeatureDefaultEntryHolder.defaultEntry); + } + if (!feature_.isMutable()) { + feature_ = feature_.copy(); + } + return feature_; + } + + public int getFeatureCount() { + return internalGetFeature().getMap().size(); + } + /** + *
+     * Map from feature name to feature.
+     * 
+ * + * map<string, .tensorflow.Feature> feature = 1; + */ + + public boolean containsFeature( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFeature().getMap().containsKey(key); + } + /** + * Use {@link #getFeatureMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getFeature() { + return getFeatureMap(); + } + /** + *
+     * Map from feature name to feature.
+     * 
+ * + * map<string, .tensorflow.Feature> feature = 1; + */ + + public java.util.Map getFeatureMap() { + return internalGetFeature().getMap(); + } + /** + *
+     * Map from feature name to feature.
+     * 
+ * + * map<string, .tensorflow.Feature> feature = 1; + */ + + public org.tensorflow.proto.example.Feature getFeatureOrDefault( + java.lang.String key, + org.tensorflow.proto.example.Feature defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFeature().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Map from feature name to feature.
+     * 
+ * + * map<string, .tensorflow.Feature> feature = 1; + */ + + public org.tensorflow.proto.example.Feature getFeatureOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFeature().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearFeature() { + internalGetMutableFeature().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Map from feature name to feature.
+     * 
+ * + * map<string, .tensorflow.Feature> feature = 1; + */ + + public Builder removeFeature( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFeature().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableFeature() { + return internalGetMutableFeature().getMutableMap(); + } + /** + *
+     * Map from feature name to feature.
+     * 
+ * + * map<string, .tensorflow.Feature> feature = 1; + */ + public Builder putFeature( + java.lang.String key, + org.tensorflow.proto.example.Feature value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFeature().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Map from feature name to feature.
+     * 
+ * + * map<string, .tensorflow.Feature> feature = 1; + */ + + public Builder putAllFeature( + java.util.Map values) { + internalGetMutableFeature().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.Features) + } + + // @@protoc_insertion_point(class_scope:tensorflow.Features) + private static final org.tensorflow.proto.example.Features DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.example.Features(); + } + + public static org.tensorflow.proto.example.Features getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Features parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Features(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.example.Features getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeaturesOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeaturesOrBuilder.java new file mode 100644 index 00000000000..2ee80ee66a0 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FeaturesOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/feature.proto + +package org.tensorflow.proto.example; + +public interface FeaturesOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.Features) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Map from feature name to feature.
+   * 
+ * + * map<string, .tensorflow.Feature> feature = 1; + */ + int getFeatureCount(); + /** + *
+   * Map from feature name to feature.
+   * 
+ * + * map<string, .tensorflow.Feature> feature = 1; + */ + boolean containsFeature( + java.lang.String key); + /** + * Use {@link #getFeatureMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getFeature(); + /** + *
+   * Map from feature name to feature.
+   * 
+ * + * map<string, .tensorflow.Feature> feature = 1; + */ + java.util.Map + getFeatureMap(); + /** + *
+   * Map from feature name to feature.
+   * 
+ * + * map<string, .tensorflow.Feature> feature = 1; + */ + + org.tensorflow.proto.example.Feature getFeatureOrDefault( + java.lang.String key, + org.tensorflow.proto.example.Feature defaultValue); + /** + *
+   * Map from feature name to feature.
+   * 
+ * + * map<string, .tensorflow.Feature> feature = 1; + */ + + org.tensorflow.proto.example.Feature getFeatureOrThrow( + java.lang.String key); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FixedLenFeatureProto.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FixedLenFeatureProto.java new file mode 100644 index 00000000000..1f378121573 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FixedLenFeatureProto.java @@ -0,0 +1,993 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/example_parser_configuration.proto + +package org.tensorflow.proto.example; + +/** + * Protobuf type {@code tensorflow.FixedLenFeatureProto} + */ +public final class FixedLenFeatureProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.FixedLenFeatureProto) + FixedLenFeatureProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use FixedLenFeatureProto.newBuilder() to construct. + private FixedLenFeatureProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FixedLenFeatureProto() { + dtype_ = 0; + valuesOutputTensorName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FixedLenFeatureProto(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FixedLenFeatureProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + dtype_ = rawValue; + break; + } + case 18: { + org.tensorflow.proto.framework.TensorShapeProto.Builder subBuilder = null; + if (shape_ != null) { + subBuilder = shape_.toBuilder(); + } + shape_ = input.readMessage(org.tensorflow.proto.framework.TensorShapeProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(shape_); + shape_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + org.tensorflow.proto.framework.TensorProto.Builder subBuilder = null; + if (defaultValue_ != null) { + subBuilder = defaultValue_.toBuilder(); + } + defaultValue_ = input.readMessage(org.tensorflow.proto.framework.TensorProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(defaultValue_); + defaultValue_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + valuesOutputTensorName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_FixedLenFeatureProto_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_FixedLenFeatureProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.FixedLenFeatureProto.class, org.tensorflow.proto.example.FixedLenFeatureProto.Builder.class); + } + + public static final int DTYPE_FIELD_NUMBER = 1; + private int dtype_; + /** + * .tensorflow.DataType dtype = 1; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + + public static final int SHAPE_FIELD_NUMBER = 2; + private org.tensorflow.proto.framework.TensorShapeProto shape_; + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public boolean hasShape() { + return shape_ != null; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProto getShape() { + return shape_ == null ? org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { + return getShape(); + } + + public static final int DEFAULT_VALUE_FIELD_NUMBER = 3; + private org.tensorflow.proto.framework.TensorProto defaultValue_; + /** + * .tensorflow.TensorProto default_value = 3; + */ + public boolean hasDefaultValue() { + return defaultValue_ != null; + } + /** + * .tensorflow.TensorProto default_value = 3; + */ + public org.tensorflow.proto.framework.TensorProto getDefaultValue() { + return defaultValue_ == null ? org.tensorflow.proto.framework.TensorProto.getDefaultInstance() : defaultValue_; + } + /** + * .tensorflow.TensorProto default_value = 3; + */ + public org.tensorflow.proto.framework.TensorProtoOrBuilder getDefaultValueOrBuilder() { + return getDefaultValue(); + } + + public static final int VALUES_OUTPUT_TENSOR_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object valuesOutputTensorName_; + /** + * string values_output_tensor_name = 4; + */ + public java.lang.String getValuesOutputTensorName() { + java.lang.Object ref = valuesOutputTensorName_; + 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(); + valuesOutputTensorName_ = s; + return s; + } + } + /** + * string values_output_tensor_name = 4; + */ + public com.google.protobuf.ByteString + getValuesOutputTensorNameBytes() { + java.lang.Object ref = valuesOutputTensorName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + valuesOutputTensorName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + output.writeEnum(1, dtype_); + } + if (shape_ != null) { + output.writeMessage(2, getShape()); + } + if (defaultValue_ != null) { + output.writeMessage(3, getDefaultValue()); + } + if (!getValuesOutputTensorNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, valuesOutputTensorName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, dtype_); + } + if (shape_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getShape()); + } + if (defaultValue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getDefaultValue()); + } + if (!getValuesOutputTensorNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, valuesOutputTensorName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.example.FixedLenFeatureProto)) { + return super.equals(obj); + } + org.tensorflow.proto.example.FixedLenFeatureProto other = (org.tensorflow.proto.example.FixedLenFeatureProto) obj; + + if (dtype_ != other.dtype_) return false; + if (hasShape() != other.hasShape()) return false; + if (hasShape()) { + if (!getShape() + .equals(other.getShape())) return false; + } + if (hasDefaultValue() != other.hasDefaultValue()) return false; + if (hasDefaultValue()) { + if (!getDefaultValue() + .equals(other.getDefaultValue())) return false; + } + if (!getValuesOutputTensorName() + .equals(other.getValuesOutputTensorName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DTYPE_FIELD_NUMBER; + hash = (53 * hash) + dtype_; + if (hasShape()) { + hash = (37 * hash) + SHAPE_FIELD_NUMBER; + hash = (53 * hash) + getShape().hashCode(); + } + if (hasDefaultValue()) { + hash = (37 * hash) + DEFAULT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getDefaultValue().hashCode(); + } + hash = (37 * hash) + VALUES_OUTPUT_TENSOR_NAME_FIELD_NUMBER; + hash = (53 * hash) + getValuesOutputTensorName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.example.FixedLenFeatureProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.FixedLenFeatureProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.FixedLenFeatureProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.FixedLenFeatureProto 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.proto.example.FixedLenFeatureProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.FixedLenFeatureProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.FixedLenFeatureProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.FixedLenFeatureProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.FixedLenFeatureProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.FixedLenFeatureProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.FixedLenFeatureProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.FixedLenFeatureProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.example.FixedLenFeatureProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.FixedLenFeatureProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.FixedLenFeatureProto) + org.tensorflow.proto.example.FixedLenFeatureProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_FixedLenFeatureProto_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_FixedLenFeatureProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.FixedLenFeatureProto.class, org.tensorflow.proto.example.FixedLenFeatureProto.Builder.class); + } + + // Construct using org.tensorflow.proto.example.FixedLenFeatureProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + dtype_ = 0; + + if (shapeBuilder_ == null) { + shape_ = null; + } else { + shape_ = null; + shapeBuilder_ = null; + } + if (defaultValueBuilder_ == null) { + defaultValue_ = null; + } else { + defaultValue_ = null; + defaultValueBuilder_ = null; + } + valuesOutputTensorName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_FixedLenFeatureProto_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.example.FixedLenFeatureProto getDefaultInstanceForType() { + return org.tensorflow.proto.example.FixedLenFeatureProto.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.example.FixedLenFeatureProto build() { + org.tensorflow.proto.example.FixedLenFeatureProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.example.FixedLenFeatureProto buildPartial() { + org.tensorflow.proto.example.FixedLenFeatureProto result = new org.tensorflow.proto.example.FixedLenFeatureProto(this); + result.dtype_ = dtype_; + if (shapeBuilder_ == null) { + result.shape_ = shape_; + } else { + result.shape_ = shapeBuilder_.build(); + } + if (defaultValueBuilder_ == null) { + result.defaultValue_ = defaultValue_; + } else { + result.defaultValue_ = defaultValueBuilder_.build(); + } + result.valuesOutputTensorName_ = valuesOutputTensorName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.example.FixedLenFeatureProto) { + return mergeFrom((org.tensorflow.proto.example.FixedLenFeatureProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.example.FixedLenFeatureProto other) { + if (other == org.tensorflow.proto.example.FixedLenFeatureProto.getDefaultInstance()) return this; + if (other.dtype_ != 0) { + setDtypeValue(other.getDtypeValue()); + } + if (other.hasShape()) { + mergeShape(other.getShape()); + } + if (other.hasDefaultValue()) { + mergeDefaultValue(other.getDefaultValue()); + } + if (!other.getValuesOutputTensorName().isEmpty()) { + valuesOutputTensorName_ = other.valuesOutputTensorName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.example.FixedLenFeatureProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.example.FixedLenFeatureProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int dtype_ = 0; + /** + * .tensorflow.DataType dtype = 1; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder setDtypeValue(int value) { + dtype_ = value; + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder setDtype(org.tensorflow.proto.framework.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + + dtype_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder clearDtype() { + + dtype_ = 0; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.TensorShapeProto shape_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> shapeBuilder_; + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public boolean hasShape() { + return shapeBuilder_ != null || shape_ != null; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProto getShape() { + if (shapeBuilder_ == null) { + return shape_ == null ? org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } else { + return shapeBuilder_.getMessage(); + } + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder setShape(org.tensorflow.proto.framework.TensorShapeProto value) { + if (shapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shape_ = value; + onChanged(); + } else { + shapeBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder setShape( + org.tensorflow.proto.framework.TensorShapeProto.Builder builderForValue) { + if (shapeBuilder_ == null) { + shape_ = builderForValue.build(); + onChanged(); + } else { + shapeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder mergeShape(org.tensorflow.proto.framework.TensorShapeProto value) { + if (shapeBuilder_ == null) { + if (shape_ != null) { + shape_ = + org.tensorflow.proto.framework.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial(); + } else { + shape_ = value; + } + onChanged(); + } else { + shapeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder clearShape() { + if (shapeBuilder_ == null) { + shape_ = null; + onChanged(); + } else { + shape_ = null; + shapeBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProto.Builder getShapeBuilder() { + + onChanged(); + return getShapeFieldBuilder().getBuilder(); + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { + if (shapeBuilder_ != null) { + return shapeBuilder_.getMessageOrBuilder(); + } else { + return shape_ == null ? + org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> + getShapeFieldBuilder() { + if (shapeBuilder_ == null) { + shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder>( + getShape(), + getParentForChildren(), + isClean()); + shape_ = null; + } + return shapeBuilder_; + } + + private org.tensorflow.proto.framework.TensorProto defaultValue_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorProto, org.tensorflow.proto.framework.TensorProto.Builder, org.tensorflow.proto.framework.TensorProtoOrBuilder> defaultValueBuilder_; + /** + * .tensorflow.TensorProto default_value = 3; + */ + public boolean hasDefaultValue() { + return defaultValueBuilder_ != null || defaultValue_ != null; + } + /** + * .tensorflow.TensorProto default_value = 3; + */ + public org.tensorflow.proto.framework.TensorProto getDefaultValue() { + if (defaultValueBuilder_ == null) { + return defaultValue_ == null ? org.tensorflow.proto.framework.TensorProto.getDefaultInstance() : defaultValue_; + } else { + return defaultValueBuilder_.getMessage(); + } + } + /** + * .tensorflow.TensorProto default_value = 3; + */ + public Builder setDefaultValue(org.tensorflow.proto.framework.TensorProto value) { + if (defaultValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + defaultValue_ = value; + onChanged(); + } else { + defaultValueBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.TensorProto default_value = 3; + */ + public Builder setDefaultValue( + org.tensorflow.proto.framework.TensorProto.Builder builderForValue) { + if (defaultValueBuilder_ == null) { + defaultValue_ = builderForValue.build(); + onChanged(); + } else { + defaultValueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.TensorProto default_value = 3; + */ + public Builder mergeDefaultValue(org.tensorflow.proto.framework.TensorProto value) { + if (defaultValueBuilder_ == null) { + if (defaultValue_ != null) { + defaultValue_ = + org.tensorflow.proto.framework.TensorProto.newBuilder(defaultValue_).mergeFrom(value).buildPartial(); + } else { + defaultValue_ = value; + } + onChanged(); + } else { + defaultValueBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.TensorProto default_value = 3; + */ + public Builder clearDefaultValue() { + if (defaultValueBuilder_ == null) { + defaultValue_ = null; + onChanged(); + } else { + defaultValue_ = null; + defaultValueBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.TensorProto default_value = 3; + */ + public org.tensorflow.proto.framework.TensorProto.Builder getDefaultValueBuilder() { + + onChanged(); + return getDefaultValueFieldBuilder().getBuilder(); + } + /** + * .tensorflow.TensorProto default_value = 3; + */ + public org.tensorflow.proto.framework.TensorProtoOrBuilder getDefaultValueOrBuilder() { + if (defaultValueBuilder_ != null) { + return defaultValueBuilder_.getMessageOrBuilder(); + } else { + return defaultValue_ == null ? + org.tensorflow.proto.framework.TensorProto.getDefaultInstance() : defaultValue_; + } + } + /** + * .tensorflow.TensorProto default_value = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorProto, org.tensorflow.proto.framework.TensorProto.Builder, org.tensorflow.proto.framework.TensorProtoOrBuilder> + getDefaultValueFieldBuilder() { + if (defaultValueBuilder_ == null) { + defaultValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorProto, org.tensorflow.proto.framework.TensorProto.Builder, org.tensorflow.proto.framework.TensorProtoOrBuilder>( + getDefaultValue(), + getParentForChildren(), + isClean()); + defaultValue_ = null; + } + return defaultValueBuilder_; + } + + private java.lang.Object valuesOutputTensorName_ = ""; + /** + * string values_output_tensor_name = 4; + */ + public java.lang.String getValuesOutputTensorName() { + java.lang.Object ref = valuesOutputTensorName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + valuesOutputTensorName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string values_output_tensor_name = 4; + */ + public com.google.protobuf.ByteString + getValuesOutputTensorNameBytes() { + java.lang.Object ref = valuesOutputTensorName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + valuesOutputTensorName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string values_output_tensor_name = 4; + */ + public Builder setValuesOutputTensorName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + valuesOutputTensorName_ = value; + onChanged(); + return this; + } + /** + * string values_output_tensor_name = 4; + */ + public Builder clearValuesOutputTensorName() { + + valuesOutputTensorName_ = getDefaultInstance().getValuesOutputTensorName(); + onChanged(); + return this; + } + /** + * string values_output_tensor_name = 4; + */ + public Builder setValuesOutputTensorNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + valuesOutputTensorName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.FixedLenFeatureProto) + } + + // @@protoc_insertion_point(class_scope:tensorflow.FixedLenFeatureProto) + private static final org.tensorflow.proto.example.FixedLenFeatureProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.example.FixedLenFeatureProto(); + } + + public static org.tensorflow.proto.example.FixedLenFeatureProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FixedLenFeatureProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FixedLenFeatureProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.example.FixedLenFeatureProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FixedLenFeatureProtoOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FixedLenFeatureProtoOrBuilder.java new file mode 100644 index 00000000000..0008b29583f --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FixedLenFeatureProtoOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/example_parser_configuration.proto + +package org.tensorflow.proto.example; + +public interface FixedLenFeatureProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.FixedLenFeatureProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .tensorflow.DataType dtype = 1; + */ + int getDtypeValue(); + /** + * .tensorflow.DataType dtype = 1; + */ + org.tensorflow.proto.framework.DataType getDtype(); + + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + boolean hasShape(); + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + org.tensorflow.proto.framework.TensorShapeProto getShape(); + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder(); + + /** + * .tensorflow.TensorProto default_value = 3; + */ + boolean hasDefaultValue(); + /** + * .tensorflow.TensorProto default_value = 3; + */ + org.tensorflow.proto.framework.TensorProto getDefaultValue(); + /** + * .tensorflow.TensorProto default_value = 3; + */ + org.tensorflow.proto.framework.TensorProtoOrBuilder getDefaultValueOrBuilder(); + + /** + * string values_output_tensor_name = 4; + */ + java.lang.String getValuesOutputTensorName(); + /** + * string values_output_tensor_name = 4; + */ + com.google.protobuf.ByteString + getValuesOutputTensorNameBytes(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FloatList.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FloatList.java new file mode 100644 index 00000000000..efad9ee2fb6 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FloatList.java @@ -0,0 +1,579 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/feature.proto + +package org.tensorflow.proto.example; + +/** + * Protobuf type {@code tensorflow.FloatList} + */ +public final class FloatList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.FloatList) + FloatListOrBuilder { +private static final long serialVersionUID = 0L; + // Use FloatList.newBuilder() to construct. + private FloatList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FloatList() { + value_ = emptyFloatList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FloatList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FloatList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + value_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + value_.addFloat(input.readFloat()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + value_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + value_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + value_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_FloatList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_FloatList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.FloatList.class, org.tensorflow.proto.example.FloatList.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.FloatList value_; + /** + * repeated float value = 1 [packed = true]; + */ + public java.util.List + getValueList() { + return value_; + } + /** + * repeated float value = 1 [packed = true]; + */ + public int getValueCount() { + return value_.size(); + } + /** + * repeated float value = 1 [packed = true]; + */ + public float getValue(int index) { + return value_.getFloat(index); + } + private int valueMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getValueList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(valueMemoizedSerializedSize); + } + for (int i = 0; i < value_.size(); i++) { + output.writeFloatNoTag(value_.getFloat(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 4 * getValueList().size(); + size += dataSize; + if (!getValueList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + valueMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.example.FloatList)) { + return super.equals(obj); + } + org.tensorflow.proto.example.FloatList other = (org.tensorflow.proto.example.FloatList) obj; + + if (!getValueList() + .equals(other.getValueList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValueCount() > 0) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValueList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.example.FloatList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.FloatList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.FloatList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.FloatList 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.proto.example.FloatList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.FloatList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.FloatList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.FloatList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.FloatList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.FloatList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.FloatList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.FloatList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.example.FloatList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.FloatList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.FloatList) + org.tensorflow.proto.example.FloatListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_FloatList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_FloatList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.FloatList.class, org.tensorflow.proto.example.FloatList.Builder.class); + } + + // Construct using org.tensorflow.proto.example.FloatList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + value_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_FloatList_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.example.FloatList getDefaultInstanceForType() { + return org.tensorflow.proto.example.FloatList.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.example.FloatList build() { + org.tensorflow.proto.example.FloatList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.example.FloatList buildPartial() { + org.tensorflow.proto.example.FloatList result = new org.tensorflow.proto.example.FloatList(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + value_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.value_ = value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.example.FloatList) { + return mergeFrom((org.tensorflow.proto.example.FloatList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.example.FloatList other) { + if (other == org.tensorflow.proto.example.FloatList.getDefaultInstance()) return this; + if (!other.value_.isEmpty()) { + if (value_.isEmpty()) { + value_ = other.value_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValueIsMutable(); + value_.addAll(other.value_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.example.FloatList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.example.FloatList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.FloatList value_ = emptyFloatList(); + private void ensureValueIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + value_ = mutableCopy(value_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated float value = 1 [packed = true]; + */ + public java.util.List + getValueList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(value_) : value_; + } + /** + * repeated float value = 1 [packed = true]; + */ + public int getValueCount() { + return value_.size(); + } + /** + * repeated float value = 1 [packed = true]; + */ + public float getValue(int index) { + return value_.getFloat(index); + } + /** + * repeated float value = 1 [packed = true]; + */ + public Builder setValue( + int index, float value) { + ensureValueIsMutable(); + value_.setFloat(index, value); + onChanged(); + return this; + } + /** + * repeated float value = 1 [packed = true]; + */ + public Builder addValue(float value) { + ensureValueIsMutable(); + value_.addFloat(value); + onChanged(); + return this; + } + /** + * repeated float value = 1 [packed = true]; + */ + public Builder addAllValue( + java.lang.Iterable values) { + ensureValueIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, value_); + onChanged(); + return this; + } + /** + * repeated float value = 1 [packed = true]; + */ + public Builder clearValue() { + value_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.FloatList) + } + + // @@protoc_insertion_point(class_scope:tensorflow.FloatList) + private static final org.tensorflow.proto.example.FloatList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.example.FloatList(); + } + + public static org.tensorflow.proto.example.FloatList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FloatList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FloatList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.example.FloatList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FloatListOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FloatListOrBuilder.java new file mode 100644 index 00000000000..65856cd5f4e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/FloatListOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/feature.proto + +package org.tensorflow.proto.example; + +public interface FloatListOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.FloatList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated float value = 1 [packed = true]; + */ + java.util.List getValueList(); + /** + * repeated float value = 1 [packed = true]; + */ + int getValueCount(); + /** + * repeated float value = 1 [packed = true]; + */ + float getValue(int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/Int64List.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/Int64List.java new file mode 100644 index 00000000000..1cf4f104182 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/Int64List.java @@ -0,0 +1,582 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/feature.proto + +package org.tensorflow.proto.example; + +/** + * Protobuf type {@code tensorflow.Int64List} + */ +public final class Int64List extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.Int64List) + Int64ListOrBuilder { +private static final long serialVersionUID = 0L; + // Use Int64List.newBuilder() to construct. + private Int64List(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Int64List() { + value_ = emptyLongList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Int64List(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Int64List( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + value_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + value_.addLong(input.readInt64()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + value_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + value_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + value_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_Int64List_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_Int64List_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.Int64List.class, org.tensorflow.proto.example.Int64List.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.LongList value_; + /** + * repeated int64 value = 1 [packed = true]; + */ + public java.util.List + getValueList() { + return value_; + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public int getValueCount() { + return value_.size(); + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public long getValue(int index) { + return value_.getLong(index); + } + private int valueMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getValueList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(valueMemoizedSerializedSize); + } + for (int i = 0; i < value_.size(); i++) { + output.writeInt64NoTag(value_.getLong(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < value_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(value_.getLong(i)); + } + size += dataSize; + if (!getValueList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + valueMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.example.Int64List)) { + return super.equals(obj); + } + org.tensorflow.proto.example.Int64List other = (org.tensorflow.proto.example.Int64List) obj; + + if (!getValueList() + .equals(other.getValueList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValueCount() > 0) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValueList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.example.Int64List parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.Int64List parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.Int64List parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.Int64List 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.proto.example.Int64List parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.Int64List parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.Int64List parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.Int64List parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.Int64List parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.Int64List parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.Int64List parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.Int64List parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.example.Int64List prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.Int64List} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.Int64List) + org.tensorflow.proto.example.Int64ListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_Int64List_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_Int64List_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.Int64List.class, org.tensorflow.proto.example.Int64List.Builder.class); + } + + // Construct using org.tensorflow.proto.example.Int64List.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + value_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.example.FeatureProtos.internal_static_tensorflow_Int64List_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.example.Int64List getDefaultInstanceForType() { + return org.tensorflow.proto.example.Int64List.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.example.Int64List build() { + org.tensorflow.proto.example.Int64List result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.example.Int64List buildPartial() { + org.tensorflow.proto.example.Int64List result = new org.tensorflow.proto.example.Int64List(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + value_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.value_ = value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.example.Int64List) { + return mergeFrom((org.tensorflow.proto.example.Int64List)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.example.Int64List other) { + if (other == org.tensorflow.proto.example.Int64List.getDefaultInstance()) return this; + if (!other.value_.isEmpty()) { + if (value_.isEmpty()) { + value_ = other.value_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValueIsMutable(); + value_.addAll(other.value_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.example.Int64List parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.example.Int64List) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.LongList value_ = emptyLongList(); + private void ensureValueIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + value_ = mutableCopy(value_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public java.util.List + getValueList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(value_) : value_; + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public int getValueCount() { + return value_.size(); + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public long getValue(int index) { + return value_.getLong(index); + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public Builder setValue( + int index, long value) { + ensureValueIsMutable(); + value_.setLong(index, value); + onChanged(); + return this; + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public Builder addValue(long value) { + ensureValueIsMutable(); + value_.addLong(value); + onChanged(); + return this; + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public Builder addAllValue( + java.lang.Iterable values) { + ensureValueIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, value_); + onChanged(); + return this; + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public Builder clearValue() { + value_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.Int64List) + } + + // @@protoc_insertion_point(class_scope:tensorflow.Int64List) + private static final org.tensorflow.proto.example.Int64List DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.example.Int64List(); + } + + public static org.tensorflow.proto.example.Int64List getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Int64List parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Int64List(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.example.Int64List getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/Int64ListOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/Int64ListOrBuilder.java new file mode 100644 index 00000000000..6ca9f168a7d --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/Int64ListOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/feature.proto + +package org.tensorflow.proto.example; + +public interface Int64ListOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.Int64List) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated int64 value = 1 [packed = true]; + */ + java.util.List getValueList(); + /** + * repeated int64 value = 1 [packed = true]; + */ + int getValueCount(); + /** + * repeated int64 value = 1 [packed = true]; + */ + long getValue(int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/SequenceExample.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/SequenceExample.java new file mode 100644 index 00000000000..b88e6f12e34 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/SequenceExample.java @@ -0,0 +1,781 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/example.proto + +package org.tensorflow.proto.example; + +/** + * Protobuf type {@code tensorflow.SequenceExample} + */ +public final class SequenceExample extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.SequenceExample) + SequenceExampleOrBuilder { +private static final long serialVersionUID = 0L; + // Use SequenceExample.newBuilder() to construct. + private SequenceExample(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SequenceExample() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SequenceExample(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SequenceExample( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.tensorflow.proto.example.Features.Builder subBuilder = null; + if (context_ != null) { + subBuilder = context_.toBuilder(); + } + context_ = input.readMessage(org.tensorflow.proto.example.Features.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(context_); + context_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + org.tensorflow.proto.example.FeatureLists.Builder subBuilder = null; + if (featureLists_ != null) { + subBuilder = featureLists_.toBuilder(); + } + featureLists_ = input.readMessage(org.tensorflow.proto.example.FeatureLists.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(featureLists_); + featureLists_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.ExampleProtos.internal_static_tensorflow_SequenceExample_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.ExampleProtos.internal_static_tensorflow_SequenceExample_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.SequenceExample.class, org.tensorflow.proto.example.SequenceExample.Builder.class); + } + + public static final int CONTEXT_FIELD_NUMBER = 1; + private org.tensorflow.proto.example.Features context_; + /** + * .tensorflow.Features context = 1; + */ + public boolean hasContext() { + return context_ != null; + } + /** + * .tensorflow.Features context = 1; + */ + public org.tensorflow.proto.example.Features getContext() { + return context_ == null ? org.tensorflow.proto.example.Features.getDefaultInstance() : context_; + } + /** + * .tensorflow.Features context = 1; + */ + public org.tensorflow.proto.example.FeaturesOrBuilder getContextOrBuilder() { + return getContext(); + } + + public static final int FEATURE_LISTS_FIELD_NUMBER = 2; + private org.tensorflow.proto.example.FeatureLists featureLists_; + /** + * .tensorflow.FeatureLists feature_lists = 2; + */ + public boolean hasFeatureLists() { + return featureLists_ != null; + } + /** + * .tensorflow.FeatureLists feature_lists = 2; + */ + public org.tensorflow.proto.example.FeatureLists getFeatureLists() { + return featureLists_ == null ? org.tensorflow.proto.example.FeatureLists.getDefaultInstance() : featureLists_; + } + /** + * .tensorflow.FeatureLists feature_lists = 2; + */ + public org.tensorflow.proto.example.FeatureListsOrBuilder getFeatureListsOrBuilder() { + return getFeatureLists(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (context_ != null) { + output.writeMessage(1, getContext()); + } + if (featureLists_ != null) { + output.writeMessage(2, getFeatureLists()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getContext()); + } + if (featureLists_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFeatureLists()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.example.SequenceExample)) { + return super.equals(obj); + } + org.tensorflow.proto.example.SequenceExample other = (org.tensorflow.proto.example.SequenceExample) obj; + + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext() + .equals(other.getContext())) return false; + } + if (hasFeatureLists() != other.hasFeatureLists()) return false; + if (hasFeatureLists()) { + if (!getFeatureLists() + .equals(other.getFeatureLists())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + if (hasFeatureLists()) { + hash = (37 * hash) + FEATURE_LISTS_FIELD_NUMBER; + hash = (53 * hash) + getFeatureLists().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.example.SequenceExample parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.SequenceExample parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.SequenceExample parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.SequenceExample 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.proto.example.SequenceExample parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.SequenceExample parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.SequenceExample parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.SequenceExample parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.SequenceExample parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.SequenceExample parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.SequenceExample parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.SequenceExample parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.example.SequenceExample prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.SequenceExample} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.SequenceExample) + org.tensorflow.proto.example.SequenceExampleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.ExampleProtos.internal_static_tensorflow_SequenceExample_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.ExampleProtos.internal_static_tensorflow_SequenceExample_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.SequenceExample.class, org.tensorflow.proto.example.SequenceExample.Builder.class); + } + + // Construct using org.tensorflow.proto.example.SequenceExample.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (contextBuilder_ == null) { + context_ = null; + } else { + context_ = null; + contextBuilder_ = null; + } + if (featureListsBuilder_ == null) { + featureLists_ = null; + } else { + featureLists_ = null; + featureListsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.example.ExampleProtos.internal_static_tensorflow_SequenceExample_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.example.SequenceExample getDefaultInstanceForType() { + return org.tensorflow.proto.example.SequenceExample.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.example.SequenceExample build() { + org.tensorflow.proto.example.SequenceExample result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.example.SequenceExample buildPartial() { + org.tensorflow.proto.example.SequenceExample result = new org.tensorflow.proto.example.SequenceExample(this); + if (contextBuilder_ == null) { + result.context_ = context_; + } else { + result.context_ = contextBuilder_.build(); + } + if (featureListsBuilder_ == null) { + result.featureLists_ = featureLists_; + } else { + result.featureLists_ = featureListsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.example.SequenceExample) { + return mergeFrom((org.tensorflow.proto.example.SequenceExample)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.example.SequenceExample other) { + if (other == org.tensorflow.proto.example.SequenceExample.getDefaultInstance()) return this; + if (other.hasContext()) { + mergeContext(other.getContext()); + } + if (other.hasFeatureLists()) { + mergeFeatureLists(other.getFeatureLists()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.example.SequenceExample parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.example.SequenceExample) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private org.tensorflow.proto.example.Features context_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.Features, org.tensorflow.proto.example.Features.Builder, org.tensorflow.proto.example.FeaturesOrBuilder> contextBuilder_; + /** + * .tensorflow.Features context = 1; + */ + public boolean hasContext() { + return contextBuilder_ != null || context_ != null; + } + /** + * .tensorflow.Features context = 1; + */ + public org.tensorflow.proto.example.Features getContext() { + if (contextBuilder_ == null) { + return context_ == null ? org.tensorflow.proto.example.Features.getDefaultInstance() : context_; + } else { + return contextBuilder_.getMessage(); + } + } + /** + * .tensorflow.Features context = 1; + */ + public Builder setContext(org.tensorflow.proto.example.Features value) { + if (contextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + onChanged(); + } else { + contextBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.Features context = 1; + */ + public Builder setContext( + org.tensorflow.proto.example.Features.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + onChanged(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.Features context = 1; + */ + public Builder mergeContext(org.tensorflow.proto.example.Features value) { + if (contextBuilder_ == null) { + if (context_ != null) { + context_ = + org.tensorflow.proto.example.Features.newBuilder(context_).mergeFrom(value).buildPartial(); + } else { + context_ = value; + } + onChanged(); + } else { + contextBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.Features context = 1; + */ + public Builder clearContext() { + if (contextBuilder_ == null) { + context_ = null; + onChanged(); + } else { + context_ = null; + contextBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.Features context = 1; + */ + public org.tensorflow.proto.example.Features.Builder getContextBuilder() { + + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + * .tensorflow.Features context = 1; + */ + public org.tensorflow.proto.example.FeaturesOrBuilder getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null ? + org.tensorflow.proto.example.Features.getDefaultInstance() : context_; + } + } + /** + * .tensorflow.Features context = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.Features, org.tensorflow.proto.example.Features.Builder, org.tensorflow.proto.example.FeaturesOrBuilder> + getContextFieldBuilder() { + if (contextBuilder_ == null) { + contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.Features, org.tensorflow.proto.example.Features.Builder, org.tensorflow.proto.example.FeaturesOrBuilder>( + getContext(), + getParentForChildren(), + isClean()); + context_ = null; + } + return contextBuilder_; + } + + private org.tensorflow.proto.example.FeatureLists featureLists_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.FeatureLists, org.tensorflow.proto.example.FeatureLists.Builder, org.tensorflow.proto.example.FeatureListsOrBuilder> featureListsBuilder_; + /** + * .tensorflow.FeatureLists feature_lists = 2; + */ + public boolean hasFeatureLists() { + return featureListsBuilder_ != null || featureLists_ != null; + } + /** + * .tensorflow.FeatureLists feature_lists = 2; + */ + public org.tensorflow.proto.example.FeatureLists getFeatureLists() { + if (featureListsBuilder_ == null) { + return featureLists_ == null ? org.tensorflow.proto.example.FeatureLists.getDefaultInstance() : featureLists_; + } else { + return featureListsBuilder_.getMessage(); + } + } + /** + * .tensorflow.FeatureLists feature_lists = 2; + */ + public Builder setFeatureLists(org.tensorflow.proto.example.FeatureLists value) { + if (featureListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + featureLists_ = value; + onChanged(); + } else { + featureListsBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.FeatureLists feature_lists = 2; + */ + public Builder setFeatureLists( + org.tensorflow.proto.example.FeatureLists.Builder builderForValue) { + if (featureListsBuilder_ == null) { + featureLists_ = builderForValue.build(); + onChanged(); + } else { + featureListsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.FeatureLists feature_lists = 2; + */ + public Builder mergeFeatureLists(org.tensorflow.proto.example.FeatureLists value) { + if (featureListsBuilder_ == null) { + if (featureLists_ != null) { + featureLists_ = + org.tensorflow.proto.example.FeatureLists.newBuilder(featureLists_).mergeFrom(value).buildPartial(); + } else { + featureLists_ = value; + } + onChanged(); + } else { + featureListsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.FeatureLists feature_lists = 2; + */ + public Builder clearFeatureLists() { + if (featureListsBuilder_ == null) { + featureLists_ = null; + onChanged(); + } else { + featureLists_ = null; + featureListsBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.FeatureLists feature_lists = 2; + */ + public org.tensorflow.proto.example.FeatureLists.Builder getFeatureListsBuilder() { + + onChanged(); + return getFeatureListsFieldBuilder().getBuilder(); + } + /** + * .tensorflow.FeatureLists feature_lists = 2; + */ + public org.tensorflow.proto.example.FeatureListsOrBuilder getFeatureListsOrBuilder() { + if (featureListsBuilder_ != null) { + return featureListsBuilder_.getMessageOrBuilder(); + } else { + return featureLists_ == null ? + org.tensorflow.proto.example.FeatureLists.getDefaultInstance() : featureLists_; + } + } + /** + * .tensorflow.FeatureLists feature_lists = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.FeatureLists, org.tensorflow.proto.example.FeatureLists.Builder, org.tensorflow.proto.example.FeatureListsOrBuilder> + getFeatureListsFieldBuilder() { + if (featureListsBuilder_ == null) { + featureListsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.example.FeatureLists, org.tensorflow.proto.example.FeatureLists.Builder, org.tensorflow.proto.example.FeatureListsOrBuilder>( + getFeatureLists(), + getParentForChildren(), + isClean()); + featureLists_ = null; + } + return featureListsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.SequenceExample) + } + + // @@protoc_insertion_point(class_scope:tensorflow.SequenceExample) + private static final org.tensorflow.proto.example.SequenceExample DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.example.SequenceExample(); + } + + public static org.tensorflow.proto.example.SequenceExample getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SequenceExample parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SequenceExample(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.example.SequenceExample getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/SequenceExampleOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/SequenceExampleOrBuilder.java new file mode 100644 index 00000000000..9b849c8c3c2 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/SequenceExampleOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/example.proto + +package org.tensorflow.proto.example; + +public interface SequenceExampleOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.SequenceExample) + com.google.protobuf.MessageOrBuilder { + + /** + * .tensorflow.Features context = 1; + */ + boolean hasContext(); + /** + * .tensorflow.Features context = 1; + */ + org.tensorflow.proto.example.Features getContext(); + /** + * .tensorflow.Features context = 1; + */ + org.tensorflow.proto.example.FeaturesOrBuilder getContextOrBuilder(); + + /** + * .tensorflow.FeatureLists feature_lists = 2; + */ + boolean hasFeatureLists(); + /** + * .tensorflow.FeatureLists feature_lists = 2; + */ + org.tensorflow.proto.example.FeatureLists getFeatureLists(); + /** + * .tensorflow.FeatureLists feature_lists = 2; + */ + org.tensorflow.proto.example.FeatureListsOrBuilder getFeatureListsOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/VarLenFeatureProto.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/VarLenFeatureProto.java new file mode 100644 index 00000000000..8edd05b1f24 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/VarLenFeatureProto.java @@ -0,0 +1,885 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/example_parser_configuration.proto + +package org.tensorflow.proto.example; + +/** + * Protobuf type {@code tensorflow.VarLenFeatureProto} + */ +public final class VarLenFeatureProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.VarLenFeatureProto) + VarLenFeatureProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use VarLenFeatureProto.newBuilder() to construct. + private VarLenFeatureProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private VarLenFeatureProto() { + dtype_ = 0; + valuesOutputTensorName_ = ""; + indicesOutputTensorName_ = ""; + shapesOutputTensorName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new VarLenFeatureProto(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private VarLenFeatureProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + dtype_ = rawValue; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + valuesOutputTensorName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + indicesOutputTensorName_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + shapesOutputTensorName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_VarLenFeatureProto_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_VarLenFeatureProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.VarLenFeatureProto.class, org.tensorflow.proto.example.VarLenFeatureProto.Builder.class); + } + + public static final int DTYPE_FIELD_NUMBER = 1; + private int dtype_; + /** + * .tensorflow.DataType dtype = 1; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + + public static final int VALUES_OUTPUT_TENSOR_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object valuesOutputTensorName_; + /** + * string values_output_tensor_name = 2; + */ + public java.lang.String getValuesOutputTensorName() { + java.lang.Object ref = valuesOutputTensorName_; + 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(); + valuesOutputTensorName_ = s; + return s; + } + } + /** + * string values_output_tensor_name = 2; + */ + public com.google.protobuf.ByteString + getValuesOutputTensorNameBytes() { + java.lang.Object ref = valuesOutputTensorName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + valuesOutputTensorName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDICES_OUTPUT_TENSOR_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object indicesOutputTensorName_; + /** + * string indices_output_tensor_name = 3; + */ + public java.lang.String getIndicesOutputTensorName() { + java.lang.Object ref = indicesOutputTensorName_; + 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(); + indicesOutputTensorName_ = s; + return s; + } + } + /** + * string indices_output_tensor_name = 3; + */ + public com.google.protobuf.ByteString + getIndicesOutputTensorNameBytes() { + java.lang.Object ref = indicesOutputTensorName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + indicesOutputTensorName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHAPES_OUTPUT_TENSOR_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object shapesOutputTensorName_; + /** + * string shapes_output_tensor_name = 4; + */ + public java.lang.String getShapesOutputTensorName() { + java.lang.Object ref = shapesOutputTensorName_; + 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(); + shapesOutputTensorName_ = s; + return s; + } + } + /** + * string shapes_output_tensor_name = 4; + */ + public com.google.protobuf.ByteString + getShapesOutputTensorNameBytes() { + java.lang.Object ref = shapesOutputTensorName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shapesOutputTensorName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + output.writeEnum(1, dtype_); + } + if (!getValuesOutputTensorNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, valuesOutputTensorName_); + } + if (!getIndicesOutputTensorNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, indicesOutputTensorName_); + } + if (!getShapesOutputTensorNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, shapesOutputTensorName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, dtype_); + } + if (!getValuesOutputTensorNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, valuesOutputTensorName_); + } + if (!getIndicesOutputTensorNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, indicesOutputTensorName_); + } + if (!getShapesOutputTensorNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, shapesOutputTensorName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.example.VarLenFeatureProto)) { + return super.equals(obj); + } + org.tensorflow.proto.example.VarLenFeatureProto other = (org.tensorflow.proto.example.VarLenFeatureProto) obj; + + if (dtype_ != other.dtype_) return false; + if (!getValuesOutputTensorName() + .equals(other.getValuesOutputTensorName())) return false; + if (!getIndicesOutputTensorName() + .equals(other.getIndicesOutputTensorName())) return false; + if (!getShapesOutputTensorName() + .equals(other.getShapesOutputTensorName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DTYPE_FIELD_NUMBER; + hash = (53 * hash) + dtype_; + hash = (37 * hash) + VALUES_OUTPUT_TENSOR_NAME_FIELD_NUMBER; + hash = (53 * hash) + getValuesOutputTensorName().hashCode(); + hash = (37 * hash) + INDICES_OUTPUT_TENSOR_NAME_FIELD_NUMBER; + hash = (53 * hash) + getIndicesOutputTensorName().hashCode(); + hash = (37 * hash) + SHAPES_OUTPUT_TENSOR_NAME_FIELD_NUMBER; + hash = (53 * hash) + getShapesOutputTensorName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.example.VarLenFeatureProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.VarLenFeatureProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.VarLenFeatureProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.VarLenFeatureProto 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.proto.example.VarLenFeatureProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.example.VarLenFeatureProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.example.VarLenFeatureProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.VarLenFeatureProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.VarLenFeatureProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.VarLenFeatureProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.example.VarLenFeatureProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.example.VarLenFeatureProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.example.VarLenFeatureProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.VarLenFeatureProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.VarLenFeatureProto) + org.tensorflow.proto.example.VarLenFeatureProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_VarLenFeatureProto_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_VarLenFeatureProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.example.VarLenFeatureProto.class, org.tensorflow.proto.example.VarLenFeatureProto.Builder.class); + } + + // Construct using org.tensorflow.proto.example.VarLenFeatureProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + dtype_ = 0; + + valuesOutputTensorName_ = ""; + + indicesOutputTensorName_ = ""; + + shapesOutputTensorName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.example.ExampleParserConfigurationProtos.internal_static_tensorflow_VarLenFeatureProto_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.example.VarLenFeatureProto getDefaultInstanceForType() { + return org.tensorflow.proto.example.VarLenFeatureProto.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.example.VarLenFeatureProto build() { + org.tensorflow.proto.example.VarLenFeatureProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.example.VarLenFeatureProto buildPartial() { + org.tensorflow.proto.example.VarLenFeatureProto result = new org.tensorflow.proto.example.VarLenFeatureProto(this); + result.dtype_ = dtype_; + result.valuesOutputTensorName_ = valuesOutputTensorName_; + result.indicesOutputTensorName_ = indicesOutputTensorName_; + result.shapesOutputTensorName_ = shapesOutputTensorName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.example.VarLenFeatureProto) { + return mergeFrom((org.tensorflow.proto.example.VarLenFeatureProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.example.VarLenFeatureProto other) { + if (other == org.tensorflow.proto.example.VarLenFeatureProto.getDefaultInstance()) return this; + if (other.dtype_ != 0) { + setDtypeValue(other.getDtypeValue()); + } + if (!other.getValuesOutputTensorName().isEmpty()) { + valuesOutputTensorName_ = other.valuesOutputTensorName_; + onChanged(); + } + if (!other.getIndicesOutputTensorName().isEmpty()) { + indicesOutputTensorName_ = other.indicesOutputTensorName_; + onChanged(); + } + if (!other.getShapesOutputTensorName().isEmpty()) { + shapesOutputTensorName_ = other.shapesOutputTensorName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.example.VarLenFeatureProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.example.VarLenFeatureProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int dtype_ = 0; + /** + * .tensorflow.DataType dtype = 1; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder setDtypeValue(int value) { + dtype_ = value; + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder setDtype(org.tensorflow.proto.framework.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + + dtype_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder clearDtype() { + + dtype_ = 0; + onChanged(); + return this; + } + + private java.lang.Object valuesOutputTensorName_ = ""; + /** + * string values_output_tensor_name = 2; + */ + public java.lang.String getValuesOutputTensorName() { + java.lang.Object ref = valuesOutputTensorName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + valuesOutputTensorName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string values_output_tensor_name = 2; + */ + public com.google.protobuf.ByteString + getValuesOutputTensorNameBytes() { + java.lang.Object ref = valuesOutputTensorName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + valuesOutputTensorName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string values_output_tensor_name = 2; + */ + public Builder setValuesOutputTensorName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + valuesOutputTensorName_ = value; + onChanged(); + return this; + } + /** + * string values_output_tensor_name = 2; + */ + public Builder clearValuesOutputTensorName() { + + valuesOutputTensorName_ = getDefaultInstance().getValuesOutputTensorName(); + onChanged(); + return this; + } + /** + * string values_output_tensor_name = 2; + */ + public Builder setValuesOutputTensorNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + valuesOutputTensorName_ = value; + onChanged(); + return this; + } + + private java.lang.Object indicesOutputTensorName_ = ""; + /** + * string indices_output_tensor_name = 3; + */ + public java.lang.String getIndicesOutputTensorName() { + java.lang.Object ref = indicesOutputTensorName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + indicesOutputTensorName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string indices_output_tensor_name = 3; + */ + public com.google.protobuf.ByteString + getIndicesOutputTensorNameBytes() { + java.lang.Object ref = indicesOutputTensorName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + indicesOutputTensorName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string indices_output_tensor_name = 3; + */ + public Builder setIndicesOutputTensorName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + indicesOutputTensorName_ = value; + onChanged(); + return this; + } + /** + * string indices_output_tensor_name = 3; + */ + public Builder clearIndicesOutputTensorName() { + + indicesOutputTensorName_ = getDefaultInstance().getIndicesOutputTensorName(); + onChanged(); + return this; + } + /** + * string indices_output_tensor_name = 3; + */ + public Builder setIndicesOutputTensorNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + indicesOutputTensorName_ = value; + onChanged(); + return this; + } + + private java.lang.Object shapesOutputTensorName_ = ""; + /** + * string shapes_output_tensor_name = 4; + */ + public java.lang.String getShapesOutputTensorName() { + java.lang.Object ref = shapesOutputTensorName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shapesOutputTensorName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string shapes_output_tensor_name = 4; + */ + public com.google.protobuf.ByteString + getShapesOutputTensorNameBytes() { + java.lang.Object ref = shapesOutputTensorName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shapesOutputTensorName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string shapes_output_tensor_name = 4; + */ + public Builder setShapesOutputTensorName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + shapesOutputTensorName_ = value; + onChanged(); + return this; + } + /** + * string shapes_output_tensor_name = 4; + */ + public Builder clearShapesOutputTensorName() { + + shapesOutputTensorName_ = getDefaultInstance().getShapesOutputTensorName(); + onChanged(); + return this; + } + /** + * string shapes_output_tensor_name = 4; + */ + public Builder setShapesOutputTensorNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + shapesOutputTensorName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.VarLenFeatureProto) + } + + // @@protoc_insertion_point(class_scope:tensorflow.VarLenFeatureProto) + private static final org.tensorflow.proto.example.VarLenFeatureProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.example.VarLenFeatureProto(); + } + + public static org.tensorflow.proto.example.VarLenFeatureProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VarLenFeatureProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VarLenFeatureProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.example.VarLenFeatureProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/VarLenFeatureProtoOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/VarLenFeatureProtoOrBuilder.java new file mode 100644 index 00000000000..820c2faa8f8 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/example/VarLenFeatureProtoOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/example/example_parser_configuration.proto + +package org.tensorflow.proto.example; + +public interface VarLenFeatureProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.VarLenFeatureProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .tensorflow.DataType dtype = 1; + */ + int getDtypeValue(); + /** + * .tensorflow.DataType dtype = 1; + */ + org.tensorflow.proto.framework.DataType getDtype(); + + /** + * string values_output_tensor_name = 2; + */ + java.lang.String getValuesOutputTensorName(); + /** + * string values_output_tensor_name = 2; + */ + com.google.protobuf.ByteString + getValuesOutputTensorNameBytes(); + + /** + * string indices_output_tensor_name = 3; + */ + java.lang.String getIndicesOutputTensorName(); + /** + * string indices_output_tensor_name = 3; + */ + com.google.protobuf.ByteString + getIndicesOutputTensorNameBytes(); + + /** + * string shapes_output_tensor_name = 4; + */ + java.lang.String getShapesOutputTensorName(); + /** + * string shapes_output_tensor_name = 4; + */ + com.google.protobuf.ByteString + getShapesOutputTensorNameBytes(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocationDescription.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocationDescription.java new file mode 100644 index 00000000000..2abffe7549a --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocationDescription.java @@ -0,0 +1,944 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/allocation_description.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.AllocationDescription} + */ +public final class AllocationDescription extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.AllocationDescription) + AllocationDescriptionOrBuilder { +private static final long serialVersionUID = 0L; + // Use AllocationDescription.newBuilder() to construct. + private AllocationDescription(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AllocationDescription() { + allocatorName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AllocationDescription(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AllocationDescription( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + requestedBytes_ = input.readInt64(); + break; + } + case 16: { + + allocatedBytes_ = input.readInt64(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + allocatorName_ = s; + break; + } + case 32: { + + allocationId_ = input.readInt64(); + break; + } + case 40: { + + hasSingleReference_ = input.readBool(); + break; + } + case 48: { + + ptr_ = input.readUInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.AllocationDescriptionProtos.internal_static_tensorflow_AllocationDescription_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.AllocationDescriptionProtos.internal_static_tensorflow_AllocationDescription_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.AllocationDescription.class, org.tensorflow.proto.framework.AllocationDescription.Builder.class); + } + + public static final int REQUESTED_BYTES_FIELD_NUMBER = 1; + private long requestedBytes_; + /** + *
+   * Total number of bytes requested
+   * 
+ * + * int64 requested_bytes = 1; + */ + public long getRequestedBytes() { + return requestedBytes_; + } + + public static final int ALLOCATED_BYTES_FIELD_NUMBER = 2; + private long allocatedBytes_; + /** + *
+   * Total number of bytes allocated if known
+   * 
+ * + * int64 allocated_bytes = 2; + */ + public long getAllocatedBytes() { + return allocatedBytes_; + } + + public static final int ALLOCATOR_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object allocatorName_; + /** + *
+   * Name of the allocator used
+   * 
+ * + * string allocator_name = 3; + */ + 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; + } + } + /** + *
+   * Name of the allocator used
+   * 
+ * + * string allocator_name = 3; + */ + 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_; + /** + *
+   * Identifier of the allocated buffer if known
+   * 
+ * + * int64 allocation_id = 4; + */ + public long getAllocationId() { + return allocationId_; + } + + public static final int HAS_SINGLE_REFERENCE_FIELD_NUMBER = 5; + private boolean hasSingleReference_; + /** + *
+   * Set if this tensor only has one remaining reference
+   * 
+ * + * bool has_single_reference = 5; + */ + public boolean getHasSingleReference() { + return hasSingleReference_; + } + + public static final int PTR_FIELD_NUMBER = 6; + private long ptr_; + /** + *
+   * Address of the allocation.
+   * 
+ * + * uint64 ptr = 6; + */ + public long getPtr() { + return ptr_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(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.GeneratedMessageV3.writeString(output, 3, allocatorName_); + } + if (allocationId_ != 0L) { + output.writeInt64(4, allocationId_); + } + if (hasSingleReference_ != false) { + output.writeBool(5, hasSingleReference_); + } + if (ptr_ != 0L) { + output.writeUInt64(6, ptr_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + 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.GeneratedMessageV3.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_); + } + if (ptr_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(6, ptr_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.AllocationDescription)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.AllocationDescription other = (org.tensorflow.proto.framework.AllocationDescription) obj; + + if (getRequestedBytes() + != other.getRequestedBytes()) return false; + if (getAllocatedBytes() + != other.getAllocatedBytes()) return false; + if (!getAllocatorName() + .equals(other.getAllocatorName())) return false; + if (getAllocationId() + != other.getAllocationId()) return false; + if (getHasSingleReference() + != other.getHasSingleReference()) return false; + if (getPtr() + != other.getPtr()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REQUESTED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRequestedBytes()); + hash = (37 * hash) + ALLOCATED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAllocatedBytes()); + hash = (37 * hash) + ALLOCATOR_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAllocatorName().hashCode(); + hash = (37 * hash) + ALLOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAllocationId()); + hash = (37 * hash) + HAS_SINGLE_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getHasSingleReference()); + hash = (37 * hash) + PTR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPtr()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.AllocationDescription parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.AllocationDescription parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.AllocationDescription parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.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.proto.framework.AllocationDescription parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.AllocationDescription parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.AllocationDescription parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AllocationDescription parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.AllocationDescription parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AllocationDescription parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.AllocationDescription parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AllocationDescription parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.AllocationDescription prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.AllocationDescription} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.AllocationDescription) + org.tensorflow.proto.framework.AllocationDescriptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.AllocationDescriptionProtos.internal_static_tensorflow_AllocationDescription_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.AllocationDescriptionProtos.internal_static_tensorflow_AllocationDescription_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.AllocationDescription.class, org.tensorflow.proto.framework.AllocationDescription.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.AllocationDescription.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + requestedBytes_ = 0L; + + allocatedBytes_ = 0L; + + allocatorName_ = ""; + + allocationId_ = 0L; + + hasSingleReference_ = false; + + ptr_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.AllocationDescriptionProtos.internal_static_tensorflow_AllocationDescription_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AllocationDescription getDefaultInstanceForType() { + return org.tensorflow.proto.framework.AllocationDescription.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.AllocationDescription build() { + org.tensorflow.proto.framework.AllocationDescription result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AllocationDescription buildPartial() { + org.tensorflow.proto.framework.AllocationDescription result = new org.tensorflow.proto.framework.AllocationDescription(this); + result.requestedBytes_ = requestedBytes_; + result.allocatedBytes_ = allocatedBytes_; + result.allocatorName_ = allocatorName_; + result.allocationId_ = allocationId_; + result.hasSingleReference_ = hasSingleReference_; + result.ptr_ = ptr_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.AllocationDescription) { + return mergeFrom((org.tensorflow.proto.framework.AllocationDescription)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.AllocationDescription other) { + if (other == org.tensorflow.proto.framework.AllocationDescription.getDefaultInstance()) return this; + if (other.getRequestedBytes() != 0L) { + setRequestedBytes(other.getRequestedBytes()); + } + if (other.getAllocatedBytes() != 0L) { + setAllocatedBytes(other.getAllocatedBytes()); + } + if (!other.getAllocatorName().isEmpty()) { + allocatorName_ = other.allocatorName_; + onChanged(); + } + if (other.getAllocationId() != 0L) { + setAllocationId(other.getAllocationId()); + } + if (other.getHasSingleReference() != false) { + setHasSingleReference(other.getHasSingleReference()); + } + if (other.getPtr() != 0L) { + setPtr(other.getPtr()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.AllocationDescription parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.AllocationDescription) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long requestedBytes_ ; + /** + *
+     * Total number of bytes requested
+     * 
+ * + * int64 requested_bytes = 1; + */ + public long getRequestedBytes() { + return requestedBytes_; + } + /** + *
+     * Total number of bytes requested
+     * 
+ * + * int64 requested_bytes = 1; + */ + public Builder setRequestedBytes(long value) { + + requestedBytes_ = value; + onChanged(); + return this; + } + /** + *
+     * Total number of bytes requested
+     * 
+ * + * int64 requested_bytes = 1; + */ + public Builder clearRequestedBytes() { + + requestedBytes_ = 0L; + onChanged(); + return this; + } + + private long allocatedBytes_ ; + /** + *
+     * Total number of bytes allocated if known
+     * 
+ * + * int64 allocated_bytes = 2; + */ + public long getAllocatedBytes() { + return allocatedBytes_; + } + /** + *
+     * Total number of bytes allocated if known
+     * 
+ * + * int64 allocated_bytes = 2; + */ + public Builder setAllocatedBytes(long value) { + + allocatedBytes_ = value; + onChanged(); + return this; + } + /** + *
+     * Total number of bytes allocated if known
+     * 
+ * + * int64 allocated_bytes = 2; + */ + public Builder clearAllocatedBytes() { + + allocatedBytes_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object allocatorName_ = ""; + /** + *
+     * Name of the allocator used
+     * 
+ * + * string allocator_name = 3; + */ + 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; + } + } + /** + *
+     * Name of the allocator used
+     * 
+ * + * string allocator_name = 3; + */ + 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; + } + } + /** + *
+     * Name of the allocator used
+     * 
+ * + * string allocator_name = 3; + */ + public Builder setAllocatorName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + allocatorName_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the allocator used
+     * 
+ * + * string allocator_name = 3; + */ + public Builder clearAllocatorName() { + + allocatorName_ = getDefaultInstance().getAllocatorName(); + onChanged(); + return this; + } + /** + *
+     * Name of the allocator used
+     * 
+ * + * string allocator_name = 3; + */ + public Builder setAllocatorNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + allocatorName_ = value; + onChanged(); + return this; + } + + private long allocationId_ ; + /** + *
+     * Identifier of the allocated buffer if known
+     * 
+ * + * int64 allocation_id = 4; + */ + public long getAllocationId() { + return allocationId_; + } + /** + *
+     * Identifier of the allocated buffer if known
+     * 
+ * + * int64 allocation_id = 4; + */ + public Builder setAllocationId(long value) { + + allocationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Identifier of the allocated buffer if known
+     * 
+ * + * int64 allocation_id = 4; + */ + public Builder clearAllocationId() { + + allocationId_ = 0L; + onChanged(); + return this; + } + + private boolean hasSingleReference_ ; + /** + *
+     * Set if this tensor only has one remaining reference
+     * 
+ * + * bool has_single_reference = 5; + */ + public boolean getHasSingleReference() { + return hasSingleReference_; + } + /** + *
+     * Set if this tensor only has one remaining reference
+     * 
+ * + * bool has_single_reference = 5; + */ + public Builder setHasSingleReference(boolean value) { + + hasSingleReference_ = value; + onChanged(); + return this; + } + /** + *
+     * Set if this tensor only has one remaining reference
+     * 
+ * + * bool has_single_reference = 5; + */ + public Builder clearHasSingleReference() { + + hasSingleReference_ = false; + onChanged(); + return this; + } + + private long ptr_ ; + /** + *
+     * Address of the allocation.
+     * 
+ * + * uint64 ptr = 6; + */ + public long getPtr() { + return ptr_; + } + /** + *
+     * Address of the allocation.
+     * 
+ * + * uint64 ptr = 6; + */ + public Builder setPtr(long value) { + + ptr_ = value; + onChanged(); + return this; + } + /** + *
+     * Address of the allocation.
+     * 
+ * + * uint64 ptr = 6; + */ + public Builder clearPtr() { + + ptr_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.AllocationDescription) + } + + // @@protoc_insertion_point(class_scope:tensorflow.AllocationDescription) + private static final org.tensorflow.proto.framework.AllocationDescription DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.AllocationDescription(); + } + + public static org.tensorflow.proto.framework.AllocationDescription getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AllocationDescription parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AllocationDescription(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AllocationDescription getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocationDescriptionOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocationDescriptionOrBuilder.java new file mode 100644 index 00000000000..9fbd5df0695 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocationDescriptionOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/allocation_description.proto + +package org.tensorflow.proto.framework; + +public interface AllocationDescriptionOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.AllocationDescription) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Total number of bytes requested
+   * 
+ * + * int64 requested_bytes = 1; + */ + long getRequestedBytes(); + + /** + *
+   * Total number of bytes allocated if known
+   * 
+ * + * int64 allocated_bytes = 2; + */ + long getAllocatedBytes(); + + /** + *
+   * Name of the allocator used
+   * 
+ * + * string allocator_name = 3; + */ + java.lang.String getAllocatorName(); + /** + *
+   * Name of the allocator used
+   * 
+ * + * string allocator_name = 3; + */ + com.google.protobuf.ByteString + getAllocatorNameBytes(); + + /** + *
+   * Identifier of the allocated buffer if known
+   * 
+ * + * int64 allocation_id = 4; + */ + long getAllocationId(); + + /** + *
+   * Set if this tensor only has one remaining reference
+   * 
+ * + * bool has_single_reference = 5; + */ + boolean getHasSingleReference(); + + /** + *
+   * Address of the allocation.
+   * 
+ * + * uint64 ptr = 6; + */ + long getPtr(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocationDescriptionProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocationDescriptionProtos.java new file mode 100644 index 00000000000..f3af7b380fc --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocationDescriptionProtos.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/allocation_description.proto + +package org.tensorflow.proto.framework; + +public final class AllocationDescriptionProtos { + private AllocationDescriptionProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_AllocationDescription_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.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\"\243\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(\010\022\013\n\003ptr\030\006 \001(\004B\241\001\n\036o" + + "rg.tensorflow.proto.frameworkB\033Allocatio" + + "nDescriptionProtosP\001Z]github.com/tensorf" + + "low/tensorflow/tensorflow/go/core/framew" + + "ork/allocation_description_go_proto\370\001\001b\006" + + "proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tensorflow_AllocationDescription_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_AllocationDescription_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_AllocationDescription_descriptor, + new java.lang.String[] { "RequestedBytes", "AllocatedBytes", "AllocatorName", "AllocationId", "HasSingleReference", "Ptr", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocationRecord.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocationRecord.java new file mode 100644 index 00000000000..738f1117fbe --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocationRecord.java @@ -0,0 +1,575 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/step_stats.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * An allocation/de-allocation operation performed by the allocator.
+ * 
+ * + * Protobuf type {@code tensorflow.AllocationRecord} + */ +public final class AllocationRecord extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.AllocationRecord) + AllocationRecordOrBuilder { +private static final long serialVersionUID = 0L; + // Use AllocationRecord.newBuilder() to construct. + private AllocationRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AllocationRecord() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AllocationRecord(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AllocationRecord( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + allocMicros_ = input.readInt64(); + break; + } + case 16: { + + allocBytes_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_AllocationRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_AllocationRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.AllocationRecord.class, org.tensorflow.proto.framework.AllocationRecord.Builder.class); + } + + public static final int ALLOC_MICROS_FIELD_NUMBER = 1; + private long allocMicros_; + /** + *
+   * The timestamp of the operation.
+   * 
+ * + * int64 alloc_micros = 1; + */ + public long getAllocMicros() { + return allocMicros_; + } + + public static final int ALLOC_BYTES_FIELD_NUMBER = 2; + private long allocBytes_; + /** + *
+   * Number of bytes allocated, or de-allocated if negative.
+   * 
+ * + * int64 alloc_bytes = 2; + */ + public long getAllocBytes() { + return allocBytes_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (allocMicros_ != 0L) { + output.writeInt64(1, allocMicros_); + } + if (allocBytes_ != 0L) { + output.writeInt64(2, allocBytes_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (allocMicros_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, allocMicros_); + } + if (allocBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, allocBytes_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.AllocationRecord)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.AllocationRecord other = (org.tensorflow.proto.framework.AllocationRecord) obj; + + if (getAllocMicros() + != other.getAllocMicros()) return false; + if (getAllocBytes() + != other.getAllocBytes()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ALLOC_MICROS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAllocMicros()); + hash = (37 * hash) + ALLOC_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAllocBytes()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.AllocationRecord parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.AllocationRecord parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.AllocationRecord parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.AllocationRecord 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.proto.framework.AllocationRecord parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.AllocationRecord parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.AllocationRecord parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AllocationRecord parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.AllocationRecord parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AllocationRecord parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.AllocationRecord parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AllocationRecord parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.AllocationRecord prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An allocation/de-allocation operation performed by the allocator.
+   * 
+ * + * Protobuf type {@code tensorflow.AllocationRecord} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.AllocationRecord) + org.tensorflow.proto.framework.AllocationRecordOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_AllocationRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_AllocationRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.AllocationRecord.class, org.tensorflow.proto.framework.AllocationRecord.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.AllocationRecord.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + allocMicros_ = 0L; + + allocBytes_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_AllocationRecord_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AllocationRecord getDefaultInstanceForType() { + return org.tensorflow.proto.framework.AllocationRecord.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.AllocationRecord build() { + org.tensorflow.proto.framework.AllocationRecord result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AllocationRecord buildPartial() { + org.tensorflow.proto.framework.AllocationRecord result = new org.tensorflow.proto.framework.AllocationRecord(this); + result.allocMicros_ = allocMicros_; + result.allocBytes_ = allocBytes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.AllocationRecord) { + return mergeFrom((org.tensorflow.proto.framework.AllocationRecord)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.AllocationRecord other) { + if (other == org.tensorflow.proto.framework.AllocationRecord.getDefaultInstance()) return this; + if (other.getAllocMicros() != 0L) { + setAllocMicros(other.getAllocMicros()); + } + if (other.getAllocBytes() != 0L) { + setAllocBytes(other.getAllocBytes()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.AllocationRecord parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.AllocationRecord) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long allocMicros_ ; + /** + *
+     * The timestamp of the operation.
+     * 
+ * + * int64 alloc_micros = 1; + */ + public long getAllocMicros() { + return allocMicros_; + } + /** + *
+     * The timestamp of the operation.
+     * 
+ * + * int64 alloc_micros = 1; + */ + public Builder setAllocMicros(long value) { + + allocMicros_ = value; + onChanged(); + return this; + } + /** + *
+     * The timestamp of the operation.
+     * 
+ * + * int64 alloc_micros = 1; + */ + public Builder clearAllocMicros() { + + allocMicros_ = 0L; + onChanged(); + return this; + } + + private long allocBytes_ ; + /** + *
+     * Number of bytes allocated, or de-allocated if negative.
+     * 
+ * + * int64 alloc_bytes = 2; + */ + public long getAllocBytes() { + return allocBytes_; + } + /** + *
+     * Number of bytes allocated, or de-allocated if negative.
+     * 
+ * + * int64 alloc_bytes = 2; + */ + public Builder setAllocBytes(long value) { + + allocBytes_ = value; + onChanged(); + return this; + } + /** + *
+     * Number of bytes allocated, or de-allocated if negative.
+     * 
+ * + * int64 alloc_bytes = 2; + */ + public Builder clearAllocBytes() { + + allocBytes_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.AllocationRecord) + } + + // @@protoc_insertion_point(class_scope:tensorflow.AllocationRecord) + private static final org.tensorflow.proto.framework.AllocationRecord DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.AllocationRecord(); + } + + public static org.tensorflow.proto.framework.AllocationRecord getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AllocationRecord parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AllocationRecord(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AllocationRecord getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocationRecordOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocationRecordOrBuilder.java new file mode 100644 index 00000000000..c6c5dd502da --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocationRecordOrBuilder.java @@ -0,0 +1,27 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/step_stats.proto + +package org.tensorflow.proto.framework; + +public interface AllocationRecordOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.AllocationRecord) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The timestamp of the operation.
+   * 
+ * + * int64 alloc_micros = 1; + */ + long getAllocMicros(); + + /** + *
+   * Number of bytes allocated, or de-allocated if negative.
+   * 
+ * + * int64 alloc_bytes = 2; + */ + long getAllocBytes(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocatorMemoryUsed.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocatorMemoryUsed.java new file mode 100644 index 00000000000..3cb33266367 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocatorMemoryUsed.java @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/step_stats.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.AllocatorMemoryUsed} + */ +public final class AllocatorMemoryUsed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.AllocatorMemoryUsed) + AllocatorMemoryUsedOrBuilder { +private static final long serialVersionUID = 0L; + // Use AllocatorMemoryUsed.newBuilder() to construct. + private AllocatorMemoryUsed(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AllocatorMemoryUsed() { + allocatorName_ = ""; + allocationRecords_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AllocatorMemoryUsed(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AllocatorMemoryUsed( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + allocatorName_ = s; + break; + } + case 16: { + + totalBytes_ = input.readInt64(); + break; + } + case 24: { + + peakBytes_ = input.readInt64(); + break; + } + case 32: { + + liveBytes_ = input.readInt64(); + break; + } + case 40: { + + allocatorBytesInUse_ = input.readInt64(); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + allocationRecords_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + allocationRecords_.add( + input.readMessage(org.tensorflow.proto.framework.AllocationRecord.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + allocationRecords_ = java.util.Collections.unmodifiableList(allocationRecords_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.AllocatorMemoryUsed.class, org.tensorflow.proto.framework.AllocatorMemoryUsed.Builder.class); + } + + public static final int ALLOCATOR_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object allocatorName_; + /** + * 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; + } + } + /** + * 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_; + /** + *
+   * These are per-node allocator memory stats.
+   * 
+ * + * int64 total_bytes = 2; + */ + public long getTotalBytes() { + return totalBytes_; + } + + public static final int PEAK_BYTES_FIELD_NUMBER = 3; + private long peakBytes_; + /** + * int64 peak_bytes = 3; + */ + public long getPeakBytes() { + return peakBytes_; + } + + public static final int LIVE_BYTES_FIELD_NUMBER = 4; + private long liveBytes_; + /** + *
+   * The bytes that are not deallocated.
+   * 
+ * + * int64 live_bytes = 4; + */ + public long getLiveBytes() { + return liveBytes_; + } + + public static final int ALLOCATION_RECORDS_FIELD_NUMBER = 6; + private java.util.List allocationRecords_; + /** + *
+   * The allocation and deallocation timeline.
+   * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public java.util.List getAllocationRecordsList() { + return allocationRecords_; + } + /** + *
+   * The allocation and deallocation timeline.
+   * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public java.util.List + getAllocationRecordsOrBuilderList() { + return allocationRecords_; + } + /** + *
+   * The allocation and deallocation timeline.
+   * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public int getAllocationRecordsCount() { + return allocationRecords_.size(); + } + /** + *
+   * The allocation and deallocation timeline.
+   * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public org.tensorflow.proto.framework.AllocationRecord getAllocationRecords(int index) { + return allocationRecords_.get(index); + } + /** + *
+   * The allocation and deallocation timeline.
+   * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public org.tensorflow.proto.framework.AllocationRecordOrBuilder getAllocationRecordsOrBuilder( + int index) { + return allocationRecords_.get(index); + } + + public static final int ALLOCATOR_BYTES_IN_USE_FIELD_NUMBER = 5; + private long allocatorBytesInUse_; + /** + *
+   * These are snapshots of the overall allocator memory stats.
+   * The number of live bytes currently allocated by the allocator.
+   * 
+ * + * int64 allocator_bytes_in_use = 5; + */ + public long getAllocatorBytesInUse() { + return allocatorBytesInUse_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getAllocatorNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, allocatorName_); + } + if (totalBytes_ != 0L) { + output.writeInt64(2, totalBytes_); + } + if (peakBytes_ != 0L) { + output.writeInt64(3, peakBytes_); + } + if (liveBytes_ != 0L) { + output.writeInt64(4, liveBytes_); + } + if (allocatorBytesInUse_ != 0L) { + output.writeInt64(5, allocatorBytesInUse_); + } + for (int i = 0; i < allocationRecords_.size(); i++) { + output.writeMessage(6, allocationRecords_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAllocatorNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.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_); + } + if (liveBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, liveBytes_); + } + if (allocatorBytesInUse_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, allocatorBytesInUse_); + } + for (int i = 0; i < allocationRecords_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, allocationRecords_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.AllocatorMemoryUsed)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.AllocatorMemoryUsed other = (org.tensorflow.proto.framework.AllocatorMemoryUsed) obj; + + if (!getAllocatorName() + .equals(other.getAllocatorName())) return false; + if (getTotalBytes() + != other.getTotalBytes()) return false; + if (getPeakBytes() + != other.getPeakBytes()) return false; + if (getLiveBytes() + != other.getLiveBytes()) return false; + if (!getAllocationRecordsList() + .equals(other.getAllocationRecordsList())) return false; + if (getAllocatorBytesInUse() + != other.getAllocatorBytesInUse()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ALLOCATOR_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAllocatorName().hashCode(); + hash = (37 * hash) + TOTAL_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalBytes()); + hash = (37 * hash) + PEAK_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPeakBytes()); + hash = (37 * hash) + LIVE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLiveBytes()); + if (getAllocationRecordsCount() > 0) { + hash = (37 * hash) + ALLOCATION_RECORDS_FIELD_NUMBER; + hash = (53 * hash) + getAllocationRecordsList().hashCode(); + } + hash = (37 * hash) + ALLOCATOR_BYTES_IN_USE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAllocatorBytesInUse()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.AllocatorMemoryUsed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.AllocatorMemoryUsed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.AllocatorMemoryUsed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.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.proto.framework.AllocatorMemoryUsed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.AllocatorMemoryUsed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.AllocatorMemoryUsed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AllocatorMemoryUsed parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.AllocatorMemoryUsed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AllocatorMemoryUsed parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.AllocatorMemoryUsed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AllocatorMemoryUsed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.AllocatorMemoryUsed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.AllocatorMemoryUsed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.AllocatorMemoryUsed) + org.tensorflow.proto.framework.AllocatorMemoryUsedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.AllocatorMemoryUsed.class, org.tensorflow.proto.framework.AllocatorMemoryUsed.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.AllocatorMemoryUsed.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAllocationRecordsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + allocatorName_ = ""; + + totalBytes_ = 0L; + + peakBytes_ = 0L; + + liveBytes_ = 0L; + + if (allocationRecordsBuilder_ == null) { + allocationRecords_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + allocationRecordsBuilder_.clear(); + } + allocatorBytesInUse_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AllocatorMemoryUsed getDefaultInstanceForType() { + return org.tensorflow.proto.framework.AllocatorMemoryUsed.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.AllocatorMemoryUsed build() { + org.tensorflow.proto.framework.AllocatorMemoryUsed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AllocatorMemoryUsed buildPartial() { + org.tensorflow.proto.framework.AllocatorMemoryUsed result = new org.tensorflow.proto.framework.AllocatorMemoryUsed(this); + int from_bitField0_ = bitField0_; + result.allocatorName_ = allocatorName_; + result.totalBytes_ = totalBytes_; + result.peakBytes_ = peakBytes_; + result.liveBytes_ = liveBytes_; + if (allocationRecordsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + allocationRecords_ = java.util.Collections.unmodifiableList(allocationRecords_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.allocationRecords_ = allocationRecords_; + } else { + result.allocationRecords_ = allocationRecordsBuilder_.build(); + } + result.allocatorBytesInUse_ = allocatorBytesInUse_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.AllocatorMemoryUsed) { + return mergeFrom((org.tensorflow.proto.framework.AllocatorMemoryUsed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.AllocatorMemoryUsed other) { + if (other == org.tensorflow.proto.framework.AllocatorMemoryUsed.getDefaultInstance()) return this; + if (!other.getAllocatorName().isEmpty()) { + allocatorName_ = other.allocatorName_; + onChanged(); + } + if (other.getTotalBytes() != 0L) { + setTotalBytes(other.getTotalBytes()); + } + if (other.getPeakBytes() != 0L) { + setPeakBytes(other.getPeakBytes()); + } + if (other.getLiveBytes() != 0L) { + setLiveBytes(other.getLiveBytes()); + } + if (allocationRecordsBuilder_ == null) { + if (!other.allocationRecords_.isEmpty()) { + if (allocationRecords_.isEmpty()) { + allocationRecords_ = other.allocationRecords_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAllocationRecordsIsMutable(); + allocationRecords_.addAll(other.allocationRecords_); + } + onChanged(); + } + } else { + if (!other.allocationRecords_.isEmpty()) { + if (allocationRecordsBuilder_.isEmpty()) { + allocationRecordsBuilder_.dispose(); + allocationRecordsBuilder_ = null; + allocationRecords_ = other.allocationRecords_; + bitField0_ = (bitField0_ & ~0x00000001); + allocationRecordsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAllocationRecordsFieldBuilder() : null; + } else { + allocationRecordsBuilder_.addAllMessages(other.allocationRecords_); + } + } + } + if (other.getAllocatorBytesInUse() != 0L) { + setAllocatorBytesInUse(other.getAllocatorBytesInUse()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.AllocatorMemoryUsed parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.AllocatorMemoryUsed) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object allocatorName_ = ""; + /** + * 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; + } + } + /** + * 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; + } + } + /** + * string allocator_name = 1; + */ + public Builder setAllocatorName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + allocatorName_ = value; + onChanged(); + return this; + } + /** + * string allocator_name = 1; + */ + public Builder clearAllocatorName() { + + allocatorName_ = getDefaultInstance().getAllocatorName(); + onChanged(); + return this; + } + /** + * 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_ ; + /** + *
+     * These are per-node allocator memory stats.
+     * 
+ * + * int64 total_bytes = 2; + */ + public long getTotalBytes() { + return totalBytes_; + } + /** + *
+     * These are per-node allocator memory stats.
+     * 
+ * + * int64 total_bytes = 2; + */ + public Builder setTotalBytes(long value) { + + totalBytes_ = value; + onChanged(); + return this; + } + /** + *
+     * These are per-node allocator memory stats.
+     * 
+ * + * int64 total_bytes = 2; + */ + public Builder clearTotalBytes() { + + totalBytes_ = 0L; + onChanged(); + return this; + } + + private long peakBytes_ ; + /** + * int64 peak_bytes = 3; + */ + public long getPeakBytes() { + return peakBytes_; + } + /** + * int64 peak_bytes = 3; + */ + public Builder setPeakBytes(long value) { + + peakBytes_ = value; + onChanged(); + return this; + } + /** + * int64 peak_bytes = 3; + */ + public Builder clearPeakBytes() { + + peakBytes_ = 0L; + onChanged(); + return this; + } + + private long liveBytes_ ; + /** + *
+     * The bytes that are not deallocated.
+     * 
+ * + * int64 live_bytes = 4; + */ + public long getLiveBytes() { + return liveBytes_; + } + /** + *
+     * The bytes that are not deallocated.
+     * 
+ * + * int64 live_bytes = 4; + */ + public Builder setLiveBytes(long value) { + + liveBytes_ = value; + onChanged(); + return this; + } + /** + *
+     * The bytes that are not deallocated.
+     * 
+ * + * int64 live_bytes = 4; + */ + public Builder clearLiveBytes() { + + liveBytes_ = 0L; + onChanged(); + return this; + } + + private java.util.List allocationRecords_ = + java.util.Collections.emptyList(); + private void ensureAllocationRecordsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + allocationRecords_ = new java.util.ArrayList(allocationRecords_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.AllocationRecord, org.tensorflow.proto.framework.AllocationRecord.Builder, org.tensorflow.proto.framework.AllocationRecordOrBuilder> allocationRecordsBuilder_; + + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public java.util.List getAllocationRecordsList() { + if (allocationRecordsBuilder_ == null) { + return java.util.Collections.unmodifiableList(allocationRecords_); + } else { + return allocationRecordsBuilder_.getMessageList(); + } + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public int getAllocationRecordsCount() { + if (allocationRecordsBuilder_ == null) { + return allocationRecords_.size(); + } else { + return allocationRecordsBuilder_.getCount(); + } + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public org.tensorflow.proto.framework.AllocationRecord getAllocationRecords(int index) { + if (allocationRecordsBuilder_ == null) { + return allocationRecords_.get(index); + } else { + return allocationRecordsBuilder_.getMessage(index); + } + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public Builder setAllocationRecords( + int index, org.tensorflow.proto.framework.AllocationRecord value) { + if (allocationRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllocationRecordsIsMutable(); + allocationRecords_.set(index, value); + onChanged(); + } else { + allocationRecordsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public Builder setAllocationRecords( + int index, org.tensorflow.proto.framework.AllocationRecord.Builder builderForValue) { + if (allocationRecordsBuilder_ == null) { + ensureAllocationRecordsIsMutable(); + allocationRecords_.set(index, builderForValue.build()); + onChanged(); + } else { + allocationRecordsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public Builder addAllocationRecords(org.tensorflow.proto.framework.AllocationRecord value) { + if (allocationRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllocationRecordsIsMutable(); + allocationRecords_.add(value); + onChanged(); + } else { + allocationRecordsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public Builder addAllocationRecords( + int index, org.tensorflow.proto.framework.AllocationRecord value) { + if (allocationRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllocationRecordsIsMutable(); + allocationRecords_.add(index, value); + onChanged(); + } else { + allocationRecordsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public Builder addAllocationRecords( + org.tensorflow.proto.framework.AllocationRecord.Builder builderForValue) { + if (allocationRecordsBuilder_ == null) { + ensureAllocationRecordsIsMutable(); + allocationRecords_.add(builderForValue.build()); + onChanged(); + } else { + allocationRecordsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public Builder addAllocationRecords( + int index, org.tensorflow.proto.framework.AllocationRecord.Builder builderForValue) { + if (allocationRecordsBuilder_ == null) { + ensureAllocationRecordsIsMutable(); + allocationRecords_.add(index, builderForValue.build()); + onChanged(); + } else { + allocationRecordsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public Builder addAllAllocationRecords( + java.lang.Iterable values) { + if (allocationRecordsBuilder_ == null) { + ensureAllocationRecordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, allocationRecords_); + onChanged(); + } else { + allocationRecordsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public Builder clearAllocationRecords() { + if (allocationRecordsBuilder_ == null) { + allocationRecords_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + allocationRecordsBuilder_.clear(); + } + return this; + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public Builder removeAllocationRecords(int index) { + if (allocationRecordsBuilder_ == null) { + ensureAllocationRecordsIsMutable(); + allocationRecords_.remove(index); + onChanged(); + } else { + allocationRecordsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public org.tensorflow.proto.framework.AllocationRecord.Builder getAllocationRecordsBuilder( + int index) { + return getAllocationRecordsFieldBuilder().getBuilder(index); + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public org.tensorflow.proto.framework.AllocationRecordOrBuilder getAllocationRecordsOrBuilder( + int index) { + if (allocationRecordsBuilder_ == null) { + return allocationRecords_.get(index); } else { + return allocationRecordsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public java.util.List + getAllocationRecordsOrBuilderList() { + if (allocationRecordsBuilder_ != null) { + return allocationRecordsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(allocationRecords_); + } + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public org.tensorflow.proto.framework.AllocationRecord.Builder addAllocationRecordsBuilder() { + return getAllocationRecordsFieldBuilder().addBuilder( + org.tensorflow.proto.framework.AllocationRecord.getDefaultInstance()); + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public org.tensorflow.proto.framework.AllocationRecord.Builder addAllocationRecordsBuilder( + int index) { + return getAllocationRecordsFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.AllocationRecord.getDefaultInstance()); + } + /** + *
+     * The allocation and deallocation timeline.
+     * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + public java.util.List + getAllocationRecordsBuilderList() { + return getAllocationRecordsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.AllocationRecord, org.tensorflow.proto.framework.AllocationRecord.Builder, org.tensorflow.proto.framework.AllocationRecordOrBuilder> + getAllocationRecordsFieldBuilder() { + if (allocationRecordsBuilder_ == null) { + allocationRecordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.AllocationRecord, org.tensorflow.proto.framework.AllocationRecord.Builder, org.tensorflow.proto.framework.AllocationRecordOrBuilder>( + allocationRecords_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + allocationRecords_ = null; + } + return allocationRecordsBuilder_; + } + + private long allocatorBytesInUse_ ; + /** + *
+     * These are snapshots of the overall allocator memory stats.
+     * The number of live bytes currently allocated by the allocator.
+     * 
+ * + * int64 allocator_bytes_in_use = 5; + */ + public long getAllocatorBytesInUse() { + return allocatorBytesInUse_; + } + /** + *
+     * These are snapshots of the overall allocator memory stats.
+     * The number of live bytes currently allocated by the allocator.
+     * 
+ * + * int64 allocator_bytes_in_use = 5; + */ + public Builder setAllocatorBytesInUse(long value) { + + allocatorBytesInUse_ = value; + onChanged(); + return this; + } + /** + *
+     * These are snapshots of the overall allocator memory stats.
+     * The number of live bytes currently allocated by the allocator.
+     * 
+ * + * int64 allocator_bytes_in_use = 5; + */ + public Builder clearAllocatorBytesInUse() { + + allocatorBytesInUse_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.AllocatorMemoryUsed) + } + + // @@protoc_insertion_point(class_scope:tensorflow.AllocatorMemoryUsed) + private static final org.tensorflow.proto.framework.AllocatorMemoryUsed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.AllocatorMemoryUsed(); + } + + public static org.tensorflow.proto.framework.AllocatorMemoryUsed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AllocatorMemoryUsed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AllocatorMemoryUsed(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AllocatorMemoryUsed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocatorMemoryUsedOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocatorMemoryUsedOrBuilder.java new file mode 100644 index 00000000000..44dc47fa31d --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AllocatorMemoryUsedOrBuilder.java @@ -0,0 +1,96 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/step_stats.proto + +package org.tensorflow.proto.framework; + +public interface AllocatorMemoryUsedOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.AllocatorMemoryUsed) + com.google.protobuf.MessageOrBuilder { + + /** + * string allocator_name = 1; + */ + java.lang.String getAllocatorName(); + /** + * string allocator_name = 1; + */ + com.google.protobuf.ByteString + getAllocatorNameBytes(); + + /** + *
+   * These are per-node allocator memory stats.
+   * 
+ * + * int64 total_bytes = 2; + */ + long getTotalBytes(); + + /** + * int64 peak_bytes = 3; + */ + long getPeakBytes(); + + /** + *
+   * The bytes that are not deallocated.
+   * 
+ * + * int64 live_bytes = 4; + */ + long getLiveBytes(); + + /** + *
+   * The allocation and deallocation timeline.
+   * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + java.util.List + getAllocationRecordsList(); + /** + *
+   * The allocation and deallocation timeline.
+   * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + org.tensorflow.proto.framework.AllocationRecord getAllocationRecords(int index); + /** + *
+   * The allocation and deallocation timeline.
+   * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + int getAllocationRecordsCount(); + /** + *
+   * The allocation and deallocation timeline.
+   * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + java.util.List + getAllocationRecordsOrBuilderList(); + /** + *
+   * The allocation and deallocation timeline.
+   * 
+ * + * repeated .tensorflow.AllocationRecord allocation_records = 6; + */ + org.tensorflow.proto.framework.AllocationRecordOrBuilder getAllocationRecordsOrBuilder( + int index); + + /** + *
+   * These are snapshots of the overall allocator memory stats.
+   * The number of live bytes currently allocated by the allocator.
+   * 
+ * + * int64 allocator_bytes_in_use = 5; + */ + long getAllocatorBytesInUse(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ApiDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ApiDef.java new file mode 100644 index 00000000000..99916fcf1f2 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ApiDef.java @@ -0,0 +1,6303 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/api_def.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Used to specify and override the default API & behavior in the
+ * generated code for client languages, from what you would get from
+ * the OpDef alone. There will be a set of ApiDefs that are common
+ * to all client languages, and another set per client language.
+ * The per-client-language ApiDefs will inherit values from the
+ * common ApiDefs which it can either replace or modify.
+ * We separate the API definition from the OpDef so we can evolve the
+ * API while remaining backwards compatible when interpretting old
+ * graphs.  Overrides go in an "api_def.pbtxt" file with a text-format
+ * ApiDefs message.
+ * WARNING: Be *very* careful changing the API for any existing op --
+ * you can change the semantics of existing code.  These changes may
+ * need to wait until a major release of TensorFlow to avoid breaking
+ * our compatibility promises.
+ * 
+ * + * Protobuf type {@code tensorflow.ApiDef} + */ +public final class ApiDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ApiDef) + ApiDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use ApiDef.newBuilder() to construct. + private ApiDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiDef() { + graphOpName_ = ""; + deprecationMessage_ = ""; + visibility_ = 0; + endpoint_ = java.util.Collections.emptyList(); + inArg_ = java.util.Collections.emptyList(); + outArg_ = java.util.Collections.emptyList(); + argOrder_ = com.google.protobuf.LazyStringArrayList.EMPTY; + attr_ = java.util.Collections.emptyList(); + summary_ = ""; + description_ = ""; + descriptionPrefix_ = ""; + descriptionSuffix_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ApiDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + graphOpName_ = s; + break; + } + case 16: { + int rawValue = input.readEnum(); + + visibility_ = rawValue; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + endpoint_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + endpoint_.add( + input.readMessage(org.tensorflow.proto.framework.ApiDef.Endpoint.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + inArg_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + inArg_.add( + input.readMessage(org.tensorflow.proto.framework.ApiDef.Arg.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + outArg_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + outArg_.add( + input.readMessage(org.tensorflow.proto.framework.ApiDef.Arg.parser(), extensionRegistry)); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + attr_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + attr_.add( + input.readMessage(org.tensorflow.proto.framework.ApiDef.Attr.parser(), extensionRegistry)); + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + summary_ = s; + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + + descriptionPrefix_ = s; + break; + } + case 82: { + java.lang.String s = input.readStringRequireUtf8(); + + descriptionSuffix_ = s; + break; + } + case 90: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + argOrder_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + argOrder_.add(s); + break; + } + case 98: { + java.lang.String s = input.readStringRequireUtf8(); + + deprecationMessage_ = s; + break; + } + case 104: { + + deprecationVersion_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + endpoint_ = java.util.Collections.unmodifiableList(endpoint_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + inArg_ = java.util.Collections.unmodifiableList(inArg_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + outArg_ = java.util.Collections.unmodifiableList(outArg_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + attr_ = java.util.Collections.unmodifiableList(attr_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + argOrder_ = argOrder_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ApiDef.class, org.tensorflow.proto.framework.ApiDef.Builder.class); + } + + /** + * Protobuf enum {@code tensorflow.ApiDef.Visibility} + */ + public enum Visibility + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Normally this is "VISIBLE" unless you are inheriting a
+     * different value from another ApiDef.
+     * 
+ * + * DEFAULT_VISIBILITY = 0; + */ + DEFAULT_VISIBILITY(0), + /** + *
+     * Publicly visible in the API.
+     * 
+ * + * VISIBLE = 1; + */ + VISIBLE(1), + /** + *
+     * Do not include this op in the generated API. If visibility is
+     * set to 'SKIP', other fields are ignored for this op.
+     * 
+ * + * SKIP = 2; + */ + SKIP(2), + /** + *
+     * Hide this op by putting it into an internal namespace (or whatever
+     * is appropriate in the target language).
+     * 
+ * + * HIDDEN = 3; + */ + HIDDEN(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Normally this is "VISIBLE" unless you are inheriting a
+     * different value from another ApiDef.
+     * 
+ * + * DEFAULT_VISIBILITY = 0; + */ + public static final int DEFAULT_VISIBILITY_VALUE = 0; + /** + *
+     * Publicly visible in the API.
+     * 
+ * + * VISIBLE = 1; + */ + public static final int VISIBLE_VALUE = 1; + /** + *
+     * Do not include this op in the generated API. If visibility is
+     * set to 'SKIP', other fields are ignored for this op.
+     * 
+ * + * SKIP = 2; + */ + public static final int SKIP_VALUE = 2; + /** + *
+     * Hide this op by putting it into an internal namespace (or whatever
+     * is appropriate in the target language).
+     * 
+ * + * HIDDEN = 3; + */ + public static final int HIDDEN_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Visibility valueOf(int value) { + return forNumber(value); + } + + public static Visibility forNumber(int value) { + switch (value) { + case 0: return DEFAULT_VISIBILITY; + case 1: return VISIBLE; + case 2: return SKIP; + case 3: return HIDDEN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Visibility> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Visibility findValueByNumber(int number) { + return Visibility.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.tensorflow.proto.framework.ApiDef.getDescriptor().getEnumTypes().get(0); + } + + private static final Visibility[] VALUES = values(); + + public static Visibility valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Visibility(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:tensorflow.ApiDef.Visibility) + } + + public interface EndpointOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ApiDef.Endpoint) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Name should be either like "CamelCaseName" or
+     * "Package.CamelCaseName". Client-language-specific ApiDefs may
+     * use a snake_case convention instead of CamelCase.
+     * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+     * Name should be either like "CamelCaseName" or
+     * "Package.CamelCaseName". Client-language-specific ApiDefs may
+     * use a snake_case convention instead of CamelCase.
+     * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Set if this endpoint is deprecated. If set to true, a message suggesting
+     * to use a non-deprecated endpoint instead will be printed. If all
+     * endpoints are deprecated, set deprecation_message in ApiDef instead.
+     * 
+ * + * bool deprecated = 3; + */ + boolean getDeprecated(); + + /** + *
+     * Major version when an endpoint will be deleted. For e.g. set this
+     * value to 2 if endpoint should be removed in TensorFlow 2.0 and
+     * deprecated in versions before that.
+     * 
+ * + * int32 deprecation_version = 4; + */ + int getDeprecationVersion(); + } + /** + *
+   * If you specify any endpoint, this will replace all of the
+   * inherited endpoints.  The first endpoint should be the
+   * "canonical" endpoint, and should not be deprecated (unless all
+   * endpoints are deprecated).
+   * 
+ * + * Protobuf type {@code tensorflow.ApiDef.Endpoint} + */ + public static final class Endpoint extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ApiDef.Endpoint) + EndpointOrBuilder { + private static final long serialVersionUID = 0L; + // Use Endpoint.newBuilder() to construct. + private Endpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Endpoint() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Endpoint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Endpoint( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 24: { + + deprecated_ = input.readBool(); + break; + } + case 32: { + + deprecationVersion_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_Endpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ApiDef.Endpoint.class, org.tensorflow.proto.framework.ApiDef.Endpoint.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * Name should be either like "CamelCaseName" or
+     * "Package.CamelCaseName". Client-language-specific ApiDefs may
+     * use a snake_case convention instead of CamelCase.
+     * 
+ * + * 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; + } + } + /** + *
+     * Name should be either like "CamelCaseName" or
+     * "Package.CamelCaseName". Client-language-specific ApiDefs may
+     * use a snake_case convention instead of CamelCase.
+     * 
+ * + * 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 DEPRECATED_FIELD_NUMBER = 3; + private boolean deprecated_; + /** + *
+     * Set if this endpoint is deprecated. If set to true, a message suggesting
+     * to use a non-deprecated endpoint instead will be printed. If all
+     * endpoints are deprecated, set deprecation_message in ApiDef instead.
+     * 
+ * + * bool deprecated = 3; + */ + public boolean getDeprecated() { + return deprecated_; + } + + public static final int DEPRECATION_VERSION_FIELD_NUMBER = 4; + private int deprecationVersion_; + /** + *
+     * Major version when an endpoint will be deleted. For e.g. set this
+     * value to 2 if endpoint should be removed in TensorFlow 2.0 and
+     * deprecated in versions before that.
+     * 
+ * + * int32 deprecation_version = 4; + */ + public int getDeprecationVersion() { + return deprecationVersion_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (deprecated_ != false) { + output.writeBool(3, deprecated_); + } + if (deprecationVersion_ != 0) { + output.writeInt32(4, deprecationVersion_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (deprecated_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, deprecated_); + } + if (deprecationVersion_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, deprecationVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.ApiDef.Endpoint)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.ApiDef.Endpoint other = (org.tensorflow.proto.framework.ApiDef.Endpoint) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getDeprecated() + != other.getDeprecated()) return false; + if (getDeprecationVersion() + != other.getDeprecationVersion()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DEPRECATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDeprecated()); + hash = (37 * hash) + DEPRECATION_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getDeprecationVersion(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.ApiDef.Endpoint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ApiDef.Endpoint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDef.Endpoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ApiDef.Endpoint 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.proto.framework.ApiDef.Endpoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ApiDef.Endpoint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDef.Endpoint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ApiDef.Endpoint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDef.Endpoint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ApiDef.Endpoint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDef.Endpoint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ApiDef.Endpoint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.ApiDef.Endpoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * If you specify any endpoint, this will replace all of the
+     * inherited endpoints.  The first endpoint should be the
+     * "canonical" endpoint, and should not be deprecated (unless all
+     * endpoints are deprecated).
+     * 
+ * + * Protobuf type {@code tensorflow.ApiDef.Endpoint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ApiDef.Endpoint) + org.tensorflow.proto.framework.ApiDef.EndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_Endpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ApiDef.Endpoint.class, org.tensorflow.proto.framework.ApiDef.Endpoint.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.ApiDef.Endpoint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + deprecated_ = false; + + deprecationVersion_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_Endpoint_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDef.Endpoint getDefaultInstanceForType() { + return org.tensorflow.proto.framework.ApiDef.Endpoint.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDef.Endpoint build() { + org.tensorflow.proto.framework.ApiDef.Endpoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDef.Endpoint buildPartial() { + org.tensorflow.proto.framework.ApiDef.Endpoint result = new org.tensorflow.proto.framework.ApiDef.Endpoint(this); + result.name_ = name_; + result.deprecated_ = deprecated_; + result.deprecationVersion_ = deprecationVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.ApiDef.Endpoint) { + return mergeFrom((org.tensorflow.proto.framework.ApiDef.Endpoint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.ApiDef.Endpoint other) { + if (other == org.tensorflow.proto.framework.ApiDef.Endpoint.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getDeprecated() != false) { + setDeprecated(other.getDeprecated()); + } + if (other.getDeprecationVersion() != 0) { + setDeprecationVersion(other.getDeprecationVersion()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.ApiDef.Endpoint parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.ApiDef.Endpoint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Name should be either like "CamelCaseName" or
+       * "Package.CamelCaseName". Client-language-specific ApiDefs may
+       * use a snake_case convention instead of CamelCase.
+       * 
+ * + * 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; + } + } + /** + *
+       * Name should be either like "CamelCaseName" or
+       * "Package.CamelCaseName". Client-language-specific ApiDefs may
+       * use a snake_case convention instead of CamelCase.
+       * 
+ * + * 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; + } + } + /** + *
+       * Name should be either like "CamelCaseName" or
+       * "Package.CamelCaseName". Client-language-specific ApiDefs may
+       * use a snake_case convention instead of CamelCase.
+       * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * Name should be either like "CamelCaseName" or
+       * "Package.CamelCaseName". Client-language-specific ApiDefs may
+       * use a snake_case convention instead of CamelCase.
+       * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Name should be either like "CamelCaseName" or
+       * "Package.CamelCaseName". Client-language-specific ApiDefs may
+       * use a snake_case convention instead of CamelCase.
+       * 
+ * + * 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 boolean deprecated_ ; + /** + *
+       * Set if this endpoint is deprecated. If set to true, a message suggesting
+       * to use a non-deprecated endpoint instead will be printed. If all
+       * endpoints are deprecated, set deprecation_message in ApiDef instead.
+       * 
+ * + * bool deprecated = 3; + */ + public boolean getDeprecated() { + return deprecated_; + } + /** + *
+       * Set if this endpoint is deprecated. If set to true, a message suggesting
+       * to use a non-deprecated endpoint instead will be printed. If all
+       * endpoints are deprecated, set deprecation_message in ApiDef instead.
+       * 
+ * + * bool deprecated = 3; + */ + public Builder setDeprecated(boolean value) { + + deprecated_ = value; + onChanged(); + return this; + } + /** + *
+       * Set if this endpoint is deprecated. If set to true, a message suggesting
+       * to use a non-deprecated endpoint instead will be printed. If all
+       * endpoints are deprecated, set deprecation_message in ApiDef instead.
+       * 
+ * + * bool deprecated = 3; + */ + public Builder clearDeprecated() { + + deprecated_ = false; + onChanged(); + return this; + } + + private int deprecationVersion_ ; + /** + *
+       * Major version when an endpoint will be deleted. For e.g. set this
+       * value to 2 if endpoint should be removed in TensorFlow 2.0 and
+       * deprecated in versions before that.
+       * 
+ * + * int32 deprecation_version = 4; + */ + public int getDeprecationVersion() { + return deprecationVersion_; + } + /** + *
+       * Major version when an endpoint will be deleted. For e.g. set this
+       * value to 2 if endpoint should be removed in TensorFlow 2.0 and
+       * deprecated in versions before that.
+       * 
+ * + * int32 deprecation_version = 4; + */ + public Builder setDeprecationVersion(int value) { + + deprecationVersion_ = value; + onChanged(); + return this; + } + /** + *
+       * Major version when an endpoint will be deleted. For e.g. set this
+       * value to 2 if endpoint should be removed in TensorFlow 2.0 and
+       * deprecated in versions before that.
+       * 
+ * + * int32 deprecation_version = 4; + */ + public Builder clearDeprecationVersion() { + + deprecationVersion_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ApiDef.Endpoint) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ApiDef.Endpoint) + private static final org.tensorflow.proto.framework.ApiDef.Endpoint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.ApiDef.Endpoint(); + } + + public static org.tensorflow.proto.framework.ApiDef.Endpoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Endpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Endpoint(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDef.Endpoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ArgOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ApiDef.Arg) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + */ + java.lang.String getName(); + /** + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Change the name used to access this arg in the API from what
+     * is used in the GraphDef.  Note that these names in `backticks`
+     * will also be replaced in the summary & description fields.
+     * 
+ * + * string rename_to = 2; + */ + java.lang.String getRenameTo(); + /** + *
+     * Change the name used to access this arg in the API from what
+     * is used in the GraphDef.  Note that these names in `backticks`
+     * will also be replaced in the summary & description fields.
+     * 
+ * + * string rename_to = 2; + */ + com.google.protobuf.ByteString + getRenameToBytes(); + + /** + *
+     * Note: this will replace any inherited arg doc. There is no
+     * current way of modifying arg descriptions (other than replacing
+     * them entirely) as can be done with op descriptions.
+     * 
+ * + * string description = 3; + */ + java.lang.String getDescription(); + /** + *
+     * Note: this will replace any inherited arg doc. There is no
+     * current way of modifying arg descriptions (other than replacing
+     * them entirely) as can be done with op descriptions.
+     * 
+ * + * string description = 3; + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + } + /** + * Protobuf type {@code tensorflow.ApiDef.Arg} + */ + public static final class Arg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ApiDef.Arg) + ArgOrBuilder { + private static final long serialVersionUID = 0L; + // Use Arg.newBuilder() to construct. + private Arg(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Arg() { + name_ = ""; + renameTo_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Arg(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Arg( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + renameTo_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_Arg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_Arg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ApiDef.Arg.class, org.tensorflow.proto.framework.ApiDef.Arg.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * 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; + } + } + /** + * 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 RENAME_TO_FIELD_NUMBER = 2; + private volatile java.lang.Object renameTo_; + /** + *
+     * Change the name used to access this arg in the API from what
+     * is used in the GraphDef.  Note that these names in `backticks`
+     * will also be replaced in the summary & description fields.
+     * 
+ * + * string rename_to = 2; + */ + public java.lang.String getRenameTo() { + java.lang.Object ref = renameTo_; + 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(); + renameTo_ = s; + return s; + } + } + /** + *
+     * Change the name used to access this arg in the API from what
+     * is used in the GraphDef.  Note that these names in `backticks`
+     * will also be replaced in the summary & description fields.
+     * 
+ * + * string rename_to = 2; + */ + public com.google.protobuf.ByteString + getRenameToBytes() { + java.lang.Object ref = renameTo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + renameTo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+     * Note: this will replace any inherited arg doc. There is no
+     * current way of modifying arg descriptions (other than replacing
+     * them entirely) as can be done with op descriptions.
+     * 
+ * + * string description = 3; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+     * Note: this will replace any inherited arg doc. There is no
+     * current way of modifying arg descriptions (other than replacing
+     * them entirely) as can be done with op descriptions.
+     * 
+ * + * string description = 3; + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getRenameToBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, renameTo_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getRenameToBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, renameTo_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.ApiDef.Arg)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.ApiDef.Arg other = (org.tensorflow.proto.framework.ApiDef.Arg) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getRenameTo() + .equals(other.getRenameTo())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + RENAME_TO_FIELD_NUMBER; + hash = (53 * hash) + getRenameTo().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.ApiDef.Arg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ApiDef.Arg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDef.Arg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ApiDef.Arg 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.proto.framework.ApiDef.Arg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ApiDef.Arg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDef.Arg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ApiDef.Arg parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDef.Arg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ApiDef.Arg parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDef.Arg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ApiDef.Arg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.ApiDef.Arg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.ApiDef.Arg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ApiDef.Arg) + org.tensorflow.proto.framework.ApiDef.ArgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_Arg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_Arg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ApiDef.Arg.class, org.tensorflow.proto.framework.ApiDef.Arg.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.ApiDef.Arg.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + renameTo_ = ""; + + description_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_Arg_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDef.Arg getDefaultInstanceForType() { + return org.tensorflow.proto.framework.ApiDef.Arg.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDef.Arg build() { + org.tensorflow.proto.framework.ApiDef.Arg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDef.Arg buildPartial() { + org.tensorflow.proto.framework.ApiDef.Arg result = new org.tensorflow.proto.framework.ApiDef.Arg(this); + result.name_ = name_; + result.renameTo_ = renameTo_; + result.description_ = description_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.ApiDef.Arg) { + return mergeFrom((org.tensorflow.proto.framework.ApiDef.Arg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.ApiDef.Arg other) { + if (other == org.tensorflow.proto.framework.ApiDef.Arg.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRenameTo().isEmpty()) { + renameTo_ = other.renameTo_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.ApiDef.Arg parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.ApiDef.Arg) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * 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; + } + } + /** + * 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; + } + } + /** + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * 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 renameTo_ = ""; + /** + *
+       * Change the name used to access this arg in the API from what
+       * is used in the GraphDef.  Note that these names in `backticks`
+       * will also be replaced in the summary & description fields.
+       * 
+ * + * string rename_to = 2; + */ + public java.lang.String getRenameTo() { + java.lang.Object ref = renameTo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + renameTo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Change the name used to access this arg in the API from what
+       * is used in the GraphDef.  Note that these names in `backticks`
+       * will also be replaced in the summary & description fields.
+       * 
+ * + * string rename_to = 2; + */ + public com.google.protobuf.ByteString + getRenameToBytes() { + java.lang.Object ref = renameTo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + renameTo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Change the name used to access this arg in the API from what
+       * is used in the GraphDef.  Note that these names in `backticks`
+       * will also be replaced in the summary & description fields.
+       * 
+ * + * string rename_to = 2; + */ + public Builder setRenameTo( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + renameTo_ = value; + onChanged(); + return this; + } + /** + *
+       * Change the name used to access this arg in the API from what
+       * is used in the GraphDef.  Note that these names in `backticks`
+       * will also be replaced in the summary & description fields.
+       * 
+ * + * string rename_to = 2; + */ + public Builder clearRenameTo() { + + renameTo_ = getDefaultInstance().getRenameTo(); + onChanged(); + return this; + } + /** + *
+       * Change the name used to access this arg in the API from what
+       * is used in the GraphDef.  Note that these names in `backticks`
+       * will also be replaced in the summary & description fields.
+       * 
+ * + * string rename_to = 2; + */ + public Builder setRenameToBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + renameTo_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+       * Note: this will replace any inherited arg doc. There is no
+       * current way of modifying arg descriptions (other than replacing
+       * them entirely) as can be done with op descriptions.
+       * 
+ * + * string description = 3; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Note: this will replace any inherited arg doc. There is no
+       * current way of modifying arg descriptions (other than replacing
+       * them entirely) as can be done with op descriptions.
+       * 
+ * + * string description = 3; + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Note: this will replace any inherited arg doc. There is no
+       * current way of modifying arg descriptions (other than replacing
+       * them entirely) as can be done with op descriptions.
+       * 
+ * + * string description = 3; + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+       * Note: this will replace any inherited arg doc. There is no
+       * current way of modifying arg descriptions (other than replacing
+       * them entirely) as can be done with op descriptions.
+       * 
+ * + * string description = 3; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+       * Note: this will replace any inherited arg doc. There is no
+       * current way of modifying arg descriptions (other than replacing
+       * them entirely) as can be done with op descriptions.
+       * 
+ * + * string description = 3; + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ApiDef.Arg) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ApiDef.Arg) + private static final org.tensorflow.proto.framework.ApiDef.Arg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.ApiDef.Arg(); + } + + public static org.tensorflow.proto.framework.ApiDef.Arg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Arg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Arg(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDef.Arg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AttrOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ApiDef.Attr) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + */ + java.lang.String getName(); + /** + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Change the name used to access this attr in the API from what
+     * is used in the GraphDef.  Note that these names in `backticks`
+     * will also be replaced in the summary & description fields.
+     * 
+ * + * string rename_to = 2; + */ + java.lang.String getRenameTo(); + /** + *
+     * Change the name used to access this attr in the API from what
+     * is used in the GraphDef.  Note that these names in `backticks`
+     * will also be replaced in the summary & description fields.
+     * 
+ * + * string rename_to = 2; + */ + com.google.protobuf.ByteString + getRenameToBytes(); + + /** + *
+     * Specify a new default value to use for this attr.  This default
+     * will be used when creating new graphs, as opposed to the
+     * default in the OpDef, which will be used when interpreting old
+     * GraphDefs.
+     * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + boolean hasDefaultValue(); + /** + *
+     * Specify a new default value to use for this attr.  This default
+     * will be used when creating new graphs, as opposed to the
+     * default in the OpDef, which will be used when interpreting old
+     * GraphDefs.
+     * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + org.tensorflow.proto.framework.AttrValue getDefaultValue(); + /** + *
+     * Specify a new default value to use for this attr.  This default
+     * will be used when creating new graphs, as opposed to the
+     * default in the OpDef, which will be used when interpreting old
+     * GraphDefs.
+     * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + org.tensorflow.proto.framework.AttrValueOrBuilder getDefaultValueOrBuilder(); + + /** + *
+     * Note: this will replace any inherited attr doc, there is no current
+     * way of modifying attr descriptions as can be done with op descriptions.
+     * 
+ * + * string description = 4; + */ + java.lang.String getDescription(); + /** + *
+     * Note: this will replace any inherited attr doc, there is no current
+     * way of modifying attr descriptions as can be done with op descriptions.
+     * 
+ * + * string description = 4; + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + } + /** + *
+   * Description of the graph-construction-time configuration of this
+   * Op.  That is to say, this describes the attr fields that will
+   * be specified in the NodeDef.
+   * 
+ * + * Protobuf type {@code tensorflow.ApiDef.Attr} + */ + public static final class Attr extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ApiDef.Attr) + AttrOrBuilder { + private static final long serialVersionUID = 0L; + // Use Attr.newBuilder() to construct. + private Attr(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Attr() { + name_ = ""; + renameTo_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Attr(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Attr( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + renameTo_ = s; + break; + } + case 26: { + org.tensorflow.proto.framework.AttrValue.Builder subBuilder = null; + if (defaultValue_ != null) { + subBuilder = defaultValue_.toBuilder(); + } + defaultValue_ = input.readMessage(org.tensorflow.proto.framework.AttrValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(defaultValue_); + defaultValue_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_Attr_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_Attr_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ApiDef.Attr.class, org.tensorflow.proto.framework.ApiDef.Attr.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * 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; + } + } + /** + * 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 RENAME_TO_FIELD_NUMBER = 2; + private volatile java.lang.Object renameTo_; + /** + *
+     * Change the name used to access this attr in the API from what
+     * is used in the GraphDef.  Note that these names in `backticks`
+     * will also be replaced in the summary & description fields.
+     * 
+ * + * string rename_to = 2; + */ + public java.lang.String getRenameTo() { + java.lang.Object ref = renameTo_; + 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(); + renameTo_ = s; + return s; + } + } + /** + *
+     * Change the name used to access this attr in the API from what
+     * is used in the GraphDef.  Note that these names in `backticks`
+     * will also be replaced in the summary & description fields.
+     * 
+ * + * string rename_to = 2; + */ + public com.google.protobuf.ByteString + getRenameToBytes() { + java.lang.Object ref = renameTo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + renameTo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_VALUE_FIELD_NUMBER = 3; + private org.tensorflow.proto.framework.AttrValue defaultValue_; + /** + *
+     * Specify a new default value to use for this attr.  This default
+     * will be used when creating new graphs, as opposed to the
+     * default in the OpDef, which will be used when interpreting old
+     * GraphDefs.
+     * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public boolean hasDefaultValue() { + return defaultValue_ != null; + } + /** + *
+     * Specify a new default value to use for this attr.  This default
+     * will be used when creating new graphs, as opposed to the
+     * default in the OpDef, which will be used when interpreting old
+     * GraphDefs.
+     * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public org.tensorflow.proto.framework.AttrValue getDefaultValue() { + return defaultValue_ == null ? org.tensorflow.proto.framework.AttrValue.getDefaultInstance() : defaultValue_; + } + /** + *
+     * Specify a new default value to use for this attr.  This default
+     * will be used when creating new graphs, as opposed to the
+     * default in the OpDef, which will be used when interpreting old
+     * GraphDefs.
+     * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public org.tensorflow.proto.framework.AttrValueOrBuilder getDefaultValueOrBuilder() { + return getDefaultValue(); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + private volatile java.lang.Object description_; + /** + *
+     * Note: this will replace any inherited attr doc, there is no current
+     * way of modifying attr descriptions as can be done with op descriptions.
+     * 
+ * + * string description = 4; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+     * Note: this will replace any inherited attr doc, there is no current
+     * way of modifying attr descriptions as can be done with op descriptions.
+     * 
+ * + * string description = 4; + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getRenameToBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, renameTo_); + } + if (defaultValue_ != null) { + output.writeMessage(3, getDefaultValue()); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getRenameToBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, renameTo_); + } + if (defaultValue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getDefaultValue()); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.ApiDef.Attr)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.ApiDef.Attr other = (org.tensorflow.proto.framework.ApiDef.Attr) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getRenameTo() + .equals(other.getRenameTo())) return false; + if (hasDefaultValue() != other.hasDefaultValue()) return false; + if (hasDefaultValue()) { + if (!getDefaultValue() + .equals(other.getDefaultValue())) return false; + } + if (!getDescription() + .equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + RENAME_TO_FIELD_NUMBER; + hash = (53 * hash) + getRenameTo().hashCode(); + if (hasDefaultValue()) { + hash = (37 * hash) + DEFAULT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getDefaultValue().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.ApiDef.Attr parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ApiDef.Attr parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDef.Attr parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ApiDef.Attr 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.proto.framework.ApiDef.Attr parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ApiDef.Attr parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDef.Attr parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ApiDef.Attr parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDef.Attr parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ApiDef.Attr parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDef.Attr parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ApiDef.Attr parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.ApiDef.Attr prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Description of the graph-construction-time configuration of this
+     * Op.  That is to say, this describes the attr fields that will
+     * be specified in the NodeDef.
+     * 
+ * + * Protobuf type {@code tensorflow.ApiDef.Attr} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ApiDef.Attr) + org.tensorflow.proto.framework.ApiDef.AttrOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_Attr_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_Attr_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ApiDef.Attr.class, org.tensorflow.proto.framework.ApiDef.Attr.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.ApiDef.Attr.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + renameTo_ = ""; + + if (defaultValueBuilder_ == null) { + defaultValue_ = null; + } else { + defaultValue_ = null; + defaultValueBuilder_ = null; + } + description_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_Attr_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDef.Attr getDefaultInstanceForType() { + return org.tensorflow.proto.framework.ApiDef.Attr.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDef.Attr build() { + org.tensorflow.proto.framework.ApiDef.Attr result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDef.Attr buildPartial() { + org.tensorflow.proto.framework.ApiDef.Attr result = new org.tensorflow.proto.framework.ApiDef.Attr(this); + result.name_ = name_; + result.renameTo_ = renameTo_; + if (defaultValueBuilder_ == null) { + result.defaultValue_ = defaultValue_; + } else { + result.defaultValue_ = defaultValueBuilder_.build(); + } + result.description_ = description_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.ApiDef.Attr) { + return mergeFrom((org.tensorflow.proto.framework.ApiDef.Attr)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.ApiDef.Attr other) { + if (other == org.tensorflow.proto.framework.ApiDef.Attr.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRenameTo().isEmpty()) { + renameTo_ = other.renameTo_; + onChanged(); + } + if (other.hasDefaultValue()) { + mergeDefaultValue(other.getDefaultValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.ApiDef.Attr parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.ApiDef.Attr) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * 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; + } + } + /** + * 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; + } + } + /** + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * 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 renameTo_ = ""; + /** + *
+       * Change the name used to access this attr in the API from what
+       * is used in the GraphDef.  Note that these names in `backticks`
+       * will also be replaced in the summary & description fields.
+       * 
+ * + * string rename_to = 2; + */ + public java.lang.String getRenameTo() { + java.lang.Object ref = renameTo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + renameTo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Change the name used to access this attr in the API from what
+       * is used in the GraphDef.  Note that these names in `backticks`
+       * will also be replaced in the summary & description fields.
+       * 
+ * + * string rename_to = 2; + */ + public com.google.protobuf.ByteString + getRenameToBytes() { + java.lang.Object ref = renameTo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + renameTo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Change the name used to access this attr in the API from what
+       * is used in the GraphDef.  Note that these names in `backticks`
+       * will also be replaced in the summary & description fields.
+       * 
+ * + * string rename_to = 2; + */ + public Builder setRenameTo( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + renameTo_ = value; + onChanged(); + return this; + } + /** + *
+       * Change the name used to access this attr in the API from what
+       * is used in the GraphDef.  Note that these names in `backticks`
+       * will also be replaced in the summary & description fields.
+       * 
+ * + * string rename_to = 2; + */ + public Builder clearRenameTo() { + + renameTo_ = getDefaultInstance().getRenameTo(); + onChanged(); + return this; + } + /** + *
+       * Change the name used to access this attr in the API from what
+       * is used in the GraphDef.  Note that these names in `backticks`
+       * will also be replaced in the summary & description fields.
+       * 
+ * + * string rename_to = 2; + */ + public Builder setRenameToBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + renameTo_ = value; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.AttrValue defaultValue_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AttrValue, org.tensorflow.proto.framework.AttrValue.Builder, org.tensorflow.proto.framework.AttrValueOrBuilder> defaultValueBuilder_; + /** + *
+       * Specify a new default value to use for this attr.  This default
+       * will be used when creating new graphs, as opposed to the
+       * default in the OpDef, which will be used when interpreting old
+       * GraphDefs.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public boolean hasDefaultValue() { + return defaultValueBuilder_ != null || defaultValue_ != null; + } + /** + *
+       * Specify a new default value to use for this attr.  This default
+       * will be used when creating new graphs, as opposed to the
+       * default in the OpDef, which will be used when interpreting old
+       * GraphDefs.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public org.tensorflow.proto.framework.AttrValue getDefaultValue() { + if (defaultValueBuilder_ == null) { + return defaultValue_ == null ? org.tensorflow.proto.framework.AttrValue.getDefaultInstance() : defaultValue_; + } else { + return defaultValueBuilder_.getMessage(); + } + } + /** + *
+       * Specify a new default value to use for this attr.  This default
+       * will be used when creating new graphs, as opposed to the
+       * default in the OpDef, which will be used when interpreting old
+       * GraphDefs.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public Builder setDefaultValue(org.tensorflow.proto.framework.AttrValue value) { + if (defaultValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + defaultValue_ = value; + onChanged(); + } else { + defaultValueBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Specify a new default value to use for this attr.  This default
+       * will be used when creating new graphs, as opposed to the
+       * default in the OpDef, which will be used when interpreting old
+       * GraphDefs.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public Builder setDefaultValue( + org.tensorflow.proto.framework.AttrValue.Builder builderForValue) { + if (defaultValueBuilder_ == null) { + defaultValue_ = builderForValue.build(); + onChanged(); + } else { + defaultValueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Specify a new default value to use for this attr.  This default
+       * will be used when creating new graphs, as opposed to the
+       * default in the OpDef, which will be used when interpreting old
+       * GraphDefs.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public Builder mergeDefaultValue(org.tensorflow.proto.framework.AttrValue value) { + if (defaultValueBuilder_ == null) { + if (defaultValue_ != null) { + defaultValue_ = + org.tensorflow.proto.framework.AttrValue.newBuilder(defaultValue_).mergeFrom(value).buildPartial(); + } else { + defaultValue_ = value; + } + onChanged(); + } else { + defaultValueBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Specify a new default value to use for this attr.  This default
+       * will be used when creating new graphs, as opposed to the
+       * default in the OpDef, which will be used when interpreting old
+       * GraphDefs.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public Builder clearDefaultValue() { + if (defaultValueBuilder_ == null) { + defaultValue_ = null; + onChanged(); + } else { + defaultValue_ = null; + defaultValueBuilder_ = null; + } + + return this; + } + /** + *
+       * Specify a new default value to use for this attr.  This default
+       * will be used when creating new graphs, as opposed to the
+       * default in the OpDef, which will be used when interpreting old
+       * GraphDefs.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public org.tensorflow.proto.framework.AttrValue.Builder getDefaultValueBuilder() { + + onChanged(); + return getDefaultValueFieldBuilder().getBuilder(); + } + /** + *
+       * Specify a new default value to use for this attr.  This default
+       * will be used when creating new graphs, as opposed to the
+       * default in the OpDef, which will be used when interpreting old
+       * GraphDefs.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public org.tensorflow.proto.framework.AttrValueOrBuilder getDefaultValueOrBuilder() { + if (defaultValueBuilder_ != null) { + return defaultValueBuilder_.getMessageOrBuilder(); + } else { + return defaultValue_ == null ? + org.tensorflow.proto.framework.AttrValue.getDefaultInstance() : defaultValue_; + } + } + /** + *
+       * Specify a new default value to use for this attr.  This default
+       * will be used when creating new graphs, as opposed to the
+       * default in the OpDef, which will be used when interpreting old
+       * GraphDefs.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AttrValue, org.tensorflow.proto.framework.AttrValue.Builder, org.tensorflow.proto.framework.AttrValueOrBuilder> + getDefaultValueFieldBuilder() { + if (defaultValueBuilder_ == null) { + defaultValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AttrValue, org.tensorflow.proto.framework.AttrValue.Builder, org.tensorflow.proto.framework.AttrValueOrBuilder>( + getDefaultValue(), + getParentForChildren(), + isClean()); + defaultValue_ = null; + } + return defaultValueBuilder_; + } + + private java.lang.Object description_ = ""; + /** + *
+       * Note: this will replace any inherited attr doc, there is no current
+       * way of modifying attr descriptions as can be done with op descriptions.
+       * 
+ * + * string description = 4; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Note: this will replace any inherited attr doc, there is no current
+       * way of modifying attr descriptions as can be done with op descriptions.
+       * 
+ * + * string description = 4; + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Note: this will replace any inherited attr doc, there is no current
+       * way of modifying attr descriptions as can be done with op descriptions.
+       * 
+ * + * string description = 4; + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+       * Note: this will replace any inherited attr doc, there is no current
+       * way of modifying attr descriptions as can be done with op descriptions.
+       * 
+ * + * string description = 4; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+       * Note: this will replace any inherited attr doc, there is no current
+       * way of modifying attr descriptions as can be done with op descriptions.
+       * 
+ * + * string description = 4; + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ApiDef.Attr) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ApiDef.Attr) + private static final org.tensorflow.proto.framework.ApiDef.Attr DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.ApiDef.Attr(); + } + + public static org.tensorflow.proto.framework.ApiDef.Attr getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Attr parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Attr(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDef.Attr getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int GRAPH_OP_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object graphOpName_; + /** + *
+   * Name of the op (in the OpDef) to specify the API for.
+   * 
+ * + * string graph_op_name = 1; + */ + public java.lang.String getGraphOpName() { + java.lang.Object ref = graphOpName_; + 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(); + graphOpName_ = s; + return s; + } + } + /** + *
+   * Name of the op (in the OpDef) to specify the API for.
+   * 
+ * + * string graph_op_name = 1; + */ + public com.google.protobuf.ByteString + getGraphOpNameBytes() { + java.lang.Object ref = graphOpName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + graphOpName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPRECATION_MESSAGE_FIELD_NUMBER = 12; + private volatile java.lang.Object deprecationMessage_; + /** + *
+   * If this op is deprecated, set deprecation message to the message
+   * that should be logged when this op is used.
+   * The message should indicate alternative op to use, if any.
+   * 
+ * + * string deprecation_message = 12; + */ + public java.lang.String getDeprecationMessage() { + java.lang.Object ref = deprecationMessage_; + 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(); + deprecationMessage_ = s; + return s; + } + } + /** + *
+   * If this op is deprecated, set deprecation message to the message
+   * that should be logged when this op is used.
+   * The message should indicate alternative op to use, if any.
+   * 
+ * + * string deprecation_message = 12; + */ + public com.google.protobuf.ByteString + getDeprecationMessageBytes() { + java.lang.Object ref = deprecationMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deprecationMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPRECATION_VERSION_FIELD_NUMBER = 13; + private int deprecationVersion_; + /** + *
+   * Major version when the op will be deleted. For e.g. set this
+   * value to 2 if op API should be removed in TensorFlow 2.0 and
+   * deprecated in versions before that.
+   * 
+ * + * int32 deprecation_version = 13; + */ + public int getDeprecationVersion() { + return deprecationVersion_; + } + + public static final int VISIBILITY_FIELD_NUMBER = 2; + private int visibility_; + /** + * .tensorflow.ApiDef.Visibility visibility = 2; + */ + public int getVisibilityValue() { + return visibility_; + } + /** + * .tensorflow.ApiDef.Visibility visibility = 2; + */ + public org.tensorflow.proto.framework.ApiDef.Visibility getVisibility() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.ApiDef.Visibility result = org.tensorflow.proto.framework.ApiDef.Visibility.valueOf(visibility_); + return result == null ? org.tensorflow.proto.framework.ApiDef.Visibility.UNRECOGNIZED : result; + } + + public static final int ENDPOINT_FIELD_NUMBER = 3; + private java.util.List endpoint_; + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public java.util.List getEndpointList() { + return endpoint_; + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public java.util.List + getEndpointOrBuilderList() { + return endpoint_; + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public int getEndpointCount() { + return endpoint_.size(); + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public org.tensorflow.proto.framework.ApiDef.Endpoint getEndpoint(int index) { + return endpoint_.get(index); + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public org.tensorflow.proto.framework.ApiDef.EndpointOrBuilder getEndpointOrBuilder( + int index) { + return endpoint_.get(index); + } + + public static final int IN_ARG_FIELD_NUMBER = 4; + private java.util.List inArg_; + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public java.util.List getInArgList() { + return inArg_; + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public java.util.List + getInArgOrBuilderList() { + return inArg_; + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public int getInArgCount() { + return inArg_.size(); + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public org.tensorflow.proto.framework.ApiDef.Arg getInArg(int index) { + return inArg_.get(index); + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public org.tensorflow.proto.framework.ApiDef.ArgOrBuilder getInArgOrBuilder( + int index) { + return inArg_.get(index); + } + + public static final int OUT_ARG_FIELD_NUMBER = 5; + private java.util.List outArg_; + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public java.util.List getOutArgList() { + return outArg_; + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public java.util.List + getOutArgOrBuilderList() { + return outArg_; + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public int getOutArgCount() { + return outArg_.size(); + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public org.tensorflow.proto.framework.ApiDef.Arg getOutArg(int index) { + return outArg_.get(index); + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public org.tensorflow.proto.framework.ApiDef.ArgOrBuilder getOutArgOrBuilder( + int index) { + return outArg_.get(index); + } + + public static final int ARG_ORDER_FIELD_NUMBER = 11; + private com.google.protobuf.LazyStringList argOrder_; + /** + *
+   * List of original in_arg names to specify new argument order.
+   * Length of arg_order should be either empty to keep current order
+   * or match size of in_arg.
+   * 
+ * + * repeated string arg_order = 11; + */ + public com.google.protobuf.ProtocolStringList + getArgOrderList() { + return argOrder_; + } + /** + *
+   * List of original in_arg names to specify new argument order.
+   * Length of arg_order should be either empty to keep current order
+   * or match size of in_arg.
+   * 
+ * + * repeated string arg_order = 11; + */ + public int getArgOrderCount() { + return argOrder_.size(); + } + /** + *
+   * List of original in_arg names to specify new argument order.
+   * Length of arg_order should be either empty to keep current order
+   * or match size of in_arg.
+   * 
+ * + * repeated string arg_order = 11; + */ + public java.lang.String getArgOrder(int index) { + return argOrder_.get(index); + } + /** + *
+   * List of original in_arg names to specify new argument order.
+   * Length of arg_order should be either empty to keep current order
+   * or match size of in_arg.
+   * 
+ * + * repeated string arg_order = 11; + */ + public com.google.protobuf.ByteString + getArgOrderBytes(int index) { + return argOrder_.getByteString(index); + } + + public static final int ATTR_FIELD_NUMBER = 6; + private java.util.List attr_; + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public java.util.List getAttrList() { + return attr_; + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public java.util.List + getAttrOrBuilderList() { + return attr_; + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public int getAttrCount() { + return attr_.size(); + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public org.tensorflow.proto.framework.ApiDef.Attr getAttr(int index) { + return attr_.get(index); + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public org.tensorflow.proto.framework.ApiDef.AttrOrBuilder getAttrOrBuilder( + int index) { + return attr_.get(index); + } + + public static final int SUMMARY_FIELD_NUMBER = 7; + private volatile java.lang.Object summary_; + /** + *
+   * One-line human-readable description of what the Op does.
+   * 
+ * + * string summary = 7; + */ + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summary_ = s; + return s; + } + } + /** + *
+   * One-line human-readable description of what the Op does.
+   * 
+ * + * string summary = 7; + */ + public com.google.protobuf.ByteString + getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 8; + private volatile java.lang.Object description_; + /** + *
+   * Additional, longer human-readable description of what the Op does.
+   * 
+ * + * string description = 8; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * Additional, longer human-readable description of what the Op does.
+   * 
+ * + * string description = 8; + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_PREFIX_FIELD_NUMBER = 9; + private volatile java.lang.Object descriptionPrefix_; + /** + *
+   * Modify an existing/inherited description by adding text to the beginning
+   * or end.
+   * 
+ * + * string description_prefix = 9; + */ + public java.lang.String getDescriptionPrefix() { + java.lang.Object ref = descriptionPrefix_; + 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(); + descriptionPrefix_ = s; + return s; + } + } + /** + *
+   * Modify an existing/inherited description by adding text to the beginning
+   * or end.
+   * 
+ * + * string description_prefix = 9; + */ + public com.google.protobuf.ByteString + getDescriptionPrefixBytes() { + java.lang.Object ref = descriptionPrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + descriptionPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_SUFFIX_FIELD_NUMBER = 10; + private volatile java.lang.Object descriptionSuffix_; + /** + * string description_suffix = 10; + */ + public java.lang.String getDescriptionSuffix() { + java.lang.Object ref = descriptionSuffix_; + 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(); + descriptionSuffix_ = s; + return s; + } + } + /** + * string description_suffix = 10; + */ + public com.google.protobuf.ByteString + getDescriptionSuffixBytes() { + java.lang.Object ref = descriptionSuffix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + descriptionSuffix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getGraphOpNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, graphOpName_); + } + if (visibility_ != org.tensorflow.proto.framework.ApiDef.Visibility.DEFAULT_VISIBILITY.getNumber()) { + output.writeEnum(2, visibility_); + } + for (int i = 0; i < endpoint_.size(); i++) { + output.writeMessage(3, endpoint_.get(i)); + } + for (int i = 0; i < inArg_.size(); i++) { + output.writeMessage(4, inArg_.get(i)); + } + for (int i = 0; i < outArg_.size(); i++) { + output.writeMessage(5, outArg_.get(i)); + } + for (int i = 0; i < attr_.size(); i++) { + output.writeMessage(6, attr_.get(i)); + } + if (!getSummaryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, summary_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_); + } + if (!getDescriptionPrefixBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, descriptionPrefix_); + } + if (!getDescriptionSuffixBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, descriptionSuffix_); + } + for (int i = 0; i < argOrder_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, argOrder_.getRaw(i)); + } + if (!getDeprecationMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, deprecationMessage_); + } + if (deprecationVersion_ != 0) { + output.writeInt32(13, deprecationVersion_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGraphOpNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, graphOpName_); + } + if (visibility_ != org.tensorflow.proto.framework.ApiDef.Visibility.DEFAULT_VISIBILITY.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, visibility_); + } + for (int i = 0; i < endpoint_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, endpoint_.get(i)); + } + for (int i = 0; i < inArg_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, inArg_.get(i)); + } + for (int i = 0; i < outArg_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, outArg_.get(i)); + } + for (int i = 0; i < attr_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, attr_.get(i)); + } + if (!getSummaryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, summary_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_); + } + if (!getDescriptionPrefixBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, descriptionPrefix_); + } + if (!getDescriptionSuffixBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, descriptionSuffix_); + } + { + int dataSize = 0; + for (int i = 0; i < argOrder_.size(); i++) { + dataSize += computeStringSizeNoTag(argOrder_.getRaw(i)); + } + size += dataSize; + size += 1 * getArgOrderList().size(); + } + if (!getDeprecationMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, deprecationMessage_); + } + if (deprecationVersion_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(13, deprecationVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.ApiDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.ApiDef other = (org.tensorflow.proto.framework.ApiDef) obj; + + if (!getGraphOpName() + .equals(other.getGraphOpName())) return false; + if (!getDeprecationMessage() + .equals(other.getDeprecationMessage())) return false; + if (getDeprecationVersion() + != other.getDeprecationVersion()) return false; + if (visibility_ != other.visibility_) return false; + if (!getEndpointList() + .equals(other.getEndpointList())) return false; + if (!getInArgList() + .equals(other.getInArgList())) return false; + if (!getOutArgList() + .equals(other.getOutArgList())) return false; + if (!getArgOrderList() + .equals(other.getArgOrderList())) return false; + if (!getAttrList() + .equals(other.getAttrList())) return false; + if (!getSummary() + .equals(other.getSummary())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getDescriptionPrefix() + .equals(other.getDescriptionPrefix())) return false; + if (!getDescriptionSuffix() + .equals(other.getDescriptionSuffix())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GRAPH_OP_NAME_FIELD_NUMBER; + hash = (53 * hash) + getGraphOpName().hashCode(); + hash = (37 * hash) + DEPRECATION_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getDeprecationMessage().hashCode(); + hash = (37 * hash) + DEPRECATION_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getDeprecationVersion(); + hash = (37 * hash) + VISIBILITY_FIELD_NUMBER; + hash = (53 * hash) + visibility_; + if (getEndpointCount() > 0) { + hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpointList().hashCode(); + } + if (getInArgCount() > 0) { + hash = (37 * hash) + IN_ARG_FIELD_NUMBER; + hash = (53 * hash) + getInArgList().hashCode(); + } + if (getOutArgCount() > 0) { + hash = (37 * hash) + OUT_ARG_FIELD_NUMBER; + hash = (53 * hash) + getOutArgList().hashCode(); + } + if (getArgOrderCount() > 0) { + hash = (37 * hash) + ARG_ORDER_FIELD_NUMBER; + hash = (53 * hash) + getArgOrderList().hashCode(); + } + if (getAttrCount() > 0) { + hash = (37 * hash) + ATTR_FIELD_NUMBER; + hash = (53 * hash) + getAttrList().hashCode(); + } + hash = (37 * hash) + SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getSummary().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DESCRIPTION_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getDescriptionPrefix().hashCode(); + hash = (37 * hash) + DESCRIPTION_SUFFIX_FIELD_NUMBER; + hash = (53 * hash) + getDescriptionSuffix().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.ApiDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ApiDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ApiDef 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.proto.framework.ApiDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ApiDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ApiDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ApiDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ApiDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.ApiDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Used to specify and override the default API & behavior in the
+   * generated code for client languages, from what you would get from
+   * the OpDef alone. There will be a set of ApiDefs that are common
+   * to all client languages, and another set per client language.
+   * The per-client-language ApiDefs will inherit values from the
+   * common ApiDefs which it can either replace or modify.
+   * We separate the API definition from the OpDef so we can evolve the
+   * API while remaining backwards compatible when interpretting old
+   * graphs.  Overrides go in an "api_def.pbtxt" file with a text-format
+   * ApiDefs message.
+   * WARNING: Be *very* careful changing the API for any existing op --
+   * you can change the semantics of existing code.  These changes may
+   * need to wait until a major release of TensorFlow to avoid breaking
+   * our compatibility promises.
+   * 
+ * + * Protobuf type {@code tensorflow.ApiDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ApiDef) + org.tensorflow.proto.framework.ApiDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ApiDef.class, org.tensorflow.proto.framework.ApiDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.ApiDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getEndpointFieldBuilder(); + getInArgFieldBuilder(); + getOutArgFieldBuilder(); + getAttrFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + graphOpName_ = ""; + + deprecationMessage_ = ""; + + deprecationVersion_ = 0; + + visibility_ = 0; + + if (endpointBuilder_ == null) { + endpoint_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + endpointBuilder_.clear(); + } + if (inArgBuilder_ == null) { + inArg_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + inArgBuilder_.clear(); + } + if (outArgBuilder_ == null) { + outArg_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + outArgBuilder_.clear(); + } + argOrder_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + if (attrBuilder_ == null) { + attr_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + attrBuilder_.clear(); + } + summary_ = ""; + + description_ = ""; + + descriptionPrefix_ = ""; + + descriptionSuffix_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.ApiDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDef build() { + org.tensorflow.proto.framework.ApiDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDef buildPartial() { + org.tensorflow.proto.framework.ApiDef result = new org.tensorflow.proto.framework.ApiDef(this); + int from_bitField0_ = bitField0_; + result.graphOpName_ = graphOpName_; + result.deprecationMessage_ = deprecationMessage_; + result.deprecationVersion_ = deprecationVersion_; + result.visibility_ = visibility_; + if (endpointBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + endpoint_ = java.util.Collections.unmodifiableList(endpoint_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.endpoint_ = endpoint_; + } else { + result.endpoint_ = endpointBuilder_.build(); + } + if (inArgBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + inArg_ = java.util.Collections.unmodifiableList(inArg_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.inArg_ = inArg_; + } else { + result.inArg_ = inArgBuilder_.build(); + } + if (outArgBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + outArg_ = java.util.Collections.unmodifiableList(outArg_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.outArg_ = outArg_; + } else { + result.outArg_ = outArgBuilder_.build(); + } + if (((bitField0_ & 0x00000008) != 0)) { + argOrder_ = argOrder_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.argOrder_ = argOrder_; + if (attrBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + attr_ = java.util.Collections.unmodifiableList(attr_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.attr_ = attr_; + } else { + result.attr_ = attrBuilder_.build(); + } + result.summary_ = summary_; + result.description_ = description_; + result.descriptionPrefix_ = descriptionPrefix_; + result.descriptionSuffix_ = descriptionSuffix_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.ApiDef) { + return mergeFrom((org.tensorflow.proto.framework.ApiDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.ApiDef other) { + if (other == org.tensorflow.proto.framework.ApiDef.getDefaultInstance()) return this; + if (!other.getGraphOpName().isEmpty()) { + graphOpName_ = other.graphOpName_; + onChanged(); + } + if (!other.getDeprecationMessage().isEmpty()) { + deprecationMessage_ = other.deprecationMessage_; + onChanged(); + } + if (other.getDeprecationVersion() != 0) { + setDeprecationVersion(other.getDeprecationVersion()); + } + if (other.visibility_ != 0) { + setVisibilityValue(other.getVisibilityValue()); + } + if (endpointBuilder_ == null) { + if (!other.endpoint_.isEmpty()) { + if (endpoint_.isEmpty()) { + endpoint_ = other.endpoint_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEndpointIsMutable(); + endpoint_.addAll(other.endpoint_); + } + onChanged(); + } + } else { + if (!other.endpoint_.isEmpty()) { + if (endpointBuilder_.isEmpty()) { + endpointBuilder_.dispose(); + endpointBuilder_ = null; + endpoint_ = other.endpoint_; + bitField0_ = (bitField0_ & ~0x00000001); + endpointBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getEndpointFieldBuilder() : null; + } else { + endpointBuilder_.addAllMessages(other.endpoint_); + } + } + } + if (inArgBuilder_ == null) { + if (!other.inArg_.isEmpty()) { + if (inArg_.isEmpty()) { + inArg_ = other.inArg_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureInArgIsMutable(); + inArg_.addAll(other.inArg_); + } + onChanged(); + } + } else { + if (!other.inArg_.isEmpty()) { + if (inArgBuilder_.isEmpty()) { + inArgBuilder_.dispose(); + inArgBuilder_ = null; + inArg_ = other.inArg_; + bitField0_ = (bitField0_ & ~0x00000002); + inArgBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getInArgFieldBuilder() : null; + } else { + inArgBuilder_.addAllMessages(other.inArg_); + } + } + } + if (outArgBuilder_ == null) { + if (!other.outArg_.isEmpty()) { + if (outArg_.isEmpty()) { + outArg_ = other.outArg_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureOutArgIsMutable(); + outArg_.addAll(other.outArg_); + } + onChanged(); + } + } else { + if (!other.outArg_.isEmpty()) { + if (outArgBuilder_.isEmpty()) { + outArgBuilder_.dispose(); + outArgBuilder_ = null; + outArg_ = other.outArg_; + bitField0_ = (bitField0_ & ~0x00000004); + outArgBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOutArgFieldBuilder() : null; + } else { + outArgBuilder_.addAllMessages(other.outArg_); + } + } + } + if (!other.argOrder_.isEmpty()) { + if (argOrder_.isEmpty()) { + argOrder_ = other.argOrder_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureArgOrderIsMutable(); + argOrder_.addAll(other.argOrder_); + } + onChanged(); + } + if (attrBuilder_ == null) { + if (!other.attr_.isEmpty()) { + if (attr_.isEmpty()) { + attr_ = other.attr_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureAttrIsMutable(); + attr_.addAll(other.attr_); + } + onChanged(); + } + } else { + if (!other.attr_.isEmpty()) { + if (attrBuilder_.isEmpty()) { + attrBuilder_.dispose(); + attrBuilder_ = null; + attr_ = other.attr_; + bitField0_ = (bitField0_ & ~0x00000010); + attrBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAttrFieldBuilder() : null; + } else { + attrBuilder_.addAllMessages(other.attr_); + } + } + } + if (!other.getSummary().isEmpty()) { + summary_ = other.summary_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getDescriptionPrefix().isEmpty()) { + descriptionPrefix_ = other.descriptionPrefix_; + onChanged(); + } + if (!other.getDescriptionSuffix().isEmpty()) { + descriptionSuffix_ = other.descriptionSuffix_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.ApiDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.ApiDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object graphOpName_ = ""; + /** + *
+     * Name of the op (in the OpDef) to specify the API for.
+     * 
+ * + * string graph_op_name = 1; + */ + public java.lang.String getGraphOpName() { + java.lang.Object ref = graphOpName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + graphOpName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the op (in the OpDef) to specify the API for.
+     * 
+ * + * string graph_op_name = 1; + */ + public com.google.protobuf.ByteString + getGraphOpNameBytes() { + java.lang.Object ref = graphOpName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + graphOpName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the op (in the OpDef) to specify the API for.
+     * 
+ * + * string graph_op_name = 1; + */ + public Builder setGraphOpName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + graphOpName_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the op (in the OpDef) to specify the API for.
+     * 
+ * + * string graph_op_name = 1; + */ + public Builder clearGraphOpName() { + + graphOpName_ = getDefaultInstance().getGraphOpName(); + onChanged(); + return this; + } + /** + *
+     * Name of the op (in the OpDef) to specify the API for.
+     * 
+ * + * string graph_op_name = 1; + */ + public Builder setGraphOpNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + graphOpName_ = value; + onChanged(); + return this; + } + + private java.lang.Object deprecationMessage_ = ""; + /** + *
+     * If this op is deprecated, set deprecation message to the message
+     * that should be logged when this op is used.
+     * The message should indicate alternative op to use, if any.
+     * 
+ * + * string deprecation_message = 12; + */ + public java.lang.String getDeprecationMessage() { + java.lang.Object ref = deprecationMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deprecationMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * If this op is deprecated, set deprecation message to the message
+     * that should be logged when this op is used.
+     * The message should indicate alternative op to use, if any.
+     * 
+ * + * string deprecation_message = 12; + */ + public com.google.protobuf.ByteString + getDeprecationMessageBytes() { + java.lang.Object ref = deprecationMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deprecationMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * If this op is deprecated, set deprecation message to the message
+     * that should be logged when this op is used.
+     * The message should indicate alternative op to use, if any.
+     * 
+ * + * string deprecation_message = 12; + */ + public Builder setDeprecationMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deprecationMessage_ = value; + onChanged(); + return this; + } + /** + *
+     * If this op is deprecated, set deprecation message to the message
+     * that should be logged when this op is used.
+     * The message should indicate alternative op to use, if any.
+     * 
+ * + * string deprecation_message = 12; + */ + public Builder clearDeprecationMessage() { + + deprecationMessage_ = getDefaultInstance().getDeprecationMessage(); + onChanged(); + return this; + } + /** + *
+     * If this op is deprecated, set deprecation message to the message
+     * that should be logged when this op is used.
+     * The message should indicate alternative op to use, if any.
+     * 
+ * + * string deprecation_message = 12; + */ + public Builder setDeprecationMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deprecationMessage_ = value; + onChanged(); + return this; + } + + private int deprecationVersion_ ; + /** + *
+     * Major version when the op will be deleted. For e.g. set this
+     * value to 2 if op API should be removed in TensorFlow 2.0 and
+     * deprecated in versions before that.
+     * 
+ * + * int32 deprecation_version = 13; + */ + public int getDeprecationVersion() { + return deprecationVersion_; + } + /** + *
+     * Major version when the op will be deleted. For e.g. set this
+     * value to 2 if op API should be removed in TensorFlow 2.0 and
+     * deprecated in versions before that.
+     * 
+ * + * int32 deprecation_version = 13; + */ + public Builder setDeprecationVersion(int value) { + + deprecationVersion_ = value; + onChanged(); + return this; + } + /** + *
+     * Major version when the op will be deleted. For e.g. set this
+     * value to 2 if op API should be removed in TensorFlow 2.0 and
+     * deprecated in versions before that.
+     * 
+ * + * int32 deprecation_version = 13; + */ + public Builder clearDeprecationVersion() { + + deprecationVersion_ = 0; + onChanged(); + return this; + } + + private int visibility_ = 0; + /** + * .tensorflow.ApiDef.Visibility visibility = 2; + */ + public int getVisibilityValue() { + return visibility_; + } + /** + * .tensorflow.ApiDef.Visibility visibility = 2; + */ + public Builder setVisibilityValue(int value) { + visibility_ = value; + onChanged(); + return this; + } + /** + * .tensorflow.ApiDef.Visibility visibility = 2; + */ + public org.tensorflow.proto.framework.ApiDef.Visibility getVisibility() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.ApiDef.Visibility result = org.tensorflow.proto.framework.ApiDef.Visibility.valueOf(visibility_); + return result == null ? org.tensorflow.proto.framework.ApiDef.Visibility.UNRECOGNIZED : result; + } + /** + * .tensorflow.ApiDef.Visibility visibility = 2; + */ + public Builder setVisibility(org.tensorflow.proto.framework.ApiDef.Visibility value) { + if (value == null) { + throw new NullPointerException(); + } + + visibility_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .tensorflow.ApiDef.Visibility visibility = 2; + */ + public Builder clearVisibility() { + + visibility_ = 0; + onChanged(); + return this; + } + + private java.util.List endpoint_ = + java.util.Collections.emptyList(); + private void ensureEndpointIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + endpoint_ = new java.util.ArrayList(endpoint_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ApiDef.Endpoint, org.tensorflow.proto.framework.ApiDef.Endpoint.Builder, org.tensorflow.proto.framework.ApiDef.EndpointOrBuilder> endpointBuilder_; + + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public java.util.List getEndpointList() { + if (endpointBuilder_ == null) { + return java.util.Collections.unmodifiableList(endpoint_); + } else { + return endpointBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public int getEndpointCount() { + if (endpointBuilder_ == null) { + return endpoint_.size(); + } else { + return endpointBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public org.tensorflow.proto.framework.ApiDef.Endpoint getEndpoint(int index) { + if (endpointBuilder_ == null) { + return endpoint_.get(index); + } else { + return endpointBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public Builder setEndpoint( + int index, org.tensorflow.proto.framework.ApiDef.Endpoint value) { + if (endpointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointIsMutable(); + endpoint_.set(index, value); + onChanged(); + } else { + endpointBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public Builder setEndpoint( + int index, org.tensorflow.proto.framework.ApiDef.Endpoint.Builder builderForValue) { + if (endpointBuilder_ == null) { + ensureEndpointIsMutable(); + endpoint_.set(index, builderForValue.build()); + onChanged(); + } else { + endpointBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public Builder addEndpoint(org.tensorflow.proto.framework.ApiDef.Endpoint value) { + if (endpointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointIsMutable(); + endpoint_.add(value); + onChanged(); + } else { + endpointBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public Builder addEndpoint( + int index, org.tensorflow.proto.framework.ApiDef.Endpoint value) { + if (endpointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointIsMutable(); + endpoint_.add(index, value); + onChanged(); + } else { + endpointBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public Builder addEndpoint( + org.tensorflow.proto.framework.ApiDef.Endpoint.Builder builderForValue) { + if (endpointBuilder_ == null) { + ensureEndpointIsMutable(); + endpoint_.add(builderForValue.build()); + onChanged(); + } else { + endpointBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public Builder addEndpoint( + int index, org.tensorflow.proto.framework.ApiDef.Endpoint.Builder builderForValue) { + if (endpointBuilder_ == null) { + ensureEndpointIsMutable(); + endpoint_.add(index, builderForValue.build()); + onChanged(); + } else { + endpointBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public Builder addAllEndpoint( + java.lang.Iterable values) { + if (endpointBuilder_ == null) { + ensureEndpointIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, endpoint_); + onChanged(); + } else { + endpointBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public Builder clearEndpoint() { + if (endpointBuilder_ == null) { + endpoint_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + endpointBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public Builder removeEndpoint(int index) { + if (endpointBuilder_ == null) { + ensureEndpointIsMutable(); + endpoint_.remove(index); + onChanged(); + } else { + endpointBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public org.tensorflow.proto.framework.ApiDef.Endpoint.Builder getEndpointBuilder( + int index) { + return getEndpointFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public org.tensorflow.proto.framework.ApiDef.EndpointOrBuilder getEndpointOrBuilder( + int index) { + if (endpointBuilder_ == null) { + return endpoint_.get(index); } else { + return endpointBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public java.util.List + getEndpointOrBuilderList() { + if (endpointBuilder_ != null) { + return endpointBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(endpoint_); + } + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public org.tensorflow.proto.framework.ApiDef.Endpoint.Builder addEndpointBuilder() { + return getEndpointFieldBuilder().addBuilder( + org.tensorflow.proto.framework.ApiDef.Endpoint.getDefaultInstance()); + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public org.tensorflow.proto.framework.ApiDef.Endpoint.Builder addEndpointBuilder( + int index) { + return getEndpointFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.ApiDef.Endpoint.getDefaultInstance()); + } + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + public java.util.List + getEndpointBuilderList() { + return getEndpointFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ApiDef.Endpoint, org.tensorflow.proto.framework.ApiDef.Endpoint.Builder, org.tensorflow.proto.framework.ApiDef.EndpointOrBuilder> + getEndpointFieldBuilder() { + if (endpointBuilder_ == null) { + endpointBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ApiDef.Endpoint, org.tensorflow.proto.framework.ApiDef.Endpoint.Builder, org.tensorflow.proto.framework.ApiDef.EndpointOrBuilder>( + endpoint_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + endpoint_ = null; + } + return endpointBuilder_; + } + + private java.util.List inArg_ = + java.util.Collections.emptyList(); + private void ensureInArgIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + inArg_ = new java.util.ArrayList(inArg_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ApiDef.Arg, org.tensorflow.proto.framework.ApiDef.Arg.Builder, org.tensorflow.proto.framework.ApiDef.ArgOrBuilder> inArgBuilder_; + + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public java.util.List getInArgList() { + if (inArgBuilder_ == null) { + return java.util.Collections.unmodifiableList(inArg_); + } else { + return inArgBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public int getInArgCount() { + if (inArgBuilder_ == null) { + return inArg_.size(); + } else { + return inArgBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public org.tensorflow.proto.framework.ApiDef.Arg getInArg(int index) { + if (inArgBuilder_ == null) { + return inArg_.get(index); + } else { + return inArgBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public Builder setInArg( + int index, org.tensorflow.proto.framework.ApiDef.Arg value) { + if (inArgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInArgIsMutable(); + inArg_.set(index, value); + onChanged(); + } else { + inArgBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public Builder setInArg( + int index, org.tensorflow.proto.framework.ApiDef.Arg.Builder builderForValue) { + if (inArgBuilder_ == null) { + ensureInArgIsMutable(); + inArg_.set(index, builderForValue.build()); + onChanged(); + } else { + inArgBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public Builder addInArg(org.tensorflow.proto.framework.ApiDef.Arg value) { + if (inArgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInArgIsMutable(); + inArg_.add(value); + onChanged(); + } else { + inArgBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public Builder addInArg( + int index, org.tensorflow.proto.framework.ApiDef.Arg value) { + if (inArgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInArgIsMutable(); + inArg_.add(index, value); + onChanged(); + } else { + inArgBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public Builder addInArg( + org.tensorflow.proto.framework.ApiDef.Arg.Builder builderForValue) { + if (inArgBuilder_ == null) { + ensureInArgIsMutable(); + inArg_.add(builderForValue.build()); + onChanged(); + } else { + inArgBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public Builder addInArg( + int index, org.tensorflow.proto.framework.ApiDef.Arg.Builder builderForValue) { + if (inArgBuilder_ == null) { + ensureInArgIsMutable(); + inArg_.add(index, builderForValue.build()); + onChanged(); + } else { + inArgBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public Builder addAllInArg( + java.lang.Iterable values) { + if (inArgBuilder_ == null) { + ensureInArgIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, inArg_); + onChanged(); + } else { + inArgBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public Builder clearInArg() { + if (inArgBuilder_ == null) { + inArg_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + inArgBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public Builder removeInArg(int index) { + if (inArgBuilder_ == null) { + ensureInArgIsMutable(); + inArg_.remove(index); + onChanged(); + } else { + inArgBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public org.tensorflow.proto.framework.ApiDef.Arg.Builder getInArgBuilder( + int index) { + return getInArgFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public org.tensorflow.proto.framework.ApiDef.ArgOrBuilder getInArgOrBuilder( + int index) { + if (inArgBuilder_ == null) { + return inArg_.get(index); } else { + return inArgBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public java.util.List + getInArgOrBuilderList() { + if (inArgBuilder_ != null) { + return inArgBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inArg_); + } + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public org.tensorflow.proto.framework.ApiDef.Arg.Builder addInArgBuilder() { + return getInArgFieldBuilder().addBuilder( + org.tensorflow.proto.framework.ApiDef.Arg.getDefaultInstance()); + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public org.tensorflow.proto.framework.ApiDef.Arg.Builder addInArgBuilder( + int index) { + return getInArgFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.ApiDef.Arg.getDefaultInstance()); + } + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + public java.util.List + getInArgBuilderList() { + return getInArgFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ApiDef.Arg, org.tensorflow.proto.framework.ApiDef.Arg.Builder, org.tensorflow.proto.framework.ApiDef.ArgOrBuilder> + getInArgFieldBuilder() { + if (inArgBuilder_ == null) { + inArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ApiDef.Arg, org.tensorflow.proto.framework.ApiDef.Arg.Builder, org.tensorflow.proto.framework.ApiDef.ArgOrBuilder>( + inArg_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + inArg_ = null; + } + return inArgBuilder_; + } + + private java.util.List outArg_ = + java.util.Collections.emptyList(); + private void ensureOutArgIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + outArg_ = new java.util.ArrayList(outArg_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ApiDef.Arg, org.tensorflow.proto.framework.ApiDef.Arg.Builder, org.tensorflow.proto.framework.ApiDef.ArgOrBuilder> outArgBuilder_; + + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public java.util.List getOutArgList() { + if (outArgBuilder_ == null) { + return java.util.Collections.unmodifiableList(outArg_); + } else { + return outArgBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public int getOutArgCount() { + if (outArgBuilder_ == null) { + return outArg_.size(); + } else { + return outArgBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public org.tensorflow.proto.framework.ApiDef.Arg getOutArg(int index) { + if (outArgBuilder_ == null) { + return outArg_.get(index); + } else { + return outArgBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public Builder setOutArg( + int index, org.tensorflow.proto.framework.ApiDef.Arg value) { + if (outArgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutArgIsMutable(); + outArg_.set(index, value); + onChanged(); + } else { + outArgBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public Builder setOutArg( + int index, org.tensorflow.proto.framework.ApiDef.Arg.Builder builderForValue) { + if (outArgBuilder_ == null) { + ensureOutArgIsMutable(); + outArg_.set(index, builderForValue.build()); + onChanged(); + } else { + outArgBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public Builder addOutArg(org.tensorflow.proto.framework.ApiDef.Arg value) { + if (outArgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutArgIsMutable(); + outArg_.add(value); + onChanged(); + } else { + outArgBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public Builder addOutArg( + int index, org.tensorflow.proto.framework.ApiDef.Arg value) { + if (outArgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutArgIsMutable(); + outArg_.add(index, value); + onChanged(); + } else { + outArgBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public Builder addOutArg( + org.tensorflow.proto.framework.ApiDef.Arg.Builder builderForValue) { + if (outArgBuilder_ == null) { + ensureOutArgIsMutable(); + outArg_.add(builderForValue.build()); + onChanged(); + } else { + outArgBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public Builder addOutArg( + int index, org.tensorflow.proto.framework.ApiDef.Arg.Builder builderForValue) { + if (outArgBuilder_ == null) { + ensureOutArgIsMutable(); + outArg_.add(index, builderForValue.build()); + onChanged(); + } else { + outArgBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public Builder addAllOutArg( + java.lang.Iterable values) { + if (outArgBuilder_ == null) { + ensureOutArgIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, outArg_); + onChanged(); + } else { + outArgBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public Builder clearOutArg() { + if (outArgBuilder_ == null) { + outArg_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + outArgBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public Builder removeOutArg(int index) { + if (outArgBuilder_ == null) { + ensureOutArgIsMutable(); + outArg_.remove(index); + onChanged(); + } else { + outArgBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public org.tensorflow.proto.framework.ApiDef.Arg.Builder getOutArgBuilder( + int index) { + return getOutArgFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public org.tensorflow.proto.framework.ApiDef.ArgOrBuilder getOutArgOrBuilder( + int index) { + if (outArgBuilder_ == null) { + return outArg_.get(index); } else { + return outArgBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public java.util.List + getOutArgOrBuilderList() { + if (outArgBuilder_ != null) { + return outArgBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(outArg_); + } + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public org.tensorflow.proto.framework.ApiDef.Arg.Builder addOutArgBuilder() { + return getOutArgFieldBuilder().addBuilder( + org.tensorflow.proto.framework.ApiDef.Arg.getDefaultInstance()); + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public org.tensorflow.proto.framework.ApiDef.Arg.Builder addOutArgBuilder( + int index) { + return getOutArgFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.ApiDef.Arg.getDefaultInstance()); + } + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + public java.util.List + getOutArgBuilderList() { + return getOutArgFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ApiDef.Arg, org.tensorflow.proto.framework.ApiDef.Arg.Builder, org.tensorflow.proto.framework.ApiDef.ArgOrBuilder> + getOutArgFieldBuilder() { + if (outArgBuilder_ == null) { + outArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ApiDef.Arg, org.tensorflow.proto.framework.ApiDef.Arg.Builder, org.tensorflow.proto.framework.ApiDef.ArgOrBuilder>( + outArg_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + outArg_ = null; + } + return outArgBuilder_; + } + + private com.google.protobuf.LazyStringList argOrder_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureArgOrderIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + argOrder_ = new com.google.protobuf.LazyStringArrayList(argOrder_); + bitField0_ |= 0x00000008; + } + } + /** + *
+     * List of original in_arg names to specify new argument order.
+     * Length of arg_order should be either empty to keep current order
+     * or match size of in_arg.
+     * 
+ * + * repeated string arg_order = 11; + */ + public com.google.protobuf.ProtocolStringList + getArgOrderList() { + return argOrder_.getUnmodifiableView(); + } + /** + *
+     * List of original in_arg names to specify new argument order.
+     * Length of arg_order should be either empty to keep current order
+     * or match size of in_arg.
+     * 
+ * + * repeated string arg_order = 11; + */ + public int getArgOrderCount() { + return argOrder_.size(); + } + /** + *
+     * List of original in_arg names to specify new argument order.
+     * Length of arg_order should be either empty to keep current order
+     * or match size of in_arg.
+     * 
+ * + * repeated string arg_order = 11; + */ + public java.lang.String getArgOrder(int index) { + return argOrder_.get(index); + } + /** + *
+     * List of original in_arg names to specify new argument order.
+     * Length of arg_order should be either empty to keep current order
+     * or match size of in_arg.
+     * 
+ * + * repeated string arg_order = 11; + */ + public com.google.protobuf.ByteString + getArgOrderBytes(int index) { + return argOrder_.getByteString(index); + } + /** + *
+     * List of original in_arg names to specify new argument order.
+     * Length of arg_order should be either empty to keep current order
+     * or match size of in_arg.
+     * 
+ * + * repeated string arg_order = 11; + */ + public Builder setArgOrder( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgOrderIsMutable(); + argOrder_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * List of original in_arg names to specify new argument order.
+     * Length of arg_order should be either empty to keep current order
+     * or match size of in_arg.
+     * 
+ * + * repeated string arg_order = 11; + */ + public Builder addArgOrder( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgOrderIsMutable(); + argOrder_.add(value); + onChanged(); + return this; + } + /** + *
+     * List of original in_arg names to specify new argument order.
+     * Length of arg_order should be either empty to keep current order
+     * or match size of in_arg.
+     * 
+ * + * repeated string arg_order = 11; + */ + public Builder addAllArgOrder( + java.lang.Iterable values) { + ensureArgOrderIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, argOrder_); + onChanged(); + return this; + } + /** + *
+     * List of original in_arg names to specify new argument order.
+     * Length of arg_order should be either empty to keep current order
+     * or match size of in_arg.
+     * 
+ * + * repeated string arg_order = 11; + */ + public Builder clearArgOrder() { + argOrder_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * List of original in_arg names to specify new argument order.
+     * Length of arg_order should be either empty to keep current order
+     * or match size of in_arg.
+     * 
+ * + * repeated string arg_order = 11; + */ + public Builder addArgOrderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureArgOrderIsMutable(); + argOrder_.add(value); + onChanged(); + return this; + } + + private java.util.List attr_ = + java.util.Collections.emptyList(); + private void ensureAttrIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + attr_ = new java.util.ArrayList(attr_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ApiDef.Attr, org.tensorflow.proto.framework.ApiDef.Attr.Builder, org.tensorflow.proto.framework.ApiDef.AttrOrBuilder> attrBuilder_; + + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public java.util.List getAttrList() { + if (attrBuilder_ == null) { + return java.util.Collections.unmodifiableList(attr_); + } else { + return attrBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public int getAttrCount() { + if (attrBuilder_ == null) { + return attr_.size(); + } else { + return attrBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public org.tensorflow.proto.framework.ApiDef.Attr getAttr(int index) { + if (attrBuilder_ == null) { + return attr_.get(index); + } else { + return attrBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public Builder setAttr( + int index, org.tensorflow.proto.framework.ApiDef.Attr value) { + if (attrBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttrIsMutable(); + attr_.set(index, value); + onChanged(); + } else { + attrBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public Builder setAttr( + int index, org.tensorflow.proto.framework.ApiDef.Attr.Builder builderForValue) { + if (attrBuilder_ == null) { + ensureAttrIsMutable(); + attr_.set(index, builderForValue.build()); + onChanged(); + } else { + attrBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public Builder addAttr(org.tensorflow.proto.framework.ApiDef.Attr value) { + if (attrBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttrIsMutable(); + attr_.add(value); + onChanged(); + } else { + attrBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public Builder addAttr( + int index, org.tensorflow.proto.framework.ApiDef.Attr value) { + if (attrBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttrIsMutable(); + attr_.add(index, value); + onChanged(); + } else { + attrBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public Builder addAttr( + org.tensorflow.proto.framework.ApiDef.Attr.Builder builderForValue) { + if (attrBuilder_ == null) { + ensureAttrIsMutable(); + attr_.add(builderForValue.build()); + onChanged(); + } else { + attrBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public Builder addAttr( + int index, org.tensorflow.proto.framework.ApiDef.Attr.Builder builderForValue) { + if (attrBuilder_ == null) { + ensureAttrIsMutable(); + attr_.add(index, builderForValue.build()); + onChanged(); + } else { + attrBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public Builder addAllAttr( + java.lang.Iterable values) { + if (attrBuilder_ == null) { + ensureAttrIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, attr_); + onChanged(); + } else { + attrBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public Builder clearAttr() { + if (attrBuilder_ == null) { + attr_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + attrBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public Builder removeAttr(int index) { + if (attrBuilder_ == null) { + ensureAttrIsMutable(); + attr_.remove(index); + onChanged(); + } else { + attrBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public org.tensorflow.proto.framework.ApiDef.Attr.Builder getAttrBuilder( + int index) { + return getAttrFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public org.tensorflow.proto.framework.ApiDef.AttrOrBuilder getAttrOrBuilder( + int index) { + if (attrBuilder_ == null) { + return attr_.get(index); } else { + return attrBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public java.util.List + getAttrOrBuilderList() { + if (attrBuilder_ != null) { + return attrBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attr_); + } + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public org.tensorflow.proto.framework.ApiDef.Attr.Builder addAttrBuilder() { + return getAttrFieldBuilder().addBuilder( + org.tensorflow.proto.framework.ApiDef.Attr.getDefaultInstance()); + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public org.tensorflow.proto.framework.ApiDef.Attr.Builder addAttrBuilder( + int index) { + return getAttrFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.ApiDef.Attr.getDefaultInstance()); + } + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + public java.util.List + getAttrBuilderList() { + return getAttrFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ApiDef.Attr, org.tensorflow.proto.framework.ApiDef.Attr.Builder, org.tensorflow.proto.framework.ApiDef.AttrOrBuilder> + getAttrFieldBuilder() { + if (attrBuilder_ == null) { + attrBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ApiDef.Attr, org.tensorflow.proto.framework.ApiDef.Attr.Builder, org.tensorflow.proto.framework.ApiDef.AttrOrBuilder>( + attr_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + attr_ = null; + } + return attrBuilder_; + } + + private java.lang.Object summary_ = ""; + /** + *
+     * One-line human-readable description of what the Op does.
+     * 
+ * + * string summary = 7; + */ + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summary_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * One-line human-readable description of what the Op does.
+     * 
+ * + * string summary = 7; + */ + public com.google.protobuf.ByteString + getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * One-line human-readable description of what the Op does.
+     * 
+ * + * string summary = 7; + */ + public Builder setSummary( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + summary_ = value; + onChanged(); + return this; + } + /** + *
+     * One-line human-readable description of what the Op does.
+     * 
+ * + * string summary = 7; + */ + public Builder clearSummary() { + + summary_ = getDefaultInstance().getSummary(); + onChanged(); + return this; + } + /** + *
+     * One-line human-readable description of what the Op does.
+     * 
+ * + * string summary = 7; + */ + public Builder setSummaryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + summary_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * Additional, longer human-readable description of what the Op does.
+     * 
+ * + * string description = 8; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Additional, longer human-readable description of what the Op does.
+     * 
+ * + * string description = 8; + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Additional, longer human-readable description of what the Op does.
+     * 
+ * + * string description = 8; + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * Additional, longer human-readable description of what the Op does.
+     * 
+ * + * string description = 8; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * Additional, longer human-readable description of what the Op does.
+     * 
+ * + * string description = 8; + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object descriptionPrefix_ = ""; + /** + *
+     * Modify an existing/inherited description by adding text to the beginning
+     * or end.
+     * 
+ * + * string description_prefix = 9; + */ + public java.lang.String getDescriptionPrefix() { + java.lang.Object ref = descriptionPrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + descriptionPrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Modify an existing/inherited description by adding text to the beginning
+     * or end.
+     * 
+ * + * string description_prefix = 9; + */ + public com.google.protobuf.ByteString + getDescriptionPrefixBytes() { + java.lang.Object ref = descriptionPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + descriptionPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Modify an existing/inherited description by adding text to the beginning
+     * or end.
+     * 
+ * + * string description_prefix = 9; + */ + public Builder setDescriptionPrefix( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + descriptionPrefix_ = value; + onChanged(); + return this; + } + /** + *
+     * Modify an existing/inherited description by adding text to the beginning
+     * or end.
+     * 
+ * + * string description_prefix = 9; + */ + public Builder clearDescriptionPrefix() { + + descriptionPrefix_ = getDefaultInstance().getDescriptionPrefix(); + onChanged(); + return this; + } + /** + *
+     * Modify an existing/inherited description by adding text to the beginning
+     * or end.
+     * 
+ * + * string description_prefix = 9; + */ + public Builder setDescriptionPrefixBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + descriptionPrefix_ = value; + onChanged(); + return this; + } + + private java.lang.Object descriptionSuffix_ = ""; + /** + * string description_suffix = 10; + */ + public java.lang.String getDescriptionSuffix() { + java.lang.Object ref = descriptionSuffix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + descriptionSuffix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string description_suffix = 10; + */ + public com.google.protobuf.ByteString + getDescriptionSuffixBytes() { + java.lang.Object ref = descriptionSuffix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + descriptionSuffix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string description_suffix = 10; + */ + public Builder setDescriptionSuffix( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + descriptionSuffix_ = value; + onChanged(); + return this; + } + /** + * string description_suffix = 10; + */ + public Builder clearDescriptionSuffix() { + + descriptionSuffix_ = getDefaultInstance().getDescriptionSuffix(); + onChanged(); + return this; + } + /** + * string description_suffix = 10; + */ + public Builder setDescriptionSuffixBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + descriptionSuffix_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ApiDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ApiDef) + private static final org.tensorflow.proto.framework.ApiDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.ApiDef(); + } + + public static org.tensorflow.proto.framework.ApiDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApiDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ApiDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ApiDefOrBuilder.java new file mode 100644 index 00000000000..1a435d93fdb --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ApiDefOrBuilder.java @@ -0,0 +1,274 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/api_def.proto + +package org.tensorflow.proto.framework; + +public interface ApiDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ApiDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Name of the op (in the OpDef) to specify the API for.
+   * 
+ * + * string graph_op_name = 1; + */ + java.lang.String getGraphOpName(); + /** + *
+   * Name of the op (in the OpDef) to specify the API for.
+   * 
+ * + * string graph_op_name = 1; + */ + com.google.protobuf.ByteString + getGraphOpNameBytes(); + + /** + *
+   * If this op is deprecated, set deprecation message to the message
+   * that should be logged when this op is used.
+   * The message should indicate alternative op to use, if any.
+   * 
+ * + * string deprecation_message = 12; + */ + java.lang.String getDeprecationMessage(); + /** + *
+   * If this op is deprecated, set deprecation message to the message
+   * that should be logged when this op is used.
+   * The message should indicate alternative op to use, if any.
+   * 
+ * + * string deprecation_message = 12; + */ + com.google.protobuf.ByteString + getDeprecationMessageBytes(); + + /** + *
+   * Major version when the op will be deleted. For e.g. set this
+   * value to 2 if op API should be removed in TensorFlow 2.0 and
+   * deprecated in versions before that.
+   * 
+ * + * int32 deprecation_version = 13; + */ + int getDeprecationVersion(); + + /** + * .tensorflow.ApiDef.Visibility visibility = 2; + */ + int getVisibilityValue(); + /** + * .tensorflow.ApiDef.Visibility visibility = 2; + */ + org.tensorflow.proto.framework.ApiDef.Visibility getVisibility(); + + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + java.util.List + getEndpointList(); + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + org.tensorflow.proto.framework.ApiDef.Endpoint getEndpoint(int index); + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + int getEndpointCount(); + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + java.util.List + getEndpointOrBuilderList(); + /** + * repeated .tensorflow.ApiDef.Endpoint endpoint = 3; + */ + org.tensorflow.proto.framework.ApiDef.EndpointOrBuilder getEndpointOrBuilder( + int index); + + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + java.util.List + getInArgList(); + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + org.tensorflow.proto.framework.ApiDef.Arg getInArg(int index); + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + int getInArgCount(); + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + java.util.List + getInArgOrBuilderList(); + /** + * repeated .tensorflow.ApiDef.Arg in_arg = 4; + */ + org.tensorflow.proto.framework.ApiDef.ArgOrBuilder getInArgOrBuilder( + int index); + + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + java.util.List + getOutArgList(); + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + org.tensorflow.proto.framework.ApiDef.Arg getOutArg(int index); + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + int getOutArgCount(); + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + java.util.List + getOutArgOrBuilderList(); + /** + * repeated .tensorflow.ApiDef.Arg out_arg = 5; + */ + org.tensorflow.proto.framework.ApiDef.ArgOrBuilder getOutArgOrBuilder( + int index); + + /** + *
+   * List of original in_arg names to specify new argument order.
+   * Length of arg_order should be either empty to keep current order
+   * or match size of in_arg.
+   * 
+ * + * repeated string arg_order = 11; + */ + java.util.List + getArgOrderList(); + /** + *
+   * List of original in_arg names to specify new argument order.
+   * Length of arg_order should be either empty to keep current order
+   * or match size of in_arg.
+   * 
+ * + * repeated string arg_order = 11; + */ + int getArgOrderCount(); + /** + *
+   * List of original in_arg names to specify new argument order.
+   * Length of arg_order should be either empty to keep current order
+   * or match size of in_arg.
+   * 
+ * + * repeated string arg_order = 11; + */ + java.lang.String getArgOrder(int index); + /** + *
+   * List of original in_arg names to specify new argument order.
+   * Length of arg_order should be either empty to keep current order
+   * or match size of in_arg.
+   * 
+ * + * repeated string arg_order = 11; + */ + com.google.protobuf.ByteString + getArgOrderBytes(int index); + + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + java.util.List + getAttrList(); + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + org.tensorflow.proto.framework.ApiDef.Attr getAttr(int index); + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + int getAttrCount(); + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + java.util.List + getAttrOrBuilderList(); + /** + * repeated .tensorflow.ApiDef.Attr attr = 6; + */ + org.tensorflow.proto.framework.ApiDef.AttrOrBuilder getAttrOrBuilder( + int index); + + /** + *
+   * One-line human-readable description of what the Op does.
+   * 
+ * + * string summary = 7; + */ + java.lang.String getSummary(); + /** + *
+   * One-line human-readable description of what the Op does.
+   * 
+ * + * string summary = 7; + */ + com.google.protobuf.ByteString + getSummaryBytes(); + + /** + *
+   * Additional, longer human-readable description of what the Op does.
+   * 
+ * + * string description = 8; + */ + java.lang.String getDescription(); + /** + *
+   * Additional, longer human-readable description of what the Op does.
+   * 
+ * + * string description = 8; + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Modify an existing/inherited description by adding text to the beginning
+   * or end.
+   * 
+ * + * string description_prefix = 9; + */ + java.lang.String getDescriptionPrefix(); + /** + *
+   * Modify an existing/inherited description by adding text to the beginning
+   * or end.
+   * 
+ * + * string description_prefix = 9; + */ + com.google.protobuf.ByteString + getDescriptionPrefixBytes(); + + /** + * string description_suffix = 10; + */ + java.lang.String getDescriptionSuffix(); + /** + * string description_suffix = 10; + */ + com.google.protobuf.ByteString + getDescriptionSuffixBytes(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ApiDefProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ApiDefProtos.java new file mode 100644 index 00000000000..6df5379d411 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ApiDefProtos.java @@ -0,0 +1,117 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/api_def.proto + +package org.tensorflow.proto.framework; + +public final class ApiDefProtos { + private ApiDefProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ApiDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ApiDef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ApiDef_Endpoint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ApiDef_Endpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ApiDef_Arg_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ApiDef_Arg_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ApiDef_Attr_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ApiDef_Attr_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ApiDefs_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ApiDefs_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/api_def.prot" + + "o\022\ntensorflow\032*tensorflow/core/framework" + + "/attr_value.proto\"\341\005\n\006ApiDef\022\025\n\rgraph_op" + + "_name\030\001 \001(\t\022\033\n\023deprecation_message\030\014 \001(\t" + + "\022\033\n\023deprecation_version\030\r \001(\005\0221\n\nvisibil" + + "ity\030\002 \001(\0162\035.tensorflow.ApiDef.Visibility" + + "\022-\n\010endpoint\030\003 \003(\0132\033.tensorflow.ApiDef.E" + + "ndpoint\022&\n\006in_arg\030\004 \003(\0132\026.tensorflow.Api" + + "Def.Arg\022\'\n\007out_arg\030\005 \003(\0132\026.tensorflow.Ap" + + "iDef.Arg\022\021\n\targ_order\030\013 \003(\t\022%\n\004attr\030\006 \003(" + + "\0132\027.tensorflow.ApiDef.Attr\022\017\n\007summary\030\007 " + + "\001(\t\022\023\n\013description\030\010 \001(\t\022\032\n\022description_" + + "prefix\030\t \001(\t\022\032\n\022description_suffix\030\n \001(\t" + + "\032I\n\010Endpoint\022\014\n\004name\030\001 \001(\t\022\022\n\ndeprecated" + + "\030\003 \001(\010\022\033\n\023deprecation_version\030\004 \001(\005\032;\n\003A" + + "rg\022\014\n\004name\030\001 \001(\t\022\021\n\trename_to\030\002 \001(\t\022\023\n\013d" + + "escription\030\003 \001(\t\032j\n\004Attr\022\014\n\004name\030\001 \001(\t\022\021" + + "\n\trename_to\030\002 \001(\t\022,\n\rdefault_value\030\003 \001(\013" + + "2\025.tensorflow.AttrValue\022\023\n\013description\030\004" + + " \001(\t\"G\n\nVisibility\022\026\n\022DEFAULT_VISIBILITY" + + "\020\000\022\013\n\007VISIBLE\020\001\022\010\n\004SKIP\020\002\022\n\n\006HIDDEN\020\003\")\n" + + "\007ApiDefs\022\036\n\002op\030\001 \003(\0132\022.tensorflow.ApiDef" + + "B\203\001\n\036org.tensorflow.proto.frameworkB\014Api" + + "DefProtosP\001ZNgithub.com/tensorflow/tenso" + + "rflow/tensorflow/go/core/framework/api_d" + + "ef_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.AttrValueProtos.getDescriptor(), + }); + internal_static_tensorflow_ApiDef_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_ApiDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ApiDef_descriptor, + new java.lang.String[] { "GraphOpName", "DeprecationMessage", "DeprecationVersion", "Visibility", "Endpoint", "InArg", "OutArg", "ArgOrder", "Attr", "Summary", "Description", "DescriptionPrefix", "DescriptionSuffix", }); + internal_static_tensorflow_ApiDef_Endpoint_descriptor = + internal_static_tensorflow_ApiDef_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_ApiDef_Endpoint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ApiDef_Endpoint_descriptor, + new java.lang.String[] { "Name", "Deprecated", "DeprecationVersion", }); + internal_static_tensorflow_ApiDef_Arg_descriptor = + internal_static_tensorflow_ApiDef_descriptor.getNestedTypes().get(1); + internal_static_tensorflow_ApiDef_Arg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ApiDef_Arg_descriptor, + new java.lang.String[] { "Name", "RenameTo", "Description", }); + internal_static_tensorflow_ApiDef_Attr_descriptor = + internal_static_tensorflow_ApiDef_descriptor.getNestedTypes().get(2); + internal_static_tensorflow_ApiDef_Attr_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ApiDef_Attr_descriptor, + new java.lang.String[] { "Name", "RenameTo", "DefaultValue", "Description", }); + internal_static_tensorflow_ApiDefs_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_ApiDefs_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ApiDefs_descriptor, + new java.lang.String[] { "Op", }); + org.tensorflow.proto.framework.AttrValueProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ApiDefs.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ApiDefs.java new file mode 100644 index 00000000000..a4076265967 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ApiDefs.java @@ -0,0 +1,765 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/api_def.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.ApiDefs} + */ +public final class ApiDefs extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ApiDefs) + ApiDefsOrBuilder { +private static final long serialVersionUID = 0L; + // Use ApiDefs.newBuilder() to construct. + private ApiDefs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ApiDefs() { + op_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ApiDefs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApiDefs( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + op_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + op_.add( + input.readMessage(org.tensorflow.proto.framework.ApiDef.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + op_ = java.util.Collections.unmodifiableList(op_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDefs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDefs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ApiDefs.class, org.tensorflow.proto.framework.ApiDefs.Builder.class); + } + + public static final int OP_FIELD_NUMBER = 1; + private java.util.List op_; + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public java.util.List getOpList() { + return op_; + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public java.util.List + getOpOrBuilderList() { + return op_; + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public int getOpCount() { + return op_.size(); + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public org.tensorflow.proto.framework.ApiDef getOp(int index) { + return op_.get(index); + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public org.tensorflow.proto.framework.ApiDefOrBuilder getOpOrBuilder( + int index) { + return op_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < op_.size(); i++) { + output.writeMessage(1, op_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < op_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, op_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.ApiDefs)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.ApiDefs other = (org.tensorflow.proto.framework.ApiDefs) obj; + + if (!getOpList() + .equals(other.getOpList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOpCount() > 0) { + hash = (37 * hash) + OP_FIELD_NUMBER; + hash = (53 * hash) + getOpList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.ApiDefs parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ApiDefs parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDefs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ApiDefs 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.proto.framework.ApiDefs parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ApiDefs parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDefs parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ApiDefs parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDefs parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ApiDefs parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ApiDefs parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ApiDefs parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.ApiDefs prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.ApiDefs} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ApiDefs) + org.tensorflow.proto.framework.ApiDefsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDefs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDefs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ApiDefs.class, org.tensorflow.proto.framework.ApiDefs.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.ApiDefs.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getOpFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (opBuilder_ == null) { + op_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + opBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ApiDefProtos.internal_static_tensorflow_ApiDefs_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDefs getDefaultInstanceForType() { + return org.tensorflow.proto.framework.ApiDefs.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDefs build() { + org.tensorflow.proto.framework.ApiDefs result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDefs buildPartial() { + org.tensorflow.proto.framework.ApiDefs result = new org.tensorflow.proto.framework.ApiDefs(this); + int from_bitField0_ = bitField0_; + if (opBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + op_ = java.util.Collections.unmodifiableList(op_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.op_ = op_; + } else { + result.op_ = opBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.ApiDefs) { + return mergeFrom((org.tensorflow.proto.framework.ApiDefs)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.ApiDefs other) { + if (other == org.tensorflow.proto.framework.ApiDefs.getDefaultInstance()) return this; + if (opBuilder_ == null) { + if (!other.op_.isEmpty()) { + if (op_.isEmpty()) { + op_ = other.op_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOpIsMutable(); + op_.addAll(other.op_); + } + onChanged(); + } + } else { + if (!other.op_.isEmpty()) { + if (opBuilder_.isEmpty()) { + opBuilder_.dispose(); + opBuilder_ = null; + op_ = other.op_; + bitField0_ = (bitField0_ & ~0x00000001); + opBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOpFieldBuilder() : null; + } else { + opBuilder_.addAllMessages(other.op_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.ApiDefs parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.ApiDefs) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List op_ = + java.util.Collections.emptyList(); + private void ensureOpIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + op_ = new java.util.ArrayList(op_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ApiDef, org.tensorflow.proto.framework.ApiDef.Builder, org.tensorflow.proto.framework.ApiDefOrBuilder> opBuilder_; + + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public java.util.List getOpList() { + if (opBuilder_ == null) { + return java.util.Collections.unmodifiableList(op_); + } else { + return opBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public int getOpCount() { + if (opBuilder_ == null) { + return op_.size(); + } else { + return opBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public org.tensorflow.proto.framework.ApiDef getOp(int index) { + if (opBuilder_ == null) { + return op_.get(index); + } else { + return opBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public Builder setOp( + int index, org.tensorflow.proto.framework.ApiDef value) { + if (opBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpIsMutable(); + op_.set(index, value); + onChanged(); + } else { + opBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public Builder setOp( + int index, org.tensorflow.proto.framework.ApiDef.Builder builderForValue) { + if (opBuilder_ == null) { + ensureOpIsMutable(); + op_.set(index, builderForValue.build()); + onChanged(); + } else { + opBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public Builder addOp(org.tensorflow.proto.framework.ApiDef value) { + if (opBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpIsMutable(); + op_.add(value); + onChanged(); + } else { + opBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public Builder addOp( + int index, org.tensorflow.proto.framework.ApiDef value) { + if (opBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpIsMutable(); + op_.add(index, value); + onChanged(); + } else { + opBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public Builder addOp( + org.tensorflow.proto.framework.ApiDef.Builder builderForValue) { + if (opBuilder_ == null) { + ensureOpIsMutable(); + op_.add(builderForValue.build()); + onChanged(); + } else { + opBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public Builder addOp( + int index, org.tensorflow.proto.framework.ApiDef.Builder builderForValue) { + if (opBuilder_ == null) { + ensureOpIsMutable(); + op_.add(index, builderForValue.build()); + onChanged(); + } else { + opBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public Builder addAllOp( + java.lang.Iterable values) { + if (opBuilder_ == null) { + ensureOpIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, op_); + onChanged(); + } else { + opBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public Builder clearOp() { + if (opBuilder_ == null) { + op_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + opBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public Builder removeOp(int index) { + if (opBuilder_ == null) { + ensureOpIsMutable(); + op_.remove(index); + onChanged(); + } else { + opBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public org.tensorflow.proto.framework.ApiDef.Builder getOpBuilder( + int index) { + return getOpFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public org.tensorflow.proto.framework.ApiDefOrBuilder getOpOrBuilder( + int index) { + if (opBuilder_ == null) { + return op_.get(index); } else { + return opBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public java.util.List + getOpOrBuilderList() { + if (opBuilder_ != null) { + return opBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(op_); + } + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public org.tensorflow.proto.framework.ApiDef.Builder addOpBuilder() { + return getOpFieldBuilder().addBuilder( + org.tensorflow.proto.framework.ApiDef.getDefaultInstance()); + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public org.tensorflow.proto.framework.ApiDef.Builder addOpBuilder( + int index) { + return getOpFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.ApiDef.getDefaultInstance()); + } + /** + * repeated .tensorflow.ApiDef op = 1; + */ + public java.util.List + getOpBuilderList() { + return getOpFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ApiDef, org.tensorflow.proto.framework.ApiDef.Builder, org.tensorflow.proto.framework.ApiDefOrBuilder> + getOpFieldBuilder() { + if (opBuilder_ == null) { + opBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ApiDef, org.tensorflow.proto.framework.ApiDef.Builder, org.tensorflow.proto.framework.ApiDefOrBuilder>( + op_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + op_ = null; + } + return opBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ApiDefs) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ApiDefs) + private static final org.tensorflow.proto.framework.ApiDefs DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.ApiDefs(); + } + + public static org.tensorflow.proto.framework.ApiDefs getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApiDefs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApiDefs(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ApiDefs getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ApiDefsOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ApiDefsOrBuilder.java new file mode 100644 index 00000000000..e3ba64964e7 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ApiDefsOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/api_def.proto + +package org.tensorflow.proto.framework; + +public interface ApiDefsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ApiDefs) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .tensorflow.ApiDef op = 1; + */ + java.util.List + getOpList(); + /** + * repeated .tensorflow.ApiDef op = 1; + */ + org.tensorflow.proto.framework.ApiDef getOp(int index); + /** + * repeated .tensorflow.ApiDef op = 1; + */ + int getOpCount(); + /** + * repeated .tensorflow.ApiDef op = 1; + */ + java.util.List + getOpOrBuilderList(); + /** + * repeated .tensorflow.ApiDef op = 1; + */ + org.tensorflow.proto.framework.ApiDefOrBuilder getOpOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AssetFileDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AssetFileDef.java new file mode 100644 index 00000000000..2d4a4e4b828 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AssetFileDef.java @@ -0,0 +1,827 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/meta_graph.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * An asset file def for a single file or a set of sharded files with the same
+ * name.
+ * 
+ * + * Protobuf type {@code tensorflow.AssetFileDef} + */ +public final class AssetFileDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.AssetFileDef) + AssetFileDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use AssetFileDef.newBuilder() to construct. + private AssetFileDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AssetFileDef() { + filename_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AssetFileDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AssetFileDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.tensorflow.proto.framework.TensorInfo.Builder subBuilder = null; + if (tensorInfo_ != null) { + subBuilder = tensorInfo_.toBuilder(); + } + tensorInfo_ = input.readMessage(org.tensorflow.proto.framework.TensorInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tensorInfo_); + tensorInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + filename_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_AssetFileDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_AssetFileDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.AssetFileDef.class, org.tensorflow.proto.framework.AssetFileDef.Builder.class); + } + + public static final int TENSOR_INFO_FIELD_NUMBER = 1; + private org.tensorflow.proto.framework.TensorInfo tensorInfo_; + /** + *
+   * The tensor to bind the asset filename to.
+   * 
+ * + * .tensorflow.TensorInfo tensor_info = 1; + */ + public boolean hasTensorInfo() { + return tensorInfo_ != null; + } + /** + *
+   * The tensor to bind the asset filename to.
+   * 
+ * + * .tensorflow.TensorInfo tensor_info = 1; + */ + public org.tensorflow.proto.framework.TensorInfo getTensorInfo() { + return tensorInfo_ == null ? org.tensorflow.proto.framework.TensorInfo.getDefaultInstance() : tensorInfo_; + } + /** + *
+   * The tensor to bind the asset filename to.
+   * 
+ * + * .tensorflow.TensorInfo tensor_info = 1; + */ + public org.tensorflow.proto.framework.TensorInfoOrBuilder getTensorInfoOrBuilder() { + return getTensorInfo(); + } + + public static final int FILENAME_FIELD_NUMBER = 2; + private volatile java.lang.Object filename_; + /** + *
+   * The filename within an assets directory. Note: does not include the path
+   * prefix, i.e. directories. For an asset at /tmp/path/vocab.txt, the filename
+   * would be "vocab.txt".
+   * 
+ * + * string filename = 2; + */ + public java.lang.String getFilename() { + java.lang.Object ref = filename_; + 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(); + filename_ = s; + return s; + } + } + /** + *
+   * The filename within an assets directory. Note: does not include the path
+   * prefix, i.e. directories. For an asset at /tmp/path/vocab.txt, the filename
+   * would be "vocab.txt".
+   * 
+ * + * string filename = 2; + */ + public com.google.protobuf.ByteString + getFilenameBytes() { + java.lang.Object ref = filename_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (tensorInfo_ != null) { + output.writeMessage(1, getTensorInfo()); + } + if (!getFilenameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filename_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tensorInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getTensorInfo()); + } + if (!getFilenameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filename_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.AssetFileDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.AssetFileDef other = (org.tensorflow.proto.framework.AssetFileDef) obj; + + if (hasTensorInfo() != other.hasTensorInfo()) return false; + if (hasTensorInfo()) { + if (!getTensorInfo() + .equals(other.getTensorInfo())) return false; + } + if (!getFilename() + .equals(other.getFilename())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTensorInfo()) { + hash = (37 * hash) + TENSOR_INFO_FIELD_NUMBER; + hash = (53 * hash) + getTensorInfo().hashCode(); + } + hash = (37 * hash) + FILENAME_FIELD_NUMBER; + hash = (53 * hash) + getFilename().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.AssetFileDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.AssetFileDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.AssetFileDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.AssetFileDef 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.proto.framework.AssetFileDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.AssetFileDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.AssetFileDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AssetFileDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.AssetFileDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AssetFileDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.AssetFileDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AssetFileDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.AssetFileDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An asset file def for a single file or a set of sharded files with the same
+   * name.
+   * 
+ * + * Protobuf type {@code tensorflow.AssetFileDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.AssetFileDef) + org.tensorflow.proto.framework.AssetFileDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_AssetFileDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_AssetFileDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.AssetFileDef.class, org.tensorflow.proto.framework.AssetFileDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.AssetFileDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (tensorInfoBuilder_ == null) { + tensorInfo_ = null; + } else { + tensorInfo_ = null; + tensorInfoBuilder_ = null; + } + filename_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_AssetFileDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AssetFileDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.AssetFileDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.AssetFileDef build() { + org.tensorflow.proto.framework.AssetFileDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AssetFileDef buildPartial() { + org.tensorflow.proto.framework.AssetFileDef result = new org.tensorflow.proto.framework.AssetFileDef(this); + if (tensorInfoBuilder_ == null) { + result.tensorInfo_ = tensorInfo_; + } else { + result.tensorInfo_ = tensorInfoBuilder_.build(); + } + result.filename_ = filename_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.AssetFileDef) { + return mergeFrom((org.tensorflow.proto.framework.AssetFileDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.AssetFileDef other) { + if (other == org.tensorflow.proto.framework.AssetFileDef.getDefaultInstance()) return this; + if (other.hasTensorInfo()) { + mergeTensorInfo(other.getTensorInfo()); + } + if (!other.getFilename().isEmpty()) { + filename_ = other.filename_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.AssetFileDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.AssetFileDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private org.tensorflow.proto.framework.TensorInfo tensorInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorInfo, org.tensorflow.proto.framework.TensorInfo.Builder, org.tensorflow.proto.framework.TensorInfoOrBuilder> tensorInfoBuilder_; + /** + *
+     * The tensor to bind the asset filename to.
+     * 
+ * + * .tensorflow.TensorInfo tensor_info = 1; + */ + public boolean hasTensorInfo() { + return tensorInfoBuilder_ != null || tensorInfo_ != null; + } + /** + *
+     * The tensor to bind the asset filename to.
+     * 
+ * + * .tensorflow.TensorInfo tensor_info = 1; + */ + public org.tensorflow.proto.framework.TensorInfo getTensorInfo() { + if (tensorInfoBuilder_ == null) { + return tensorInfo_ == null ? org.tensorflow.proto.framework.TensorInfo.getDefaultInstance() : tensorInfo_; + } else { + return tensorInfoBuilder_.getMessage(); + } + } + /** + *
+     * The tensor to bind the asset filename to.
+     * 
+ * + * .tensorflow.TensorInfo tensor_info = 1; + */ + public Builder setTensorInfo(org.tensorflow.proto.framework.TensorInfo value) { + if (tensorInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tensorInfo_ = value; + onChanged(); + } else { + tensorInfoBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The tensor to bind the asset filename to.
+     * 
+ * + * .tensorflow.TensorInfo tensor_info = 1; + */ + public Builder setTensorInfo( + org.tensorflow.proto.framework.TensorInfo.Builder builderForValue) { + if (tensorInfoBuilder_ == null) { + tensorInfo_ = builderForValue.build(); + onChanged(); + } else { + tensorInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The tensor to bind the asset filename to.
+     * 
+ * + * .tensorflow.TensorInfo tensor_info = 1; + */ + public Builder mergeTensorInfo(org.tensorflow.proto.framework.TensorInfo value) { + if (tensorInfoBuilder_ == null) { + if (tensorInfo_ != null) { + tensorInfo_ = + org.tensorflow.proto.framework.TensorInfo.newBuilder(tensorInfo_).mergeFrom(value).buildPartial(); + } else { + tensorInfo_ = value; + } + onChanged(); + } else { + tensorInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The tensor to bind the asset filename to.
+     * 
+ * + * .tensorflow.TensorInfo tensor_info = 1; + */ + public Builder clearTensorInfo() { + if (tensorInfoBuilder_ == null) { + tensorInfo_ = null; + onChanged(); + } else { + tensorInfo_ = null; + tensorInfoBuilder_ = null; + } + + return this; + } + /** + *
+     * The tensor to bind the asset filename to.
+     * 
+ * + * .tensorflow.TensorInfo tensor_info = 1; + */ + public org.tensorflow.proto.framework.TensorInfo.Builder getTensorInfoBuilder() { + + onChanged(); + return getTensorInfoFieldBuilder().getBuilder(); + } + /** + *
+     * The tensor to bind the asset filename to.
+     * 
+ * + * .tensorflow.TensorInfo tensor_info = 1; + */ + public org.tensorflow.proto.framework.TensorInfoOrBuilder getTensorInfoOrBuilder() { + if (tensorInfoBuilder_ != null) { + return tensorInfoBuilder_.getMessageOrBuilder(); + } else { + return tensorInfo_ == null ? + org.tensorflow.proto.framework.TensorInfo.getDefaultInstance() : tensorInfo_; + } + } + /** + *
+     * The tensor to bind the asset filename to.
+     * 
+ * + * .tensorflow.TensorInfo tensor_info = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorInfo, org.tensorflow.proto.framework.TensorInfo.Builder, org.tensorflow.proto.framework.TensorInfoOrBuilder> + getTensorInfoFieldBuilder() { + if (tensorInfoBuilder_ == null) { + tensorInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorInfo, org.tensorflow.proto.framework.TensorInfo.Builder, org.tensorflow.proto.framework.TensorInfoOrBuilder>( + getTensorInfo(), + getParentForChildren(), + isClean()); + tensorInfo_ = null; + } + return tensorInfoBuilder_; + } + + private java.lang.Object filename_ = ""; + /** + *
+     * The filename within an assets directory. Note: does not include the path
+     * prefix, i.e. directories. For an asset at /tmp/path/vocab.txt, the filename
+     * would be "vocab.txt".
+     * 
+ * + * string filename = 2; + */ + public java.lang.String getFilename() { + java.lang.Object ref = filename_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filename_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The filename within an assets directory. Note: does not include the path
+     * prefix, i.e. directories. For an asset at /tmp/path/vocab.txt, the filename
+     * would be "vocab.txt".
+     * 
+ * + * string filename = 2; + */ + public com.google.protobuf.ByteString + getFilenameBytes() { + java.lang.Object ref = filename_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The filename within an assets directory. Note: does not include the path
+     * prefix, i.e. directories. For an asset at /tmp/path/vocab.txt, the filename
+     * would be "vocab.txt".
+     * 
+ * + * string filename = 2; + */ + public Builder setFilename( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filename_ = value; + onChanged(); + return this; + } + /** + *
+     * The filename within an assets directory. Note: does not include the path
+     * prefix, i.e. directories. For an asset at /tmp/path/vocab.txt, the filename
+     * would be "vocab.txt".
+     * 
+ * + * string filename = 2; + */ + public Builder clearFilename() { + + filename_ = getDefaultInstance().getFilename(); + onChanged(); + return this; + } + /** + *
+     * The filename within an assets directory. Note: does not include the path
+     * prefix, i.e. directories. For an asset at /tmp/path/vocab.txt, the filename
+     * would be "vocab.txt".
+     * 
+ * + * string filename = 2; + */ + public Builder setFilenameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filename_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.AssetFileDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.AssetFileDef) + private static final org.tensorflow.proto.framework.AssetFileDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.AssetFileDef(); + } + + public static org.tensorflow.proto.framework.AssetFileDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssetFileDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AssetFileDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AssetFileDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AssetFileDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AssetFileDefOrBuilder.java new file mode 100644 index 00000000000..dd8ec09799f --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AssetFileDefOrBuilder.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/meta_graph.proto + +package org.tensorflow.proto.framework; + +public interface AssetFileDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.AssetFileDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The tensor to bind the asset filename to.
+   * 
+ * + * .tensorflow.TensorInfo tensor_info = 1; + */ + boolean hasTensorInfo(); + /** + *
+   * The tensor to bind the asset filename to.
+   * 
+ * + * .tensorflow.TensorInfo tensor_info = 1; + */ + org.tensorflow.proto.framework.TensorInfo getTensorInfo(); + /** + *
+   * The tensor to bind the asset filename to.
+   * 
+ * + * .tensorflow.TensorInfo tensor_info = 1; + */ + org.tensorflow.proto.framework.TensorInfoOrBuilder getTensorInfoOrBuilder(); + + /** + *
+   * The filename within an assets directory. Note: does not include the path
+   * prefix, i.e. directories. For an asset at /tmp/path/vocab.txt, the filename
+   * would be "vocab.txt".
+   * 
+ * + * string filename = 2; + */ + java.lang.String getFilename(); + /** + *
+   * The filename within an assets directory. Note: does not include the path
+   * prefix, i.e. directories. For an asset at /tmp/path/vocab.txt, the filename
+   * would be "vocab.txt".
+   * 
+ * + * string filename = 2; + */ + com.google.protobuf.ByteString + getFilenameBytes(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AttrValue.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AttrValue.java new file mode 100644 index 00000000000..f64f1a8b3ab --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AttrValue.java @@ -0,0 +1,5341 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/attr_value.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * 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.
+ * 
+ * + * Protobuf type {@code tensorflow.AttrValue} + */ +public final class AttrValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.AttrValue) + AttrValueOrBuilder { +private static final long serialVersionUID = 0L; + // Use AttrValue.newBuilder() to construct. + private AttrValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttrValue() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttrValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AttrValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.tensorflow.proto.framework.AttrValue.ListValue.Builder subBuilder = null; + if (valueCase_ == 1) { + subBuilder = ((org.tensorflow.proto.framework.AttrValue.ListValue) value_).toBuilder(); + } + value_ = + input.readMessage(org.tensorflow.proto.framework.AttrValue.ListValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.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.proto.framework.TensorShapeProto.Builder subBuilder = null; + if (valueCase_ == 7) { + subBuilder = ((org.tensorflow.proto.framework.TensorShapeProto) value_).toBuilder(); + } + value_ = + input.readMessage(org.tensorflow.proto.framework.TensorShapeProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.TensorShapeProto) value_); + value_ = subBuilder.buildPartial(); + } + valueCase_ = 7; + break; + } + case 66: { + org.tensorflow.proto.framework.TensorProto.Builder subBuilder = null; + if (valueCase_ == 8) { + subBuilder = ((org.tensorflow.proto.framework.TensorProto) value_).toBuilder(); + } + value_ = + input.readMessage(org.tensorflow.proto.framework.TensorProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.TensorProto) value_); + value_ = subBuilder.buildPartial(); + } + valueCase_ = 8; + break; + } + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + valueCase_ = 9; + value_ = s; + break; + } + case 82: { + org.tensorflow.proto.framework.NameAttrList.Builder subBuilder = null; + if (valueCase_ == 10) { + subBuilder = ((org.tensorflow.proto.framework.NameAttrList) value_).toBuilder(); + } + value_ = + input.readMessage(org.tensorflow.proto.framework.NameAttrList.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.NameAttrList) value_); + value_ = subBuilder.buildPartial(); + } + valueCase_ = 10; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.AttrValue.class, org.tensorflow.proto.framework.AttrValue.Builder.class); + } + + public interface ListValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.AttrValue.ListValue) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * "list(string)"
+     * 
+ * + * repeated bytes s = 2; + */ + java.util.List getSList(); + /** + *
+     * "list(string)"
+     * 
+ * + * repeated bytes s = 2; + */ + int getSCount(); + /** + *
+     * "list(string)"
+     * 
+ * + * repeated bytes s = 2; + */ + com.google.protobuf.ByteString getS(int index); + + /** + *
+     * "list(int)"
+     * 
+ * + * repeated int64 i = 3 [packed = true]; + */ + java.util.List getIList(); + /** + *
+     * "list(int)"
+     * 
+ * + * repeated int64 i = 3 [packed = true]; + */ + int getICount(); + /** + *
+     * "list(int)"
+     * 
+ * + * repeated int64 i = 3 [packed = true]; + */ + long getI(int index); + + /** + *
+     * "list(float)"
+     * 
+ * + * repeated float f = 4 [packed = true]; + */ + java.util.List getFList(); + /** + *
+     * "list(float)"
+     * 
+ * + * repeated float f = 4 [packed = true]; + */ + int getFCount(); + /** + *
+     * "list(float)"
+     * 
+ * + * repeated float f = 4 [packed = true]; + */ + float getF(int index); + + /** + *
+     * "list(bool)"
+     * 
+ * + * repeated bool b = 5 [packed = true]; + */ + java.util.List getBList(); + /** + *
+     * "list(bool)"
+     * 
+ * + * repeated bool b = 5 [packed = true]; + */ + int getBCount(); + /** + *
+     * "list(bool)"
+     * 
+ * + * repeated bool b = 5 [packed = true]; + */ + boolean getB(int index); + + /** + *
+     * "list(type)"
+     * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + java.util.List getTypeList(); + /** + *
+     * "list(type)"
+     * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + int getTypeCount(); + /** + *
+     * "list(type)"
+     * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + org.tensorflow.proto.framework.DataType getType(int index); + /** + *
+     * "list(type)"
+     * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + java.util.List + getTypeValueList(); + /** + *
+     * "list(type)"
+     * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + int getTypeValue(int index); + + /** + *
+     * "list(shape)"
+     * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + java.util.List + getShapeList(); + /** + *
+     * "list(shape)"
+     * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + org.tensorflow.proto.framework.TensorShapeProto getShape(int index); + /** + *
+     * "list(shape)"
+     * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + int getShapeCount(); + /** + *
+     * "list(shape)"
+     * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + java.util.List + getShapeOrBuilderList(); + /** + *
+     * "list(shape)"
+     * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder( + int index); + + /** + *
+     * "list(tensor)"
+     * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + java.util.List + getTensorList(); + /** + *
+     * "list(tensor)"
+     * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + org.tensorflow.proto.framework.TensorProto getTensor(int index); + /** + *
+     * "list(tensor)"
+     * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + int getTensorCount(); + /** + *
+     * "list(tensor)"
+     * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + java.util.List + getTensorOrBuilderList(); + /** + *
+     * "list(tensor)"
+     * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + org.tensorflow.proto.framework.TensorProtoOrBuilder getTensorOrBuilder( + int index); + + /** + *
+     * "list(attr)"
+     * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + java.util.List + getFuncList(); + /** + *
+     * "list(attr)"
+     * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + org.tensorflow.proto.framework.NameAttrList getFunc(int index); + /** + *
+     * "list(attr)"
+     * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + int getFuncCount(); + /** + *
+     * "list(attr)"
+     * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + java.util.List + getFuncOrBuilderList(); + /** + *
+     * "list(attr)"
+     * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + org.tensorflow.proto.framework.NameAttrListOrBuilder getFuncOrBuilder( + int index); + } + /** + *
+   * LINT.IfChange
+   * 
+ * + * Protobuf type {@code tensorflow.AttrValue.ListValue} + */ + public static final class ListValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.AttrValue.ListValue) + ListValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListValue.newBuilder() to construct. + private ListValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListValue() { + s_ = java.util.Collections.emptyList(); + i_ = emptyLongList(); + f_ = emptyFloatList(); + b_ = emptyBooleanList(); + type_ = java.util.Collections.emptyList(); + shape_ = java.util.Collections.emptyList(); + tensor_ = java.util.Collections.emptyList(); + func_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + s_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + s_.add(input.readBytes()); + break; + } + case 24: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + i_ = newLongList(); + mutable_bitField0_ |= 0x00000002; + } + i_.addLong(input.readInt64()); + break; + } + case 26: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { + i_ = newLongList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + i_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 37: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + f_ = newFloatList(); + mutable_bitField0_ |= 0x00000004; + } + f_.addFloat(input.readFloat()); + break; + } + case 34: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { + f_ = newFloatList(); + mutable_bitField0_ |= 0x00000004; + } + while (input.getBytesUntilLimit() > 0) { + f_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } + case 40: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + b_ = newBooleanList(); + mutable_bitField0_ |= 0x00000008; + } + b_.addBoolean(input.readBool()); + break; + } + case 42: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000008) != 0) && input.getBytesUntilLimit() > 0) { + b_ = newBooleanList(); + mutable_bitField0_ |= 0x00000008; + } + while (input.getBytesUntilLimit() > 0) { + b_.addBoolean(input.readBool()); + } + input.popLimit(limit); + break; + } + case 48: { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + type_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + type_.add(rawValue); + break; + } + case 50: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + type_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + type_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + shape_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + shape_.add( + input.readMessage(org.tensorflow.proto.framework.TensorShapeProto.parser(), extensionRegistry)); + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000040) != 0)) { + tensor_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000040; + } + tensor_.add( + input.readMessage(org.tensorflow.proto.framework.TensorProto.parser(), extensionRegistry)); + break; + } + case 74: { + if (!((mutable_bitField0_ & 0x00000080) != 0)) { + func_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000080; + } + func_.add( + input.readMessage(org.tensorflow.proto.framework.NameAttrList.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + s_ = java.util.Collections.unmodifiableList(s_); // C + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + i_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + f_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + b_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + type_ = java.util.Collections.unmodifiableList(type_); + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { + shape_ = java.util.Collections.unmodifiableList(shape_); + } + if (((mutable_bitField0_ & 0x00000040) != 0)) { + tensor_ = java.util.Collections.unmodifiableList(tensor_); + } + if (((mutable_bitField0_ & 0x00000080) != 0)) { + func_ = java.util.Collections.unmodifiableList(func_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.AttrValue.ListValue.class, org.tensorflow.proto.framework.AttrValue.ListValue.Builder.class); + } + + public static final int S_FIELD_NUMBER = 2; + private java.util.List s_; + /** + *
+     * "list(string)"
+     * 
+ * + * repeated bytes s = 2; + */ + public java.util.List + getSList() { + return s_; + } + /** + *
+     * "list(string)"
+     * 
+ * + * repeated bytes s = 2; + */ + public int getSCount() { + return s_.size(); + } + /** + *
+     * "list(string)"
+     * 
+ * + * repeated bytes s = 2; + */ + public com.google.protobuf.ByteString getS(int index) { + return s_.get(index); + } + + public static final int I_FIELD_NUMBER = 3; + private com.google.protobuf.Internal.LongList i_; + /** + *
+     * "list(int)"
+     * 
+ * + * repeated int64 i = 3 [packed = true]; + */ + public java.util.List + getIList() { + return i_; + } + /** + *
+     * "list(int)"
+     * 
+ * + * repeated int64 i = 3 [packed = true]; + */ + public int getICount() { + return i_.size(); + } + /** + *
+     * "list(int)"
+     * 
+ * + * repeated int64 i = 3 [packed = true]; + */ + public long getI(int index) { + return i_.getLong(index); + } + private int iMemoizedSerializedSize = -1; + + public static final int F_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.FloatList f_; + /** + *
+     * "list(float)"
+     * 
+ * + * repeated float f = 4 [packed = true]; + */ + public java.util.List + getFList() { + return f_; + } + /** + *
+     * "list(float)"
+     * 
+ * + * repeated float f = 4 [packed = true]; + */ + public int getFCount() { + return f_.size(); + } + /** + *
+     * "list(float)"
+     * 
+ * + * repeated float f = 4 [packed = true]; + */ + public float getF(int index) { + return f_.getFloat(index); + } + private int fMemoizedSerializedSize = -1; + + public static final int B_FIELD_NUMBER = 5; + private com.google.protobuf.Internal.BooleanList b_; + /** + *
+     * "list(bool)"
+     * 
+ * + * repeated bool b = 5 [packed = true]; + */ + public java.util.List + getBList() { + return b_; + } + /** + *
+     * "list(bool)"
+     * 
+ * + * repeated bool b = 5 [packed = true]; + */ + public int getBCount() { + return b_.size(); + } + /** + *
+     * "list(bool)"
+     * 
+ * + * repeated bool b = 5 [packed = true]; + */ + public boolean getB(int index) { + return b_.getBoolean(index); + } + private int bMemoizedSerializedSize = -1; + + public static final int TYPE_FIELD_NUMBER = 6; + private java.util.List type_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, org.tensorflow.proto.framework.DataType> type_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, org.tensorflow.proto.framework.DataType>() { + public org.tensorflow.proto.framework.DataType convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(from); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + }; + /** + *
+     * "list(type)"
+     * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public java.util.List getTypeList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, org.tensorflow.proto.framework.DataType>(type_, type_converter_); + } + /** + *
+     * "list(type)"
+     * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public int getTypeCount() { + return type_.size(); + } + /** + *
+     * "list(type)"
+     * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public org.tensorflow.proto.framework.DataType getType(int index) { + return type_converter_.convert(type_.get(index)); + } + /** + *
+     * "list(type)"
+     * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public java.util.List + getTypeValueList() { + return type_; + } + /** + *
+     * "list(type)"
+     * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public int getTypeValue(int index) { + return type_.get(index); + } + private int typeMemoizedSerializedSize; + + public static final int SHAPE_FIELD_NUMBER = 7; + private java.util.List shape_; + /** + *
+     * "list(shape)"
+     * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public java.util.List getShapeList() { + return shape_; + } + /** + *
+     * "list(shape)"
+     * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public java.util.List + getShapeOrBuilderList() { + return shape_; + } + /** + *
+     * "list(shape)"
+     * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public int getShapeCount() { + return shape_.size(); + } + /** + *
+     * "list(shape)"
+     * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public org.tensorflow.proto.framework.TensorShapeProto getShape(int index) { + return shape_.get(index); + } + /** + *
+     * "list(shape)"
+     * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder( + int index) { + return shape_.get(index); + } + + public static final int TENSOR_FIELD_NUMBER = 8; + private java.util.List tensor_; + /** + *
+     * "list(tensor)"
+     * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public java.util.List getTensorList() { + return tensor_; + } + /** + *
+     * "list(tensor)"
+     * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public java.util.List + getTensorOrBuilderList() { + return tensor_; + } + /** + *
+     * "list(tensor)"
+     * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public int getTensorCount() { + return tensor_.size(); + } + /** + *
+     * "list(tensor)"
+     * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public org.tensorflow.proto.framework.TensorProto getTensor(int index) { + return tensor_.get(index); + } + /** + *
+     * "list(tensor)"
+     * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public org.tensorflow.proto.framework.TensorProtoOrBuilder getTensorOrBuilder( + int index) { + return tensor_.get(index); + } + + public static final int FUNC_FIELD_NUMBER = 9; + private java.util.List func_; + /** + *
+     * "list(attr)"
+     * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public java.util.List getFuncList() { + return func_; + } + /** + *
+     * "list(attr)"
+     * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public java.util.List + getFuncOrBuilderList() { + return func_; + } + /** + *
+     * "list(attr)"
+     * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public int getFuncCount() { + return func_.size(); + } + /** + *
+     * "list(attr)"
+     * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public org.tensorflow.proto.framework.NameAttrList getFunc(int index) { + return func_.get(index); + } + /** + *
+     * "list(attr)"
+     * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public org.tensorflow.proto.framework.NameAttrListOrBuilder getFuncOrBuilder( + int index) { + return func_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(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.writeUInt32NoTag(26); + output.writeUInt32NoTag(iMemoizedSerializedSize); + } + for (int i = 0; i < i_.size(); i++) { + output.writeInt64NoTag(i_.getLong(i)); + } + if (getFList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(fMemoizedSerializedSize); + } + for (int i = 0; i < f_.size(); i++) { + output.writeFloatNoTag(f_.getFloat(i)); + } + if (getBList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(bMemoizedSerializedSize); + } + for (int i = 0; i < b_.size(); i++) { + output.writeBoolNoTag(b_.getBoolean(i)); + } + if (getTypeList().size() > 0) { + output.writeUInt32NoTag(50); + output.writeUInt32NoTag(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)); + } + for (int i = 0; i < func_.size(); i++) { + output.writeMessage(9, func_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + 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_.getLong(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 + .computeUInt32SizeNoTag(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)); + } + for (int i = 0; i < func_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, func_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.AttrValue.ListValue)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.AttrValue.ListValue other = (org.tensorflow.proto.framework.AttrValue.ListValue) obj; + + if (!getSList() + .equals(other.getSList())) return false; + if (!getIList() + .equals(other.getIList())) return false; + if (!getFList() + .equals(other.getFList())) return false; + if (!getBList() + .equals(other.getBList())) return false; + if (!type_.equals(other.type_)) return false; + if (!getShapeList() + .equals(other.getShapeList())) return false; + if (!getTensorList() + .equals(other.getTensorList())) return false; + if (!getFuncList() + .equals(other.getFuncList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSCount() > 0) { + hash = (37 * hash) + S_FIELD_NUMBER; + hash = (53 * hash) + getSList().hashCode(); + } + if (getICount() > 0) { + hash = (37 * hash) + I_FIELD_NUMBER; + hash = (53 * hash) + getIList().hashCode(); + } + if (getFCount() > 0) { + hash = (37 * hash) + F_FIELD_NUMBER; + hash = (53 * hash) + getFList().hashCode(); + } + if (getBCount() > 0) { + hash = (37 * hash) + B_FIELD_NUMBER; + hash = (53 * hash) + getBList().hashCode(); + } + if (getTypeCount() > 0) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_.hashCode(); + } + if (getShapeCount() > 0) { + hash = (37 * hash) + SHAPE_FIELD_NUMBER; + hash = (53 * hash) + getShapeList().hashCode(); + } + if (getTensorCount() > 0) { + hash = (37 * hash) + TENSOR_FIELD_NUMBER; + hash = (53 * hash) + getTensorList().hashCode(); + } + if (getFuncCount() > 0) { + hash = (37 * hash) + FUNC_FIELD_NUMBER; + hash = (53 * hash) + getFuncList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.AttrValue.ListValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.AttrValue.ListValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.AttrValue.ListValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.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.proto.framework.AttrValue.ListValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.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.proto.framework.AttrValue.ListValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AttrValue.ListValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.AttrValue.ListValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AttrValue.ListValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.AttrValue.ListValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AttrValue.ListValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.AttrValue.ListValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * LINT.IfChange
+     * 
+ * + * Protobuf type {@code tensorflow.AttrValue.ListValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.AttrValue.ListValue) + org.tensorflow.proto.framework.AttrValue.ListValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.AttrValue.ListValue.class, org.tensorflow.proto.framework.AttrValue.ListValue.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.AttrValue.ListValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getShapeFieldBuilder(); + getTensorFieldBuilder(); + getFuncFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + s_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + i_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000002); + f_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000004); + b_ = emptyBooleanList(); + bitField0_ = (bitField0_ & ~0x00000008); + type_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + if (shapeBuilder_ == null) { + shape_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + shapeBuilder_.clear(); + } + if (tensorBuilder_ == null) { + tensor_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + } else { + tensorBuilder_.clear(); + } + if (funcBuilder_ == null) { + func_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + } else { + funcBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AttrValue.ListValue getDefaultInstanceForType() { + return org.tensorflow.proto.framework.AttrValue.ListValue.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.AttrValue.ListValue build() { + org.tensorflow.proto.framework.AttrValue.ListValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AttrValue.ListValue buildPartial() { + org.tensorflow.proto.framework.AttrValue.ListValue result = new org.tensorflow.proto.framework.AttrValue.ListValue(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + s_ = java.util.Collections.unmodifiableList(s_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.s_ = s_; + if (((bitField0_ & 0x00000002) != 0)) { + i_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.i_ = i_; + if (((bitField0_ & 0x00000004) != 0)) { + f_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.f_ = f_; + if (((bitField0_ & 0x00000008) != 0)) { + b_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.b_ = b_; + if (((bitField0_ & 0x00000010) != 0)) { + type_ = java.util.Collections.unmodifiableList(type_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.type_ = type_; + if (shapeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + shape_ = java.util.Collections.unmodifiableList(shape_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.shape_ = shape_; + } else { + result.shape_ = shapeBuilder_.build(); + } + if (tensorBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + tensor_ = java.util.Collections.unmodifiableList(tensor_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.tensor_ = tensor_; + } else { + result.tensor_ = tensorBuilder_.build(); + } + if (funcBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + func_ = java.util.Collections.unmodifiableList(func_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.func_ = func_; + } else { + result.func_ = funcBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.AttrValue.ListValue) { + return mergeFrom((org.tensorflow.proto.framework.AttrValue.ListValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.AttrValue.ListValue other) { + if (other == org.tensorflow.proto.framework.AttrValue.ListValue.getDefaultInstance()) return this; + if (!other.s_.isEmpty()) { + if (s_.isEmpty()) { + s_ = other.s_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSIsMutable(); + s_.addAll(other.s_); + } + onChanged(); + } + if (!other.i_.isEmpty()) { + if (i_.isEmpty()) { + i_ = other.i_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureIIsMutable(); + i_.addAll(other.i_); + } + onChanged(); + } + if (!other.f_.isEmpty()) { + if (f_.isEmpty()) { + f_ = other.f_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureFIsMutable(); + f_.addAll(other.f_); + } + onChanged(); + } + if (!other.b_.isEmpty()) { + if (b_.isEmpty()) { + b_ = other.b_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureBIsMutable(); + b_.addAll(other.b_); + } + onChanged(); + } + if (!other.type_.isEmpty()) { + if (type_.isEmpty()) { + type_ = other.type_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureTypeIsMutable(); + type_.addAll(other.type_); + } + onChanged(); + } + if (shapeBuilder_ == null) { + if (!other.shape_.isEmpty()) { + if (shape_.isEmpty()) { + shape_ = other.shape_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureShapeIsMutable(); + shape_.addAll(other.shape_); + } + onChanged(); + } + } else { + if (!other.shape_.isEmpty()) { + if (shapeBuilder_.isEmpty()) { + shapeBuilder_.dispose(); + shapeBuilder_ = null; + shape_ = other.shape_; + bitField0_ = (bitField0_ & ~0x00000020); + shapeBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getShapeFieldBuilder() : null; + } else { + shapeBuilder_.addAllMessages(other.shape_); + } + } + } + if (tensorBuilder_ == null) { + if (!other.tensor_.isEmpty()) { + if (tensor_.isEmpty()) { + tensor_ = other.tensor_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureTensorIsMutable(); + tensor_.addAll(other.tensor_); + } + onChanged(); + } + } else { + if (!other.tensor_.isEmpty()) { + if (tensorBuilder_.isEmpty()) { + tensorBuilder_.dispose(); + tensorBuilder_ = null; + tensor_ = other.tensor_; + bitField0_ = (bitField0_ & ~0x00000040); + tensorBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTensorFieldBuilder() : null; + } else { + tensorBuilder_.addAllMessages(other.tensor_); + } + } + } + if (funcBuilder_ == null) { + if (!other.func_.isEmpty()) { + if (func_.isEmpty()) { + func_ = other.func_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureFuncIsMutable(); + func_.addAll(other.func_); + } + onChanged(); + } + } else { + if (!other.func_.isEmpty()) { + if (funcBuilder_.isEmpty()) { + funcBuilder_.dispose(); + funcBuilder_ = null; + func_ = other.func_; + bitField0_ = (bitField0_ & ~0x00000080); + funcBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFuncFieldBuilder() : null; + } else { + funcBuilder_.addAllMessages(other.func_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.AttrValue.ListValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.AttrValue.ListValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List s_ = java.util.Collections.emptyList(); + private void ensureSIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + s_ = new java.util.ArrayList(s_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * "list(string)"
+       * 
+ * + * repeated bytes s = 2; + */ + public java.util.List + getSList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(s_) : s_; + } + /** + *
+       * "list(string)"
+       * 
+ * + * repeated bytes s = 2; + */ + public int getSCount() { + return s_.size(); + } + /** + *
+       * "list(string)"
+       * 
+ * + * repeated bytes s = 2; + */ + public com.google.protobuf.ByteString getS(int index) { + return s_.get(index); + } + /** + *
+       * "list(string)"
+       * 
+ * + * repeated bytes s = 2; + */ + public Builder setS( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSIsMutable(); + s_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * "list(string)"
+       * 
+ * + * repeated bytes s = 2; + */ + public Builder addS(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSIsMutable(); + s_.add(value); + onChanged(); + return this; + } + /** + *
+       * "list(string)"
+       * 
+ * + * repeated bytes s = 2; + */ + public Builder addAllS( + java.lang.Iterable values) { + ensureSIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, s_); + onChanged(); + return this; + } + /** + *
+       * "list(string)"
+       * 
+ * + * repeated bytes s = 2; + */ + public Builder clearS() { + s_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList i_ = emptyLongList(); + private void ensureIIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + i_ = mutableCopy(i_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       * "list(int)"
+       * 
+ * + * repeated int64 i = 3 [packed = true]; + */ + public java.util.List + getIList() { + return ((bitField0_ & 0x00000002) != 0) ? + java.util.Collections.unmodifiableList(i_) : i_; + } + /** + *
+       * "list(int)"
+       * 
+ * + * repeated int64 i = 3 [packed = true]; + */ + public int getICount() { + return i_.size(); + } + /** + *
+       * "list(int)"
+       * 
+ * + * repeated int64 i = 3 [packed = true]; + */ + public long getI(int index) { + return i_.getLong(index); + } + /** + *
+       * "list(int)"
+       * 
+ * + * repeated int64 i = 3 [packed = true]; + */ + public Builder setI( + int index, long value) { + ensureIIsMutable(); + i_.setLong(index, value); + onChanged(); + return this; + } + /** + *
+       * "list(int)"
+       * 
+ * + * repeated int64 i = 3 [packed = true]; + */ + public Builder addI(long value) { + ensureIIsMutable(); + i_.addLong(value); + onChanged(); + return this; + } + /** + *
+       * "list(int)"
+       * 
+ * + * repeated int64 i = 3 [packed = true]; + */ + public Builder addAllI( + java.lang.Iterable values) { + ensureIIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, i_); + onChanged(); + return this; + } + /** + *
+       * "list(int)"
+       * 
+ * + * repeated int64 i = 3 [packed = true]; + */ + public Builder clearI() { + i_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.FloatList f_ = emptyFloatList(); + private void ensureFIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + f_ = mutableCopy(f_); + bitField0_ |= 0x00000004; + } + } + /** + *
+       * "list(float)"
+       * 
+ * + * repeated float f = 4 [packed = true]; + */ + public java.util.List + getFList() { + return ((bitField0_ & 0x00000004) != 0) ? + java.util.Collections.unmodifiableList(f_) : f_; + } + /** + *
+       * "list(float)"
+       * 
+ * + * repeated float f = 4 [packed = true]; + */ + public int getFCount() { + return f_.size(); + } + /** + *
+       * "list(float)"
+       * 
+ * + * repeated float f = 4 [packed = true]; + */ + public float getF(int index) { + return f_.getFloat(index); + } + /** + *
+       * "list(float)"
+       * 
+ * + * repeated float f = 4 [packed = true]; + */ + public Builder setF( + int index, float value) { + ensureFIsMutable(); + f_.setFloat(index, value); + onChanged(); + return this; + } + /** + *
+       * "list(float)"
+       * 
+ * + * repeated float f = 4 [packed = true]; + */ + public Builder addF(float value) { + ensureFIsMutable(); + f_.addFloat(value); + onChanged(); + return this; + } + /** + *
+       * "list(float)"
+       * 
+ * + * repeated float f = 4 [packed = true]; + */ + public Builder addAllF( + java.lang.Iterable values) { + ensureFIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, f_); + onChanged(); + return this; + } + /** + *
+       * "list(float)"
+       * 
+ * + * repeated float f = 4 [packed = true]; + */ + public Builder clearF() { + f_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.BooleanList b_ = emptyBooleanList(); + private void ensureBIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + b_ = mutableCopy(b_); + bitField0_ |= 0x00000008; + } + } + /** + *
+       * "list(bool)"
+       * 
+ * + * repeated bool b = 5 [packed = true]; + */ + public java.util.List + getBList() { + return ((bitField0_ & 0x00000008) != 0) ? + java.util.Collections.unmodifiableList(b_) : b_; + } + /** + *
+       * "list(bool)"
+       * 
+ * + * repeated bool b = 5 [packed = true]; + */ + public int getBCount() { + return b_.size(); + } + /** + *
+       * "list(bool)"
+       * 
+ * + * repeated bool b = 5 [packed = true]; + */ + public boolean getB(int index) { + return b_.getBoolean(index); + } + /** + *
+       * "list(bool)"
+       * 
+ * + * repeated bool b = 5 [packed = true]; + */ + public Builder setB( + int index, boolean value) { + ensureBIsMutable(); + b_.setBoolean(index, value); + onChanged(); + return this; + } + /** + *
+       * "list(bool)"
+       * 
+ * + * repeated bool b = 5 [packed = true]; + */ + public Builder addB(boolean value) { + ensureBIsMutable(); + b_.addBoolean(value); + onChanged(); + return this; + } + /** + *
+       * "list(bool)"
+       * 
+ * + * repeated bool b = 5 [packed = true]; + */ + public Builder addAllB( + java.lang.Iterable values) { + ensureBIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, b_); + onChanged(); + return this; + } + /** + *
+       * "list(bool)"
+       * 
+ * + * repeated bool b = 5 [packed = true]; + */ + public Builder clearB() { + b_ = emptyBooleanList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + private java.util.List type_ = + java.util.Collections.emptyList(); + private void ensureTypeIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + type_ = new java.util.ArrayList(type_); + bitField0_ |= 0x00000010; + } + } + /** + *
+       * "list(type)"
+       * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public java.util.List getTypeList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, org.tensorflow.proto.framework.DataType>(type_, type_converter_); + } + /** + *
+       * "list(type)"
+       * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public int getTypeCount() { + return type_.size(); + } + /** + *
+       * "list(type)"
+       * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public org.tensorflow.proto.framework.DataType getType(int index) { + return type_converter_.convert(type_.get(index)); + } + /** + *
+       * "list(type)"
+       * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public Builder setType( + int index, org.tensorflow.proto.framework.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + *
+       * "list(type)"
+       * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public Builder addType(org.tensorflow.proto.framework.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.add(value.getNumber()); + onChanged(); + return this; + } + /** + *
+       * "list(type)"
+       * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public Builder addAllType( + java.lang.Iterable values) { + ensureTypeIsMutable(); + for (org.tensorflow.proto.framework.DataType value : values) { + type_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + *
+       * "list(type)"
+       * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public Builder clearType() { + type_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+       * "list(type)"
+       * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public java.util.List + getTypeValueList() { + return java.util.Collections.unmodifiableList(type_); + } + /** + *
+       * "list(type)"
+       * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public int getTypeValue(int index) { + return type_.get(index); + } + /** + *
+       * "list(type)"
+       * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public Builder setTypeValue( + int index, int value) { + ensureTypeIsMutable(); + type_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * "list(type)"
+       * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public Builder addTypeValue(int value) { + ensureTypeIsMutable(); + type_.add(value); + onChanged(); + return this; + } + /** + *
+       * "list(type)"
+       * 
+ * + * repeated .tensorflow.DataType type = 6 [packed = true]; + */ + public Builder addAllTypeValue( + java.lang.Iterable values) { + ensureTypeIsMutable(); + for (int value : values) { + type_.add(value); + } + onChanged(); + return this; + } + + private java.util.List shape_ = + java.util.Collections.emptyList(); + private void ensureShapeIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + shape_ = new java.util.ArrayList(shape_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> shapeBuilder_; + + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public java.util.List getShapeList() { + if (shapeBuilder_ == null) { + return java.util.Collections.unmodifiableList(shape_); + } else { + return shapeBuilder_.getMessageList(); + } + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public int getShapeCount() { + if (shapeBuilder_ == null) { + return shape_.size(); + } else { + return shapeBuilder_.getCount(); + } + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public org.tensorflow.proto.framework.TensorShapeProto getShape(int index) { + if (shapeBuilder_ == null) { + return shape_.get(index); + } else { + return shapeBuilder_.getMessage(index); + } + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public Builder setShape( + int index, org.tensorflow.proto.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; + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public Builder setShape( + int index, org.tensorflow.proto.framework.TensorShapeProto.Builder builderForValue) { + if (shapeBuilder_ == null) { + ensureShapeIsMutable(); + shape_.set(index, builderForValue.build()); + onChanged(); + } else { + shapeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public Builder addShape(org.tensorflow.proto.framework.TensorShapeProto value) { + if (shapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShapeIsMutable(); + shape_.add(value); + onChanged(); + } else { + shapeBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public Builder addShape( + int index, org.tensorflow.proto.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; + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public Builder addShape( + org.tensorflow.proto.framework.TensorShapeProto.Builder builderForValue) { + if (shapeBuilder_ == null) { + ensureShapeIsMutable(); + shape_.add(builderForValue.build()); + onChanged(); + } else { + shapeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public Builder addShape( + int index, org.tensorflow.proto.framework.TensorShapeProto.Builder builderForValue) { + if (shapeBuilder_ == null) { + ensureShapeIsMutable(); + shape_.add(index, builderForValue.build()); + onChanged(); + } else { + shapeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public Builder addAllShape( + java.lang.Iterable values) { + if (shapeBuilder_ == null) { + ensureShapeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, shape_); + onChanged(); + } else { + shapeBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public Builder clearShape() { + if (shapeBuilder_ == null) { + shape_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + shapeBuilder_.clear(); + } + return this; + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public Builder removeShape(int index) { + if (shapeBuilder_ == null) { + ensureShapeIsMutable(); + shape_.remove(index); + onChanged(); + } else { + shapeBuilder_.remove(index); + } + return this; + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public org.tensorflow.proto.framework.TensorShapeProto.Builder getShapeBuilder( + int index) { + return getShapeFieldBuilder().getBuilder(index); + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder( + int index) { + if (shapeBuilder_ == null) { + return shape_.get(index); } else { + return shapeBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public java.util.List + getShapeOrBuilderList() { + if (shapeBuilder_ != null) { + return shapeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(shape_); + } + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public org.tensorflow.proto.framework.TensorShapeProto.Builder addShapeBuilder() { + return getShapeFieldBuilder().addBuilder( + org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance()); + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public org.tensorflow.proto.framework.TensorShapeProto.Builder addShapeBuilder( + int index) { + return getShapeFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance()); + } + /** + *
+       * "list(shape)"
+       * 
+ * + * repeated .tensorflow.TensorShapeProto shape = 7; + */ + public java.util.List + getShapeBuilderList() { + return getShapeFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> + getShapeFieldBuilder() { + if (shapeBuilder_ == null) { + shapeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder>( + shape_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + shape_ = null; + } + return shapeBuilder_; + } + + private java.util.List tensor_ = + java.util.Collections.emptyList(); + private void ensureTensorIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + tensor_ = new java.util.ArrayList(tensor_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.TensorProto, org.tensorflow.proto.framework.TensorProto.Builder, org.tensorflow.proto.framework.TensorProtoOrBuilder> tensorBuilder_; + + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public java.util.List getTensorList() { + if (tensorBuilder_ == null) { + return java.util.Collections.unmodifiableList(tensor_); + } else { + return tensorBuilder_.getMessageList(); + } + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public int getTensorCount() { + if (tensorBuilder_ == null) { + return tensor_.size(); + } else { + return tensorBuilder_.getCount(); + } + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public org.tensorflow.proto.framework.TensorProto getTensor(int index) { + if (tensorBuilder_ == null) { + return tensor_.get(index); + } else { + return tensorBuilder_.getMessage(index); + } + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public Builder setTensor( + int index, org.tensorflow.proto.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; + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public Builder setTensor( + int index, org.tensorflow.proto.framework.TensorProto.Builder builderForValue) { + if (tensorBuilder_ == null) { + ensureTensorIsMutable(); + tensor_.set(index, builderForValue.build()); + onChanged(); + } else { + tensorBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public Builder addTensor(org.tensorflow.proto.framework.TensorProto value) { + if (tensorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTensorIsMutable(); + tensor_.add(value); + onChanged(); + } else { + tensorBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public Builder addTensor( + int index, org.tensorflow.proto.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; + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public Builder addTensor( + org.tensorflow.proto.framework.TensorProto.Builder builderForValue) { + if (tensorBuilder_ == null) { + ensureTensorIsMutable(); + tensor_.add(builderForValue.build()); + onChanged(); + } else { + tensorBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public Builder addTensor( + int index, org.tensorflow.proto.framework.TensorProto.Builder builderForValue) { + if (tensorBuilder_ == null) { + ensureTensorIsMutable(); + tensor_.add(index, builderForValue.build()); + onChanged(); + } else { + tensorBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public Builder addAllTensor( + java.lang.Iterable values) { + if (tensorBuilder_ == null) { + ensureTensorIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tensor_); + onChanged(); + } else { + tensorBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public Builder clearTensor() { + if (tensorBuilder_ == null) { + tensor_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + tensorBuilder_.clear(); + } + return this; + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public Builder removeTensor(int index) { + if (tensorBuilder_ == null) { + ensureTensorIsMutable(); + tensor_.remove(index); + onChanged(); + } else { + tensorBuilder_.remove(index); + } + return this; + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public org.tensorflow.proto.framework.TensorProto.Builder getTensorBuilder( + int index) { + return getTensorFieldBuilder().getBuilder(index); + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public org.tensorflow.proto.framework.TensorProtoOrBuilder getTensorOrBuilder( + int index) { + if (tensorBuilder_ == null) { + return tensor_.get(index); } else { + return tensorBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public java.util.List + getTensorOrBuilderList() { + if (tensorBuilder_ != null) { + return tensorBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tensor_); + } + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public org.tensorflow.proto.framework.TensorProto.Builder addTensorBuilder() { + return getTensorFieldBuilder().addBuilder( + org.tensorflow.proto.framework.TensorProto.getDefaultInstance()); + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public org.tensorflow.proto.framework.TensorProto.Builder addTensorBuilder( + int index) { + return getTensorFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.TensorProto.getDefaultInstance()); + } + /** + *
+       * "list(tensor)"
+       * 
+ * + * repeated .tensorflow.TensorProto tensor = 8; + */ + public java.util.List + getTensorBuilderList() { + return getTensorFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.TensorProto, org.tensorflow.proto.framework.TensorProto.Builder, org.tensorflow.proto.framework.TensorProtoOrBuilder> + getTensorFieldBuilder() { + if (tensorBuilder_ == null) { + tensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.TensorProto, org.tensorflow.proto.framework.TensorProto.Builder, org.tensorflow.proto.framework.TensorProtoOrBuilder>( + tensor_, + ((bitField0_ & 0x00000040) != 0), + getParentForChildren(), + isClean()); + tensor_ = null; + } + return tensorBuilder_; + } + + private java.util.List func_ = + java.util.Collections.emptyList(); + private void ensureFuncIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + func_ = new java.util.ArrayList(func_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.NameAttrList, org.tensorflow.proto.framework.NameAttrList.Builder, org.tensorflow.proto.framework.NameAttrListOrBuilder> funcBuilder_; + + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public java.util.List getFuncList() { + if (funcBuilder_ == null) { + return java.util.Collections.unmodifiableList(func_); + } else { + return funcBuilder_.getMessageList(); + } + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public int getFuncCount() { + if (funcBuilder_ == null) { + return func_.size(); + } else { + return funcBuilder_.getCount(); + } + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public org.tensorflow.proto.framework.NameAttrList getFunc(int index) { + if (funcBuilder_ == null) { + return func_.get(index); + } else { + return funcBuilder_.getMessage(index); + } + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public Builder setFunc( + int index, org.tensorflow.proto.framework.NameAttrList value) { + if (funcBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFuncIsMutable(); + func_.set(index, value); + onChanged(); + } else { + funcBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public Builder setFunc( + int index, org.tensorflow.proto.framework.NameAttrList.Builder builderForValue) { + if (funcBuilder_ == null) { + ensureFuncIsMutable(); + func_.set(index, builderForValue.build()); + onChanged(); + } else { + funcBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public Builder addFunc(org.tensorflow.proto.framework.NameAttrList value) { + if (funcBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFuncIsMutable(); + func_.add(value); + onChanged(); + } else { + funcBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public Builder addFunc( + int index, org.tensorflow.proto.framework.NameAttrList value) { + if (funcBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFuncIsMutable(); + func_.add(index, value); + onChanged(); + } else { + funcBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public Builder addFunc( + org.tensorflow.proto.framework.NameAttrList.Builder builderForValue) { + if (funcBuilder_ == null) { + ensureFuncIsMutable(); + func_.add(builderForValue.build()); + onChanged(); + } else { + funcBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public Builder addFunc( + int index, org.tensorflow.proto.framework.NameAttrList.Builder builderForValue) { + if (funcBuilder_ == null) { + ensureFuncIsMutable(); + func_.add(index, builderForValue.build()); + onChanged(); + } else { + funcBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public Builder addAllFunc( + java.lang.Iterable values) { + if (funcBuilder_ == null) { + ensureFuncIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, func_); + onChanged(); + } else { + funcBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public Builder clearFunc() { + if (funcBuilder_ == null) { + func_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + funcBuilder_.clear(); + } + return this; + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public Builder removeFunc(int index) { + if (funcBuilder_ == null) { + ensureFuncIsMutable(); + func_.remove(index); + onChanged(); + } else { + funcBuilder_.remove(index); + } + return this; + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public org.tensorflow.proto.framework.NameAttrList.Builder getFuncBuilder( + int index) { + return getFuncFieldBuilder().getBuilder(index); + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public org.tensorflow.proto.framework.NameAttrListOrBuilder getFuncOrBuilder( + int index) { + if (funcBuilder_ == null) { + return func_.get(index); } else { + return funcBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public java.util.List + getFuncOrBuilderList() { + if (funcBuilder_ != null) { + return funcBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(func_); + } + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public org.tensorflow.proto.framework.NameAttrList.Builder addFuncBuilder() { + return getFuncFieldBuilder().addBuilder( + org.tensorflow.proto.framework.NameAttrList.getDefaultInstance()); + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public org.tensorflow.proto.framework.NameAttrList.Builder addFuncBuilder( + int index) { + return getFuncFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.NameAttrList.getDefaultInstance()); + } + /** + *
+       * "list(attr)"
+       * 
+ * + * repeated .tensorflow.NameAttrList func = 9; + */ + public java.util.List + getFuncBuilderList() { + return getFuncFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.NameAttrList, org.tensorflow.proto.framework.NameAttrList.Builder, org.tensorflow.proto.framework.NameAttrListOrBuilder> + getFuncFieldBuilder() { + if (funcBuilder_ == null) { + funcBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.NameAttrList, org.tensorflow.proto.framework.NameAttrList.Builder, org.tensorflow.proto.framework.NameAttrListOrBuilder>( + func_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + func_ = null; + } + return funcBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.AttrValue.ListValue) + } + + // @@protoc_insertion_point(class_scope:tensorflow.AttrValue.ListValue) + private static final org.tensorflow.proto.framework.AttrValue.ListValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.AttrValue.ListValue(); + } + + public static org.tensorflow.proto.framework.AttrValue.ListValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AttrValue.ListValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int valueCase_ = 0; + private java.lang.Object value_; + public enum ValueCase + implements com.google.protobuf.Internal.EnumLite { + S(2), + I(3), + F(4), + B(5), + TYPE(6), + SHAPE(7), + TENSOR(8), + LIST(1), + FUNC(10), + PLACEHOLDER(9), + VALUE_NOT_SET(0); + private final int value; + private ValueCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 2: return S; + case 3: return I; + case 4: return F; + case 5: return B; + case 6: return TYPE; + case 7: return SHAPE; + case 8: return TENSOR; + case 1: return LIST; + case 10: return FUNC; + case 9: return PLACEHOLDER; + case 0: return VALUE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ValueCase + getValueCase() { + return ValueCase.forNumber( + valueCase_); + } + + public static final int S_FIELD_NUMBER = 2; + /** + *
+   * "string"
+   * 
+ * + * bytes s = 2; + */ + 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; + /** + *
+   * "int"
+   * 
+ * + * int64 i = 3; + */ + public long getI() { + if (valueCase_ == 3) { + return (java.lang.Long) value_; + } + return 0L; + } + + public static final int F_FIELD_NUMBER = 4; + /** + *
+   * "float"
+   * 
+ * + * float f = 4; + */ + public float getF() { + if (valueCase_ == 4) { + return (java.lang.Float) value_; + } + return 0F; + } + + public static final int B_FIELD_NUMBER = 5; + /** + *
+   * "bool"
+   * 
+ * + * bool b = 5; + */ + public boolean getB() { + if (valueCase_ == 5) { + return (java.lang.Boolean) value_; + } + return false; + } + + public static final int TYPE_FIELD_NUMBER = 6; + /** + *
+   * "type"
+   * 
+ * + * .tensorflow.DataType type = 6; + */ + public int getTypeValue() { + if (valueCase_ == 6) { + return (java.lang.Integer) value_; + } + return 0; + } + /** + *
+   * "type"
+   * 
+ * + * .tensorflow.DataType type = 6; + */ + public org.tensorflow.proto.framework.DataType getType() { + if (valueCase_ == 6) { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf( + (java.lang.Integer) value_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + return org.tensorflow.proto.framework.DataType.DT_INVALID; + } + + public static final int SHAPE_FIELD_NUMBER = 7; + /** + *
+   * "shape"
+   * 
+ * + * .tensorflow.TensorShapeProto shape = 7; + */ + public boolean hasShape() { + return valueCase_ == 7; + } + /** + *
+   * "shape"
+   * 
+ * + * .tensorflow.TensorShapeProto shape = 7; + */ + public org.tensorflow.proto.framework.TensorShapeProto getShape() { + if (valueCase_ == 7) { + return (org.tensorflow.proto.framework.TensorShapeProto) value_; + } + return org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance(); + } + /** + *
+   * "shape"
+   * 
+ * + * .tensorflow.TensorShapeProto shape = 7; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { + if (valueCase_ == 7) { + return (org.tensorflow.proto.framework.TensorShapeProto) value_; + } + return org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance(); + } + + public static final int TENSOR_FIELD_NUMBER = 8; + /** + *
+   * "tensor"
+   * 
+ * + * .tensorflow.TensorProto tensor = 8; + */ + public boolean hasTensor() { + return valueCase_ == 8; + } + /** + *
+   * "tensor"
+   * 
+ * + * .tensorflow.TensorProto tensor = 8; + */ + public org.tensorflow.proto.framework.TensorProto getTensor() { + if (valueCase_ == 8) { + return (org.tensorflow.proto.framework.TensorProto) value_; + } + return org.tensorflow.proto.framework.TensorProto.getDefaultInstance(); + } + /** + *
+   * "tensor"
+   * 
+ * + * .tensorflow.TensorProto tensor = 8; + */ + public org.tensorflow.proto.framework.TensorProtoOrBuilder getTensorOrBuilder() { + if (valueCase_ == 8) { + return (org.tensorflow.proto.framework.TensorProto) value_; + } + return org.tensorflow.proto.framework.TensorProto.getDefaultInstance(); + } + + public static final int LIST_FIELD_NUMBER = 1; + /** + *
+   * any "list(...)"
+   * 
+ * + * .tensorflow.AttrValue.ListValue list = 1; + */ + public boolean hasList() { + return valueCase_ == 1; + } + /** + *
+   * any "list(...)"
+   * 
+ * + * .tensorflow.AttrValue.ListValue list = 1; + */ + public org.tensorflow.proto.framework.AttrValue.ListValue getList() { + if (valueCase_ == 1) { + return (org.tensorflow.proto.framework.AttrValue.ListValue) value_; + } + return org.tensorflow.proto.framework.AttrValue.ListValue.getDefaultInstance(); + } + /** + *
+   * any "list(...)"
+   * 
+ * + * .tensorflow.AttrValue.ListValue list = 1; + */ + public org.tensorflow.proto.framework.AttrValue.ListValueOrBuilder getListOrBuilder() { + if (valueCase_ == 1) { + return (org.tensorflow.proto.framework.AttrValue.ListValue) value_; + } + return org.tensorflow.proto.framework.AttrValue.ListValue.getDefaultInstance(); + } + + public static final int FUNC_FIELD_NUMBER = 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.
+   * 
+ * + * .tensorflow.NameAttrList func = 10; + */ + public boolean hasFunc() { + return valueCase_ == 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.
+   * 
+ * + * .tensorflow.NameAttrList func = 10; + */ + public org.tensorflow.proto.framework.NameAttrList getFunc() { + if (valueCase_ == 10) { + return (org.tensorflow.proto.framework.NameAttrList) value_; + } + return org.tensorflow.proto.framework.NameAttrList.getDefaultInstance(); + } + /** + *
+   * "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.
+   * 
+ * + * .tensorflow.NameAttrList func = 10; + */ + public org.tensorflow.proto.framework.NameAttrListOrBuilder getFuncOrBuilder() { + if (valueCase_ == 10) { + return (org.tensorflow.proto.framework.NameAttrList) value_; + } + return org.tensorflow.proto.framework.NameAttrList.getDefaultInstance(); + } + + public static final int PLACEHOLDER_FIELD_NUMBER = 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".
+   * 
+ * + * string placeholder = 9; + */ + 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; + } + } + /** + *
+   * 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".
+   * 
+ * + * string placeholder = 9; + */ + 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; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (valueCase_ == 1) { + output.writeMessage(1, (org.tensorflow.proto.framework.AttrValue.ListValue) value_); + } + if (valueCase_ == 2) { + output.writeBytes( + 2, (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.proto.framework.TensorShapeProto) value_); + } + if (valueCase_ == 8) { + output.writeMessage(8, (org.tensorflow.proto.framework.TensorProto) value_); + } + if (valueCase_ == 9) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, value_); + } + if (valueCase_ == 10) { + output.writeMessage(10, (org.tensorflow.proto.framework.NameAttrList) value_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + 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.proto.framework.AttrValue.ListValue) value_); + } + if (valueCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize( + 2, (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.proto.framework.TensorShapeProto) value_); + } + if (valueCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (org.tensorflow.proto.framework.TensorProto) value_); + } + if (valueCase_ == 9) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, value_); + } + if (valueCase_ == 10) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, (org.tensorflow.proto.framework.NameAttrList) value_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.AttrValue)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.AttrValue other = (org.tensorflow.proto.framework.AttrValue) obj; + + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 2: + if (!getS() + .equals(other.getS())) return false; + break; + case 3: + if (getI() + != other.getI()) return false; + break; + case 4: + if (java.lang.Float.floatToIntBits(getF()) + != java.lang.Float.floatToIntBits( + other.getF())) return false; + break; + case 5: + if (getB() + != other.getB()) return false; + break; + case 6: + if (getTypeValue() + != other.getTypeValue()) return false; + break; + case 7: + if (!getShape() + .equals(other.getShape())) return false; + break; + case 8: + if (!getTensor() + .equals(other.getTensor())) return false; + break; + case 1: + if (!getList() + .equals(other.getList())) return false; + break; + case 10: + if (!getFunc() + .equals(other.getFunc())) return false; + break; + case 9: + if (!getPlaceholder() + .equals(other.getPlaceholder())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (valueCase_) { + case 2: + hash = (37 * hash) + S_FIELD_NUMBER; + hash = (53 * hash) + getS().hashCode(); + break; + case 3: + hash = (37 * hash) + I_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getI()); + break; + case 4: + hash = (37 * hash) + F_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getF()); + break; + case 5: + hash = (37 * hash) + B_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getB()); + break; + case 6: + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getTypeValue(); + break; + case 7: + hash = (37 * hash) + SHAPE_FIELD_NUMBER; + hash = (53 * hash) + getShape().hashCode(); + break; + case 8: + hash = (37 * hash) + TENSOR_FIELD_NUMBER; + hash = (53 * hash) + getTensor().hashCode(); + break; + case 1: + hash = (37 * hash) + LIST_FIELD_NUMBER; + hash = (53 * hash) + getList().hashCode(); + break; + case 10: + hash = (37 * hash) + FUNC_FIELD_NUMBER; + hash = (53 * hash) + getFunc().hashCode(); + break; + case 9: + hash = (37 * hash) + PLACEHOLDER_FIELD_NUMBER; + hash = (53 * hash) + getPlaceholder().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.AttrValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.AttrValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.AttrValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.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.proto.framework.AttrValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.AttrValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.AttrValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AttrValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.AttrValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AttrValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.AttrValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AttrValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.AttrValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * 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.
+   * 
+ * + * Protobuf type {@code tensorflow.AttrValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.AttrValue) + org.tensorflow.proto.framework.AttrValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.AttrValue.class, org.tensorflow.proto.framework.AttrValue.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.AttrValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AttrValue getDefaultInstanceForType() { + return org.tensorflow.proto.framework.AttrValue.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.AttrValue build() { + org.tensorflow.proto.framework.AttrValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AttrValue buildPartial() { + org.tensorflow.proto.framework.AttrValue result = new org.tensorflow.proto.framework.AttrValue(this); + if (valueCase_ == 2) { + result.value_ = value_; + } + if (valueCase_ == 3) { + result.value_ = value_; + } + if (valueCase_ == 4) { + result.value_ = value_; + } + if (valueCase_ == 5) { + result.value_ = value_; + } + if (valueCase_ == 6) { + result.value_ = value_; + } + if (valueCase_ == 7) { + if (shapeBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = shapeBuilder_.build(); + } + } + if (valueCase_ == 8) { + if (tensorBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = tensorBuilder_.build(); + } + } + if (valueCase_ == 1) { + if (listBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = listBuilder_.build(); + } + } + if (valueCase_ == 10) { + if (funcBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = funcBuilder_.build(); + } + } + if (valueCase_ == 9) { + result.value_ = value_; + } + result.valueCase_ = valueCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.AttrValue) { + return mergeFrom((org.tensorflow.proto.framework.AttrValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.AttrValue other) { + if (other == org.tensorflow.proto.framework.AttrValue.getDefaultInstance()) return this; + switch (other.getValueCase()) { + case S: { + setS(other.getS()); + break; + } + case I: { + setI(other.getI()); + break; + } + case F: { + setF(other.getF()); + break; + } + case B: { + setB(other.getB()); + break; + } + case TYPE: { + setTypeValue(other.getTypeValue()); + break; + } + case SHAPE: { + mergeShape(other.getShape()); + break; + } + case TENSOR: { + mergeTensor(other.getTensor()); + break; + } + case LIST: { + mergeList(other.getList()); + break; + } + case FUNC: { + mergeFunc(other.getFunc()); + break; + } + case PLACEHOLDER: { + valueCase_ = 9; + value_ = other.value_; + onChanged(); + break; + } + case VALUE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.AttrValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.AttrValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int valueCase_ = 0; + private java.lang.Object value_; + public ValueCase + getValueCase() { + return ValueCase.forNumber( + valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + + /** + *
+     * "string"
+     * 
+ * + * bytes s = 2; + */ + public com.google.protobuf.ByteString getS() { + if (valueCase_ == 2) { + return (com.google.protobuf.ByteString) value_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + *
+     * "string"
+     * 
+ * + * bytes s = 2; + */ + public Builder setS(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + /** + *
+     * "string"
+     * 
+ * + * bytes s = 2; + */ + public Builder clearS() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * "int"
+     * 
+ * + * int64 i = 3; + */ + public long getI() { + if (valueCase_ == 3) { + return (java.lang.Long) value_; + } + return 0L; + } + /** + *
+     * "int"
+     * 
+ * + * int64 i = 3; + */ + public Builder setI(long value) { + valueCase_ = 3; + value_ = value; + onChanged(); + return this; + } + /** + *
+     * "int"
+     * 
+ * + * int64 i = 3; + */ + public Builder clearI() { + if (valueCase_ == 3) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * "float"
+     * 
+ * + * float f = 4; + */ + public float getF() { + if (valueCase_ == 4) { + return (java.lang.Float) value_; + } + return 0F; + } + /** + *
+     * "float"
+     * 
+ * + * float f = 4; + */ + public Builder setF(float value) { + valueCase_ = 4; + value_ = value; + onChanged(); + return this; + } + /** + *
+     * "float"
+     * 
+ * + * float f = 4; + */ + public Builder clearF() { + if (valueCase_ == 4) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * "bool"
+     * 
+ * + * bool b = 5; + */ + public boolean getB() { + if (valueCase_ == 5) { + return (java.lang.Boolean) value_; + } + return false; + } + /** + *
+     * "bool"
+     * 
+ * + * bool b = 5; + */ + public Builder setB(boolean value) { + valueCase_ = 5; + value_ = value; + onChanged(); + return this; + } + /** + *
+     * "bool"
+     * 
+ * + * bool b = 5; + */ + public Builder clearB() { + if (valueCase_ == 5) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * "type"
+     * 
+ * + * .tensorflow.DataType type = 6; + */ + public int getTypeValue() { + if (valueCase_ == 6) { + return ((java.lang.Integer) value_).intValue(); + } + return 0; + } + /** + *
+     * "type"
+     * 
+ * + * .tensorflow.DataType type = 6; + */ + public Builder setTypeValue(int value) { + valueCase_ = 6; + value_ = value; + onChanged(); + return this; + } + /** + *
+     * "type"
+     * 
+ * + * .tensorflow.DataType type = 6; + */ + public org.tensorflow.proto.framework.DataType getType() { + if (valueCase_ == 6) { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf( + (java.lang.Integer) value_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + return org.tensorflow.proto.framework.DataType.DT_INVALID; + } + /** + *
+     * "type"
+     * 
+ * + * .tensorflow.DataType type = 6; + */ + public Builder setType(org.tensorflow.proto.framework.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + valueCase_ = 6; + value_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * "type"
+     * 
+ * + * .tensorflow.DataType type = 6; + */ + public Builder clearType() { + if (valueCase_ == 6) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> shapeBuilder_; + /** + *
+     * "shape"
+     * 
+ * + * .tensorflow.TensorShapeProto shape = 7; + */ + public boolean hasShape() { + return valueCase_ == 7; + } + /** + *
+     * "shape"
+     * 
+ * + * .tensorflow.TensorShapeProto shape = 7; + */ + public org.tensorflow.proto.framework.TensorShapeProto getShape() { + if (shapeBuilder_ == null) { + if (valueCase_ == 7) { + return (org.tensorflow.proto.framework.TensorShapeProto) value_; + } + return org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance(); + } else { + if (valueCase_ == 7) { + return shapeBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance(); + } + } + /** + *
+     * "shape"
+     * 
+ * + * .tensorflow.TensorShapeProto shape = 7; + */ + public Builder setShape(org.tensorflow.proto.framework.TensorShapeProto value) { + if (shapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + shapeBuilder_.setMessage(value); + } + valueCase_ = 7; + return this; + } + /** + *
+     * "shape"
+     * 
+ * + * .tensorflow.TensorShapeProto shape = 7; + */ + public Builder setShape( + org.tensorflow.proto.framework.TensorShapeProto.Builder builderForValue) { + if (shapeBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + shapeBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 7; + return this; + } + /** + *
+     * "shape"
+     * 
+ * + * .tensorflow.TensorShapeProto shape = 7; + */ + public Builder mergeShape(org.tensorflow.proto.framework.TensorShapeProto value) { + if (shapeBuilder_ == null) { + if (valueCase_ == 7 && + value_ != org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance()) { + value_ = org.tensorflow.proto.framework.TensorShapeProto.newBuilder((org.tensorflow.proto.framework.TensorShapeProto) value_) + .mergeFrom(value).buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 7) { + shapeBuilder_.mergeFrom(value); + } + shapeBuilder_.setMessage(value); + } + valueCase_ = 7; + return this; + } + /** + *
+     * "shape"
+     * 
+ * + * .tensorflow.TensorShapeProto shape = 7; + */ + 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; + } + /** + *
+     * "shape"
+     * 
+ * + * .tensorflow.TensorShapeProto shape = 7; + */ + public org.tensorflow.proto.framework.TensorShapeProto.Builder getShapeBuilder() { + return getShapeFieldBuilder().getBuilder(); + } + /** + *
+     * "shape"
+     * 
+ * + * .tensorflow.TensorShapeProto shape = 7; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { + if ((valueCase_ == 7) && (shapeBuilder_ != null)) { + return shapeBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 7) { + return (org.tensorflow.proto.framework.TensorShapeProto) value_; + } + return org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance(); + } + } + /** + *
+     * "shape"
+     * 
+ * + * .tensorflow.TensorShapeProto shape = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> + getShapeFieldBuilder() { + if (shapeBuilder_ == null) { + if (!(valueCase_ == 7)) { + value_ = org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance(); + } + shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder>( + (org.tensorflow.proto.framework.TensorShapeProto) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 7; + onChanged();; + return shapeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorProto, org.tensorflow.proto.framework.TensorProto.Builder, org.tensorflow.proto.framework.TensorProtoOrBuilder> tensorBuilder_; + /** + *
+     * "tensor"
+     * 
+ * + * .tensorflow.TensorProto tensor = 8; + */ + public boolean hasTensor() { + return valueCase_ == 8; + } + /** + *
+     * "tensor"
+     * 
+ * + * .tensorflow.TensorProto tensor = 8; + */ + public org.tensorflow.proto.framework.TensorProto getTensor() { + if (tensorBuilder_ == null) { + if (valueCase_ == 8) { + return (org.tensorflow.proto.framework.TensorProto) value_; + } + return org.tensorflow.proto.framework.TensorProto.getDefaultInstance(); + } else { + if (valueCase_ == 8) { + return tensorBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.TensorProto.getDefaultInstance(); + } + } + /** + *
+     * "tensor"
+     * 
+ * + * .tensorflow.TensorProto tensor = 8; + */ + public Builder setTensor(org.tensorflow.proto.framework.TensorProto value) { + if (tensorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + tensorBuilder_.setMessage(value); + } + valueCase_ = 8; + return this; + } + /** + *
+     * "tensor"
+     * 
+ * + * .tensorflow.TensorProto tensor = 8; + */ + public Builder setTensor( + org.tensorflow.proto.framework.TensorProto.Builder builderForValue) { + if (tensorBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + tensorBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 8; + return this; + } + /** + *
+     * "tensor"
+     * 
+ * + * .tensorflow.TensorProto tensor = 8; + */ + public Builder mergeTensor(org.tensorflow.proto.framework.TensorProto value) { + if (tensorBuilder_ == null) { + if (valueCase_ == 8 && + value_ != org.tensorflow.proto.framework.TensorProto.getDefaultInstance()) { + value_ = org.tensorflow.proto.framework.TensorProto.newBuilder((org.tensorflow.proto.framework.TensorProto) value_) + .mergeFrom(value).buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 8) { + tensorBuilder_.mergeFrom(value); + } + tensorBuilder_.setMessage(value); + } + valueCase_ = 8; + return this; + } + /** + *
+     * "tensor"
+     * 
+ * + * .tensorflow.TensorProto tensor = 8; + */ + 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; + } + /** + *
+     * "tensor"
+     * 
+ * + * .tensorflow.TensorProto tensor = 8; + */ + public org.tensorflow.proto.framework.TensorProto.Builder getTensorBuilder() { + return getTensorFieldBuilder().getBuilder(); + } + /** + *
+     * "tensor"
+     * 
+ * + * .tensorflow.TensorProto tensor = 8; + */ + public org.tensorflow.proto.framework.TensorProtoOrBuilder getTensorOrBuilder() { + if ((valueCase_ == 8) && (tensorBuilder_ != null)) { + return tensorBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 8) { + return (org.tensorflow.proto.framework.TensorProto) value_; + } + return org.tensorflow.proto.framework.TensorProto.getDefaultInstance(); + } + } + /** + *
+     * "tensor"
+     * 
+ * + * .tensorflow.TensorProto tensor = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorProto, org.tensorflow.proto.framework.TensorProto.Builder, org.tensorflow.proto.framework.TensorProtoOrBuilder> + getTensorFieldBuilder() { + if (tensorBuilder_ == null) { + if (!(valueCase_ == 8)) { + value_ = org.tensorflow.proto.framework.TensorProto.getDefaultInstance(); + } + tensorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorProto, org.tensorflow.proto.framework.TensorProto.Builder, org.tensorflow.proto.framework.TensorProtoOrBuilder>( + (org.tensorflow.proto.framework.TensorProto) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 8; + onChanged();; + return tensorBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AttrValue.ListValue, org.tensorflow.proto.framework.AttrValue.ListValue.Builder, org.tensorflow.proto.framework.AttrValue.ListValueOrBuilder> listBuilder_; + /** + *
+     * any "list(...)"
+     * 
+ * + * .tensorflow.AttrValue.ListValue list = 1; + */ + public boolean hasList() { + return valueCase_ == 1; + } + /** + *
+     * any "list(...)"
+     * 
+ * + * .tensorflow.AttrValue.ListValue list = 1; + */ + public org.tensorflow.proto.framework.AttrValue.ListValue getList() { + if (listBuilder_ == null) { + if (valueCase_ == 1) { + return (org.tensorflow.proto.framework.AttrValue.ListValue) value_; + } + return org.tensorflow.proto.framework.AttrValue.ListValue.getDefaultInstance(); + } else { + if (valueCase_ == 1) { + return listBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.AttrValue.ListValue.getDefaultInstance(); + } + } + /** + *
+     * any "list(...)"
+     * 
+ * + * .tensorflow.AttrValue.ListValue list = 1; + */ + public Builder setList(org.tensorflow.proto.framework.AttrValue.ListValue value) { + if (listBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + listBuilder_.setMessage(value); + } + valueCase_ = 1; + return this; + } + /** + *
+     * any "list(...)"
+     * 
+ * + * .tensorflow.AttrValue.ListValue list = 1; + */ + public Builder setList( + org.tensorflow.proto.framework.AttrValue.ListValue.Builder builderForValue) { + if (listBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + listBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 1; + return this; + } + /** + *
+     * any "list(...)"
+     * 
+ * + * .tensorflow.AttrValue.ListValue list = 1; + */ + public Builder mergeList(org.tensorflow.proto.framework.AttrValue.ListValue value) { + if (listBuilder_ == null) { + if (valueCase_ == 1 && + value_ != org.tensorflow.proto.framework.AttrValue.ListValue.getDefaultInstance()) { + value_ = org.tensorflow.proto.framework.AttrValue.ListValue.newBuilder((org.tensorflow.proto.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; + } + /** + *
+     * any "list(...)"
+     * 
+ * + * .tensorflow.AttrValue.ListValue list = 1; + */ + 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; + } + /** + *
+     * any "list(...)"
+     * 
+ * + * .tensorflow.AttrValue.ListValue list = 1; + */ + public org.tensorflow.proto.framework.AttrValue.ListValue.Builder getListBuilder() { + return getListFieldBuilder().getBuilder(); + } + /** + *
+     * any "list(...)"
+     * 
+ * + * .tensorflow.AttrValue.ListValue list = 1; + */ + public org.tensorflow.proto.framework.AttrValue.ListValueOrBuilder getListOrBuilder() { + if ((valueCase_ == 1) && (listBuilder_ != null)) { + return listBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 1) { + return (org.tensorflow.proto.framework.AttrValue.ListValue) value_; + } + return org.tensorflow.proto.framework.AttrValue.ListValue.getDefaultInstance(); + } + } + /** + *
+     * any "list(...)"
+     * 
+ * + * .tensorflow.AttrValue.ListValue list = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AttrValue.ListValue, org.tensorflow.proto.framework.AttrValue.ListValue.Builder, org.tensorflow.proto.framework.AttrValue.ListValueOrBuilder> + getListFieldBuilder() { + if (listBuilder_ == null) { + if (!(valueCase_ == 1)) { + value_ = org.tensorflow.proto.framework.AttrValue.ListValue.getDefaultInstance(); + } + listBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AttrValue.ListValue, org.tensorflow.proto.framework.AttrValue.ListValue.Builder, org.tensorflow.proto.framework.AttrValue.ListValueOrBuilder>( + (org.tensorflow.proto.framework.AttrValue.ListValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 1; + onChanged();; + return listBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.NameAttrList, org.tensorflow.proto.framework.NameAttrList.Builder, org.tensorflow.proto.framework.NameAttrListOrBuilder> funcBuilder_; + /** + *
+     * "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.
+     * 
+ * + * .tensorflow.NameAttrList func = 10; + */ + public boolean hasFunc() { + return valueCase_ == 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.
+     * 
+ * + * .tensorflow.NameAttrList func = 10; + */ + public org.tensorflow.proto.framework.NameAttrList getFunc() { + if (funcBuilder_ == null) { + if (valueCase_ == 10) { + return (org.tensorflow.proto.framework.NameAttrList) value_; + } + return org.tensorflow.proto.framework.NameAttrList.getDefaultInstance(); + } else { + if (valueCase_ == 10) { + return funcBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.NameAttrList.getDefaultInstance(); + } + } + /** + *
+     * "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.
+     * 
+ * + * .tensorflow.NameAttrList func = 10; + */ + public Builder setFunc(org.tensorflow.proto.framework.NameAttrList value) { + if (funcBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + funcBuilder_.setMessage(value); + } + valueCase_ = 10; + return this; + } + /** + *
+     * "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.
+     * 
+ * + * .tensorflow.NameAttrList func = 10; + */ + public Builder setFunc( + org.tensorflow.proto.framework.NameAttrList.Builder builderForValue) { + if (funcBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + funcBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 10; + return this; + } + /** + *
+     * "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.
+     * 
+ * + * .tensorflow.NameAttrList func = 10; + */ + public Builder mergeFunc(org.tensorflow.proto.framework.NameAttrList value) { + if (funcBuilder_ == null) { + if (valueCase_ == 10 && + value_ != org.tensorflow.proto.framework.NameAttrList.getDefaultInstance()) { + value_ = org.tensorflow.proto.framework.NameAttrList.newBuilder((org.tensorflow.proto.framework.NameAttrList) value_) + .mergeFrom(value).buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 10) { + funcBuilder_.mergeFrom(value); + } + funcBuilder_.setMessage(value); + } + valueCase_ = 10; + return this; + } + /** + *
+     * "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.
+     * 
+ * + * .tensorflow.NameAttrList func = 10; + */ + 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; + } + /** + *
+     * "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.
+     * 
+ * + * .tensorflow.NameAttrList func = 10; + */ + public org.tensorflow.proto.framework.NameAttrList.Builder getFuncBuilder() { + return getFuncFieldBuilder().getBuilder(); + } + /** + *
+     * "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.
+     * 
+ * + * .tensorflow.NameAttrList func = 10; + */ + public org.tensorflow.proto.framework.NameAttrListOrBuilder getFuncOrBuilder() { + if ((valueCase_ == 10) && (funcBuilder_ != null)) { + return funcBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 10) { + return (org.tensorflow.proto.framework.NameAttrList) value_; + } + return org.tensorflow.proto.framework.NameAttrList.getDefaultInstance(); + } + } + /** + *
+     * "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.
+     * 
+ * + * .tensorflow.NameAttrList func = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.NameAttrList, org.tensorflow.proto.framework.NameAttrList.Builder, org.tensorflow.proto.framework.NameAttrListOrBuilder> + getFuncFieldBuilder() { + if (funcBuilder_ == null) { + if (!(valueCase_ == 10)) { + value_ = org.tensorflow.proto.framework.NameAttrList.getDefaultInstance(); + } + funcBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.NameAttrList, org.tensorflow.proto.framework.NameAttrList.Builder, org.tensorflow.proto.framework.NameAttrListOrBuilder>( + (org.tensorflow.proto.framework.NameAttrList) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 10; + onChanged();; + return funcBuilder_; + } + + /** + *
+     * 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".
+     * 
+ * + * string placeholder = 9; + */ + 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; + } + } + /** + *
+     * 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".
+     * 
+ * + * string placeholder = 9; + */ + 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; + } + } + /** + *
+     * 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".
+     * 
+ * + * string placeholder = 9; + */ + public Builder setPlaceholder( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueCase_ = 9; + value_ = value; + onChanged(); + return this; + } + /** + *
+     * 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".
+     * 
+ * + * string placeholder = 9; + */ + public Builder clearPlaceholder() { + if (valueCase_ == 9) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + /** + *
+     * 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".
+     * 
+ * + * string placeholder = 9; + */ + public Builder setPlaceholderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueCase_ = 9; + value_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.AttrValue) + } + + // @@protoc_insertion_point(class_scope:tensorflow.AttrValue) + private static final org.tensorflow.proto.framework.AttrValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.AttrValue(); + } + + public static org.tensorflow.proto.framework.AttrValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttrValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AttrValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AttrValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AttrValueOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AttrValueOrBuilder.java new file mode 100644 index 00000000000..f2624691edf --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AttrValueOrBuilder.java @@ -0,0 +1,203 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/attr_value.proto + +package org.tensorflow.proto.framework; + +public interface AttrValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.AttrValue) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * "string"
+   * 
+ * + * bytes s = 2; + */ + com.google.protobuf.ByteString getS(); + + /** + *
+   * "int"
+   * 
+ * + * int64 i = 3; + */ + long getI(); + + /** + *
+   * "float"
+   * 
+ * + * float f = 4; + */ + float getF(); + + /** + *
+   * "bool"
+   * 
+ * + * bool b = 5; + */ + boolean getB(); + + /** + *
+   * "type"
+   * 
+ * + * .tensorflow.DataType type = 6; + */ + int getTypeValue(); + /** + *
+   * "type"
+   * 
+ * + * .tensorflow.DataType type = 6; + */ + org.tensorflow.proto.framework.DataType getType(); + + /** + *
+   * "shape"
+   * 
+ * + * .tensorflow.TensorShapeProto shape = 7; + */ + boolean hasShape(); + /** + *
+   * "shape"
+   * 
+ * + * .tensorflow.TensorShapeProto shape = 7; + */ + org.tensorflow.proto.framework.TensorShapeProto getShape(); + /** + *
+   * "shape"
+   * 
+ * + * .tensorflow.TensorShapeProto shape = 7; + */ + org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder(); + + /** + *
+   * "tensor"
+   * 
+ * + * .tensorflow.TensorProto tensor = 8; + */ + boolean hasTensor(); + /** + *
+   * "tensor"
+   * 
+ * + * .tensorflow.TensorProto tensor = 8; + */ + org.tensorflow.proto.framework.TensorProto getTensor(); + /** + *
+   * "tensor"
+   * 
+ * + * .tensorflow.TensorProto tensor = 8; + */ + org.tensorflow.proto.framework.TensorProtoOrBuilder getTensorOrBuilder(); + + /** + *
+   * any "list(...)"
+   * 
+ * + * .tensorflow.AttrValue.ListValue list = 1; + */ + boolean hasList(); + /** + *
+   * any "list(...)"
+   * 
+ * + * .tensorflow.AttrValue.ListValue list = 1; + */ + org.tensorflow.proto.framework.AttrValue.ListValue getList(); + /** + *
+   * any "list(...)"
+   * 
+ * + * .tensorflow.AttrValue.ListValue list = 1; + */ + org.tensorflow.proto.framework.AttrValue.ListValueOrBuilder getListOrBuilder(); + + /** + *
+   * "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.
+   * 
+ * + * .tensorflow.NameAttrList func = 10; + */ + boolean hasFunc(); + /** + *
+   * "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.
+   * 
+ * + * .tensorflow.NameAttrList func = 10; + */ + org.tensorflow.proto.framework.NameAttrList getFunc(); + /** + *
+   * "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.
+   * 
+ * + * .tensorflow.NameAttrList func = 10; + */ + org.tensorflow.proto.framework.NameAttrListOrBuilder getFuncOrBuilder(); + + /** + *
+   * 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".
+   * 
+ * + * string placeholder = 9; + */ + java.lang.String getPlaceholder(); + /** + *
+   * 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".
+   * 
+ * + * string placeholder = 9; + */ + com.google.protobuf.ByteString + getPlaceholderBytes(); + + public org.tensorflow.proto.framework.AttrValue.ValueCase getValueCase(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AttrValueProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AttrValueProtos.java new file mode 100644 index 00000000000..2df18dbc3d0 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AttrValueProtos.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/attr_value.proto + +package org.tensorflow.proto.framework; + +public final class AttrValueProtos { + private AttrValueProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_AttrValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_AttrValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_AttrValue_ListValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_AttrValue_ListValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_NameAttrList_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_NameAttrList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_NameAttrList_AttrEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.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\"\246\004\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\351\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" + + "Proto\022&\n\004func\030\t \003(\0132\030.tensorflow.NameAtt" + + "rListB\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\211\001\n\036org.tensorflow.proto.frameworkB\017" + + "AttrValueProtosP\001ZQgithub.com/tensorflow" + + "/tensorflow/tensorflow/go/core/framework" + + "/attr_value_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.TensorProtos.getDescriptor(), + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(), + org.tensorflow.proto.framework.TypesProtos.getDescriptor(), + }); + internal_static_tensorflow_AttrValue_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_AttrValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_AttrValue_ListValue_descriptor, + new java.lang.String[] { "S", "I", "F", "B", "Type", "Shape", "Tensor", "Func", }); + internal_static_tensorflow_NameAttrList_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_NameAttrList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_NameAttrList_AttrEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + org.tensorflow.proto.framework.TensorProtos.getDescriptor(); + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(); + org.tensorflow.proto.framework.TypesProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AutoParallelOptions.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AutoParallelOptions.java new file mode 100644 index 00000000000..cbb6bde48fe --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AutoParallelOptions.java @@ -0,0 +1,534 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/rewriter_config.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.AutoParallelOptions} + */ +public final class AutoParallelOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.AutoParallelOptions) + AutoParallelOptionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use AutoParallelOptions.newBuilder() to construct. + private AutoParallelOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AutoParallelOptions() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AutoParallelOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AutoParallelOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + enable_ = input.readBool(); + break; + } + case 16: { + + numReplicas_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_AutoParallelOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_AutoParallelOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.AutoParallelOptions.class, org.tensorflow.proto.framework.AutoParallelOptions.Builder.class); + } + + public static final int ENABLE_FIELD_NUMBER = 1; + private boolean enable_; + /** + * bool enable = 1; + */ + public boolean getEnable() { + return enable_; + } + + public static final int NUM_REPLICAS_FIELD_NUMBER = 2; + private int numReplicas_; + /** + * int32 num_replicas = 2; + */ + public int getNumReplicas() { + return numReplicas_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (enable_ != false) { + output.writeBool(1, enable_); + } + if (numReplicas_ != 0) { + output.writeInt32(2, numReplicas_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enable_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, enable_); + } + if (numReplicas_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, numReplicas_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.AutoParallelOptions)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.AutoParallelOptions other = (org.tensorflow.proto.framework.AutoParallelOptions) obj; + + if (getEnable() + != other.getEnable()) return false; + if (getNumReplicas() + != other.getNumReplicas()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnable()); + hash = (37 * hash) + NUM_REPLICAS_FIELD_NUMBER; + hash = (53 * hash) + getNumReplicas(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.AutoParallelOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.AutoParallelOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.AutoParallelOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.AutoParallelOptions 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.proto.framework.AutoParallelOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.AutoParallelOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.AutoParallelOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AutoParallelOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.AutoParallelOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AutoParallelOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.AutoParallelOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.AutoParallelOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.AutoParallelOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.AutoParallelOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.AutoParallelOptions) + org.tensorflow.proto.framework.AutoParallelOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_AutoParallelOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_AutoParallelOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.AutoParallelOptions.class, org.tensorflow.proto.framework.AutoParallelOptions.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.AutoParallelOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + enable_ = false; + + numReplicas_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_AutoParallelOptions_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AutoParallelOptions getDefaultInstanceForType() { + return org.tensorflow.proto.framework.AutoParallelOptions.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.AutoParallelOptions build() { + org.tensorflow.proto.framework.AutoParallelOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AutoParallelOptions buildPartial() { + org.tensorflow.proto.framework.AutoParallelOptions result = new org.tensorflow.proto.framework.AutoParallelOptions(this); + result.enable_ = enable_; + result.numReplicas_ = numReplicas_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.AutoParallelOptions) { + return mergeFrom((org.tensorflow.proto.framework.AutoParallelOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.AutoParallelOptions other) { + if (other == org.tensorflow.proto.framework.AutoParallelOptions.getDefaultInstance()) return this; + if (other.getEnable() != false) { + setEnable(other.getEnable()); + } + if (other.getNumReplicas() != 0) { + setNumReplicas(other.getNumReplicas()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.AutoParallelOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.AutoParallelOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enable_ ; + /** + * bool enable = 1; + */ + public boolean getEnable() { + return enable_; + } + /** + * bool enable = 1; + */ + public Builder setEnable(boolean value) { + + enable_ = value; + onChanged(); + return this; + } + /** + * bool enable = 1; + */ + public Builder clearEnable() { + + enable_ = false; + onChanged(); + return this; + } + + private int numReplicas_ ; + /** + * int32 num_replicas = 2; + */ + public int getNumReplicas() { + return numReplicas_; + } + /** + * int32 num_replicas = 2; + */ + public Builder setNumReplicas(int value) { + + numReplicas_ = value; + onChanged(); + return this; + } + /** + * int32 num_replicas = 2; + */ + public Builder clearNumReplicas() { + + numReplicas_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.AutoParallelOptions) + } + + // @@protoc_insertion_point(class_scope:tensorflow.AutoParallelOptions) + private static final org.tensorflow.proto.framework.AutoParallelOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.AutoParallelOptions(); + } + + public static org.tensorflow.proto.framework.AutoParallelOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoParallelOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AutoParallelOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.AutoParallelOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AutoParallelOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AutoParallelOptionsOrBuilder.java new file mode 100644 index 00000000000..0b954c6477c --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/AutoParallelOptionsOrBuilder.java @@ -0,0 +1,19 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/rewriter_config.proto + +package org.tensorflow.proto.framework; + +public interface AutoParallelOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.AutoParallelOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * bool enable = 1; + */ + boolean getEnable(); + + /** + * int32 num_replicas = 2; + */ + int getNumReplicas(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CallableOptions.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CallableOptions.java new file mode 100644 index 00000000000..1128fdc60f8 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CallableOptions.java @@ -0,0 +1,2902 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Defines a subgraph in another `GraphDef` as a set of feed points and nodes
+ * to be fetched or executed.
+ * Compare with the arguments to `Session::Run()`.
+ * 
+ * + * Protobuf type {@code tensorflow.CallableOptions} + */ +public final class CallableOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.CallableOptions) + CallableOptionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use CallableOptions.newBuilder() to construct. + private CallableOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CallableOptions() { + feed_ = com.google.protobuf.LazyStringArrayList.EMPTY; + fetch_ = com.google.protobuf.LazyStringArrayList.EMPTY; + target_ = com.google.protobuf.LazyStringArrayList.EMPTY; + tensorConnection_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CallableOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CallableOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + feed_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + feed_.add(s); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + fetch_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + fetch_.add(s); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + target_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + target_.add(s); + break; + } + case 34: { + org.tensorflow.proto.framework.RunOptions.Builder subBuilder = null; + if (runOptions_ != null) { + subBuilder = runOptions_.toBuilder(); + } + runOptions_ = input.readMessage(org.tensorflow.proto.framework.RunOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(runOptions_); + runOptions_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + tensorConnection_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + tensorConnection_.add( + input.readMessage(org.tensorflow.proto.framework.TensorConnection.parser(), extensionRegistry)); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + feedDevices_ = com.google.protobuf.MapField.newMapField( + FeedDevicesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000010; + } + com.google.protobuf.MapEntry + feedDevices__ = input.readMessage( + FeedDevicesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + feedDevices_.getMutableMap().put( + feedDevices__.getKey(), feedDevices__.getValue()); + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + fetchDevices_ = com.google.protobuf.MapField.newMapField( + FetchDevicesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000020; + } + com.google.protobuf.MapEntry + fetchDevices__ = input.readMessage( + FetchDevicesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + fetchDevices_.getMutableMap().put( + fetchDevices__.getKey(), fetchDevices__.getValue()); + break; + } + case 64: { + + fetchSkipSync_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + feed_ = feed_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + fetch_ = fetch_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + target_ = target_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + tensorConnection_ = java.util.Collections.unmodifiableList(tensorConnection_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_CallableOptions_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 6: + return internalGetFeedDevices(); + case 7: + return internalGetFetchDevices(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_CallableOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CallableOptions.class, org.tensorflow.proto.framework.CallableOptions.Builder.class); + } + + public static final int FEED_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList feed_; + /** + *
+   * Tensors to be fed in the callable. Each feed is the name of a tensor.
+   * 
+ * + * repeated string feed = 1; + */ + public com.google.protobuf.ProtocolStringList + getFeedList() { + return feed_; + } + /** + *
+   * Tensors to be fed in the callable. Each feed is the name of a tensor.
+   * 
+ * + * repeated string feed = 1; + */ + public int getFeedCount() { + return feed_.size(); + } + /** + *
+   * Tensors to be fed in the callable. Each feed is the name of a tensor.
+   * 
+ * + * repeated string feed = 1; + */ + public java.lang.String getFeed(int index) { + return feed_.get(index); + } + /** + *
+   * Tensors to be fed in the callable. Each feed is the name of a tensor.
+   * 
+ * + * repeated string feed = 1; + */ + public com.google.protobuf.ByteString + getFeedBytes(int index) { + return feed_.getByteString(index); + } + + public static final int FETCH_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList fetch_; + /** + *
+   * Fetches. A list of tensor names. The caller of the callable expects a
+   * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+   * order of specified fetches does not change the execution order.
+   * 
+ * + * repeated string fetch = 2; + */ + public com.google.protobuf.ProtocolStringList + getFetchList() { + return fetch_; + } + /** + *
+   * Fetches. A list of tensor names. The caller of the callable expects a
+   * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+   * order of specified fetches does not change the execution order.
+   * 
+ * + * repeated string fetch = 2; + */ + public int getFetchCount() { + return fetch_.size(); + } + /** + *
+   * Fetches. A list of tensor names. The caller of the callable expects a
+   * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+   * order of specified fetches does not change the execution order.
+   * 
+ * + * repeated string fetch = 2; + */ + public java.lang.String getFetch(int index) { + return fetch_.get(index); + } + /** + *
+   * Fetches. A list of tensor names. The caller of the callable expects a
+   * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+   * order of specified fetches does not change the execution order.
+   * 
+ * + * repeated string fetch = 2; + */ + public com.google.protobuf.ByteString + getFetchBytes(int index) { + return fetch_.getByteString(index); + } + + public static final int TARGET_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList target_; + /** + *
+   * Target Nodes. A list of node names. The named nodes will be run by the
+   * callable but their outputs will not be returned.
+   * 
+ * + * repeated string target = 3; + */ + public com.google.protobuf.ProtocolStringList + getTargetList() { + return target_; + } + /** + *
+   * Target Nodes. A list of node names. The named nodes will be run by the
+   * callable but their outputs will not be returned.
+   * 
+ * + * repeated string target = 3; + */ + public int getTargetCount() { + return target_.size(); + } + /** + *
+   * Target Nodes. A list of node names. The named nodes will be run by the
+   * callable but their outputs will not be returned.
+   * 
+ * + * repeated string target = 3; + */ + public java.lang.String getTarget(int index) { + return target_.get(index); + } + /** + *
+   * Target Nodes. A list of node names. The named nodes will be run by the
+   * callable but their outputs will not be returned.
+   * 
+ * + * repeated string target = 3; + */ + public com.google.protobuf.ByteString + getTargetBytes(int index) { + return target_.getByteString(index); + } + + public static final int RUN_OPTIONS_FIELD_NUMBER = 4; + private org.tensorflow.proto.framework.RunOptions runOptions_; + /** + *
+   * Options that will be applied to each run.
+   * 
+ * + * .tensorflow.RunOptions run_options = 4; + */ + public boolean hasRunOptions() { + return runOptions_ != null; + } + /** + *
+   * Options that will be applied to each run.
+   * 
+ * + * .tensorflow.RunOptions run_options = 4; + */ + public org.tensorflow.proto.framework.RunOptions getRunOptions() { + return runOptions_ == null ? org.tensorflow.proto.framework.RunOptions.getDefaultInstance() : runOptions_; + } + /** + *
+   * Options that will be applied to each run.
+   * 
+ * + * .tensorflow.RunOptions run_options = 4; + */ + public org.tensorflow.proto.framework.RunOptionsOrBuilder getRunOptionsOrBuilder() { + return getRunOptions(); + } + + public static final int TENSOR_CONNECTION_FIELD_NUMBER = 5; + private java.util.List tensorConnection_; + /** + *
+   * Tensors to be connected in the callable. Each TensorConnection denotes
+   * a pair of tensors in the graph, between which an edge will be created
+   * in the callable.
+   * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public java.util.List getTensorConnectionList() { + return tensorConnection_; + } + /** + *
+   * Tensors to be connected in the callable. Each TensorConnection denotes
+   * a pair of tensors in the graph, between which an edge will be created
+   * in the callable.
+   * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public java.util.List + getTensorConnectionOrBuilderList() { + return tensorConnection_; + } + /** + *
+   * Tensors to be connected in the callable. Each TensorConnection denotes
+   * a pair of tensors in the graph, between which an edge will be created
+   * in the callable.
+   * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public int getTensorConnectionCount() { + return tensorConnection_.size(); + } + /** + *
+   * Tensors to be connected in the callable. Each TensorConnection denotes
+   * a pair of tensors in the graph, between which an edge will be created
+   * in the callable.
+   * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public org.tensorflow.proto.framework.TensorConnection getTensorConnection(int index) { + return tensorConnection_.get(index); + } + /** + *
+   * Tensors to be connected in the callable. Each TensorConnection denotes
+   * a pair of tensors in the graph, between which an edge will be created
+   * in the callable.
+   * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public org.tensorflow.proto.framework.TensorConnectionOrBuilder getTensorConnectionOrBuilder( + int index) { + return tensorConnection_.get(index); + } + + public static final int FEED_DEVICES_FIELD_NUMBER = 6; + private static final class FeedDevicesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_CallableOptions_FeedDevicesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> feedDevices_; + private com.google.protobuf.MapField + internalGetFeedDevices() { + if (feedDevices_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FeedDevicesDefaultEntryHolder.defaultEntry); + } + return feedDevices_; + } + + public int getFeedDevicesCount() { + return internalGetFeedDevices().getMap().size(); + } + /** + *
+   * The Tensor objects fed in the callable and fetched from the callable
+   * are expected to be backed by host (CPU) memory by default.
+   * The options below allow changing that - feeding tensors backed by
+   * device memory, or returning tensors that are backed by device memory.
+   * The maps below map the name of a feed/fetch tensor (which appears in
+   * 'feed' or 'fetch' fields above), to the fully qualified name of the device
+   * owning the memory backing the contents of the tensor.
+   * For example, creating a callable with the following options:
+   * CallableOptions {
+   *   feed: "a:0"
+   *   feed: "b:0"
+   *   fetch: "x:0"
+   *   fetch: "y:0"
+   *   feed_devices: {
+   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *   }
+   *   fetch_devices: {
+   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *  }
+   * }
+   * means that the Callable expects:
+   * - The first argument ("a:0") is a Tensor backed by GPU memory.
+   * - The second argument ("b:0") is a Tensor backed by host memory.
+   * and of its return values:
+   * - The first output ("x:0") will be backed by host memory.
+   * - The second output ("y:0") will be backed by GPU memory.
+   * FEEDS:
+   * It is the responsibility of the caller to ensure that the memory of the fed
+   * tensors will be correctly initialized and synchronized before it is
+   * accessed by operations executed during the call to Session::RunCallable().
+   * This is typically ensured by using the TensorFlow memory allocators
+   * (Device::GetAllocator()) to create the Tensor to be fed.
+   * Alternatively, for CUDA-enabled GPU devices, this typically means that the
+   * operation that produced the contents of the tensor has completed, i.e., the
+   * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
+   * cuStreamSynchronize()).
+   * 
+ * + * map<string, string> feed_devices = 6; + */ + + public boolean containsFeedDevices( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFeedDevices().getMap().containsKey(key); + } + /** + * Use {@link #getFeedDevicesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getFeedDevices() { + return getFeedDevicesMap(); + } + /** + *
+   * The Tensor objects fed in the callable and fetched from the callable
+   * are expected to be backed by host (CPU) memory by default.
+   * The options below allow changing that - feeding tensors backed by
+   * device memory, or returning tensors that are backed by device memory.
+   * The maps below map the name of a feed/fetch tensor (which appears in
+   * 'feed' or 'fetch' fields above), to the fully qualified name of the device
+   * owning the memory backing the contents of the tensor.
+   * For example, creating a callable with the following options:
+   * CallableOptions {
+   *   feed: "a:0"
+   *   feed: "b:0"
+   *   fetch: "x:0"
+   *   fetch: "y:0"
+   *   feed_devices: {
+   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *   }
+   *   fetch_devices: {
+   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *  }
+   * }
+   * means that the Callable expects:
+   * - The first argument ("a:0") is a Tensor backed by GPU memory.
+   * - The second argument ("b:0") is a Tensor backed by host memory.
+   * and of its return values:
+   * - The first output ("x:0") will be backed by host memory.
+   * - The second output ("y:0") will be backed by GPU memory.
+   * FEEDS:
+   * It is the responsibility of the caller to ensure that the memory of the fed
+   * tensors will be correctly initialized and synchronized before it is
+   * accessed by operations executed during the call to Session::RunCallable().
+   * This is typically ensured by using the TensorFlow memory allocators
+   * (Device::GetAllocator()) to create the Tensor to be fed.
+   * Alternatively, for CUDA-enabled GPU devices, this typically means that the
+   * operation that produced the contents of the tensor has completed, i.e., the
+   * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
+   * cuStreamSynchronize()).
+   * 
+ * + * map<string, string> feed_devices = 6; + */ + + public java.util.Map getFeedDevicesMap() { + return internalGetFeedDevices().getMap(); + } + /** + *
+   * The Tensor objects fed in the callable and fetched from the callable
+   * are expected to be backed by host (CPU) memory by default.
+   * The options below allow changing that - feeding tensors backed by
+   * device memory, or returning tensors that are backed by device memory.
+   * The maps below map the name of a feed/fetch tensor (which appears in
+   * 'feed' or 'fetch' fields above), to the fully qualified name of the device
+   * owning the memory backing the contents of the tensor.
+   * For example, creating a callable with the following options:
+   * CallableOptions {
+   *   feed: "a:0"
+   *   feed: "b:0"
+   *   fetch: "x:0"
+   *   fetch: "y:0"
+   *   feed_devices: {
+   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *   }
+   *   fetch_devices: {
+   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *  }
+   * }
+   * means that the Callable expects:
+   * - The first argument ("a:0") is a Tensor backed by GPU memory.
+   * - The second argument ("b:0") is a Tensor backed by host memory.
+   * and of its return values:
+   * - The first output ("x:0") will be backed by host memory.
+   * - The second output ("y:0") will be backed by GPU memory.
+   * FEEDS:
+   * It is the responsibility of the caller to ensure that the memory of the fed
+   * tensors will be correctly initialized and synchronized before it is
+   * accessed by operations executed during the call to Session::RunCallable().
+   * This is typically ensured by using the TensorFlow memory allocators
+   * (Device::GetAllocator()) to create the Tensor to be fed.
+   * Alternatively, for CUDA-enabled GPU devices, this typically means that the
+   * operation that produced the contents of the tensor has completed, i.e., the
+   * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
+   * cuStreamSynchronize()).
+   * 
+ * + * map<string, string> feed_devices = 6; + */ + + public java.lang.String getFeedDevicesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFeedDevices().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * The Tensor objects fed in the callable and fetched from the callable
+   * are expected to be backed by host (CPU) memory by default.
+   * The options below allow changing that - feeding tensors backed by
+   * device memory, or returning tensors that are backed by device memory.
+   * The maps below map the name of a feed/fetch tensor (which appears in
+   * 'feed' or 'fetch' fields above), to the fully qualified name of the device
+   * owning the memory backing the contents of the tensor.
+   * For example, creating a callable with the following options:
+   * CallableOptions {
+   *   feed: "a:0"
+   *   feed: "b:0"
+   *   fetch: "x:0"
+   *   fetch: "y:0"
+   *   feed_devices: {
+   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *   }
+   *   fetch_devices: {
+   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *  }
+   * }
+   * means that the Callable expects:
+   * - The first argument ("a:0") is a Tensor backed by GPU memory.
+   * - The second argument ("b:0") is a Tensor backed by host memory.
+   * and of its return values:
+   * - The first output ("x:0") will be backed by host memory.
+   * - The second output ("y:0") will be backed by GPU memory.
+   * FEEDS:
+   * It is the responsibility of the caller to ensure that the memory of the fed
+   * tensors will be correctly initialized and synchronized before it is
+   * accessed by operations executed during the call to Session::RunCallable().
+   * This is typically ensured by using the TensorFlow memory allocators
+   * (Device::GetAllocator()) to create the Tensor to be fed.
+   * Alternatively, for CUDA-enabled GPU devices, this typically means that the
+   * operation that produced the contents of the tensor has completed, i.e., the
+   * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
+   * cuStreamSynchronize()).
+   * 
+ * + * map<string, string> feed_devices = 6; + */ + + public java.lang.String getFeedDevicesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFeedDevices().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int FETCH_DEVICES_FIELD_NUMBER = 7; + private static final class FetchDevicesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_CallableOptions_FetchDevicesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> fetchDevices_; + private com.google.protobuf.MapField + internalGetFetchDevices() { + if (fetchDevices_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FetchDevicesDefaultEntryHolder.defaultEntry); + } + return fetchDevices_; + } + + public int getFetchDevicesCount() { + return internalGetFetchDevices().getMap().size(); + } + /** + * map<string, string> fetch_devices = 7; + */ + + public boolean containsFetchDevices( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFetchDevices().getMap().containsKey(key); + } + /** + * Use {@link #getFetchDevicesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getFetchDevices() { + return getFetchDevicesMap(); + } + /** + * map<string, string> fetch_devices = 7; + */ + + public java.util.Map getFetchDevicesMap() { + return internalGetFetchDevices().getMap(); + } + /** + * map<string, string> fetch_devices = 7; + */ + + public java.lang.String getFetchDevicesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFetchDevices().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> fetch_devices = 7; + */ + + public java.lang.String getFetchDevicesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFetchDevices().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int FETCH_SKIP_SYNC_FIELD_NUMBER = 8; + private boolean fetchSkipSync_; + /** + *
+   * By default, RunCallable() will synchronize the GPU stream before returning
+   * fetched tensors on a GPU device, to ensure that the values in those tensors
+   * have been produced. This simplifies interacting with the tensors, but
+   * potentially incurs a performance hit.
+   * If this options is set to true, the caller is responsible for ensuring
+   * that the values in the fetched tensors have been produced before they are
+   * used. The caller can do this by invoking `Device::Sync()` on the underlying
+   * device(s), or by feeding the tensors back to the same Session using
+   * `feed_devices` with the same corresponding device name.
+   * 
+ * + * bool fetch_skip_sync = 8; + */ + public boolean getFetchSkipSync() { + return fetchSkipSync_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < feed_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, feed_.getRaw(i)); + } + for (int i = 0; i < fetch_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fetch_.getRaw(i)); + } + for (int i = 0; i < target_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_.getRaw(i)); + } + if (runOptions_ != null) { + output.writeMessage(4, getRunOptions()); + } + for (int i = 0; i < tensorConnection_.size(); i++) { + output.writeMessage(5, tensorConnection_.get(i)); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetFeedDevices(), + FeedDevicesDefaultEntryHolder.defaultEntry, + 6); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetFetchDevices(), + FetchDevicesDefaultEntryHolder.defaultEntry, + 7); + if (fetchSkipSync_ != false) { + output.writeBool(8, fetchSkipSync_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < feed_.size(); i++) { + dataSize += computeStringSizeNoTag(feed_.getRaw(i)); + } + size += dataSize; + size += 1 * getFeedList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < fetch_.size(); i++) { + dataSize += computeStringSizeNoTag(fetch_.getRaw(i)); + } + size += dataSize; + size += 1 * getFetchList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < target_.size(); i++) { + dataSize += computeStringSizeNoTag(target_.getRaw(i)); + } + size += dataSize; + size += 1 * getTargetList().size(); + } + if (runOptions_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getRunOptions()); + } + for (int i = 0; i < tensorConnection_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, tensorConnection_.get(i)); + } + for (java.util.Map.Entry entry + : internalGetFeedDevices().getMap().entrySet()) { + com.google.protobuf.MapEntry + feedDevices__ = FeedDevicesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, feedDevices__); + } + for (java.util.Map.Entry entry + : internalGetFetchDevices().getMap().entrySet()) { + com.google.protobuf.MapEntry + fetchDevices__ = FetchDevicesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, fetchDevices__); + } + if (fetchSkipSync_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, fetchSkipSync_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.CallableOptions)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.CallableOptions other = (org.tensorflow.proto.framework.CallableOptions) obj; + + if (!getFeedList() + .equals(other.getFeedList())) return false; + if (!getFetchList() + .equals(other.getFetchList())) return false; + if (!getTargetList() + .equals(other.getTargetList())) return false; + if (hasRunOptions() != other.hasRunOptions()) return false; + if (hasRunOptions()) { + if (!getRunOptions() + .equals(other.getRunOptions())) return false; + } + if (!getTensorConnectionList() + .equals(other.getTensorConnectionList())) return false; + if (!internalGetFeedDevices().equals( + other.internalGetFeedDevices())) return false; + if (!internalGetFetchDevices().equals( + other.internalGetFetchDevices())) return false; + if (getFetchSkipSync() + != other.getFetchSkipSync()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFeedCount() > 0) { + hash = (37 * hash) + FEED_FIELD_NUMBER; + hash = (53 * hash) + getFeedList().hashCode(); + } + if (getFetchCount() > 0) { + hash = (37 * hash) + FETCH_FIELD_NUMBER; + hash = (53 * hash) + getFetchList().hashCode(); + } + if (getTargetCount() > 0) { + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTargetList().hashCode(); + } + if (hasRunOptions()) { + hash = (37 * hash) + RUN_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getRunOptions().hashCode(); + } + if (getTensorConnectionCount() > 0) { + hash = (37 * hash) + TENSOR_CONNECTION_FIELD_NUMBER; + hash = (53 * hash) + getTensorConnectionList().hashCode(); + } + if (!internalGetFeedDevices().getMap().isEmpty()) { + hash = (37 * hash) + FEED_DEVICES_FIELD_NUMBER; + hash = (53 * hash) + internalGetFeedDevices().hashCode(); + } + if (!internalGetFetchDevices().getMap().isEmpty()) { + hash = (37 * hash) + FETCH_DEVICES_FIELD_NUMBER; + hash = (53 * hash) + internalGetFetchDevices().hashCode(); + } + hash = (37 * hash) + FETCH_SKIP_SYNC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFetchSkipSync()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.CallableOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CallableOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CallableOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CallableOptions 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.proto.framework.CallableOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CallableOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CallableOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CallableOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CallableOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CallableOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CallableOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CallableOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.CallableOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Defines a subgraph in another `GraphDef` as a set of feed points and nodes
+   * to be fetched or executed.
+   * Compare with the arguments to `Session::Run()`.
+   * 
+ * + * Protobuf type {@code tensorflow.CallableOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.CallableOptions) + org.tensorflow.proto.framework.CallableOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_CallableOptions_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 6: + return internalGetFeedDevices(); + case 7: + return internalGetFetchDevices(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 6: + return internalGetMutableFeedDevices(); + case 7: + return internalGetMutableFetchDevices(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_CallableOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CallableOptions.class, org.tensorflow.proto.framework.CallableOptions.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.CallableOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getTensorConnectionFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + feed_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + fetch_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + target_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + if (runOptionsBuilder_ == null) { + runOptions_ = null; + } else { + runOptions_ = null; + runOptionsBuilder_ = null; + } + if (tensorConnectionBuilder_ == null) { + tensorConnection_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + tensorConnectionBuilder_.clear(); + } + internalGetMutableFeedDevices().clear(); + internalGetMutableFetchDevices().clear(); + fetchSkipSync_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_CallableOptions_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CallableOptions getDefaultInstanceForType() { + return org.tensorflow.proto.framework.CallableOptions.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.CallableOptions build() { + org.tensorflow.proto.framework.CallableOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CallableOptions buildPartial() { + org.tensorflow.proto.framework.CallableOptions result = new org.tensorflow.proto.framework.CallableOptions(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + feed_ = feed_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.feed_ = feed_; + if (((bitField0_ & 0x00000002) != 0)) { + fetch_ = fetch_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.fetch_ = fetch_; + if (((bitField0_ & 0x00000004) != 0)) { + target_ = target_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.target_ = target_; + if (runOptionsBuilder_ == null) { + result.runOptions_ = runOptions_; + } else { + result.runOptions_ = runOptionsBuilder_.build(); + } + if (tensorConnectionBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + tensorConnection_ = java.util.Collections.unmodifiableList(tensorConnection_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.tensorConnection_ = tensorConnection_; + } else { + result.tensorConnection_ = tensorConnectionBuilder_.build(); + } + result.feedDevices_ = internalGetFeedDevices(); + result.feedDevices_.makeImmutable(); + result.fetchDevices_ = internalGetFetchDevices(); + result.fetchDevices_.makeImmutable(); + result.fetchSkipSync_ = fetchSkipSync_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.CallableOptions) { + return mergeFrom((org.tensorflow.proto.framework.CallableOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.CallableOptions other) { + if (other == org.tensorflow.proto.framework.CallableOptions.getDefaultInstance()) return this; + if (!other.feed_.isEmpty()) { + if (feed_.isEmpty()) { + feed_ = other.feed_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeedIsMutable(); + feed_.addAll(other.feed_); + } + onChanged(); + } + if (!other.fetch_.isEmpty()) { + if (fetch_.isEmpty()) { + fetch_ = other.fetch_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFetchIsMutable(); + fetch_.addAll(other.fetch_); + } + onChanged(); + } + if (!other.target_.isEmpty()) { + if (target_.isEmpty()) { + target_ = other.target_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureTargetIsMutable(); + target_.addAll(other.target_); + } + onChanged(); + } + if (other.hasRunOptions()) { + mergeRunOptions(other.getRunOptions()); + } + if (tensorConnectionBuilder_ == null) { + if (!other.tensorConnection_.isEmpty()) { + if (tensorConnection_.isEmpty()) { + tensorConnection_ = other.tensorConnection_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureTensorConnectionIsMutable(); + tensorConnection_.addAll(other.tensorConnection_); + } + onChanged(); + } + } else { + if (!other.tensorConnection_.isEmpty()) { + if (tensorConnectionBuilder_.isEmpty()) { + tensorConnectionBuilder_.dispose(); + tensorConnectionBuilder_ = null; + tensorConnection_ = other.tensorConnection_; + bitField0_ = (bitField0_ & ~0x00000008); + tensorConnectionBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTensorConnectionFieldBuilder() : null; + } else { + tensorConnectionBuilder_.addAllMessages(other.tensorConnection_); + } + } + } + internalGetMutableFeedDevices().mergeFrom( + other.internalGetFeedDevices()); + internalGetMutableFetchDevices().mergeFrom( + other.internalGetFetchDevices()); + if (other.getFetchSkipSync() != false) { + setFetchSkipSync(other.getFetchSkipSync()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.CallableOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.CallableOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList feed_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureFeedIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + feed_ = new com.google.protobuf.LazyStringArrayList(feed_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Tensors to be fed in the callable. Each feed is the name of a tensor.
+     * 
+ * + * repeated string feed = 1; + */ + public com.google.protobuf.ProtocolStringList + getFeedList() { + return feed_.getUnmodifiableView(); + } + /** + *
+     * Tensors to be fed in the callable. Each feed is the name of a tensor.
+     * 
+ * + * repeated string feed = 1; + */ + public int getFeedCount() { + return feed_.size(); + } + /** + *
+     * Tensors to be fed in the callable. Each feed is the name of a tensor.
+     * 
+ * + * repeated string feed = 1; + */ + public java.lang.String getFeed(int index) { + return feed_.get(index); + } + /** + *
+     * Tensors to be fed in the callable. Each feed is the name of a tensor.
+     * 
+ * + * repeated string feed = 1; + */ + public com.google.protobuf.ByteString + getFeedBytes(int index) { + return feed_.getByteString(index); + } + /** + *
+     * Tensors to be fed in the callable. Each feed is the name of a tensor.
+     * 
+ * + * repeated string feed = 1; + */ + public Builder setFeed( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeedIsMutable(); + feed_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Tensors to be fed in the callable. Each feed is the name of a tensor.
+     * 
+ * + * repeated string feed = 1; + */ + public Builder addFeed( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeedIsMutable(); + feed_.add(value); + onChanged(); + return this; + } + /** + *
+     * Tensors to be fed in the callable. Each feed is the name of a tensor.
+     * 
+ * + * repeated string feed = 1; + */ + public Builder addAllFeed( + java.lang.Iterable values) { + ensureFeedIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, feed_); + onChanged(); + return this; + } + /** + *
+     * Tensors to be fed in the callable. Each feed is the name of a tensor.
+     * 
+ * + * repeated string feed = 1; + */ + public Builder clearFeed() { + feed_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Tensors to be fed in the callable. Each feed is the name of a tensor.
+     * 
+ * + * repeated string feed = 1; + */ + public Builder addFeedBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFeedIsMutable(); + feed_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList fetch_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureFetchIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + fetch_ = new com.google.protobuf.LazyStringArrayList(fetch_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * Fetches. A list of tensor names. The caller of the callable expects a
+     * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+     * order of specified fetches does not change the execution order.
+     * 
+ * + * repeated string fetch = 2; + */ + public com.google.protobuf.ProtocolStringList + getFetchList() { + return fetch_.getUnmodifiableView(); + } + /** + *
+     * Fetches. A list of tensor names. The caller of the callable expects a
+     * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+     * order of specified fetches does not change the execution order.
+     * 
+ * + * repeated string fetch = 2; + */ + public int getFetchCount() { + return fetch_.size(); + } + /** + *
+     * Fetches. A list of tensor names. The caller of the callable expects a
+     * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+     * order of specified fetches does not change the execution order.
+     * 
+ * + * repeated string fetch = 2; + */ + public java.lang.String getFetch(int index) { + return fetch_.get(index); + } + /** + *
+     * Fetches. A list of tensor names. The caller of the callable expects a
+     * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+     * order of specified fetches does not change the execution order.
+     * 
+ * + * repeated string fetch = 2; + */ + public com.google.protobuf.ByteString + getFetchBytes(int index) { + return fetch_.getByteString(index); + } + /** + *
+     * Fetches. A list of tensor names. The caller of the callable expects a
+     * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+     * order of specified fetches does not change the execution order.
+     * 
+ * + * repeated string fetch = 2; + */ + public Builder setFetch( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFetchIsMutable(); + fetch_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Fetches. A list of tensor names. The caller of the callable expects a
+     * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+     * order of specified fetches does not change the execution order.
+     * 
+ * + * repeated string fetch = 2; + */ + public Builder addFetch( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFetchIsMutable(); + fetch_.add(value); + onChanged(); + return this; + } + /** + *
+     * Fetches. A list of tensor names. The caller of the callable expects a
+     * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+     * order of specified fetches does not change the execution order.
+     * 
+ * + * repeated string fetch = 2; + */ + public Builder addAllFetch( + java.lang.Iterable values) { + ensureFetchIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fetch_); + onChanged(); + return this; + } + /** + *
+     * Fetches. A list of tensor names. The caller of the callable expects a
+     * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+     * order of specified fetches does not change the execution order.
+     * 
+ * + * repeated string fetch = 2; + */ + public Builder clearFetch() { + fetch_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Fetches. A list of tensor names. The caller of the callable expects a
+     * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+     * order of specified fetches does not change the execution order.
+     * 
+ * + * repeated string fetch = 2; + */ + public Builder addFetchBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFetchIsMutable(); + fetch_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList target_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTargetIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + target_ = new com.google.protobuf.LazyStringArrayList(target_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Target Nodes. A list of node names. The named nodes will be run by the
+     * callable but their outputs will not be returned.
+     * 
+ * + * repeated string target = 3; + */ + public com.google.protobuf.ProtocolStringList + getTargetList() { + return target_.getUnmodifiableView(); + } + /** + *
+     * Target Nodes. A list of node names. The named nodes will be run by the
+     * callable but their outputs will not be returned.
+     * 
+ * + * repeated string target = 3; + */ + public int getTargetCount() { + return target_.size(); + } + /** + *
+     * Target Nodes. A list of node names. The named nodes will be run by the
+     * callable but their outputs will not be returned.
+     * 
+ * + * repeated string target = 3; + */ + public java.lang.String getTarget(int index) { + return target_.get(index); + } + /** + *
+     * Target Nodes. A list of node names. The named nodes will be run by the
+     * callable but their outputs will not be returned.
+     * 
+ * + * repeated string target = 3; + */ + public com.google.protobuf.ByteString + getTargetBytes(int index) { + return target_.getByteString(index); + } + /** + *
+     * Target Nodes. A list of node names. The named nodes will be run by the
+     * callable but their outputs will not be returned.
+     * 
+ * + * repeated string target = 3; + */ + public Builder setTarget( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetIsMutable(); + target_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Target Nodes. A list of node names. The named nodes will be run by the
+     * callable but their outputs will not be returned.
+     * 
+ * + * repeated string target = 3; + */ + public Builder addTarget( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetIsMutable(); + target_.add(value); + onChanged(); + return this; + } + /** + *
+     * Target Nodes. A list of node names. The named nodes will be run by the
+     * callable but their outputs will not be returned.
+     * 
+ * + * repeated string target = 3; + */ + public Builder addAllTarget( + java.lang.Iterable values) { + ensureTargetIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, target_); + onChanged(); + return this; + } + /** + *
+     * Target Nodes. A list of node names. The named nodes will be run by the
+     * callable but their outputs will not be returned.
+     * 
+ * + * repeated string target = 3; + */ + public Builder clearTarget() { + target_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Target Nodes. A list of node names. The named nodes will be run by the
+     * callable but their outputs will not be returned.
+     * 
+ * + * repeated string target = 3; + */ + public Builder addTargetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTargetIsMutable(); + target_.add(value); + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.RunOptions runOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.RunOptions, org.tensorflow.proto.framework.RunOptions.Builder, org.tensorflow.proto.framework.RunOptionsOrBuilder> runOptionsBuilder_; + /** + *
+     * Options that will be applied to each run.
+     * 
+ * + * .tensorflow.RunOptions run_options = 4; + */ + public boolean hasRunOptions() { + return runOptionsBuilder_ != null || runOptions_ != null; + } + /** + *
+     * Options that will be applied to each run.
+     * 
+ * + * .tensorflow.RunOptions run_options = 4; + */ + public org.tensorflow.proto.framework.RunOptions getRunOptions() { + if (runOptionsBuilder_ == null) { + return runOptions_ == null ? org.tensorflow.proto.framework.RunOptions.getDefaultInstance() : runOptions_; + } else { + return runOptionsBuilder_.getMessage(); + } + } + /** + *
+     * Options that will be applied to each run.
+     * 
+ * + * .tensorflow.RunOptions run_options = 4; + */ + public Builder setRunOptions(org.tensorflow.proto.framework.RunOptions value) { + if (runOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + runOptions_ = value; + onChanged(); + } else { + runOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Options that will be applied to each run.
+     * 
+ * + * .tensorflow.RunOptions run_options = 4; + */ + public Builder setRunOptions( + org.tensorflow.proto.framework.RunOptions.Builder builderForValue) { + if (runOptionsBuilder_ == null) { + runOptions_ = builderForValue.build(); + onChanged(); + } else { + runOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Options that will be applied to each run.
+     * 
+ * + * .tensorflow.RunOptions run_options = 4; + */ + public Builder mergeRunOptions(org.tensorflow.proto.framework.RunOptions value) { + if (runOptionsBuilder_ == null) { + if (runOptions_ != null) { + runOptions_ = + org.tensorflow.proto.framework.RunOptions.newBuilder(runOptions_).mergeFrom(value).buildPartial(); + } else { + runOptions_ = value; + } + onChanged(); + } else { + runOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Options that will be applied to each run.
+     * 
+ * + * .tensorflow.RunOptions run_options = 4; + */ + public Builder clearRunOptions() { + if (runOptionsBuilder_ == null) { + runOptions_ = null; + onChanged(); + } else { + runOptions_ = null; + runOptionsBuilder_ = null; + } + + return this; + } + /** + *
+     * Options that will be applied to each run.
+     * 
+ * + * .tensorflow.RunOptions run_options = 4; + */ + public org.tensorflow.proto.framework.RunOptions.Builder getRunOptionsBuilder() { + + onChanged(); + return getRunOptionsFieldBuilder().getBuilder(); + } + /** + *
+     * Options that will be applied to each run.
+     * 
+ * + * .tensorflow.RunOptions run_options = 4; + */ + public org.tensorflow.proto.framework.RunOptionsOrBuilder getRunOptionsOrBuilder() { + if (runOptionsBuilder_ != null) { + return runOptionsBuilder_.getMessageOrBuilder(); + } else { + return runOptions_ == null ? + org.tensorflow.proto.framework.RunOptions.getDefaultInstance() : runOptions_; + } + } + /** + *
+     * Options that will be applied to each run.
+     * 
+ * + * .tensorflow.RunOptions run_options = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.RunOptions, org.tensorflow.proto.framework.RunOptions.Builder, org.tensorflow.proto.framework.RunOptionsOrBuilder> + getRunOptionsFieldBuilder() { + if (runOptionsBuilder_ == null) { + runOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.RunOptions, org.tensorflow.proto.framework.RunOptions.Builder, org.tensorflow.proto.framework.RunOptionsOrBuilder>( + getRunOptions(), + getParentForChildren(), + isClean()); + runOptions_ = null; + } + return runOptionsBuilder_; + } + + private java.util.List tensorConnection_ = + java.util.Collections.emptyList(); + private void ensureTensorConnectionIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + tensorConnection_ = new java.util.ArrayList(tensorConnection_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.TensorConnection, org.tensorflow.proto.framework.TensorConnection.Builder, org.tensorflow.proto.framework.TensorConnectionOrBuilder> tensorConnectionBuilder_; + + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public java.util.List getTensorConnectionList() { + if (tensorConnectionBuilder_ == null) { + return java.util.Collections.unmodifiableList(tensorConnection_); + } else { + return tensorConnectionBuilder_.getMessageList(); + } + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public int getTensorConnectionCount() { + if (tensorConnectionBuilder_ == null) { + return tensorConnection_.size(); + } else { + return tensorConnectionBuilder_.getCount(); + } + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public org.tensorflow.proto.framework.TensorConnection getTensorConnection(int index) { + if (tensorConnectionBuilder_ == null) { + return tensorConnection_.get(index); + } else { + return tensorConnectionBuilder_.getMessage(index); + } + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public Builder setTensorConnection( + int index, org.tensorflow.proto.framework.TensorConnection value) { + if (tensorConnectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTensorConnectionIsMutable(); + tensorConnection_.set(index, value); + onChanged(); + } else { + tensorConnectionBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public Builder setTensorConnection( + int index, org.tensorflow.proto.framework.TensorConnection.Builder builderForValue) { + if (tensorConnectionBuilder_ == null) { + ensureTensorConnectionIsMutable(); + tensorConnection_.set(index, builderForValue.build()); + onChanged(); + } else { + tensorConnectionBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public Builder addTensorConnection(org.tensorflow.proto.framework.TensorConnection value) { + if (tensorConnectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTensorConnectionIsMutable(); + tensorConnection_.add(value); + onChanged(); + } else { + tensorConnectionBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public Builder addTensorConnection( + int index, org.tensorflow.proto.framework.TensorConnection value) { + if (tensorConnectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTensorConnectionIsMutable(); + tensorConnection_.add(index, value); + onChanged(); + } else { + tensorConnectionBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public Builder addTensorConnection( + org.tensorflow.proto.framework.TensorConnection.Builder builderForValue) { + if (tensorConnectionBuilder_ == null) { + ensureTensorConnectionIsMutable(); + tensorConnection_.add(builderForValue.build()); + onChanged(); + } else { + tensorConnectionBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public Builder addTensorConnection( + int index, org.tensorflow.proto.framework.TensorConnection.Builder builderForValue) { + if (tensorConnectionBuilder_ == null) { + ensureTensorConnectionIsMutable(); + tensorConnection_.add(index, builderForValue.build()); + onChanged(); + } else { + tensorConnectionBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public Builder addAllTensorConnection( + java.lang.Iterable values) { + if (tensorConnectionBuilder_ == null) { + ensureTensorConnectionIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tensorConnection_); + onChanged(); + } else { + tensorConnectionBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public Builder clearTensorConnection() { + if (tensorConnectionBuilder_ == null) { + tensorConnection_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + tensorConnectionBuilder_.clear(); + } + return this; + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public Builder removeTensorConnection(int index) { + if (tensorConnectionBuilder_ == null) { + ensureTensorConnectionIsMutable(); + tensorConnection_.remove(index); + onChanged(); + } else { + tensorConnectionBuilder_.remove(index); + } + return this; + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public org.tensorflow.proto.framework.TensorConnection.Builder getTensorConnectionBuilder( + int index) { + return getTensorConnectionFieldBuilder().getBuilder(index); + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public org.tensorflow.proto.framework.TensorConnectionOrBuilder getTensorConnectionOrBuilder( + int index) { + if (tensorConnectionBuilder_ == null) { + return tensorConnection_.get(index); } else { + return tensorConnectionBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public java.util.List + getTensorConnectionOrBuilderList() { + if (tensorConnectionBuilder_ != null) { + return tensorConnectionBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tensorConnection_); + } + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public org.tensorflow.proto.framework.TensorConnection.Builder addTensorConnectionBuilder() { + return getTensorConnectionFieldBuilder().addBuilder( + org.tensorflow.proto.framework.TensorConnection.getDefaultInstance()); + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public org.tensorflow.proto.framework.TensorConnection.Builder addTensorConnectionBuilder( + int index) { + return getTensorConnectionFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.TensorConnection.getDefaultInstance()); + } + /** + *
+     * Tensors to be connected in the callable. Each TensorConnection denotes
+     * a pair of tensors in the graph, between which an edge will be created
+     * in the callable.
+     * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + public java.util.List + getTensorConnectionBuilderList() { + return getTensorConnectionFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.TensorConnection, org.tensorflow.proto.framework.TensorConnection.Builder, org.tensorflow.proto.framework.TensorConnectionOrBuilder> + getTensorConnectionFieldBuilder() { + if (tensorConnectionBuilder_ == null) { + tensorConnectionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.TensorConnection, org.tensorflow.proto.framework.TensorConnection.Builder, org.tensorflow.proto.framework.TensorConnectionOrBuilder>( + tensorConnection_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + tensorConnection_ = null; + } + return tensorConnectionBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> feedDevices_; + private com.google.protobuf.MapField + internalGetFeedDevices() { + if (feedDevices_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FeedDevicesDefaultEntryHolder.defaultEntry); + } + return feedDevices_; + } + private com.google.protobuf.MapField + internalGetMutableFeedDevices() { + onChanged();; + if (feedDevices_ == null) { + feedDevices_ = com.google.protobuf.MapField.newMapField( + FeedDevicesDefaultEntryHolder.defaultEntry); + } + if (!feedDevices_.isMutable()) { + feedDevices_ = feedDevices_.copy(); + } + return feedDevices_; + } + + public int getFeedDevicesCount() { + return internalGetFeedDevices().getMap().size(); + } + /** + *
+     * The Tensor objects fed in the callable and fetched from the callable
+     * are expected to be backed by host (CPU) memory by default.
+     * The options below allow changing that - feeding tensors backed by
+     * device memory, or returning tensors that are backed by device memory.
+     * The maps below map the name of a feed/fetch tensor (which appears in
+     * 'feed' or 'fetch' fields above), to the fully qualified name of the device
+     * owning the memory backing the contents of the tensor.
+     * For example, creating a callable with the following options:
+     * CallableOptions {
+     *   feed: "a:0"
+     *   feed: "b:0"
+     *   fetch: "x:0"
+     *   fetch: "y:0"
+     *   feed_devices: {
+     *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+     *   }
+     *   fetch_devices: {
+     *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+     *  }
+     * }
+     * means that the Callable expects:
+     * - The first argument ("a:0") is a Tensor backed by GPU memory.
+     * - The second argument ("b:0") is a Tensor backed by host memory.
+     * and of its return values:
+     * - The first output ("x:0") will be backed by host memory.
+     * - The second output ("y:0") will be backed by GPU memory.
+     * FEEDS:
+     * It is the responsibility of the caller to ensure that the memory of the fed
+     * tensors will be correctly initialized and synchronized before it is
+     * accessed by operations executed during the call to Session::RunCallable().
+     * This is typically ensured by using the TensorFlow memory allocators
+     * (Device::GetAllocator()) to create the Tensor to be fed.
+     * Alternatively, for CUDA-enabled GPU devices, this typically means that the
+     * operation that produced the contents of the tensor has completed, i.e., the
+     * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
+     * cuStreamSynchronize()).
+     * 
+ * + * map<string, string> feed_devices = 6; + */ + + public boolean containsFeedDevices( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFeedDevices().getMap().containsKey(key); + } + /** + * Use {@link #getFeedDevicesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getFeedDevices() { + return getFeedDevicesMap(); + } + /** + *
+     * The Tensor objects fed in the callable and fetched from the callable
+     * are expected to be backed by host (CPU) memory by default.
+     * The options below allow changing that - feeding tensors backed by
+     * device memory, or returning tensors that are backed by device memory.
+     * The maps below map the name of a feed/fetch tensor (which appears in
+     * 'feed' or 'fetch' fields above), to the fully qualified name of the device
+     * owning the memory backing the contents of the tensor.
+     * For example, creating a callable with the following options:
+     * CallableOptions {
+     *   feed: "a:0"
+     *   feed: "b:0"
+     *   fetch: "x:0"
+     *   fetch: "y:0"
+     *   feed_devices: {
+     *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+     *   }
+     *   fetch_devices: {
+     *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+     *  }
+     * }
+     * means that the Callable expects:
+     * - The first argument ("a:0") is a Tensor backed by GPU memory.
+     * - The second argument ("b:0") is a Tensor backed by host memory.
+     * and of its return values:
+     * - The first output ("x:0") will be backed by host memory.
+     * - The second output ("y:0") will be backed by GPU memory.
+     * FEEDS:
+     * It is the responsibility of the caller to ensure that the memory of the fed
+     * tensors will be correctly initialized and synchronized before it is
+     * accessed by operations executed during the call to Session::RunCallable().
+     * This is typically ensured by using the TensorFlow memory allocators
+     * (Device::GetAllocator()) to create the Tensor to be fed.
+     * Alternatively, for CUDA-enabled GPU devices, this typically means that the
+     * operation that produced the contents of the tensor has completed, i.e., the
+     * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
+     * cuStreamSynchronize()).
+     * 
+ * + * map<string, string> feed_devices = 6; + */ + + public java.util.Map getFeedDevicesMap() { + return internalGetFeedDevices().getMap(); + } + /** + *
+     * The Tensor objects fed in the callable and fetched from the callable
+     * are expected to be backed by host (CPU) memory by default.
+     * The options below allow changing that - feeding tensors backed by
+     * device memory, or returning tensors that are backed by device memory.
+     * The maps below map the name of a feed/fetch tensor (which appears in
+     * 'feed' or 'fetch' fields above), to the fully qualified name of the device
+     * owning the memory backing the contents of the tensor.
+     * For example, creating a callable with the following options:
+     * CallableOptions {
+     *   feed: "a:0"
+     *   feed: "b:0"
+     *   fetch: "x:0"
+     *   fetch: "y:0"
+     *   feed_devices: {
+     *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+     *   }
+     *   fetch_devices: {
+     *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+     *  }
+     * }
+     * means that the Callable expects:
+     * - The first argument ("a:0") is a Tensor backed by GPU memory.
+     * - The second argument ("b:0") is a Tensor backed by host memory.
+     * and of its return values:
+     * - The first output ("x:0") will be backed by host memory.
+     * - The second output ("y:0") will be backed by GPU memory.
+     * FEEDS:
+     * It is the responsibility of the caller to ensure that the memory of the fed
+     * tensors will be correctly initialized and synchronized before it is
+     * accessed by operations executed during the call to Session::RunCallable().
+     * This is typically ensured by using the TensorFlow memory allocators
+     * (Device::GetAllocator()) to create the Tensor to be fed.
+     * Alternatively, for CUDA-enabled GPU devices, this typically means that the
+     * operation that produced the contents of the tensor has completed, i.e., the
+     * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
+     * cuStreamSynchronize()).
+     * 
+ * + * map<string, string> feed_devices = 6; + */ + + public java.lang.String getFeedDevicesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFeedDevices().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The Tensor objects fed in the callable and fetched from the callable
+     * are expected to be backed by host (CPU) memory by default.
+     * The options below allow changing that - feeding tensors backed by
+     * device memory, or returning tensors that are backed by device memory.
+     * The maps below map the name of a feed/fetch tensor (which appears in
+     * 'feed' or 'fetch' fields above), to the fully qualified name of the device
+     * owning the memory backing the contents of the tensor.
+     * For example, creating a callable with the following options:
+     * CallableOptions {
+     *   feed: "a:0"
+     *   feed: "b:0"
+     *   fetch: "x:0"
+     *   fetch: "y:0"
+     *   feed_devices: {
+     *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+     *   }
+     *   fetch_devices: {
+     *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+     *  }
+     * }
+     * means that the Callable expects:
+     * - The first argument ("a:0") is a Tensor backed by GPU memory.
+     * - The second argument ("b:0") is a Tensor backed by host memory.
+     * and of its return values:
+     * - The first output ("x:0") will be backed by host memory.
+     * - The second output ("y:0") will be backed by GPU memory.
+     * FEEDS:
+     * It is the responsibility of the caller to ensure that the memory of the fed
+     * tensors will be correctly initialized and synchronized before it is
+     * accessed by operations executed during the call to Session::RunCallable().
+     * This is typically ensured by using the TensorFlow memory allocators
+     * (Device::GetAllocator()) to create the Tensor to be fed.
+     * Alternatively, for CUDA-enabled GPU devices, this typically means that the
+     * operation that produced the contents of the tensor has completed, i.e., the
+     * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
+     * cuStreamSynchronize()).
+     * 
+ * + * map<string, string> feed_devices = 6; + */ + + public java.lang.String getFeedDevicesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFeedDevices().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearFeedDevices() { + internalGetMutableFeedDevices().getMutableMap() + .clear(); + return this; + } + /** + *
+     * The Tensor objects fed in the callable and fetched from the callable
+     * are expected to be backed by host (CPU) memory by default.
+     * The options below allow changing that - feeding tensors backed by
+     * device memory, or returning tensors that are backed by device memory.
+     * The maps below map the name of a feed/fetch tensor (which appears in
+     * 'feed' or 'fetch' fields above), to the fully qualified name of the device
+     * owning the memory backing the contents of the tensor.
+     * For example, creating a callable with the following options:
+     * CallableOptions {
+     *   feed: "a:0"
+     *   feed: "b:0"
+     *   fetch: "x:0"
+     *   fetch: "y:0"
+     *   feed_devices: {
+     *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+     *   }
+     *   fetch_devices: {
+     *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+     *  }
+     * }
+     * means that the Callable expects:
+     * - The first argument ("a:0") is a Tensor backed by GPU memory.
+     * - The second argument ("b:0") is a Tensor backed by host memory.
+     * and of its return values:
+     * - The first output ("x:0") will be backed by host memory.
+     * - The second output ("y:0") will be backed by GPU memory.
+     * FEEDS:
+     * It is the responsibility of the caller to ensure that the memory of the fed
+     * tensors will be correctly initialized and synchronized before it is
+     * accessed by operations executed during the call to Session::RunCallable().
+     * This is typically ensured by using the TensorFlow memory allocators
+     * (Device::GetAllocator()) to create the Tensor to be fed.
+     * Alternatively, for CUDA-enabled GPU devices, this typically means that the
+     * operation that produced the contents of the tensor has completed, i.e., the
+     * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
+     * cuStreamSynchronize()).
+     * 
+ * + * map<string, string> feed_devices = 6; + */ + + public Builder removeFeedDevices( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFeedDevices().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableFeedDevices() { + return internalGetMutableFeedDevices().getMutableMap(); + } + /** + *
+     * The Tensor objects fed in the callable and fetched from the callable
+     * are expected to be backed by host (CPU) memory by default.
+     * The options below allow changing that - feeding tensors backed by
+     * device memory, or returning tensors that are backed by device memory.
+     * The maps below map the name of a feed/fetch tensor (which appears in
+     * 'feed' or 'fetch' fields above), to the fully qualified name of the device
+     * owning the memory backing the contents of the tensor.
+     * For example, creating a callable with the following options:
+     * CallableOptions {
+     *   feed: "a:0"
+     *   feed: "b:0"
+     *   fetch: "x:0"
+     *   fetch: "y:0"
+     *   feed_devices: {
+     *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+     *   }
+     *   fetch_devices: {
+     *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+     *  }
+     * }
+     * means that the Callable expects:
+     * - The first argument ("a:0") is a Tensor backed by GPU memory.
+     * - The second argument ("b:0") is a Tensor backed by host memory.
+     * and of its return values:
+     * - The first output ("x:0") will be backed by host memory.
+     * - The second output ("y:0") will be backed by GPU memory.
+     * FEEDS:
+     * It is the responsibility of the caller to ensure that the memory of the fed
+     * tensors will be correctly initialized and synchronized before it is
+     * accessed by operations executed during the call to Session::RunCallable().
+     * This is typically ensured by using the TensorFlow memory allocators
+     * (Device::GetAllocator()) to create the Tensor to be fed.
+     * Alternatively, for CUDA-enabled GPU devices, this typically means that the
+     * operation that produced the contents of the tensor has completed, i.e., the
+     * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
+     * cuStreamSynchronize()).
+     * 
+ * + * map<string, string> feed_devices = 6; + */ + public Builder putFeedDevices( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFeedDevices().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * The Tensor objects fed in the callable and fetched from the callable
+     * are expected to be backed by host (CPU) memory by default.
+     * The options below allow changing that - feeding tensors backed by
+     * device memory, or returning tensors that are backed by device memory.
+     * The maps below map the name of a feed/fetch tensor (which appears in
+     * 'feed' or 'fetch' fields above), to the fully qualified name of the device
+     * owning the memory backing the contents of the tensor.
+     * For example, creating a callable with the following options:
+     * CallableOptions {
+     *   feed: "a:0"
+     *   feed: "b:0"
+     *   fetch: "x:0"
+     *   fetch: "y:0"
+     *   feed_devices: {
+     *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+     *   }
+     *   fetch_devices: {
+     *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+     *  }
+     * }
+     * means that the Callable expects:
+     * - The first argument ("a:0") is a Tensor backed by GPU memory.
+     * - The second argument ("b:0") is a Tensor backed by host memory.
+     * and of its return values:
+     * - The first output ("x:0") will be backed by host memory.
+     * - The second output ("y:0") will be backed by GPU memory.
+     * FEEDS:
+     * It is the responsibility of the caller to ensure that the memory of the fed
+     * tensors will be correctly initialized and synchronized before it is
+     * accessed by operations executed during the call to Session::RunCallable().
+     * This is typically ensured by using the TensorFlow memory allocators
+     * (Device::GetAllocator()) to create the Tensor to be fed.
+     * Alternatively, for CUDA-enabled GPU devices, this typically means that the
+     * operation that produced the contents of the tensor has completed, i.e., the
+     * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
+     * cuStreamSynchronize()).
+     * 
+ * + * map<string, string> feed_devices = 6; + */ + + public Builder putAllFeedDevices( + java.util.Map values) { + internalGetMutableFeedDevices().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> fetchDevices_; + private com.google.protobuf.MapField + internalGetFetchDevices() { + if (fetchDevices_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FetchDevicesDefaultEntryHolder.defaultEntry); + } + return fetchDevices_; + } + private com.google.protobuf.MapField + internalGetMutableFetchDevices() { + onChanged();; + if (fetchDevices_ == null) { + fetchDevices_ = com.google.protobuf.MapField.newMapField( + FetchDevicesDefaultEntryHolder.defaultEntry); + } + if (!fetchDevices_.isMutable()) { + fetchDevices_ = fetchDevices_.copy(); + } + return fetchDevices_; + } + + public int getFetchDevicesCount() { + return internalGetFetchDevices().getMap().size(); + } + /** + * map<string, string> fetch_devices = 7; + */ + + public boolean containsFetchDevices( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFetchDevices().getMap().containsKey(key); + } + /** + * Use {@link #getFetchDevicesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getFetchDevices() { + return getFetchDevicesMap(); + } + /** + * map<string, string> fetch_devices = 7; + */ + + public java.util.Map getFetchDevicesMap() { + return internalGetFetchDevices().getMap(); + } + /** + * map<string, string> fetch_devices = 7; + */ + + public java.lang.String getFetchDevicesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFetchDevices().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> fetch_devices = 7; + */ + + public java.lang.String getFetchDevicesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFetchDevices().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearFetchDevices() { + internalGetMutableFetchDevices().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> fetch_devices = 7; + */ + + public Builder removeFetchDevices( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFetchDevices().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableFetchDevices() { + return internalGetMutableFetchDevices().getMutableMap(); + } + /** + * map<string, string> fetch_devices = 7; + */ + public Builder putFetchDevices( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFetchDevices().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, string> fetch_devices = 7; + */ + + public Builder putAllFetchDevices( + java.util.Map values) { + internalGetMutableFetchDevices().getMutableMap() + .putAll(values); + return this; + } + + private boolean fetchSkipSync_ ; + /** + *
+     * By default, RunCallable() will synchronize the GPU stream before returning
+     * fetched tensors on a GPU device, to ensure that the values in those tensors
+     * have been produced. This simplifies interacting with the tensors, but
+     * potentially incurs a performance hit.
+     * If this options is set to true, the caller is responsible for ensuring
+     * that the values in the fetched tensors have been produced before they are
+     * used. The caller can do this by invoking `Device::Sync()` on the underlying
+     * device(s), or by feeding the tensors back to the same Session using
+     * `feed_devices` with the same corresponding device name.
+     * 
+ * + * bool fetch_skip_sync = 8; + */ + public boolean getFetchSkipSync() { + return fetchSkipSync_; + } + /** + *
+     * By default, RunCallable() will synchronize the GPU stream before returning
+     * fetched tensors on a GPU device, to ensure that the values in those tensors
+     * have been produced. This simplifies interacting with the tensors, but
+     * potentially incurs a performance hit.
+     * If this options is set to true, the caller is responsible for ensuring
+     * that the values in the fetched tensors have been produced before they are
+     * used. The caller can do this by invoking `Device::Sync()` on the underlying
+     * device(s), or by feeding the tensors back to the same Session using
+     * `feed_devices` with the same corresponding device name.
+     * 
+ * + * bool fetch_skip_sync = 8; + */ + public Builder setFetchSkipSync(boolean value) { + + fetchSkipSync_ = value; + onChanged(); + return this; + } + /** + *
+     * By default, RunCallable() will synchronize the GPU stream before returning
+     * fetched tensors on a GPU device, to ensure that the values in those tensors
+     * have been produced. This simplifies interacting with the tensors, but
+     * potentially incurs a performance hit.
+     * If this options is set to true, the caller is responsible for ensuring
+     * that the values in the fetched tensors have been produced before they are
+     * used. The caller can do this by invoking `Device::Sync()` on the underlying
+     * device(s), or by feeding the tensors back to the same Session using
+     * `feed_devices` with the same corresponding device name.
+     * 
+ * + * bool fetch_skip_sync = 8; + */ + public Builder clearFetchSkipSync() { + + fetchSkipSync_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.CallableOptions) + } + + // @@protoc_insertion_point(class_scope:tensorflow.CallableOptions) + private static final org.tensorflow.proto.framework.CallableOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.CallableOptions(); + } + + public static org.tensorflow.proto.framework.CallableOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CallableOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CallableOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CallableOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CallableOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CallableOptionsOrBuilder.java new file mode 100644 index 00000000000..d65852d4843 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CallableOptionsOrBuilder.java @@ -0,0 +1,485 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +public interface CallableOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.CallableOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Tensors to be fed in the callable. Each feed is the name of a tensor.
+   * 
+ * + * repeated string feed = 1; + */ + java.util.List + getFeedList(); + /** + *
+   * Tensors to be fed in the callable. Each feed is the name of a tensor.
+   * 
+ * + * repeated string feed = 1; + */ + int getFeedCount(); + /** + *
+   * Tensors to be fed in the callable. Each feed is the name of a tensor.
+   * 
+ * + * repeated string feed = 1; + */ + java.lang.String getFeed(int index); + /** + *
+   * Tensors to be fed in the callable. Each feed is the name of a tensor.
+   * 
+ * + * repeated string feed = 1; + */ + com.google.protobuf.ByteString + getFeedBytes(int index); + + /** + *
+   * Fetches. A list of tensor names. The caller of the callable expects a
+   * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+   * order of specified fetches does not change the execution order.
+   * 
+ * + * repeated string fetch = 2; + */ + java.util.List + getFetchList(); + /** + *
+   * Fetches. A list of tensor names. The caller of the callable expects a
+   * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+   * order of specified fetches does not change the execution order.
+   * 
+ * + * repeated string fetch = 2; + */ + int getFetchCount(); + /** + *
+   * Fetches. A list of tensor names. The caller of the callable expects a
+   * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+   * order of specified fetches does not change the execution order.
+   * 
+ * + * repeated string fetch = 2; + */ + java.lang.String getFetch(int index); + /** + *
+   * Fetches. A list of tensor names. The caller of the callable expects a
+   * tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
+   * order of specified fetches does not change the execution order.
+   * 
+ * + * repeated string fetch = 2; + */ + com.google.protobuf.ByteString + getFetchBytes(int index); + + /** + *
+   * Target Nodes. A list of node names. The named nodes will be run by the
+   * callable but their outputs will not be returned.
+   * 
+ * + * repeated string target = 3; + */ + java.util.List + getTargetList(); + /** + *
+   * Target Nodes. A list of node names. The named nodes will be run by the
+   * callable but their outputs will not be returned.
+   * 
+ * + * repeated string target = 3; + */ + int getTargetCount(); + /** + *
+   * Target Nodes. A list of node names. The named nodes will be run by the
+   * callable but their outputs will not be returned.
+   * 
+ * + * repeated string target = 3; + */ + java.lang.String getTarget(int index); + /** + *
+   * Target Nodes. A list of node names. The named nodes will be run by the
+   * callable but their outputs will not be returned.
+   * 
+ * + * repeated string target = 3; + */ + com.google.protobuf.ByteString + getTargetBytes(int index); + + /** + *
+   * Options that will be applied to each run.
+   * 
+ * + * .tensorflow.RunOptions run_options = 4; + */ + boolean hasRunOptions(); + /** + *
+   * Options that will be applied to each run.
+   * 
+ * + * .tensorflow.RunOptions run_options = 4; + */ + org.tensorflow.proto.framework.RunOptions getRunOptions(); + /** + *
+   * Options that will be applied to each run.
+   * 
+ * + * .tensorflow.RunOptions run_options = 4; + */ + org.tensorflow.proto.framework.RunOptionsOrBuilder getRunOptionsOrBuilder(); + + /** + *
+   * Tensors to be connected in the callable. Each TensorConnection denotes
+   * a pair of tensors in the graph, between which an edge will be created
+   * in the callable.
+   * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + java.util.List + getTensorConnectionList(); + /** + *
+   * Tensors to be connected in the callable. Each TensorConnection denotes
+   * a pair of tensors in the graph, between which an edge will be created
+   * in the callable.
+   * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + org.tensorflow.proto.framework.TensorConnection getTensorConnection(int index); + /** + *
+   * Tensors to be connected in the callable. Each TensorConnection denotes
+   * a pair of tensors in the graph, between which an edge will be created
+   * in the callable.
+   * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + int getTensorConnectionCount(); + /** + *
+   * Tensors to be connected in the callable. Each TensorConnection denotes
+   * a pair of tensors in the graph, between which an edge will be created
+   * in the callable.
+   * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + java.util.List + getTensorConnectionOrBuilderList(); + /** + *
+   * Tensors to be connected in the callable. Each TensorConnection denotes
+   * a pair of tensors in the graph, between which an edge will be created
+   * in the callable.
+   * 
+ * + * repeated .tensorflow.TensorConnection tensor_connection = 5; + */ + org.tensorflow.proto.framework.TensorConnectionOrBuilder getTensorConnectionOrBuilder( + int index); + + /** + *
+   * The Tensor objects fed in the callable and fetched from the callable
+   * are expected to be backed by host (CPU) memory by default.
+   * The options below allow changing that - feeding tensors backed by
+   * device memory, or returning tensors that are backed by device memory.
+   * The maps below map the name of a feed/fetch tensor (which appears in
+   * 'feed' or 'fetch' fields above), to the fully qualified name of the device
+   * owning the memory backing the contents of the tensor.
+   * For example, creating a callable with the following options:
+   * CallableOptions {
+   *   feed: "a:0"
+   *   feed: "b:0"
+   *   fetch: "x:0"
+   *   fetch: "y:0"
+   *   feed_devices: {
+   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *   }
+   *   fetch_devices: {
+   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *  }
+   * }
+   * means that the Callable expects:
+   * - The first argument ("a:0") is a Tensor backed by GPU memory.
+   * - The second argument ("b:0") is a Tensor backed by host memory.
+   * and of its return values:
+   * - The first output ("x:0") will be backed by host memory.
+   * - The second output ("y:0") will be backed by GPU memory.
+   * FEEDS:
+   * It is the responsibility of the caller to ensure that the memory of the fed
+   * tensors will be correctly initialized and synchronized before it is
+   * accessed by operations executed during the call to Session::RunCallable().
+   * This is typically ensured by using the TensorFlow memory allocators
+   * (Device::GetAllocator()) to create the Tensor to be fed.
+   * Alternatively, for CUDA-enabled GPU devices, this typically means that the
+   * operation that produced the contents of the tensor has completed, i.e., the
+   * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
+   * cuStreamSynchronize()).
+   * 
+ * + * map<string, string> feed_devices = 6; + */ + int getFeedDevicesCount(); + /** + *
+   * The Tensor objects fed in the callable and fetched from the callable
+   * are expected to be backed by host (CPU) memory by default.
+   * The options below allow changing that - feeding tensors backed by
+   * device memory, or returning tensors that are backed by device memory.
+   * The maps below map the name of a feed/fetch tensor (which appears in
+   * 'feed' or 'fetch' fields above), to the fully qualified name of the device
+   * owning the memory backing the contents of the tensor.
+   * For example, creating a callable with the following options:
+   * CallableOptions {
+   *   feed: "a:0"
+   *   feed: "b:0"
+   *   fetch: "x:0"
+   *   fetch: "y:0"
+   *   feed_devices: {
+   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *   }
+   *   fetch_devices: {
+   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *  }
+   * }
+   * means that the Callable expects:
+   * - The first argument ("a:0") is a Tensor backed by GPU memory.
+   * - The second argument ("b:0") is a Tensor backed by host memory.
+   * and of its return values:
+   * - The first output ("x:0") will be backed by host memory.
+   * - The second output ("y:0") will be backed by GPU memory.
+   * FEEDS:
+   * It is the responsibility of the caller to ensure that the memory of the fed
+   * tensors will be correctly initialized and synchronized before it is
+   * accessed by operations executed during the call to Session::RunCallable().
+   * This is typically ensured by using the TensorFlow memory allocators
+   * (Device::GetAllocator()) to create the Tensor to be fed.
+   * Alternatively, for CUDA-enabled GPU devices, this typically means that the
+   * operation that produced the contents of the tensor has completed, i.e., the
+   * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
+   * cuStreamSynchronize()).
+   * 
+ * + * map<string, string> feed_devices = 6; + */ + boolean containsFeedDevices( + java.lang.String key); + /** + * Use {@link #getFeedDevicesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getFeedDevices(); + /** + *
+   * The Tensor objects fed in the callable and fetched from the callable
+   * are expected to be backed by host (CPU) memory by default.
+   * The options below allow changing that - feeding tensors backed by
+   * device memory, or returning tensors that are backed by device memory.
+   * The maps below map the name of a feed/fetch tensor (which appears in
+   * 'feed' or 'fetch' fields above), to the fully qualified name of the device
+   * owning the memory backing the contents of the tensor.
+   * For example, creating a callable with the following options:
+   * CallableOptions {
+   *   feed: "a:0"
+   *   feed: "b:0"
+   *   fetch: "x:0"
+   *   fetch: "y:0"
+   *   feed_devices: {
+   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *   }
+   *   fetch_devices: {
+   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *  }
+   * }
+   * means that the Callable expects:
+   * - The first argument ("a:0") is a Tensor backed by GPU memory.
+   * - The second argument ("b:0") is a Tensor backed by host memory.
+   * and of its return values:
+   * - The first output ("x:0") will be backed by host memory.
+   * - The second output ("y:0") will be backed by GPU memory.
+   * FEEDS:
+   * It is the responsibility of the caller to ensure that the memory of the fed
+   * tensors will be correctly initialized and synchronized before it is
+   * accessed by operations executed during the call to Session::RunCallable().
+   * This is typically ensured by using the TensorFlow memory allocators
+   * (Device::GetAllocator()) to create the Tensor to be fed.
+   * Alternatively, for CUDA-enabled GPU devices, this typically means that the
+   * operation that produced the contents of the tensor has completed, i.e., the
+   * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
+   * cuStreamSynchronize()).
+   * 
+ * + * map<string, string> feed_devices = 6; + */ + java.util.Map + getFeedDevicesMap(); + /** + *
+   * The Tensor objects fed in the callable and fetched from the callable
+   * are expected to be backed by host (CPU) memory by default.
+   * The options below allow changing that - feeding tensors backed by
+   * device memory, or returning tensors that are backed by device memory.
+   * The maps below map the name of a feed/fetch tensor (which appears in
+   * 'feed' or 'fetch' fields above), to the fully qualified name of the device
+   * owning the memory backing the contents of the tensor.
+   * For example, creating a callable with the following options:
+   * CallableOptions {
+   *   feed: "a:0"
+   *   feed: "b:0"
+   *   fetch: "x:0"
+   *   fetch: "y:0"
+   *   feed_devices: {
+   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *   }
+   *   fetch_devices: {
+   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *  }
+   * }
+   * means that the Callable expects:
+   * - The first argument ("a:0") is a Tensor backed by GPU memory.
+   * - The second argument ("b:0") is a Tensor backed by host memory.
+   * and of its return values:
+   * - The first output ("x:0") will be backed by host memory.
+   * - The second output ("y:0") will be backed by GPU memory.
+   * FEEDS:
+   * It is the responsibility of the caller to ensure that the memory of the fed
+   * tensors will be correctly initialized and synchronized before it is
+   * accessed by operations executed during the call to Session::RunCallable().
+   * This is typically ensured by using the TensorFlow memory allocators
+   * (Device::GetAllocator()) to create the Tensor to be fed.
+   * Alternatively, for CUDA-enabled GPU devices, this typically means that the
+   * operation that produced the contents of the tensor has completed, i.e., the
+   * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
+   * cuStreamSynchronize()).
+   * 
+ * + * map<string, string> feed_devices = 6; + */ + + java.lang.String getFeedDevicesOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+   * The Tensor objects fed in the callable and fetched from the callable
+   * are expected to be backed by host (CPU) memory by default.
+   * The options below allow changing that - feeding tensors backed by
+   * device memory, or returning tensors that are backed by device memory.
+   * The maps below map the name of a feed/fetch tensor (which appears in
+   * 'feed' or 'fetch' fields above), to the fully qualified name of the device
+   * owning the memory backing the contents of the tensor.
+   * For example, creating a callable with the following options:
+   * CallableOptions {
+   *   feed: "a:0"
+   *   feed: "b:0"
+   *   fetch: "x:0"
+   *   fetch: "y:0"
+   *   feed_devices: {
+   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *   }
+   *   fetch_devices: {
+   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
+   *  }
+   * }
+   * means that the Callable expects:
+   * - The first argument ("a:0") is a Tensor backed by GPU memory.
+   * - The second argument ("b:0") is a Tensor backed by host memory.
+   * and of its return values:
+   * - The first output ("x:0") will be backed by host memory.
+   * - The second output ("y:0") will be backed by GPU memory.
+   * FEEDS:
+   * It is the responsibility of the caller to ensure that the memory of the fed
+   * tensors will be correctly initialized and synchronized before it is
+   * accessed by operations executed during the call to Session::RunCallable().
+   * This is typically ensured by using the TensorFlow memory allocators
+   * (Device::GetAllocator()) to create the Tensor to be fed.
+   * Alternatively, for CUDA-enabled GPU devices, this typically means that the
+   * operation that produced the contents of the tensor has completed, i.e., the
+   * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
+   * cuStreamSynchronize()).
+   * 
+ * + * map<string, string> feed_devices = 6; + */ + + java.lang.String getFeedDevicesOrThrow( + java.lang.String key); + + /** + * map<string, string> fetch_devices = 7; + */ + int getFetchDevicesCount(); + /** + * map<string, string> fetch_devices = 7; + */ + boolean containsFetchDevices( + java.lang.String key); + /** + * Use {@link #getFetchDevicesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getFetchDevices(); + /** + * map<string, string> fetch_devices = 7; + */ + java.util.Map + getFetchDevicesMap(); + /** + * map<string, string> fetch_devices = 7; + */ + + java.lang.String getFetchDevicesOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + * map<string, string> fetch_devices = 7; + */ + + java.lang.String getFetchDevicesOrThrow( + java.lang.String key); + + /** + *
+   * By default, RunCallable() will synchronize the GPU stream before returning
+   * fetched tensors on a GPU device, to ensure that the values in those tensors
+   * have been produced. This simplifies interacting with the tensors, but
+   * potentially incurs a performance hit.
+   * If this options is set to true, the caller is responsible for ensuring
+   * that the values in the fetched tensors have been produced before they are
+   * used. The caller can do this by invoking `Device::Sync()` on the underlying
+   * device(s), or by feeding the tensors back to the same Session using
+   * `feed_devices` with the same corresponding device name.
+   * 
+ * + * bool fetch_skip_sync = 8; + */ + boolean getFetchSkipSync(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/Code.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/Code.java new file mode 100644 index 00000000000..c7eda03f92a --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/Code.java @@ -0,0 +1,536 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/error_codes.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * The canonical error codes for TensorFlow APIs.
+ * Warnings:
+ * -   Do not change any numeric assignments.
+ * -   Changes to this list should only be made if there is a compelling
+ *     need that can't be satisfied in another way.  Such changes
+ *     must be approved by at least two OWNERS.
+ * -   These error codes must match gRPC and protobuf error codes (except for
+ *     DO_NOT_USE_RESERVED_FOR_FUTURE_EXPANSION_USE_DEFAULT_IN_SWITCH_INSTEAD_).
+ * Sometimes multiple error codes may apply.  Services should return
+ * the most specific error code that applies.  For example, prefer
+ * OUT_OF_RANGE over FAILED_PRECONDITION if both codes apply.
+ * Similarly prefer NOT_FOUND or ALREADY_EXISTS over FAILED_PRECONDITION.
+ * 
+ * + * Protobuf enum {@code tensorflow.error.Code} + */ +public enum Code + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Not an error; returned on success
+   * 
+ * + * OK = 0; + */ + OK(0), + /** + *
+   * The operation was cancelled (typically by the caller).
+   * 
+ * + * CANCELLED = 1; + */ + CANCELLED(1), + /** + *
+   * Unknown error.  An example of where this error may be returned is
+   * if a Status value received from another address space belongs to
+   * an error-space that is not known in this address space.  Also
+   * errors raised by APIs that do not return enough error information
+   * may be converted to this error.
+   * 
+ * + * UNKNOWN = 2; + */ + UNKNOWN(2), + /** + *
+   * Client specified an invalid argument.  Note that this differs
+   * from FAILED_PRECONDITION.  INVALID_ARGUMENT indicates arguments
+   * that are problematic regardless of the state of the system
+   * (e.g., a malformed file name).
+   * 
+ * + * INVALID_ARGUMENT = 3; + */ + INVALID_ARGUMENT(3), + /** + *
+   * Deadline expired before operation could complete.  For operations
+   * that change the state of the system, this error may be returned
+   * even if the operation has completed successfully.  For example, a
+   * successful response from a server could have been delayed long
+   * enough for the deadline to expire.
+   * 
+ * + * DEADLINE_EXCEEDED = 4; + */ + DEADLINE_EXCEEDED(4), + /** + *
+   * Some requested entity (e.g., file or directory) was not found.
+   * For privacy reasons, this code *may* be returned when the client
+   * does not have the access right to the entity.
+   * 
+ * + * NOT_FOUND = 5; + */ + NOT_FOUND(5), + /** + *
+   * Some entity that we attempted to create (e.g., file or directory)
+   * already exists.
+   * 
+ * + * ALREADY_EXISTS = 6; + */ + ALREADY_EXISTS(6), + /** + *
+   * The caller does not have permission to execute the specified
+   * operation.  PERMISSION_DENIED must not be used for rejections
+   * caused by exhausting some resource (use RESOURCE_EXHAUSTED
+   * instead for those errors).  PERMISSION_DENIED must not be
+   * used if the caller can not be identified (use UNAUTHENTICATED
+   * instead for those errors).
+   * 
+ * + * PERMISSION_DENIED = 7; + */ + PERMISSION_DENIED(7), + /** + *
+   * The request does not have valid authentication credentials for the
+   * operation.
+   * 
+ * + * UNAUTHENTICATED = 16; + */ + UNAUTHENTICATED(16), + /** + *
+   * Some resource has been exhausted, perhaps a per-user quota, or
+   * perhaps the entire file system is out of space.
+   * 
+ * + * RESOURCE_EXHAUSTED = 8; + */ + RESOURCE_EXHAUSTED(8), + /** + *
+   * Operation was rejected because the system is not in a state
+   * required for the operation's execution.  For example, directory
+   * to be deleted may be non-empty, an rmdir operation is applied to
+   * a non-directory, etc.
+   * A litmus test that may help a service implementor in deciding
+   * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:
+   *  (a) Use UNAVAILABLE if the client can retry just the failing call.
+   *  (b) Use ABORTED if the client should retry at a higher-level
+   *      (e.g., restarting a read-modify-write sequence).
+   *  (c) Use FAILED_PRECONDITION if the client should not retry until
+   *      the system state has been explicitly fixed.  E.g., if an "rmdir"
+   *      fails because the directory is non-empty, FAILED_PRECONDITION
+   *      should be returned since the client should not retry unless
+   *      they have first fixed up the directory by deleting files from it.
+   *  (d) Use FAILED_PRECONDITION if the client performs conditional
+   *      REST Get/Update/Delete on a resource and the resource on the
+   *      server does not match the condition. E.g., conflicting
+   *      read-modify-write on the same resource.
+   * 
+ * + * FAILED_PRECONDITION = 9; + */ + FAILED_PRECONDITION(9), + /** + *
+   * The operation was aborted, typically due to a concurrency issue
+   * like sequencer check failures, transaction aborts, etc.
+   * See litmus test above for deciding between FAILED_PRECONDITION,
+   * ABORTED, and UNAVAILABLE.
+   * 
+ * + * ABORTED = 10; + */ + ABORTED(10), + /** + *
+   * Operation tried to iterate past the valid input range.  E.g., seeking or
+   * reading past end of file.
+   * Unlike INVALID_ARGUMENT, this error indicates a problem that may
+   * be fixed if the system state changes. For example, a 32-bit file
+   * system will generate INVALID_ARGUMENT if asked to read at an
+   * offset that is not in the range [0,2^32-1], but it will generate
+   * OUT_OF_RANGE if asked to read from an offset past the current
+   * file size.
+   * There is a fair bit of overlap between FAILED_PRECONDITION and
+   * OUT_OF_RANGE.  We recommend using OUT_OF_RANGE (the more specific
+   * error) when it applies so that callers who are iterating through
+   * a space can easily look for an OUT_OF_RANGE error to detect when
+   * they are done.
+   * 
+ * + * OUT_OF_RANGE = 11; + */ + OUT_OF_RANGE(11), + /** + *
+   * Operation is not implemented or not supported/enabled in this service.
+   * 
+ * + * UNIMPLEMENTED = 12; + */ + UNIMPLEMENTED(12), + /** + *
+   * Internal errors.  Means some invariant expected by the underlying
+   * system has been broken.  If you see one of these errors,
+   * something is very broken.
+   * 
+ * + * INTERNAL = 13; + */ + INTERNAL(13), + /** + *
+   * The service is currently unavailable.  This is a most likely a
+   * transient condition and may be corrected by retrying with
+   * a backoff.
+   * See litmus test above for deciding between FAILED_PRECONDITION,
+   * ABORTED, and UNAVAILABLE.
+   * 
+ * + * UNAVAILABLE = 14; + */ + UNAVAILABLE(14), + /** + *
+   * Unrecoverable data loss or corruption.
+   * 
+ * + * DATA_LOSS = 15; + */ + DATA_LOSS(15), + /** + *
+   * An extra enum entry to prevent people from writing code that
+   * fails to compile when a new code is added.
+   * Nobody should ever reference this enumeration entry. In particular,
+   * if you write C++ code that switches on this enumeration, add a default:
+   * case instead of a case that mentions this enumeration entry.
+   * Nobody should rely on the value (currently 20) listed here.  It
+   * may change in the future.
+   * 
+ * + * DO_NOT_USE_RESERVED_FOR_FUTURE_EXPANSION_USE_DEFAULT_IN_SWITCH_INSTEAD_ = 20; + */ + DO_NOT_USE_RESERVED_FOR_FUTURE_EXPANSION_USE_DEFAULT_IN_SWITCH_INSTEAD_(20), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Not an error; returned on success
+   * 
+ * + * OK = 0; + */ + public static final int OK_VALUE = 0; + /** + *
+   * The operation was cancelled (typically by the caller).
+   * 
+ * + * CANCELLED = 1; + */ + public static final int CANCELLED_VALUE = 1; + /** + *
+   * Unknown error.  An example of where this error may be returned is
+   * if a Status value received from another address space belongs to
+   * an error-space that is not known in this address space.  Also
+   * errors raised by APIs that do not return enough error information
+   * may be converted to this error.
+   * 
+ * + * UNKNOWN = 2; + */ + public static final int UNKNOWN_VALUE = 2; + /** + *
+   * Client specified an invalid argument.  Note that this differs
+   * from FAILED_PRECONDITION.  INVALID_ARGUMENT indicates arguments
+   * that are problematic regardless of the state of the system
+   * (e.g., a malformed file name).
+   * 
+ * + * INVALID_ARGUMENT = 3; + */ + public static final int INVALID_ARGUMENT_VALUE = 3; + /** + *
+   * Deadline expired before operation could complete.  For operations
+   * that change the state of the system, this error may be returned
+   * even if the operation has completed successfully.  For example, a
+   * successful response from a server could have been delayed long
+   * enough for the deadline to expire.
+   * 
+ * + * DEADLINE_EXCEEDED = 4; + */ + public static final int DEADLINE_EXCEEDED_VALUE = 4; + /** + *
+   * Some requested entity (e.g., file or directory) was not found.
+   * For privacy reasons, this code *may* be returned when the client
+   * does not have the access right to the entity.
+   * 
+ * + * NOT_FOUND = 5; + */ + public static final int NOT_FOUND_VALUE = 5; + /** + *
+   * Some entity that we attempted to create (e.g., file or directory)
+   * already exists.
+   * 
+ * + * ALREADY_EXISTS = 6; + */ + public static final int ALREADY_EXISTS_VALUE = 6; + /** + *
+   * The caller does not have permission to execute the specified
+   * operation.  PERMISSION_DENIED must not be used for rejections
+   * caused by exhausting some resource (use RESOURCE_EXHAUSTED
+   * instead for those errors).  PERMISSION_DENIED must not be
+   * used if the caller can not be identified (use UNAUTHENTICATED
+   * instead for those errors).
+   * 
+ * + * PERMISSION_DENIED = 7; + */ + public static final int PERMISSION_DENIED_VALUE = 7; + /** + *
+   * The request does not have valid authentication credentials for the
+   * operation.
+   * 
+ * + * UNAUTHENTICATED = 16; + */ + public static final int UNAUTHENTICATED_VALUE = 16; + /** + *
+   * Some resource has been exhausted, perhaps a per-user quota, or
+   * perhaps the entire file system is out of space.
+   * 
+ * + * RESOURCE_EXHAUSTED = 8; + */ + public static final int RESOURCE_EXHAUSTED_VALUE = 8; + /** + *
+   * Operation was rejected because the system is not in a state
+   * required for the operation's execution.  For example, directory
+   * to be deleted may be non-empty, an rmdir operation is applied to
+   * a non-directory, etc.
+   * A litmus test that may help a service implementor in deciding
+   * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:
+   *  (a) Use UNAVAILABLE if the client can retry just the failing call.
+   *  (b) Use ABORTED if the client should retry at a higher-level
+   *      (e.g., restarting a read-modify-write sequence).
+   *  (c) Use FAILED_PRECONDITION if the client should not retry until
+   *      the system state has been explicitly fixed.  E.g., if an "rmdir"
+   *      fails because the directory is non-empty, FAILED_PRECONDITION
+   *      should be returned since the client should not retry unless
+   *      they have first fixed up the directory by deleting files from it.
+   *  (d) Use FAILED_PRECONDITION if the client performs conditional
+   *      REST Get/Update/Delete on a resource and the resource on the
+   *      server does not match the condition. E.g., conflicting
+   *      read-modify-write on the same resource.
+   * 
+ * + * FAILED_PRECONDITION = 9; + */ + public static final int FAILED_PRECONDITION_VALUE = 9; + /** + *
+   * The operation was aborted, typically due to a concurrency issue
+   * like sequencer check failures, transaction aborts, etc.
+   * See litmus test above for deciding between FAILED_PRECONDITION,
+   * ABORTED, and UNAVAILABLE.
+   * 
+ * + * ABORTED = 10; + */ + public static final int ABORTED_VALUE = 10; + /** + *
+   * Operation tried to iterate past the valid input range.  E.g., seeking or
+   * reading past end of file.
+   * Unlike INVALID_ARGUMENT, this error indicates a problem that may
+   * be fixed if the system state changes. For example, a 32-bit file
+   * system will generate INVALID_ARGUMENT if asked to read at an
+   * offset that is not in the range [0,2^32-1], but it will generate
+   * OUT_OF_RANGE if asked to read from an offset past the current
+   * file size.
+   * There is a fair bit of overlap between FAILED_PRECONDITION and
+   * OUT_OF_RANGE.  We recommend using OUT_OF_RANGE (the more specific
+   * error) when it applies so that callers who are iterating through
+   * a space can easily look for an OUT_OF_RANGE error to detect when
+   * they are done.
+   * 
+ * + * OUT_OF_RANGE = 11; + */ + public static final int OUT_OF_RANGE_VALUE = 11; + /** + *
+   * Operation is not implemented or not supported/enabled in this service.
+   * 
+ * + * UNIMPLEMENTED = 12; + */ + public static final int UNIMPLEMENTED_VALUE = 12; + /** + *
+   * Internal errors.  Means some invariant expected by the underlying
+   * system has been broken.  If you see one of these errors,
+   * something is very broken.
+   * 
+ * + * INTERNAL = 13; + */ + public static final int INTERNAL_VALUE = 13; + /** + *
+   * The service is currently unavailable.  This is a most likely a
+   * transient condition and may be corrected by retrying with
+   * a backoff.
+   * See litmus test above for deciding between FAILED_PRECONDITION,
+   * ABORTED, and UNAVAILABLE.
+   * 
+ * + * UNAVAILABLE = 14; + */ + public static final int UNAVAILABLE_VALUE = 14; + /** + *
+   * Unrecoverable data loss or corruption.
+   * 
+ * + * DATA_LOSS = 15; + */ + public static final int DATA_LOSS_VALUE = 15; + /** + *
+   * An extra enum entry to prevent people from writing code that
+   * fails to compile when a new code is added.
+   * Nobody should ever reference this enumeration entry. In particular,
+   * if you write C++ code that switches on this enumeration, add a default:
+   * case instead of a case that mentions this enumeration entry.
+   * Nobody should rely on the value (currently 20) listed here.  It
+   * may change in the future.
+   * 
+ * + * DO_NOT_USE_RESERVED_FOR_FUTURE_EXPANSION_USE_DEFAULT_IN_SWITCH_INSTEAD_ = 20; + */ + public static final int DO_NOT_USE_RESERVED_FOR_FUTURE_EXPANSION_USE_DEFAULT_IN_SWITCH_INSTEAD__VALUE = 20; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Code valueOf(int value) { + return forNumber(value); + } + + public static Code forNumber(int value) { + switch (value) { + case 0: return OK; + case 1: return CANCELLED; + case 2: return UNKNOWN; + case 3: return INVALID_ARGUMENT; + case 4: return DEADLINE_EXCEEDED; + case 5: return NOT_FOUND; + case 6: return ALREADY_EXISTS; + case 7: return PERMISSION_DENIED; + case 16: return UNAUTHENTICATED; + case 8: return RESOURCE_EXHAUSTED; + case 9: return FAILED_PRECONDITION; + case 10: return ABORTED; + case 11: return OUT_OF_RANGE; + case 12: return UNIMPLEMENTED; + case 13: return INTERNAL; + case 14: return UNAVAILABLE; + case 15: return DATA_LOSS; + case 20: return DO_NOT_USE_RESERVED_FOR_FUTURE_EXPANSION_USE_DEFAULT_IN_SWITCH_INSTEAD_; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Code> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Code findValueByNumber(int number) { + return Code.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.tensorflow.proto.framework.ErrorCodesProtos.getDescriptor().getEnumTypes().get(0); + } + + private static final Code[] VALUES = values(); + + public static Code valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Code(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:tensorflow.error.Code) +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CollectionDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CollectionDef.java new file mode 100644 index 00000000000..f3094be10f6 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CollectionDef.java @@ -0,0 +1,4858 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/meta_graph.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * CollectionDef should cover most collections.
+ * To add a user-defined collection, do one of the following:
+ * 1. For simple data types, such as string, int, float:
+ *      tf.add_to_collection("your_collection_name", your_simple_value)
+ *    strings will be stored as bytes_list.
+ * 2. For Protobuf types, there are three ways to add them:
+ *    1) tf.add_to_collection("your_collection_name",
+ *         your_proto.SerializeToString())
+ *       collection_def {
+ *         key: "user_defined_bytes_collection"
+ *         value {
+ *           bytes_list {
+ *             value: "queue_name: \"test_queue\"\n"
+ *           }
+ *         }
+ *       }
+ *  or
+ *    2) tf.add_to_collection("your_collection_name", str(your_proto))
+ *       collection_def {
+ *         key: "user_defined_string_collection"
+ *         value {
+ *          bytes_list {
+ *             value: "\n\ntest_queue"
+ *           }
+ *         }
+ *       }
+ *  or
+ *    3) any_buf = any_pb2.Any()
+ *       tf.add_to_collection("your_collection_name",
+ *         any_buf.Pack(your_proto))
+ *       collection_def {
+ *         key: "user_defined_any_collection"
+ *         value {
+ *           any_list {
+ *             value {
+ *               type_url: "type.googleapis.com/tensorflow.QueueRunnerDef"
+ *               value: "\n\ntest_queue"
+ *             }
+ *           }
+ *         }
+ *       }
+ * 3. For Python objects, implement to_proto() and from_proto(), and register
+ *    them in the following manner:
+ *    ops.register_proto_function("your_collection_name",
+ *                                proto_type,
+ *                                to_proto=YourPythonObject.to_proto,
+ *                                from_proto=YourPythonObject.from_proto)
+ *    These functions will be invoked to serialize and de-serialize the
+ *    collection. For example,
+ *    ops.register_proto_function(ops.GraphKeys.GLOBAL_VARIABLES,
+ *                                proto_type=variable_pb2.VariableDef,
+ *                                to_proto=Variable.to_proto,
+ *                                from_proto=Variable.from_proto)
+ * 
+ * + * Protobuf type {@code tensorflow.CollectionDef} + */ +public final class CollectionDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.CollectionDef) + CollectionDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use CollectionDef.newBuilder() to construct. + private CollectionDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CollectionDef() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CollectionDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CollectionDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.tensorflow.proto.framework.CollectionDef.NodeList.Builder subBuilder = null; + if (kindCase_ == 1) { + subBuilder = ((org.tensorflow.proto.framework.CollectionDef.NodeList) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.CollectionDef.NodeList.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.CollectionDef.NodeList) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 1; + break; + } + case 18: { + org.tensorflow.proto.framework.CollectionDef.BytesList.Builder subBuilder = null; + if (kindCase_ == 2) { + subBuilder = ((org.tensorflow.proto.framework.CollectionDef.BytesList) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.CollectionDef.BytesList.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.CollectionDef.BytesList) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 2; + break; + } + case 26: { + org.tensorflow.proto.framework.CollectionDef.Int64List.Builder subBuilder = null; + if (kindCase_ == 3) { + subBuilder = ((org.tensorflow.proto.framework.CollectionDef.Int64List) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.CollectionDef.Int64List.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.CollectionDef.Int64List) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 3; + break; + } + case 34: { + org.tensorflow.proto.framework.CollectionDef.FloatList.Builder subBuilder = null; + if (kindCase_ == 4) { + subBuilder = ((org.tensorflow.proto.framework.CollectionDef.FloatList) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.CollectionDef.FloatList.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.CollectionDef.FloatList) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 4; + break; + } + case 42: { + org.tensorflow.proto.framework.CollectionDef.AnyList.Builder subBuilder = null; + if (kindCase_ == 5) { + subBuilder = ((org.tensorflow.proto.framework.CollectionDef.AnyList) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.CollectionDef.AnyList.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.CollectionDef.AnyList) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 5; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CollectionDef.class, org.tensorflow.proto.framework.CollectionDef.Builder.class); + } + + public interface NodeListOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.CollectionDef.NodeList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string value = 1; + */ + java.util.List + getValueList(); + /** + * repeated string value = 1; + */ + int getValueCount(); + /** + * repeated string value = 1; + */ + java.lang.String getValue(int index); + /** + * repeated string value = 1; + */ + com.google.protobuf.ByteString + getValueBytes(int index); + } + /** + *
+   * NodeList is used for collecting nodes in graph. For example
+   * collection_def {
+   *   key: "summaries"
+   *   value {
+   *     node_list {
+   *       value: "input_producer/ScalarSummary:0"
+   *       value: "shuffle_batch/ScalarSummary:0"
+   *       value: "ImageSummary:0"
+   *     }
+   *   }
+   * 
+ * + * Protobuf type {@code tensorflow.CollectionDef.NodeList} + */ + public static final class NodeList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.CollectionDef.NodeList) + NodeListOrBuilder { + private static final long serialVersionUID = 0L; + // Use NodeList.newBuilder() to construct. + private NodeList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NodeList() { + value_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NodeList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NodeList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + value_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + value_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + value_ = value_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_NodeList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_NodeList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CollectionDef.NodeList.class, org.tensorflow.proto.framework.CollectionDef.NodeList.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList value_; + /** + * repeated string value = 1; + */ + public com.google.protobuf.ProtocolStringList + getValueList() { + return value_; + } + /** + * repeated string value = 1; + */ + public int getValueCount() { + return value_.size(); + } + /** + * repeated string value = 1; + */ + public java.lang.String getValue(int index) { + return value_.get(index); + } + /** + * repeated string value = 1; + */ + public com.google.protobuf.ByteString + getValueBytes(int index) { + return value_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < value_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < value_.size(); i++) { + dataSize += computeStringSizeNoTag(value_.getRaw(i)); + } + size += dataSize; + size += 1 * getValueList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.CollectionDef.NodeList)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.CollectionDef.NodeList other = (org.tensorflow.proto.framework.CollectionDef.NodeList) obj; + + if (!getValueList() + .equals(other.getValueList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValueCount() > 0) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValueList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.CollectionDef.NodeList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef.NodeList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.NodeList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef.NodeList 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.proto.framework.CollectionDef.NodeList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef.NodeList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.NodeList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef.NodeList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.NodeList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef.NodeList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.NodeList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef.NodeList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.CollectionDef.NodeList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * NodeList is used for collecting nodes in graph. For example
+     * collection_def {
+     *   key: "summaries"
+     *   value {
+     *     node_list {
+     *       value: "input_producer/ScalarSummary:0"
+     *       value: "shuffle_batch/ScalarSummary:0"
+     *       value: "ImageSummary:0"
+     *     }
+     *   }
+     * 
+ * + * Protobuf type {@code tensorflow.CollectionDef.NodeList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.CollectionDef.NodeList) + org.tensorflow.proto.framework.CollectionDef.NodeListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_NodeList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_NodeList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CollectionDef.NodeList.class, org.tensorflow.proto.framework.CollectionDef.NodeList.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.CollectionDef.NodeList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + value_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_NodeList_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.NodeList getDefaultInstanceForType() { + return org.tensorflow.proto.framework.CollectionDef.NodeList.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.NodeList build() { + org.tensorflow.proto.framework.CollectionDef.NodeList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.NodeList buildPartial() { + org.tensorflow.proto.framework.CollectionDef.NodeList result = new org.tensorflow.proto.framework.CollectionDef.NodeList(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + value_ = value_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.value_ = value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.CollectionDef.NodeList) { + return mergeFrom((org.tensorflow.proto.framework.CollectionDef.NodeList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.CollectionDef.NodeList other) { + if (other == org.tensorflow.proto.framework.CollectionDef.NodeList.getDefaultInstance()) return this; + if (!other.value_.isEmpty()) { + if (value_.isEmpty()) { + value_ = other.value_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValueIsMutable(); + value_.addAll(other.value_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.CollectionDef.NodeList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.CollectionDef.NodeList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList value_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureValueIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + value_ = new com.google.protobuf.LazyStringArrayList(value_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string value = 1; + */ + public com.google.protobuf.ProtocolStringList + getValueList() { + return value_.getUnmodifiableView(); + } + /** + * repeated string value = 1; + */ + public int getValueCount() { + return value_.size(); + } + /** + * repeated string value = 1; + */ + public java.lang.String getValue(int index) { + return value_.get(index); + } + /** + * repeated string value = 1; + */ + public com.google.protobuf.ByteString + getValueBytes(int index) { + return value_.getByteString(index); + } + /** + * repeated string value = 1; + */ + public Builder setValue( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueIsMutable(); + value_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string value = 1; + */ + public Builder addValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueIsMutable(); + value_.add(value); + onChanged(); + return this; + } + /** + * repeated string value = 1; + */ + public Builder addAllValue( + java.lang.Iterable values) { + ensureValueIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, value_); + onChanged(); + return this; + } + /** + * repeated string value = 1; + */ + public Builder clearValue() { + value_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string value = 1; + */ + public Builder addValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValueIsMutable(); + value_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.CollectionDef.NodeList) + } + + // @@protoc_insertion_point(class_scope:tensorflow.CollectionDef.NodeList) + private static final org.tensorflow.proto.framework.CollectionDef.NodeList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.CollectionDef.NodeList(); + } + + public static org.tensorflow.proto.framework.CollectionDef.NodeList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NodeList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NodeList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.NodeList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BytesListOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.CollectionDef.BytesList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated bytes value = 1; + */ + java.util.List getValueList(); + /** + * repeated bytes value = 1; + */ + int getValueCount(); + /** + * repeated bytes value = 1; + */ + com.google.protobuf.ByteString getValue(int index); + } + /** + *
+   * BytesList is used for collecting strings and serialized protobufs. For
+   * example:
+   * collection_def {
+   *   key: "trainable_variables"
+   *   value {
+   *     bytes_list {
+   *       value: "\n\017conv1/weights:0\022\024conv1/weights/Assign
+   *              \032\024conv1/weights/read:0"
+   *       value: "\n\016conv1/biases:0\022\023conv1/biases/Assign\032
+   *              \023conv1/biases/read:0"
+   *     }
+   *   }
+   * }
+   * 
+ * + * Protobuf type {@code tensorflow.CollectionDef.BytesList} + */ + public static final class BytesList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.CollectionDef.BytesList) + BytesListOrBuilder { + private static final long serialVersionUID = 0L; + // Use BytesList.newBuilder() to construct. + private BytesList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BytesList() { + value_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BytesList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BytesList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + value_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + value_.add(input.readBytes()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + value_ = java.util.Collections.unmodifiableList(value_); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_BytesList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_BytesList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CollectionDef.BytesList.class, org.tensorflow.proto.framework.CollectionDef.BytesList.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private java.util.List value_; + /** + * repeated bytes value = 1; + */ + public java.util.List + getValueList() { + return value_; + } + /** + * repeated bytes value = 1; + */ + public int getValueCount() { + return value_.size(); + } + /** + * repeated bytes value = 1; + */ + public com.google.protobuf.ByteString getValue(int index) { + return value_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < value_.size(); i++) { + output.writeBytes(1, value_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < value_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(value_.get(i)); + } + size += dataSize; + size += 1 * getValueList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.CollectionDef.BytesList)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.CollectionDef.BytesList other = (org.tensorflow.proto.framework.CollectionDef.BytesList) obj; + + if (!getValueList() + .equals(other.getValueList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValueCount() > 0) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValueList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.CollectionDef.BytesList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef.BytesList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.BytesList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef.BytesList 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.proto.framework.CollectionDef.BytesList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef.BytesList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.BytesList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef.BytesList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.BytesList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef.BytesList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.BytesList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef.BytesList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.CollectionDef.BytesList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * BytesList is used for collecting strings and serialized protobufs. For
+     * example:
+     * collection_def {
+     *   key: "trainable_variables"
+     *   value {
+     *     bytes_list {
+     *       value: "\n\017conv1/weights:0\022\024conv1/weights/Assign
+     *              \032\024conv1/weights/read:0"
+     *       value: "\n\016conv1/biases:0\022\023conv1/biases/Assign\032
+     *              \023conv1/biases/read:0"
+     *     }
+     *   }
+     * }
+     * 
+ * + * Protobuf type {@code tensorflow.CollectionDef.BytesList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.CollectionDef.BytesList) + org.tensorflow.proto.framework.CollectionDef.BytesListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_BytesList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_BytesList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CollectionDef.BytesList.class, org.tensorflow.proto.framework.CollectionDef.BytesList.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.CollectionDef.BytesList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + value_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_BytesList_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.BytesList getDefaultInstanceForType() { + return org.tensorflow.proto.framework.CollectionDef.BytesList.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.BytesList build() { + org.tensorflow.proto.framework.CollectionDef.BytesList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.BytesList buildPartial() { + org.tensorflow.proto.framework.CollectionDef.BytesList result = new org.tensorflow.proto.framework.CollectionDef.BytesList(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + value_ = java.util.Collections.unmodifiableList(value_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.value_ = value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.CollectionDef.BytesList) { + return mergeFrom((org.tensorflow.proto.framework.CollectionDef.BytesList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.CollectionDef.BytesList other) { + if (other == org.tensorflow.proto.framework.CollectionDef.BytesList.getDefaultInstance()) return this; + if (!other.value_.isEmpty()) { + if (value_.isEmpty()) { + value_ = other.value_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValueIsMutable(); + value_.addAll(other.value_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.CollectionDef.BytesList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.CollectionDef.BytesList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List value_ = java.util.Collections.emptyList(); + private void ensureValueIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + value_ = new java.util.ArrayList(value_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated bytes value = 1; + */ + public java.util.List + getValueList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(value_) : value_; + } + /** + * repeated bytes value = 1; + */ + public int getValueCount() { + return value_.size(); + } + /** + * repeated bytes value = 1; + */ + public com.google.protobuf.ByteString getValue(int index) { + return value_.get(index); + } + /** + * repeated bytes value = 1; + */ + public Builder setValue( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueIsMutable(); + value_.set(index, value); + onChanged(); + return this; + } + /** + * repeated bytes value = 1; + */ + public Builder addValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueIsMutable(); + value_.add(value); + onChanged(); + return this; + } + /** + * repeated bytes value = 1; + */ + public Builder addAllValue( + java.lang.Iterable values) { + ensureValueIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, value_); + onChanged(); + return this; + } + /** + * repeated bytes value = 1; + */ + public Builder clearValue() { + value_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.CollectionDef.BytesList) + } + + // @@protoc_insertion_point(class_scope:tensorflow.CollectionDef.BytesList) + private static final org.tensorflow.proto.framework.CollectionDef.BytesList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.CollectionDef.BytesList(); + } + + public static org.tensorflow.proto.framework.CollectionDef.BytesList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BytesList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BytesList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.BytesList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface Int64ListOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.CollectionDef.Int64List) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated int64 value = 1 [packed = true]; + */ + java.util.List getValueList(); + /** + * repeated int64 value = 1 [packed = true]; + */ + int getValueCount(); + /** + * repeated int64 value = 1 [packed = true]; + */ + long getValue(int index); + } + /** + *
+   * Int64List is used for collecting int, int64 and long values.
+   * 
+ * + * Protobuf type {@code tensorflow.CollectionDef.Int64List} + */ + public static final class Int64List extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.CollectionDef.Int64List) + Int64ListOrBuilder { + private static final long serialVersionUID = 0L; + // Use Int64List.newBuilder() to construct. + private Int64List(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Int64List() { + value_ = emptyLongList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Int64List(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Int64List( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + value_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + value_.addLong(input.readInt64()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + value_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + value_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + value_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_Int64List_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_Int64List_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CollectionDef.Int64List.class, org.tensorflow.proto.framework.CollectionDef.Int64List.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.LongList value_; + /** + * repeated int64 value = 1 [packed = true]; + */ + public java.util.List + getValueList() { + return value_; + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public int getValueCount() { + return value_.size(); + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public long getValue(int index) { + return value_.getLong(index); + } + private int valueMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getValueList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(valueMemoizedSerializedSize); + } + for (int i = 0; i < value_.size(); i++) { + output.writeInt64NoTag(value_.getLong(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < value_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(value_.getLong(i)); + } + size += dataSize; + if (!getValueList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + valueMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.CollectionDef.Int64List)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.CollectionDef.Int64List other = (org.tensorflow.proto.framework.CollectionDef.Int64List) obj; + + if (!getValueList() + .equals(other.getValueList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValueCount() > 0) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValueList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.CollectionDef.Int64List parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef.Int64List parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.Int64List parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef.Int64List 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.proto.framework.CollectionDef.Int64List parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef.Int64List parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.Int64List parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef.Int64List parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.Int64List parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef.Int64List parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.Int64List parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef.Int64List parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.CollectionDef.Int64List prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Int64List is used for collecting int, int64 and long values.
+     * 
+ * + * Protobuf type {@code tensorflow.CollectionDef.Int64List} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.CollectionDef.Int64List) + org.tensorflow.proto.framework.CollectionDef.Int64ListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_Int64List_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_Int64List_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CollectionDef.Int64List.class, org.tensorflow.proto.framework.CollectionDef.Int64List.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.CollectionDef.Int64List.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + value_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_Int64List_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.Int64List getDefaultInstanceForType() { + return org.tensorflow.proto.framework.CollectionDef.Int64List.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.Int64List build() { + org.tensorflow.proto.framework.CollectionDef.Int64List result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.Int64List buildPartial() { + org.tensorflow.proto.framework.CollectionDef.Int64List result = new org.tensorflow.proto.framework.CollectionDef.Int64List(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + value_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.value_ = value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.CollectionDef.Int64List) { + return mergeFrom((org.tensorflow.proto.framework.CollectionDef.Int64List)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.CollectionDef.Int64List other) { + if (other == org.tensorflow.proto.framework.CollectionDef.Int64List.getDefaultInstance()) return this; + if (!other.value_.isEmpty()) { + if (value_.isEmpty()) { + value_ = other.value_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValueIsMutable(); + value_.addAll(other.value_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.CollectionDef.Int64List parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.CollectionDef.Int64List) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.LongList value_ = emptyLongList(); + private void ensureValueIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + value_ = mutableCopy(value_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public java.util.List + getValueList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(value_) : value_; + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public int getValueCount() { + return value_.size(); + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public long getValue(int index) { + return value_.getLong(index); + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public Builder setValue( + int index, long value) { + ensureValueIsMutable(); + value_.setLong(index, value); + onChanged(); + return this; + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public Builder addValue(long value) { + ensureValueIsMutable(); + value_.addLong(value); + onChanged(); + return this; + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public Builder addAllValue( + java.lang.Iterable values) { + ensureValueIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, value_); + onChanged(); + return this; + } + /** + * repeated int64 value = 1 [packed = true]; + */ + public Builder clearValue() { + value_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.CollectionDef.Int64List) + } + + // @@protoc_insertion_point(class_scope:tensorflow.CollectionDef.Int64List) + private static final org.tensorflow.proto.framework.CollectionDef.Int64List DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.CollectionDef.Int64List(); + } + + public static org.tensorflow.proto.framework.CollectionDef.Int64List getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Int64List parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Int64List(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.Int64List getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FloatListOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.CollectionDef.FloatList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated float value = 1 [packed = true]; + */ + java.util.List getValueList(); + /** + * repeated float value = 1 [packed = true]; + */ + int getValueCount(); + /** + * repeated float value = 1 [packed = true]; + */ + float getValue(int index); + } + /** + *
+   * FloatList is used for collecting float values.
+   * 
+ * + * Protobuf type {@code tensorflow.CollectionDef.FloatList} + */ + public static final class FloatList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.CollectionDef.FloatList) + FloatListOrBuilder { + private static final long serialVersionUID = 0L; + // Use FloatList.newBuilder() to construct. + private FloatList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FloatList() { + value_ = emptyFloatList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FloatList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FloatList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + value_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + value_.addFloat(input.readFloat()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + value_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + value_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + value_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_FloatList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_FloatList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CollectionDef.FloatList.class, org.tensorflow.proto.framework.CollectionDef.FloatList.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.FloatList value_; + /** + * repeated float value = 1 [packed = true]; + */ + public java.util.List + getValueList() { + return value_; + } + /** + * repeated float value = 1 [packed = true]; + */ + public int getValueCount() { + return value_.size(); + } + /** + * repeated float value = 1 [packed = true]; + */ + public float getValue(int index) { + return value_.getFloat(index); + } + private int valueMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getValueList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(valueMemoizedSerializedSize); + } + for (int i = 0; i < value_.size(); i++) { + output.writeFloatNoTag(value_.getFloat(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 4 * getValueList().size(); + size += dataSize; + if (!getValueList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + valueMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.CollectionDef.FloatList)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.CollectionDef.FloatList other = (org.tensorflow.proto.framework.CollectionDef.FloatList) obj; + + if (!getValueList() + .equals(other.getValueList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValueCount() > 0) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValueList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.CollectionDef.FloatList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef.FloatList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.FloatList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef.FloatList 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.proto.framework.CollectionDef.FloatList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef.FloatList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.FloatList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef.FloatList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.FloatList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef.FloatList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.FloatList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef.FloatList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.CollectionDef.FloatList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * FloatList is used for collecting float values.
+     * 
+ * + * Protobuf type {@code tensorflow.CollectionDef.FloatList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.CollectionDef.FloatList) + org.tensorflow.proto.framework.CollectionDef.FloatListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_FloatList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_FloatList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CollectionDef.FloatList.class, org.tensorflow.proto.framework.CollectionDef.FloatList.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.CollectionDef.FloatList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + value_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_FloatList_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.FloatList getDefaultInstanceForType() { + return org.tensorflow.proto.framework.CollectionDef.FloatList.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.FloatList build() { + org.tensorflow.proto.framework.CollectionDef.FloatList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.FloatList buildPartial() { + org.tensorflow.proto.framework.CollectionDef.FloatList result = new org.tensorflow.proto.framework.CollectionDef.FloatList(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + value_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.value_ = value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.CollectionDef.FloatList) { + return mergeFrom((org.tensorflow.proto.framework.CollectionDef.FloatList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.CollectionDef.FloatList other) { + if (other == org.tensorflow.proto.framework.CollectionDef.FloatList.getDefaultInstance()) return this; + if (!other.value_.isEmpty()) { + if (value_.isEmpty()) { + value_ = other.value_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValueIsMutable(); + value_.addAll(other.value_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.CollectionDef.FloatList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.CollectionDef.FloatList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.FloatList value_ = emptyFloatList(); + private void ensureValueIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + value_ = mutableCopy(value_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated float value = 1 [packed = true]; + */ + public java.util.List + getValueList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(value_) : value_; + } + /** + * repeated float value = 1 [packed = true]; + */ + public int getValueCount() { + return value_.size(); + } + /** + * repeated float value = 1 [packed = true]; + */ + public float getValue(int index) { + return value_.getFloat(index); + } + /** + * repeated float value = 1 [packed = true]; + */ + public Builder setValue( + int index, float value) { + ensureValueIsMutable(); + value_.setFloat(index, value); + onChanged(); + return this; + } + /** + * repeated float value = 1 [packed = true]; + */ + public Builder addValue(float value) { + ensureValueIsMutable(); + value_.addFloat(value); + onChanged(); + return this; + } + /** + * repeated float value = 1 [packed = true]; + */ + public Builder addAllValue( + java.lang.Iterable values) { + ensureValueIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, value_); + onChanged(); + return this; + } + /** + * repeated float value = 1 [packed = true]; + */ + public Builder clearValue() { + value_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.CollectionDef.FloatList) + } + + // @@protoc_insertion_point(class_scope:tensorflow.CollectionDef.FloatList) + private static final org.tensorflow.proto.framework.CollectionDef.FloatList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.CollectionDef.FloatList(); + } + + public static org.tensorflow.proto.framework.CollectionDef.FloatList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FloatList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FloatList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.FloatList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AnyListOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.CollectionDef.AnyList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.Any value = 1; + */ + java.util.List + getValueList(); + /** + * repeated .google.protobuf.Any value = 1; + */ + com.google.protobuf.Any getValue(int index); + /** + * repeated .google.protobuf.Any value = 1; + */ + int getValueCount(); + /** + * repeated .google.protobuf.Any value = 1; + */ + java.util.List + getValueOrBuilderList(); + /** + * repeated .google.protobuf.Any value = 1; + */ + com.google.protobuf.AnyOrBuilder getValueOrBuilder( + int index); + } + /** + *
+   * AnyList is used for collecting Any protos.
+   * 
+ * + * Protobuf type {@code tensorflow.CollectionDef.AnyList} + */ + public static final class AnyList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.CollectionDef.AnyList) + AnyListOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnyList.newBuilder() to construct. + private AnyList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnyList() { + value_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnyList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + value_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + value_.add( + input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + value_ = java.util.Collections.unmodifiableList(value_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_AnyList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_AnyList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CollectionDef.AnyList.class, org.tensorflow.proto.framework.CollectionDef.AnyList.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private java.util.List value_; + /** + * repeated .google.protobuf.Any value = 1; + */ + public java.util.List getValueList() { + return value_; + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public java.util.List + getValueOrBuilderList() { + return value_; + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public int getValueCount() { + return value_.size(); + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public com.google.protobuf.Any getValue(int index) { + return value_.get(index); + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public com.google.protobuf.AnyOrBuilder getValueOrBuilder( + int index) { + return value_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < value_.size(); i++) { + output.writeMessage(1, value_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < value_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, value_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.CollectionDef.AnyList)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.CollectionDef.AnyList other = (org.tensorflow.proto.framework.CollectionDef.AnyList) obj; + + if (!getValueList() + .equals(other.getValueList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValueCount() > 0) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValueList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.CollectionDef.AnyList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef.AnyList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.AnyList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef.AnyList 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.proto.framework.CollectionDef.AnyList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef.AnyList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.AnyList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef.AnyList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.AnyList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef.AnyList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef.AnyList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef.AnyList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.CollectionDef.AnyList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * AnyList is used for collecting Any protos.
+     * 
+ * + * Protobuf type {@code tensorflow.CollectionDef.AnyList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.CollectionDef.AnyList) + org.tensorflow.proto.framework.CollectionDef.AnyListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_AnyList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_AnyList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CollectionDef.AnyList.class, org.tensorflow.proto.framework.CollectionDef.AnyList.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.CollectionDef.AnyList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getValueFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (valueBuilder_ == null) { + value_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + valueBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_AnyList_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.AnyList getDefaultInstanceForType() { + return org.tensorflow.proto.framework.CollectionDef.AnyList.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.AnyList build() { + org.tensorflow.proto.framework.CollectionDef.AnyList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.AnyList buildPartial() { + org.tensorflow.proto.framework.CollectionDef.AnyList result = new org.tensorflow.proto.framework.CollectionDef.AnyList(this); + int from_bitField0_ = bitField0_; + if (valueBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + value_ = java.util.Collections.unmodifiableList(value_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.value_ = value_; + } else { + result.value_ = valueBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.CollectionDef.AnyList) { + return mergeFrom((org.tensorflow.proto.framework.CollectionDef.AnyList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.CollectionDef.AnyList other) { + if (other == org.tensorflow.proto.framework.CollectionDef.AnyList.getDefaultInstance()) return this; + if (valueBuilder_ == null) { + if (!other.value_.isEmpty()) { + if (value_.isEmpty()) { + value_ = other.value_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValueIsMutable(); + value_.addAll(other.value_); + } + onChanged(); + } + } else { + if (!other.value_.isEmpty()) { + if (valueBuilder_.isEmpty()) { + valueBuilder_.dispose(); + valueBuilder_ = null; + value_ = other.value_; + bitField0_ = (bitField0_ & ~0x00000001); + valueBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getValueFieldBuilder() : null; + } else { + valueBuilder_.addAllMessages(other.value_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.CollectionDef.AnyList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.CollectionDef.AnyList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List value_ = + java.util.Collections.emptyList(); + private void ensureValueIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + value_ = new java.util.ArrayList(value_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> valueBuilder_; + + /** + * repeated .google.protobuf.Any value = 1; + */ + public java.util.List getValueList() { + if (valueBuilder_ == null) { + return java.util.Collections.unmodifiableList(value_); + } else { + return valueBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public int getValueCount() { + if (valueBuilder_ == null) { + return value_.size(); + } else { + return valueBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public com.google.protobuf.Any getValue(int index) { + if (valueBuilder_ == null) { + return value_.get(index); + } else { + return valueBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public Builder setValue( + int index, com.google.protobuf.Any value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueIsMutable(); + value_.set(index, value); + onChanged(); + } else { + valueBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public Builder setValue( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (valueBuilder_ == null) { + ensureValueIsMutable(); + value_.set(index, builderForValue.build()); + onChanged(); + } else { + valueBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public Builder addValue(com.google.protobuf.Any value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueIsMutable(); + value_.add(value); + onChanged(); + } else { + valueBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public Builder addValue( + int index, com.google.protobuf.Any value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueIsMutable(); + value_.add(index, value); + onChanged(); + } else { + valueBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public Builder addValue( + com.google.protobuf.Any.Builder builderForValue) { + if (valueBuilder_ == null) { + ensureValueIsMutable(); + value_.add(builderForValue.build()); + onChanged(); + } else { + valueBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public Builder addValue( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (valueBuilder_ == null) { + ensureValueIsMutable(); + value_.add(index, builderForValue.build()); + onChanged(); + } else { + valueBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public Builder addAllValue( + java.lang.Iterable values) { + if (valueBuilder_ == null) { + ensureValueIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, value_); + onChanged(); + } else { + valueBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public Builder clearValue() { + if (valueBuilder_ == null) { + value_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valueBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public Builder removeValue(int index) { + if (valueBuilder_ == null) { + ensureValueIsMutable(); + value_.remove(index); + onChanged(); + } else { + valueBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public com.google.protobuf.Any.Builder getValueBuilder( + int index) { + return getValueFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public com.google.protobuf.AnyOrBuilder getValueOrBuilder( + int index) { + if (valueBuilder_ == null) { + return value_.get(index); } else { + return valueBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public java.util.List + getValueOrBuilderList() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(value_); + } + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public com.google.protobuf.Any.Builder addValueBuilder() { + return getValueFieldBuilder().addBuilder( + com.google.protobuf.Any.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public com.google.protobuf.Any.Builder addValueBuilder( + int index) { + return getValueFieldBuilder().addBuilder( + index, com.google.protobuf.Any.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Any value = 1; + */ + public java.util.List + getValueBuilderList() { + return getValueFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + value_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + value_ = null; + } + return valueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.CollectionDef.AnyList) + } + + // @@protoc_insertion_point(class_scope:tensorflow.CollectionDef.AnyList) + private static final org.tensorflow.proto.framework.CollectionDef.AnyList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.CollectionDef.AnyList(); + } + + public static org.tensorflow.proto.framework.CollectionDef.AnyList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnyList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnyList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef.AnyList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + public enum KindCase + implements com.google.protobuf.Internal.EnumLite { + NODE_LIST(1), + BYTES_LIST(2), + INT64_LIST(3), + FLOAT_LIST(4), + ANY_LIST(5), + KIND_NOT_SET(0); + private final int value; + private KindCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static KindCase valueOf(int value) { + return forNumber(value); + } + + public static KindCase forNumber(int value) { + switch (value) { + case 1: return NODE_LIST; + case 2: return BYTES_LIST; + case 3: return INT64_LIST; + case 4: return FLOAT_LIST; + case 5: return ANY_LIST; + case 0: return KIND_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public KindCase + getKindCase() { + return KindCase.forNumber( + kindCase_); + } + + public static final int NODE_LIST_FIELD_NUMBER = 1; + /** + * .tensorflow.CollectionDef.NodeList node_list = 1; + */ + public boolean hasNodeList() { + return kindCase_ == 1; + } + /** + * .tensorflow.CollectionDef.NodeList node_list = 1; + */ + public org.tensorflow.proto.framework.CollectionDef.NodeList getNodeList() { + if (kindCase_ == 1) { + return (org.tensorflow.proto.framework.CollectionDef.NodeList) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.NodeList.getDefaultInstance(); + } + /** + * .tensorflow.CollectionDef.NodeList node_list = 1; + */ + public org.tensorflow.proto.framework.CollectionDef.NodeListOrBuilder getNodeListOrBuilder() { + if (kindCase_ == 1) { + return (org.tensorflow.proto.framework.CollectionDef.NodeList) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.NodeList.getDefaultInstance(); + } + + public static final int BYTES_LIST_FIELD_NUMBER = 2; + /** + * .tensorflow.CollectionDef.BytesList bytes_list = 2; + */ + public boolean hasBytesList() { + return kindCase_ == 2; + } + /** + * .tensorflow.CollectionDef.BytesList bytes_list = 2; + */ + public org.tensorflow.proto.framework.CollectionDef.BytesList getBytesList() { + if (kindCase_ == 2) { + return (org.tensorflow.proto.framework.CollectionDef.BytesList) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.BytesList.getDefaultInstance(); + } + /** + * .tensorflow.CollectionDef.BytesList bytes_list = 2; + */ + public org.tensorflow.proto.framework.CollectionDef.BytesListOrBuilder getBytesListOrBuilder() { + if (kindCase_ == 2) { + return (org.tensorflow.proto.framework.CollectionDef.BytesList) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.BytesList.getDefaultInstance(); + } + + public static final int INT64_LIST_FIELD_NUMBER = 3; + /** + * .tensorflow.CollectionDef.Int64List int64_list = 3; + */ + public boolean hasInt64List() { + return kindCase_ == 3; + } + /** + * .tensorflow.CollectionDef.Int64List int64_list = 3; + */ + public org.tensorflow.proto.framework.CollectionDef.Int64List getInt64List() { + if (kindCase_ == 3) { + return (org.tensorflow.proto.framework.CollectionDef.Int64List) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.Int64List.getDefaultInstance(); + } + /** + * .tensorflow.CollectionDef.Int64List int64_list = 3; + */ + public org.tensorflow.proto.framework.CollectionDef.Int64ListOrBuilder getInt64ListOrBuilder() { + if (kindCase_ == 3) { + return (org.tensorflow.proto.framework.CollectionDef.Int64List) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.Int64List.getDefaultInstance(); + } + + public static final int FLOAT_LIST_FIELD_NUMBER = 4; + /** + * .tensorflow.CollectionDef.FloatList float_list = 4; + */ + public boolean hasFloatList() { + return kindCase_ == 4; + } + /** + * .tensorflow.CollectionDef.FloatList float_list = 4; + */ + public org.tensorflow.proto.framework.CollectionDef.FloatList getFloatList() { + if (kindCase_ == 4) { + return (org.tensorflow.proto.framework.CollectionDef.FloatList) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.FloatList.getDefaultInstance(); + } + /** + * .tensorflow.CollectionDef.FloatList float_list = 4; + */ + public org.tensorflow.proto.framework.CollectionDef.FloatListOrBuilder getFloatListOrBuilder() { + if (kindCase_ == 4) { + return (org.tensorflow.proto.framework.CollectionDef.FloatList) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.FloatList.getDefaultInstance(); + } + + public static final int ANY_LIST_FIELD_NUMBER = 5; + /** + * .tensorflow.CollectionDef.AnyList any_list = 5; + */ + public boolean hasAnyList() { + return kindCase_ == 5; + } + /** + * .tensorflow.CollectionDef.AnyList any_list = 5; + */ + public org.tensorflow.proto.framework.CollectionDef.AnyList getAnyList() { + if (kindCase_ == 5) { + return (org.tensorflow.proto.framework.CollectionDef.AnyList) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.AnyList.getDefaultInstance(); + } + /** + * .tensorflow.CollectionDef.AnyList any_list = 5; + */ + public org.tensorflow.proto.framework.CollectionDef.AnyListOrBuilder getAnyListOrBuilder() { + if (kindCase_ == 5) { + return (org.tensorflow.proto.framework.CollectionDef.AnyList) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.AnyList.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (kindCase_ == 1) { + output.writeMessage(1, (org.tensorflow.proto.framework.CollectionDef.NodeList) kind_); + } + if (kindCase_ == 2) { + output.writeMessage(2, (org.tensorflow.proto.framework.CollectionDef.BytesList) kind_); + } + if (kindCase_ == 3) { + output.writeMessage(3, (org.tensorflow.proto.framework.CollectionDef.Int64List) kind_); + } + if (kindCase_ == 4) { + output.writeMessage(4, (org.tensorflow.proto.framework.CollectionDef.FloatList) kind_); + } + if (kindCase_ == 5) { + output.writeMessage(5, (org.tensorflow.proto.framework.CollectionDef.AnyList) kind_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kindCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (org.tensorflow.proto.framework.CollectionDef.NodeList) kind_); + } + if (kindCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (org.tensorflow.proto.framework.CollectionDef.BytesList) kind_); + } + if (kindCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (org.tensorflow.proto.framework.CollectionDef.Int64List) kind_); + } + if (kindCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (org.tensorflow.proto.framework.CollectionDef.FloatList) kind_); + } + if (kindCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (org.tensorflow.proto.framework.CollectionDef.AnyList) kind_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.CollectionDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.CollectionDef other = (org.tensorflow.proto.framework.CollectionDef) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getNodeList() + .equals(other.getNodeList())) return false; + break; + case 2: + if (!getBytesList() + .equals(other.getBytesList())) return false; + break; + case 3: + if (!getInt64List() + .equals(other.getInt64List())) return false; + break; + case 4: + if (!getFloatList() + .equals(other.getFloatList())) return false; + break; + case 5: + if (!getAnyList() + .equals(other.getAnyList())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (kindCase_) { + case 1: + hash = (37 * hash) + NODE_LIST_FIELD_NUMBER; + hash = (53 * hash) + getNodeList().hashCode(); + break; + case 2: + hash = (37 * hash) + BYTES_LIST_FIELD_NUMBER; + hash = (53 * hash) + getBytesList().hashCode(); + break; + case 3: + hash = (37 * hash) + INT64_LIST_FIELD_NUMBER; + hash = (53 * hash) + getInt64List().hashCode(); + break; + case 4: + hash = (37 * hash) + FLOAT_LIST_FIELD_NUMBER; + hash = (53 * hash) + getFloatList().hashCode(); + break; + case 5: + hash = (37 * hash) + ANY_LIST_FIELD_NUMBER; + hash = (53 * hash) + getAnyList().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.CollectionDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef 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.proto.framework.CollectionDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CollectionDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CollectionDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CollectionDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.CollectionDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * CollectionDef should cover most collections.
+   * To add a user-defined collection, do one of the following:
+   * 1. For simple data types, such as string, int, float:
+   *      tf.add_to_collection("your_collection_name", your_simple_value)
+   *    strings will be stored as bytes_list.
+   * 2. For Protobuf types, there are three ways to add them:
+   *    1) tf.add_to_collection("your_collection_name",
+   *         your_proto.SerializeToString())
+   *       collection_def {
+   *         key: "user_defined_bytes_collection"
+   *         value {
+   *           bytes_list {
+   *             value: "queue_name: \"test_queue\"\n"
+   *           }
+   *         }
+   *       }
+   *  or
+   *    2) tf.add_to_collection("your_collection_name", str(your_proto))
+   *       collection_def {
+   *         key: "user_defined_string_collection"
+   *         value {
+   *          bytes_list {
+   *             value: "\n\ntest_queue"
+   *           }
+   *         }
+   *       }
+   *  or
+   *    3) any_buf = any_pb2.Any()
+   *       tf.add_to_collection("your_collection_name",
+   *         any_buf.Pack(your_proto))
+   *       collection_def {
+   *         key: "user_defined_any_collection"
+   *         value {
+   *           any_list {
+   *             value {
+   *               type_url: "type.googleapis.com/tensorflow.QueueRunnerDef"
+   *               value: "\n\ntest_queue"
+   *             }
+   *           }
+   *         }
+   *       }
+   * 3. For Python objects, implement to_proto() and from_proto(), and register
+   *    them in the following manner:
+   *    ops.register_proto_function("your_collection_name",
+   *                                proto_type,
+   *                                to_proto=YourPythonObject.to_proto,
+   *                                from_proto=YourPythonObject.from_proto)
+   *    These functions will be invoked to serialize and de-serialize the
+   *    collection. For example,
+   *    ops.register_proto_function(ops.GraphKeys.GLOBAL_VARIABLES,
+   *                                proto_type=variable_pb2.VariableDef,
+   *                                to_proto=Variable.to_proto,
+   *                                from_proto=Variable.from_proto)
+   * 
+ * + * Protobuf type {@code tensorflow.CollectionDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.CollectionDef) + org.tensorflow.proto.framework.CollectionDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CollectionDef.class, org.tensorflow.proto.framework.CollectionDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.CollectionDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_CollectionDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.CollectionDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef build() { + org.tensorflow.proto.framework.CollectionDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef buildPartial() { + org.tensorflow.proto.framework.CollectionDef result = new org.tensorflow.proto.framework.CollectionDef(this); + if (kindCase_ == 1) { + if (nodeListBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = nodeListBuilder_.build(); + } + } + if (kindCase_ == 2) { + if (bytesListBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = bytesListBuilder_.build(); + } + } + if (kindCase_ == 3) { + if (int64ListBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = int64ListBuilder_.build(); + } + } + if (kindCase_ == 4) { + if (floatListBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = floatListBuilder_.build(); + } + } + if (kindCase_ == 5) { + if (anyListBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = anyListBuilder_.build(); + } + } + result.kindCase_ = kindCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.CollectionDef) { + return mergeFrom((org.tensorflow.proto.framework.CollectionDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.CollectionDef other) { + if (other == org.tensorflow.proto.framework.CollectionDef.getDefaultInstance()) return this; + switch (other.getKindCase()) { + case NODE_LIST: { + mergeNodeList(other.getNodeList()); + break; + } + case BYTES_LIST: { + mergeBytesList(other.getBytesList()); + break; + } + case INT64_LIST: { + mergeInt64List(other.getInt64List()); + break; + } + case FLOAT_LIST: { + mergeFloatList(other.getFloatList()); + break; + } + case ANY_LIST: { + mergeAnyList(other.getAnyList()); + break; + } + case KIND_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.CollectionDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.CollectionDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int kindCase_ = 0; + private java.lang.Object kind_; + public KindCase + getKindCase() { + return KindCase.forNumber( + kindCase_); + } + + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CollectionDef.NodeList, org.tensorflow.proto.framework.CollectionDef.NodeList.Builder, org.tensorflow.proto.framework.CollectionDef.NodeListOrBuilder> nodeListBuilder_; + /** + * .tensorflow.CollectionDef.NodeList node_list = 1; + */ + public boolean hasNodeList() { + return kindCase_ == 1; + } + /** + * .tensorflow.CollectionDef.NodeList node_list = 1; + */ + public org.tensorflow.proto.framework.CollectionDef.NodeList getNodeList() { + if (nodeListBuilder_ == null) { + if (kindCase_ == 1) { + return (org.tensorflow.proto.framework.CollectionDef.NodeList) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.NodeList.getDefaultInstance(); + } else { + if (kindCase_ == 1) { + return nodeListBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.CollectionDef.NodeList.getDefaultInstance(); + } + } + /** + * .tensorflow.CollectionDef.NodeList node_list = 1; + */ + public Builder setNodeList(org.tensorflow.proto.framework.CollectionDef.NodeList value) { + if (nodeListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + nodeListBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + /** + * .tensorflow.CollectionDef.NodeList node_list = 1; + */ + public Builder setNodeList( + org.tensorflow.proto.framework.CollectionDef.NodeList.Builder builderForValue) { + if (nodeListBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + nodeListBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 1; + return this; + } + /** + * .tensorflow.CollectionDef.NodeList node_list = 1; + */ + public Builder mergeNodeList(org.tensorflow.proto.framework.CollectionDef.NodeList value) { + if (nodeListBuilder_ == null) { + if (kindCase_ == 1 && + kind_ != org.tensorflow.proto.framework.CollectionDef.NodeList.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.CollectionDef.NodeList.newBuilder((org.tensorflow.proto.framework.CollectionDef.NodeList) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 1) { + nodeListBuilder_.mergeFrom(value); + } + nodeListBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + /** + * .tensorflow.CollectionDef.NodeList node_list = 1; + */ + public Builder clearNodeList() { + if (nodeListBuilder_ == null) { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + } + nodeListBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.CollectionDef.NodeList node_list = 1; + */ + public org.tensorflow.proto.framework.CollectionDef.NodeList.Builder getNodeListBuilder() { + return getNodeListFieldBuilder().getBuilder(); + } + /** + * .tensorflow.CollectionDef.NodeList node_list = 1; + */ + public org.tensorflow.proto.framework.CollectionDef.NodeListOrBuilder getNodeListOrBuilder() { + if ((kindCase_ == 1) && (nodeListBuilder_ != null)) { + return nodeListBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 1) { + return (org.tensorflow.proto.framework.CollectionDef.NodeList) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.NodeList.getDefaultInstance(); + } + } + /** + * .tensorflow.CollectionDef.NodeList node_list = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CollectionDef.NodeList, org.tensorflow.proto.framework.CollectionDef.NodeList.Builder, org.tensorflow.proto.framework.CollectionDef.NodeListOrBuilder> + getNodeListFieldBuilder() { + if (nodeListBuilder_ == null) { + if (!(kindCase_ == 1)) { + kind_ = org.tensorflow.proto.framework.CollectionDef.NodeList.getDefaultInstance(); + } + nodeListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CollectionDef.NodeList, org.tensorflow.proto.framework.CollectionDef.NodeList.Builder, org.tensorflow.proto.framework.CollectionDef.NodeListOrBuilder>( + (org.tensorflow.proto.framework.CollectionDef.NodeList) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 1; + onChanged();; + return nodeListBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CollectionDef.BytesList, org.tensorflow.proto.framework.CollectionDef.BytesList.Builder, org.tensorflow.proto.framework.CollectionDef.BytesListOrBuilder> bytesListBuilder_; + /** + * .tensorflow.CollectionDef.BytesList bytes_list = 2; + */ + public boolean hasBytesList() { + return kindCase_ == 2; + } + /** + * .tensorflow.CollectionDef.BytesList bytes_list = 2; + */ + public org.tensorflow.proto.framework.CollectionDef.BytesList getBytesList() { + if (bytesListBuilder_ == null) { + if (kindCase_ == 2) { + return (org.tensorflow.proto.framework.CollectionDef.BytesList) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.BytesList.getDefaultInstance(); + } else { + if (kindCase_ == 2) { + return bytesListBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.CollectionDef.BytesList.getDefaultInstance(); + } + } + /** + * .tensorflow.CollectionDef.BytesList bytes_list = 2; + */ + public Builder setBytesList(org.tensorflow.proto.framework.CollectionDef.BytesList value) { + if (bytesListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + bytesListBuilder_.setMessage(value); + } + kindCase_ = 2; + return this; + } + /** + * .tensorflow.CollectionDef.BytesList bytes_list = 2; + */ + public Builder setBytesList( + org.tensorflow.proto.framework.CollectionDef.BytesList.Builder builderForValue) { + if (bytesListBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + bytesListBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 2; + return this; + } + /** + * .tensorflow.CollectionDef.BytesList bytes_list = 2; + */ + public Builder mergeBytesList(org.tensorflow.proto.framework.CollectionDef.BytesList value) { + if (bytesListBuilder_ == null) { + if (kindCase_ == 2 && + kind_ != org.tensorflow.proto.framework.CollectionDef.BytesList.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.CollectionDef.BytesList.newBuilder((org.tensorflow.proto.framework.CollectionDef.BytesList) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 2) { + bytesListBuilder_.mergeFrom(value); + } + bytesListBuilder_.setMessage(value); + } + kindCase_ = 2; + return this; + } + /** + * .tensorflow.CollectionDef.BytesList bytes_list = 2; + */ + public Builder clearBytesList() { + if (bytesListBuilder_ == null) { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + } + bytesListBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.CollectionDef.BytesList bytes_list = 2; + */ + public org.tensorflow.proto.framework.CollectionDef.BytesList.Builder getBytesListBuilder() { + return getBytesListFieldBuilder().getBuilder(); + } + /** + * .tensorflow.CollectionDef.BytesList bytes_list = 2; + */ + public org.tensorflow.proto.framework.CollectionDef.BytesListOrBuilder getBytesListOrBuilder() { + if ((kindCase_ == 2) && (bytesListBuilder_ != null)) { + return bytesListBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 2) { + return (org.tensorflow.proto.framework.CollectionDef.BytesList) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.BytesList.getDefaultInstance(); + } + } + /** + * .tensorflow.CollectionDef.BytesList bytes_list = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CollectionDef.BytesList, org.tensorflow.proto.framework.CollectionDef.BytesList.Builder, org.tensorflow.proto.framework.CollectionDef.BytesListOrBuilder> + getBytesListFieldBuilder() { + if (bytesListBuilder_ == null) { + if (!(kindCase_ == 2)) { + kind_ = org.tensorflow.proto.framework.CollectionDef.BytesList.getDefaultInstance(); + } + bytesListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CollectionDef.BytesList, org.tensorflow.proto.framework.CollectionDef.BytesList.Builder, org.tensorflow.proto.framework.CollectionDef.BytesListOrBuilder>( + (org.tensorflow.proto.framework.CollectionDef.BytesList) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 2; + onChanged();; + return bytesListBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CollectionDef.Int64List, org.tensorflow.proto.framework.CollectionDef.Int64List.Builder, org.tensorflow.proto.framework.CollectionDef.Int64ListOrBuilder> int64ListBuilder_; + /** + * .tensorflow.CollectionDef.Int64List int64_list = 3; + */ + public boolean hasInt64List() { + return kindCase_ == 3; + } + /** + * .tensorflow.CollectionDef.Int64List int64_list = 3; + */ + public org.tensorflow.proto.framework.CollectionDef.Int64List getInt64List() { + if (int64ListBuilder_ == null) { + if (kindCase_ == 3) { + return (org.tensorflow.proto.framework.CollectionDef.Int64List) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.Int64List.getDefaultInstance(); + } else { + if (kindCase_ == 3) { + return int64ListBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.CollectionDef.Int64List.getDefaultInstance(); + } + } + /** + * .tensorflow.CollectionDef.Int64List int64_list = 3; + */ + public Builder setInt64List(org.tensorflow.proto.framework.CollectionDef.Int64List value) { + if (int64ListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + int64ListBuilder_.setMessage(value); + } + kindCase_ = 3; + return this; + } + /** + * .tensorflow.CollectionDef.Int64List int64_list = 3; + */ + public Builder setInt64List( + org.tensorflow.proto.framework.CollectionDef.Int64List.Builder builderForValue) { + if (int64ListBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + int64ListBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 3; + return this; + } + /** + * .tensorflow.CollectionDef.Int64List int64_list = 3; + */ + public Builder mergeInt64List(org.tensorflow.proto.framework.CollectionDef.Int64List value) { + if (int64ListBuilder_ == null) { + if (kindCase_ == 3 && + kind_ != org.tensorflow.proto.framework.CollectionDef.Int64List.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.CollectionDef.Int64List.newBuilder((org.tensorflow.proto.framework.CollectionDef.Int64List) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 3) { + int64ListBuilder_.mergeFrom(value); + } + int64ListBuilder_.setMessage(value); + } + kindCase_ = 3; + return this; + } + /** + * .tensorflow.CollectionDef.Int64List int64_list = 3; + */ + public Builder clearInt64List() { + if (int64ListBuilder_ == null) { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + } + int64ListBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.CollectionDef.Int64List int64_list = 3; + */ + public org.tensorflow.proto.framework.CollectionDef.Int64List.Builder getInt64ListBuilder() { + return getInt64ListFieldBuilder().getBuilder(); + } + /** + * .tensorflow.CollectionDef.Int64List int64_list = 3; + */ + public org.tensorflow.proto.framework.CollectionDef.Int64ListOrBuilder getInt64ListOrBuilder() { + if ((kindCase_ == 3) && (int64ListBuilder_ != null)) { + return int64ListBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 3) { + return (org.tensorflow.proto.framework.CollectionDef.Int64List) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.Int64List.getDefaultInstance(); + } + } + /** + * .tensorflow.CollectionDef.Int64List int64_list = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CollectionDef.Int64List, org.tensorflow.proto.framework.CollectionDef.Int64List.Builder, org.tensorflow.proto.framework.CollectionDef.Int64ListOrBuilder> + getInt64ListFieldBuilder() { + if (int64ListBuilder_ == null) { + if (!(kindCase_ == 3)) { + kind_ = org.tensorflow.proto.framework.CollectionDef.Int64List.getDefaultInstance(); + } + int64ListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CollectionDef.Int64List, org.tensorflow.proto.framework.CollectionDef.Int64List.Builder, org.tensorflow.proto.framework.CollectionDef.Int64ListOrBuilder>( + (org.tensorflow.proto.framework.CollectionDef.Int64List) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 3; + onChanged();; + return int64ListBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CollectionDef.FloatList, org.tensorflow.proto.framework.CollectionDef.FloatList.Builder, org.tensorflow.proto.framework.CollectionDef.FloatListOrBuilder> floatListBuilder_; + /** + * .tensorflow.CollectionDef.FloatList float_list = 4; + */ + public boolean hasFloatList() { + return kindCase_ == 4; + } + /** + * .tensorflow.CollectionDef.FloatList float_list = 4; + */ + public org.tensorflow.proto.framework.CollectionDef.FloatList getFloatList() { + if (floatListBuilder_ == null) { + if (kindCase_ == 4) { + return (org.tensorflow.proto.framework.CollectionDef.FloatList) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.FloatList.getDefaultInstance(); + } else { + if (kindCase_ == 4) { + return floatListBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.CollectionDef.FloatList.getDefaultInstance(); + } + } + /** + * .tensorflow.CollectionDef.FloatList float_list = 4; + */ + public Builder setFloatList(org.tensorflow.proto.framework.CollectionDef.FloatList value) { + if (floatListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + floatListBuilder_.setMessage(value); + } + kindCase_ = 4; + return this; + } + /** + * .tensorflow.CollectionDef.FloatList float_list = 4; + */ + public Builder setFloatList( + org.tensorflow.proto.framework.CollectionDef.FloatList.Builder builderForValue) { + if (floatListBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + floatListBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 4; + return this; + } + /** + * .tensorflow.CollectionDef.FloatList float_list = 4; + */ + public Builder mergeFloatList(org.tensorflow.proto.framework.CollectionDef.FloatList value) { + if (floatListBuilder_ == null) { + if (kindCase_ == 4 && + kind_ != org.tensorflow.proto.framework.CollectionDef.FloatList.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.CollectionDef.FloatList.newBuilder((org.tensorflow.proto.framework.CollectionDef.FloatList) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 4) { + floatListBuilder_.mergeFrom(value); + } + floatListBuilder_.setMessage(value); + } + kindCase_ = 4; + return this; + } + /** + * .tensorflow.CollectionDef.FloatList float_list = 4; + */ + public Builder clearFloatList() { + if (floatListBuilder_ == null) { + if (kindCase_ == 4) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 4) { + kindCase_ = 0; + kind_ = null; + } + floatListBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.CollectionDef.FloatList float_list = 4; + */ + public org.tensorflow.proto.framework.CollectionDef.FloatList.Builder getFloatListBuilder() { + return getFloatListFieldBuilder().getBuilder(); + } + /** + * .tensorflow.CollectionDef.FloatList float_list = 4; + */ + public org.tensorflow.proto.framework.CollectionDef.FloatListOrBuilder getFloatListOrBuilder() { + if ((kindCase_ == 4) && (floatListBuilder_ != null)) { + return floatListBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 4) { + return (org.tensorflow.proto.framework.CollectionDef.FloatList) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.FloatList.getDefaultInstance(); + } + } + /** + * .tensorflow.CollectionDef.FloatList float_list = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CollectionDef.FloatList, org.tensorflow.proto.framework.CollectionDef.FloatList.Builder, org.tensorflow.proto.framework.CollectionDef.FloatListOrBuilder> + getFloatListFieldBuilder() { + if (floatListBuilder_ == null) { + if (!(kindCase_ == 4)) { + kind_ = org.tensorflow.proto.framework.CollectionDef.FloatList.getDefaultInstance(); + } + floatListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CollectionDef.FloatList, org.tensorflow.proto.framework.CollectionDef.FloatList.Builder, org.tensorflow.proto.framework.CollectionDef.FloatListOrBuilder>( + (org.tensorflow.proto.framework.CollectionDef.FloatList) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 4; + onChanged();; + return floatListBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CollectionDef.AnyList, org.tensorflow.proto.framework.CollectionDef.AnyList.Builder, org.tensorflow.proto.framework.CollectionDef.AnyListOrBuilder> anyListBuilder_; + /** + * .tensorflow.CollectionDef.AnyList any_list = 5; + */ + public boolean hasAnyList() { + return kindCase_ == 5; + } + /** + * .tensorflow.CollectionDef.AnyList any_list = 5; + */ + public org.tensorflow.proto.framework.CollectionDef.AnyList getAnyList() { + if (anyListBuilder_ == null) { + if (kindCase_ == 5) { + return (org.tensorflow.proto.framework.CollectionDef.AnyList) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.AnyList.getDefaultInstance(); + } else { + if (kindCase_ == 5) { + return anyListBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.CollectionDef.AnyList.getDefaultInstance(); + } + } + /** + * .tensorflow.CollectionDef.AnyList any_list = 5; + */ + public Builder setAnyList(org.tensorflow.proto.framework.CollectionDef.AnyList value) { + if (anyListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + anyListBuilder_.setMessage(value); + } + kindCase_ = 5; + return this; + } + /** + * .tensorflow.CollectionDef.AnyList any_list = 5; + */ + public Builder setAnyList( + org.tensorflow.proto.framework.CollectionDef.AnyList.Builder builderForValue) { + if (anyListBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + anyListBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 5; + return this; + } + /** + * .tensorflow.CollectionDef.AnyList any_list = 5; + */ + public Builder mergeAnyList(org.tensorflow.proto.framework.CollectionDef.AnyList value) { + if (anyListBuilder_ == null) { + if (kindCase_ == 5 && + kind_ != org.tensorflow.proto.framework.CollectionDef.AnyList.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.CollectionDef.AnyList.newBuilder((org.tensorflow.proto.framework.CollectionDef.AnyList) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 5) { + anyListBuilder_.mergeFrom(value); + } + anyListBuilder_.setMessage(value); + } + kindCase_ = 5; + return this; + } + /** + * .tensorflow.CollectionDef.AnyList any_list = 5; + */ + public Builder clearAnyList() { + if (anyListBuilder_ == null) { + if (kindCase_ == 5) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 5) { + kindCase_ = 0; + kind_ = null; + } + anyListBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.CollectionDef.AnyList any_list = 5; + */ + public org.tensorflow.proto.framework.CollectionDef.AnyList.Builder getAnyListBuilder() { + return getAnyListFieldBuilder().getBuilder(); + } + /** + * .tensorflow.CollectionDef.AnyList any_list = 5; + */ + public org.tensorflow.proto.framework.CollectionDef.AnyListOrBuilder getAnyListOrBuilder() { + if ((kindCase_ == 5) && (anyListBuilder_ != null)) { + return anyListBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 5) { + return (org.tensorflow.proto.framework.CollectionDef.AnyList) kind_; + } + return org.tensorflow.proto.framework.CollectionDef.AnyList.getDefaultInstance(); + } + } + /** + * .tensorflow.CollectionDef.AnyList any_list = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CollectionDef.AnyList, org.tensorflow.proto.framework.CollectionDef.AnyList.Builder, org.tensorflow.proto.framework.CollectionDef.AnyListOrBuilder> + getAnyListFieldBuilder() { + if (anyListBuilder_ == null) { + if (!(kindCase_ == 5)) { + kind_ = org.tensorflow.proto.framework.CollectionDef.AnyList.getDefaultInstance(); + } + anyListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CollectionDef.AnyList, org.tensorflow.proto.framework.CollectionDef.AnyList.Builder, org.tensorflow.proto.framework.CollectionDef.AnyListOrBuilder>( + (org.tensorflow.proto.framework.CollectionDef.AnyList) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 5; + onChanged();; + return anyListBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.CollectionDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.CollectionDef) + private static final org.tensorflow.proto.framework.CollectionDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.CollectionDef(); + } + + public static org.tensorflow.proto.framework.CollectionDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CollectionDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CollectionDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CollectionDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CollectionDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CollectionDefOrBuilder.java new file mode 100644 index 00000000000..f3d5fc7ce61 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CollectionDefOrBuilder.java @@ -0,0 +1,76 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/meta_graph.proto + +package org.tensorflow.proto.framework; + +public interface CollectionDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.CollectionDef) + com.google.protobuf.MessageOrBuilder { + + /** + * .tensorflow.CollectionDef.NodeList node_list = 1; + */ + boolean hasNodeList(); + /** + * .tensorflow.CollectionDef.NodeList node_list = 1; + */ + org.tensorflow.proto.framework.CollectionDef.NodeList getNodeList(); + /** + * .tensorflow.CollectionDef.NodeList node_list = 1; + */ + org.tensorflow.proto.framework.CollectionDef.NodeListOrBuilder getNodeListOrBuilder(); + + /** + * .tensorflow.CollectionDef.BytesList bytes_list = 2; + */ + boolean hasBytesList(); + /** + * .tensorflow.CollectionDef.BytesList bytes_list = 2; + */ + org.tensorflow.proto.framework.CollectionDef.BytesList getBytesList(); + /** + * .tensorflow.CollectionDef.BytesList bytes_list = 2; + */ + org.tensorflow.proto.framework.CollectionDef.BytesListOrBuilder getBytesListOrBuilder(); + + /** + * .tensorflow.CollectionDef.Int64List int64_list = 3; + */ + boolean hasInt64List(); + /** + * .tensorflow.CollectionDef.Int64List int64_list = 3; + */ + org.tensorflow.proto.framework.CollectionDef.Int64List getInt64List(); + /** + * .tensorflow.CollectionDef.Int64List int64_list = 3; + */ + org.tensorflow.proto.framework.CollectionDef.Int64ListOrBuilder getInt64ListOrBuilder(); + + /** + * .tensorflow.CollectionDef.FloatList float_list = 4; + */ + boolean hasFloatList(); + /** + * .tensorflow.CollectionDef.FloatList float_list = 4; + */ + org.tensorflow.proto.framework.CollectionDef.FloatList getFloatList(); + /** + * .tensorflow.CollectionDef.FloatList float_list = 4; + */ + org.tensorflow.proto.framework.CollectionDef.FloatListOrBuilder getFloatListOrBuilder(); + + /** + * .tensorflow.CollectionDef.AnyList any_list = 5; + */ + boolean hasAnyList(); + /** + * .tensorflow.CollectionDef.AnyList any_list = 5; + */ + org.tensorflow.proto.framework.CollectionDef.AnyList getAnyList(); + /** + * .tensorflow.CollectionDef.AnyList any_list = 5; + */ + org.tensorflow.proto.framework.CollectionDef.AnyListOrBuilder getAnyListOrBuilder(); + + public org.tensorflow.proto.framework.CollectionDef.KindCase getKindCase(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CondContextDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CondContextDef.java new file mode 100644 index 00000000000..3ab6d340e10 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CondContextDef.java @@ -0,0 +1,1632 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/control_flow.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Protocol buffer representing a CondContext object.
+ * 
+ * + * Protobuf type {@code tensorflow.CondContextDef} + */ +public final class CondContextDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.CondContextDef) + CondContextDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use CondContextDef.newBuilder() to construct. + private CondContextDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CondContextDef() { + contextName_ = ""; + predName_ = ""; + pivotName_ = ""; + nestedContexts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CondContextDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CondContextDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + contextName_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + predName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pivotName_ = s; + break; + } + case 32: { + + branch_ = input.readInt32(); + break; + } + case 42: { + org.tensorflow.proto.framework.ValuesDef.Builder subBuilder = null; + if (valuesDef_ != null) { + subBuilder = valuesDef_.toBuilder(); + } + valuesDef_ = input.readMessage(org.tensorflow.proto.framework.ValuesDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(valuesDef_); + valuesDef_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + nestedContexts_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + nestedContexts_.add( + input.readMessage(org.tensorflow.proto.framework.ControlFlowContextDef.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + nestedContexts_ = java.util.Collections.unmodifiableList(nestedContexts_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ControlFlowProtos.internal_static_tensorflow_CondContextDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ControlFlowProtos.internal_static_tensorflow_CondContextDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CondContextDef.class, org.tensorflow.proto.framework.CondContextDef.Builder.class); + } + + public static final int CONTEXT_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object contextName_; + /** + *
+   * Name of the context.
+   * 
+ * + * string context_name = 1; + */ + public java.lang.String getContextName() { + java.lang.Object ref = contextName_; + 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(); + contextName_ = s; + return s; + } + } + /** + *
+   * Name of the context.
+   * 
+ * + * string context_name = 1; + */ + public com.google.protobuf.ByteString + getContextNameBytes() { + java.lang.Object ref = contextName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + contextName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRED_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object predName_; + /** + *
+   * Name of the pred tensor.
+   * 
+ * + * string pred_name = 2; + */ + public java.lang.String getPredName() { + java.lang.Object ref = predName_; + 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(); + predName_ = s; + return s; + } + } + /** + *
+   * Name of the pred tensor.
+   * 
+ * + * string pred_name = 2; + */ + public com.google.protobuf.ByteString + getPredNameBytes() { + java.lang.Object ref = predName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + predName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PIVOT_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object pivotName_; + /** + *
+   * Name of the pivot tensor.
+   * 
+ * + * string pivot_name = 3; + */ + public java.lang.String getPivotName() { + java.lang.Object ref = pivotName_; + 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(); + pivotName_ = s; + return s; + } + } + /** + *
+   * Name of the pivot tensor.
+   * 
+ * + * string pivot_name = 3; + */ + public com.google.protobuf.ByteString + getPivotNameBytes() { + java.lang.Object ref = pivotName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pivotName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BRANCH_FIELD_NUMBER = 4; + private int branch_; + /** + *
+   * Branch prediction. 0 or 1.
+   * 
+ * + * int32 branch = 4; + */ + public int getBranch() { + return branch_; + } + + public static final int VALUES_DEF_FIELD_NUMBER = 5; + private org.tensorflow.proto.framework.ValuesDef valuesDef_; + /** + *
+   * Values and external values in control flow context.
+   * 
+ * + * .tensorflow.ValuesDef values_def = 5; + */ + public boolean hasValuesDef() { + return valuesDef_ != null; + } + /** + *
+   * Values and external values in control flow context.
+   * 
+ * + * .tensorflow.ValuesDef values_def = 5; + */ + public org.tensorflow.proto.framework.ValuesDef getValuesDef() { + return valuesDef_ == null ? org.tensorflow.proto.framework.ValuesDef.getDefaultInstance() : valuesDef_; + } + /** + *
+   * Values and external values in control flow context.
+   * 
+ * + * .tensorflow.ValuesDef values_def = 5; + */ + public org.tensorflow.proto.framework.ValuesDefOrBuilder getValuesDefOrBuilder() { + return getValuesDef(); + } + + public static final int NESTED_CONTEXTS_FIELD_NUMBER = 6; + private java.util.List nestedContexts_; + /** + *
+   * Contexts contained inside this context (e.g. nested conds).
+   * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public java.util.List getNestedContextsList() { + return nestedContexts_; + } + /** + *
+   * Contexts contained inside this context (e.g. nested conds).
+   * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public java.util.List + getNestedContextsOrBuilderList() { + return nestedContexts_; + } + /** + *
+   * Contexts contained inside this context (e.g. nested conds).
+   * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public int getNestedContextsCount() { + return nestedContexts_.size(); + } + /** + *
+   * Contexts contained inside this context (e.g. nested conds).
+   * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public org.tensorflow.proto.framework.ControlFlowContextDef getNestedContexts(int index) { + return nestedContexts_.get(index); + } + /** + *
+   * Contexts contained inside this context (e.g. nested conds).
+   * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public org.tensorflow.proto.framework.ControlFlowContextDefOrBuilder getNestedContextsOrBuilder( + int index) { + return nestedContexts_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getContextNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, contextName_); + } + if (!getPredNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, predName_); + } + if (!getPivotNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pivotName_); + } + if (branch_ != 0) { + output.writeInt32(4, branch_); + } + if (valuesDef_ != null) { + output.writeMessage(5, getValuesDef()); + } + for (int i = 0; i < nestedContexts_.size(); i++) { + output.writeMessage(6, nestedContexts_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getContextNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, contextName_); + } + if (!getPredNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, predName_); + } + if (!getPivotNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pivotName_); + } + if (branch_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, branch_); + } + if (valuesDef_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getValuesDef()); + } + for (int i = 0; i < nestedContexts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, nestedContexts_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.CondContextDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.CondContextDef other = (org.tensorflow.proto.framework.CondContextDef) obj; + + if (!getContextName() + .equals(other.getContextName())) return false; + if (!getPredName() + .equals(other.getPredName())) return false; + if (!getPivotName() + .equals(other.getPivotName())) return false; + if (getBranch() + != other.getBranch()) return false; + if (hasValuesDef() != other.hasValuesDef()) return false; + if (hasValuesDef()) { + if (!getValuesDef() + .equals(other.getValuesDef())) return false; + } + if (!getNestedContextsList() + .equals(other.getNestedContextsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTEXT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getContextName().hashCode(); + hash = (37 * hash) + PRED_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPredName().hashCode(); + hash = (37 * hash) + PIVOT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPivotName().hashCode(); + hash = (37 * hash) + BRANCH_FIELD_NUMBER; + hash = (53 * hash) + getBranch(); + if (hasValuesDef()) { + hash = (37 * hash) + VALUES_DEF_FIELD_NUMBER; + hash = (53 * hash) + getValuesDef().hashCode(); + } + if (getNestedContextsCount() > 0) { + hash = (37 * hash) + NESTED_CONTEXTS_FIELD_NUMBER; + hash = (53 * hash) + getNestedContextsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.CondContextDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CondContextDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CondContextDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CondContextDef 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.proto.framework.CondContextDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CondContextDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CondContextDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CondContextDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CondContextDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CondContextDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CondContextDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CondContextDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.CondContextDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Protocol buffer representing a CondContext object.
+   * 
+ * + * Protobuf type {@code tensorflow.CondContextDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.CondContextDef) + org.tensorflow.proto.framework.CondContextDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ControlFlowProtos.internal_static_tensorflow_CondContextDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ControlFlowProtos.internal_static_tensorflow_CondContextDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CondContextDef.class, org.tensorflow.proto.framework.CondContextDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.CondContextDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getNestedContextsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + contextName_ = ""; + + predName_ = ""; + + pivotName_ = ""; + + branch_ = 0; + + if (valuesDefBuilder_ == null) { + valuesDef_ = null; + } else { + valuesDef_ = null; + valuesDefBuilder_ = null; + } + if (nestedContextsBuilder_ == null) { + nestedContexts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + nestedContextsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ControlFlowProtos.internal_static_tensorflow_CondContextDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CondContextDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.CondContextDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.CondContextDef build() { + org.tensorflow.proto.framework.CondContextDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CondContextDef buildPartial() { + org.tensorflow.proto.framework.CondContextDef result = new org.tensorflow.proto.framework.CondContextDef(this); + int from_bitField0_ = bitField0_; + result.contextName_ = contextName_; + result.predName_ = predName_; + result.pivotName_ = pivotName_; + result.branch_ = branch_; + if (valuesDefBuilder_ == null) { + result.valuesDef_ = valuesDef_; + } else { + result.valuesDef_ = valuesDefBuilder_.build(); + } + if (nestedContextsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + nestedContexts_ = java.util.Collections.unmodifiableList(nestedContexts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.nestedContexts_ = nestedContexts_; + } else { + result.nestedContexts_ = nestedContextsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.CondContextDef) { + return mergeFrom((org.tensorflow.proto.framework.CondContextDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.CondContextDef other) { + if (other == org.tensorflow.proto.framework.CondContextDef.getDefaultInstance()) return this; + if (!other.getContextName().isEmpty()) { + contextName_ = other.contextName_; + onChanged(); + } + if (!other.getPredName().isEmpty()) { + predName_ = other.predName_; + onChanged(); + } + if (!other.getPivotName().isEmpty()) { + pivotName_ = other.pivotName_; + onChanged(); + } + if (other.getBranch() != 0) { + setBranch(other.getBranch()); + } + if (other.hasValuesDef()) { + mergeValuesDef(other.getValuesDef()); + } + if (nestedContextsBuilder_ == null) { + if (!other.nestedContexts_.isEmpty()) { + if (nestedContexts_.isEmpty()) { + nestedContexts_ = other.nestedContexts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNestedContextsIsMutable(); + nestedContexts_.addAll(other.nestedContexts_); + } + onChanged(); + } + } else { + if (!other.nestedContexts_.isEmpty()) { + if (nestedContextsBuilder_.isEmpty()) { + nestedContextsBuilder_.dispose(); + nestedContextsBuilder_ = null; + nestedContexts_ = other.nestedContexts_; + bitField0_ = (bitField0_ & ~0x00000001); + nestedContextsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNestedContextsFieldBuilder() : null; + } else { + nestedContextsBuilder_.addAllMessages(other.nestedContexts_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.CondContextDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.CondContextDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object contextName_ = ""; + /** + *
+     * Name of the context.
+     * 
+ * + * string context_name = 1; + */ + public java.lang.String getContextName() { + java.lang.Object ref = contextName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contextName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the context.
+     * 
+ * + * string context_name = 1; + */ + public com.google.protobuf.ByteString + getContextNameBytes() { + java.lang.Object ref = contextName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + contextName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the context.
+     * 
+ * + * string context_name = 1; + */ + public Builder setContextName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + contextName_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the context.
+     * 
+ * + * string context_name = 1; + */ + public Builder clearContextName() { + + contextName_ = getDefaultInstance().getContextName(); + onChanged(); + return this; + } + /** + *
+     * Name of the context.
+     * 
+ * + * string context_name = 1; + */ + public Builder setContextNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + contextName_ = value; + onChanged(); + return this; + } + + private java.lang.Object predName_ = ""; + /** + *
+     * Name of the pred tensor.
+     * 
+ * + * string pred_name = 2; + */ + public java.lang.String getPredName() { + java.lang.Object ref = predName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + predName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the pred tensor.
+     * 
+ * + * string pred_name = 2; + */ + public com.google.protobuf.ByteString + getPredNameBytes() { + java.lang.Object ref = predName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + predName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the pred tensor.
+     * 
+ * + * string pred_name = 2; + */ + public Builder setPredName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + predName_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the pred tensor.
+     * 
+ * + * string pred_name = 2; + */ + public Builder clearPredName() { + + predName_ = getDefaultInstance().getPredName(); + onChanged(); + return this; + } + /** + *
+     * Name of the pred tensor.
+     * 
+ * + * string pred_name = 2; + */ + public Builder setPredNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + predName_ = value; + onChanged(); + return this; + } + + private java.lang.Object pivotName_ = ""; + /** + *
+     * Name of the pivot tensor.
+     * 
+ * + * string pivot_name = 3; + */ + public java.lang.String getPivotName() { + java.lang.Object ref = pivotName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pivotName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the pivot tensor.
+     * 
+ * + * string pivot_name = 3; + */ + public com.google.protobuf.ByteString + getPivotNameBytes() { + java.lang.Object ref = pivotName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pivotName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the pivot tensor.
+     * 
+ * + * string pivot_name = 3; + */ + public Builder setPivotName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pivotName_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the pivot tensor.
+     * 
+ * + * string pivot_name = 3; + */ + public Builder clearPivotName() { + + pivotName_ = getDefaultInstance().getPivotName(); + onChanged(); + return this; + } + /** + *
+     * Name of the pivot tensor.
+     * 
+ * + * string pivot_name = 3; + */ + public Builder setPivotNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pivotName_ = value; + onChanged(); + return this; + } + + private int branch_ ; + /** + *
+     * Branch prediction. 0 or 1.
+     * 
+ * + * int32 branch = 4; + */ + public int getBranch() { + return branch_; + } + /** + *
+     * Branch prediction. 0 or 1.
+     * 
+ * + * int32 branch = 4; + */ + public Builder setBranch(int value) { + + branch_ = value; + onChanged(); + return this; + } + /** + *
+     * Branch prediction. 0 or 1.
+     * 
+ * + * int32 branch = 4; + */ + public Builder clearBranch() { + + branch_ = 0; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.ValuesDef valuesDef_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.ValuesDef, org.tensorflow.proto.framework.ValuesDef.Builder, org.tensorflow.proto.framework.ValuesDefOrBuilder> valuesDefBuilder_; + /** + *
+     * Values and external values in control flow context.
+     * 
+ * + * .tensorflow.ValuesDef values_def = 5; + */ + public boolean hasValuesDef() { + return valuesDefBuilder_ != null || valuesDef_ != null; + } + /** + *
+     * Values and external values in control flow context.
+     * 
+ * + * .tensorflow.ValuesDef values_def = 5; + */ + public org.tensorflow.proto.framework.ValuesDef getValuesDef() { + if (valuesDefBuilder_ == null) { + return valuesDef_ == null ? org.tensorflow.proto.framework.ValuesDef.getDefaultInstance() : valuesDef_; + } else { + return valuesDefBuilder_.getMessage(); + } + } + /** + *
+     * Values and external values in control flow context.
+     * 
+ * + * .tensorflow.ValuesDef values_def = 5; + */ + public Builder setValuesDef(org.tensorflow.proto.framework.ValuesDef value) { + if (valuesDefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valuesDef_ = value; + onChanged(); + } else { + valuesDefBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Values and external values in control flow context.
+     * 
+ * + * .tensorflow.ValuesDef values_def = 5; + */ + public Builder setValuesDef( + org.tensorflow.proto.framework.ValuesDef.Builder builderForValue) { + if (valuesDefBuilder_ == null) { + valuesDef_ = builderForValue.build(); + onChanged(); + } else { + valuesDefBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Values and external values in control flow context.
+     * 
+ * + * .tensorflow.ValuesDef values_def = 5; + */ + public Builder mergeValuesDef(org.tensorflow.proto.framework.ValuesDef value) { + if (valuesDefBuilder_ == null) { + if (valuesDef_ != null) { + valuesDef_ = + org.tensorflow.proto.framework.ValuesDef.newBuilder(valuesDef_).mergeFrom(value).buildPartial(); + } else { + valuesDef_ = value; + } + onChanged(); + } else { + valuesDefBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Values and external values in control flow context.
+     * 
+ * + * .tensorflow.ValuesDef values_def = 5; + */ + public Builder clearValuesDef() { + if (valuesDefBuilder_ == null) { + valuesDef_ = null; + onChanged(); + } else { + valuesDef_ = null; + valuesDefBuilder_ = null; + } + + return this; + } + /** + *
+     * Values and external values in control flow context.
+     * 
+ * + * .tensorflow.ValuesDef values_def = 5; + */ + public org.tensorflow.proto.framework.ValuesDef.Builder getValuesDefBuilder() { + + onChanged(); + return getValuesDefFieldBuilder().getBuilder(); + } + /** + *
+     * Values and external values in control flow context.
+     * 
+ * + * .tensorflow.ValuesDef values_def = 5; + */ + public org.tensorflow.proto.framework.ValuesDefOrBuilder getValuesDefOrBuilder() { + if (valuesDefBuilder_ != null) { + return valuesDefBuilder_.getMessageOrBuilder(); + } else { + return valuesDef_ == null ? + org.tensorflow.proto.framework.ValuesDef.getDefaultInstance() : valuesDef_; + } + } + /** + *
+     * Values and external values in control flow context.
+     * 
+ * + * .tensorflow.ValuesDef values_def = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.ValuesDef, org.tensorflow.proto.framework.ValuesDef.Builder, org.tensorflow.proto.framework.ValuesDefOrBuilder> + getValuesDefFieldBuilder() { + if (valuesDefBuilder_ == null) { + valuesDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.ValuesDef, org.tensorflow.proto.framework.ValuesDef.Builder, org.tensorflow.proto.framework.ValuesDefOrBuilder>( + getValuesDef(), + getParentForChildren(), + isClean()); + valuesDef_ = null; + } + return valuesDefBuilder_; + } + + private java.util.List nestedContexts_ = + java.util.Collections.emptyList(); + private void ensureNestedContextsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + nestedContexts_ = new java.util.ArrayList(nestedContexts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ControlFlowContextDef, org.tensorflow.proto.framework.ControlFlowContextDef.Builder, org.tensorflow.proto.framework.ControlFlowContextDefOrBuilder> nestedContextsBuilder_; + + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public java.util.List getNestedContextsList() { + if (nestedContextsBuilder_ == null) { + return java.util.Collections.unmodifiableList(nestedContexts_); + } else { + return nestedContextsBuilder_.getMessageList(); + } + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public int getNestedContextsCount() { + if (nestedContextsBuilder_ == null) { + return nestedContexts_.size(); + } else { + return nestedContextsBuilder_.getCount(); + } + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public org.tensorflow.proto.framework.ControlFlowContextDef getNestedContexts(int index) { + if (nestedContextsBuilder_ == null) { + return nestedContexts_.get(index); + } else { + return nestedContextsBuilder_.getMessage(index); + } + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public Builder setNestedContexts( + int index, org.tensorflow.proto.framework.ControlFlowContextDef value) { + if (nestedContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNestedContextsIsMutable(); + nestedContexts_.set(index, value); + onChanged(); + } else { + nestedContextsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public Builder setNestedContexts( + int index, org.tensorflow.proto.framework.ControlFlowContextDef.Builder builderForValue) { + if (nestedContextsBuilder_ == null) { + ensureNestedContextsIsMutable(); + nestedContexts_.set(index, builderForValue.build()); + onChanged(); + } else { + nestedContextsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public Builder addNestedContexts(org.tensorflow.proto.framework.ControlFlowContextDef value) { + if (nestedContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNestedContextsIsMutable(); + nestedContexts_.add(value); + onChanged(); + } else { + nestedContextsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public Builder addNestedContexts( + int index, org.tensorflow.proto.framework.ControlFlowContextDef value) { + if (nestedContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNestedContextsIsMutable(); + nestedContexts_.add(index, value); + onChanged(); + } else { + nestedContextsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public Builder addNestedContexts( + org.tensorflow.proto.framework.ControlFlowContextDef.Builder builderForValue) { + if (nestedContextsBuilder_ == null) { + ensureNestedContextsIsMutable(); + nestedContexts_.add(builderForValue.build()); + onChanged(); + } else { + nestedContextsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public Builder addNestedContexts( + int index, org.tensorflow.proto.framework.ControlFlowContextDef.Builder builderForValue) { + if (nestedContextsBuilder_ == null) { + ensureNestedContextsIsMutable(); + nestedContexts_.add(index, builderForValue.build()); + onChanged(); + } else { + nestedContextsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public Builder addAllNestedContexts( + java.lang.Iterable values) { + if (nestedContextsBuilder_ == null) { + ensureNestedContextsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nestedContexts_); + onChanged(); + } else { + nestedContextsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public Builder clearNestedContexts() { + if (nestedContextsBuilder_ == null) { + nestedContexts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + nestedContextsBuilder_.clear(); + } + return this; + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public Builder removeNestedContexts(int index) { + if (nestedContextsBuilder_ == null) { + ensureNestedContextsIsMutable(); + nestedContexts_.remove(index); + onChanged(); + } else { + nestedContextsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public org.tensorflow.proto.framework.ControlFlowContextDef.Builder getNestedContextsBuilder( + int index) { + return getNestedContextsFieldBuilder().getBuilder(index); + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public org.tensorflow.proto.framework.ControlFlowContextDefOrBuilder getNestedContextsOrBuilder( + int index) { + if (nestedContextsBuilder_ == null) { + return nestedContexts_.get(index); } else { + return nestedContextsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public java.util.List + getNestedContextsOrBuilderList() { + if (nestedContextsBuilder_ != null) { + return nestedContextsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nestedContexts_); + } + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public org.tensorflow.proto.framework.ControlFlowContextDef.Builder addNestedContextsBuilder() { + return getNestedContextsFieldBuilder().addBuilder( + org.tensorflow.proto.framework.ControlFlowContextDef.getDefaultInstance()); + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public org.tensorflow.proto.framework.ControlFlowContextDef.Builder addNestedContextsBuilder( + int index) { + return getNestedContextsFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.ControlFlowContextDef.getDefaultInstance()); + } + /** + *
+     * Contexts contained inside this context (e.g. nested conds).
+     * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + public java.util.List + getNestedContextsBuilderList() { + return getNestedContextsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ControlFlowContextDef, org.tensorflow.proto.framework.ControlFlowContextDef.Builder, org.tensorflow.proto.framework.ControlFlowContextDefOrBuilder> + getNestedContextsFieldBuilder() { + if (nestedContextsBuilder_ == null) { + nestedContextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ControlFlowContextDef, org.tensorflow.proto.framework.ControlFlowContextDef.Builder, org.tensorflow.proto.framework.ControlFlowContextDefOrBuilder>( + nestedContexts_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + nestedContexts_ = null; + } + return nestedContextsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.CondContextDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.CondContextDef) + private static final org.tensorflow.proto.framework.CondContextDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.CondContextDef(); + } + + public static org.tensorflow.proto.framework.CondContextDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CondContextDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CondContextDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CondContextDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CondContextDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CondContextDefOrBuilder.java new file mode 100644 index 00000000000..1dcdef5fd71 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CondContextDefOrBuilder.java @@ -0,0 +1,141 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/control_flow.proto + +package org.tensorflow.proto.framework; + +public interface CondContextDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.CondContextDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Name of the context.
+   * 
+ * + * string context_name = 1; + */ + java.lang.String getContextName(); + /** + *
+   * Name of the context.
+   * 
+ * + * string context_name = 1; + */ + com.google.protobuf.ByteString + getContextNameBytes(); + + /** + *
+   * Name of the pred tensor.
+   * 
+ * + * string pred_name = 2; + */ + java.lang.String getPredName(); + /** + *
+   * Name of the pred tensor.
+   * 
+ * + * string pred_name = 2; + */ + com.google.protobuf.ByteString + getPredNameBytes(); + + /** + *
+   * Name of the pivot tensor.
+   * 
+ * + * string pivot_name = 3; + */ + java.lang.String getPivotName(); + /** + *
+   * Name of the pivot tensor.
+   * 
+ * + * string pivot_name = 3; + */ + com.google.protobuf.ByteString + getPivotNameBytes(); + + /** + *
+   * Branch prediction. 0 or 1.
+   * 
+ * + * int32 branch = 4; + */ + int getBranch(); + + /** + *
+   * Values and external values in control flow context.
+   * 
+ * + * .tensorflow.ValuesDef values_def = 5; + */ + boolean hasValuesDef(); + /** + *
+   * Values and external values in control flow context.
+   * 
+ * + * .tensorflow.ValuesDef values_def = 5; + */ + org.tensorflow.proto.framework.ValuesDef getValuesDef(); + /** + *
+   * Values and external values in control flow context.
+   * 
+ * + * .tensorflow.ValuesDef values_def = 5; + */ + org.tensorflow.proto.framework.ValuesDefOrBuilder getValuesDefOrBuilder(); + + /** + *
+   * Contexts contained inside this context (e.g. nested conds).
+   * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + java.util.List + getNestedContextsList(); + /** + *
+   * Contexts contained inside this context (e.g. nested conds).
+   * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + org.tensorflow.proto.framework.ControlFlowContextDef getNestedContexts(int index); + /** + *
+   * Contexts contained inside this context (e.g. nested conds).
+   * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + int getNestedContextsCount(); + /** + *
+   * Contexts contained inside this context (e.g. nested conds).
+   * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + java.util.List + getNestedContextsOrBuilderList(); + /** + *
+   * Contexts contained inside this context (e.g. nested conds).
+   * 
+ * + * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6; + */ + org.tensorflow.proto.framework.ControlFlowContextDefOrBuilder getNestedContextsOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ConfigProto.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ConfigProto.java new file mode 100644 index 00000000000..b2ba25aa6b0 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ConfigProto.java @@ -0,0 +1,5966 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Session configuration parameters.
+ * The system picks appropriate values for fields that are not set.
+ * 
+ * + * Protobuf type {@code tensorflow.ConfigProto} + */ +public final class ConfigProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ConfigProto) + ConfigProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use ConfigProto.newBuilder() to construct. + private ConfigProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ConfigProto() { + sessionInterOpThreadPool_ = java.util.Collections.emptyList(); + deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ConfigProto(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ConfigProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + deviceCount_ = com.google.protobuf.MapField.newMapField( + DeviceCountDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + deviceCount__ = input.readMessage( + DeviceCountDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + deviceCount_.getMutableMap().put( + deviceCount__.getKey(), deviceCount__.getValue()); + break; + } + case 16: { + + intraOpParallelismThreads_ = input.readInt32(); + break; + } + case 24: { + + placementPeriod_ = input.readInt32(); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + deviceFilters_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + deviceFilters_.add(s); + break; + } + case 40: { + + interOpParallelismThreads_ = input.readInt32(); + break; + } + case 50: { + org.tensorflow.proto.framework.GPUOptions.Builder subBuilder = null; + if (gpuOptions_ != null) { + subBuilder = gpuOptions_.toBuilder(); + } + gpuOptions_ = input.readMessage(org.tensorflow.proto.framework.GPUOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(gpuOptions_); + gpuOptions_ = subBuilder.buildPartial(); + } + + break; + } + case 56: { + + allowSoftPlacement_ = input.readBool(); + break; + } + case 64: { + + logDevicePlacement_ = input.readBool(); + break; + } + case 72: { + + usePerSessionThreads_ = input.readBool(); + break; + } + case 82: { + org.tensorflow.proto.framework.GraphOptions.Builder subBuilder = null; + if (graphOptions_ != null) { + subBuilder = graphOptions_.toBuilder(); + } + graphOptions_ = input.readMessage(org.tensorflow.proto.framework.GraphOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(graphOptions_); + graphOptions_ = subBuilder.buildPartial(); + } + + break; + } + case 88: { + + operationTimeoutInMs_ = input.readInt64(); + break; + } + case 98: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + sessionInterOpThreadPool_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + sessionInterOpThreadPool_.add( + input.readMessage(org.tensorflow.proto.framework.ThreadPoolOptionProto.parser(), extensionRegistry)); + break; + } + case 106: { + org.tensorflow.proto.framework.RPCOptions.Builder subBuilder = null; + if (rpcOptions_ != null) { + subBuilder = rpcOptions_.toBuilder(); + } + rpcOptions_ = input.readMessage(org.tensorflow.proto.framework.RPCOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcOptions_); + rpcOptions_ = subBuilder.buildPartial(); + } + + break; + } + case 114: { + org.tensorflow.proto.distruntime.ClusterDef.Builder subBuilder = null; + if (clusterDef_ != null) { + subBuilder = clusterDef_.toBuilder(); + } + clusterDef_ = input.readMessage(org.tensorflow.proto.distruntime.ClusterDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(clusterDef_); + clusterDef_ = subBuilder.buildPartial(); + } + + break; + } + case 120: { + + isolateSessionState_ = input.readBool(); + break; + } + case 130: { + org.tensorflow.proto.framework.ConfigProto.Experimental.Builder subBuilder = null; + if (experimental_ != null) { + subBuilder = experimental_.toBuilder(); + } + experimental_ = input.readMessage(org.tensorflow.proto.framework.ConfigProto.Experimental.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(experimental_); + experimental_ = subBuilder.buildPartial(); + } + + break; + } + case 136: { + + shareClusterDevicesInSession_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) != 0)) { + deviceFilters_ = deviceFilters_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + sessionInterOpThreadPool_ = java.util.Collections.unmodifiableList(sessionInterOpThreadPool_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetDeviceCount(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ConfigProto.class, org.tensorflow.proto.framework.ConfigProto.Builder.class); + } + + public interface ExperimentalOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ConfigProto.Experimental) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Task name for group resolution.
+     * 
+ * + * string collective_group_leader = 1; + */ + java.lang.String getCollectiveGroupLeader(); + /** + *
+     * Task name for group resolution.
+     * 
+ * + * string collective_group_leader = 1; + */ + com.google.protobuf.ByteString + getCollectiveGroupLeaderBytes(); + + /** + *
+     * Which executor to use, the default executor will be used
+     * if it is an empty string or "DEFAULT"
+     * 
+ * + * string executor_type = 3; + */ + java.lang.String getExecutorType(); + /** + *
+     * Which executor to use, the default executor will be used
+     * if it is an empty string or "DEFAULT"
+     * 
+ * + * string executor_type = 3; + */ + com.google.protobuf.ByteString + getExecutorTypeBytes(); + + /** + *
+     * Guidance to formatting of large RecvBuf fields for transfer.
+     * Any positive value sets the max chunk size.  0 defaults to 4096.
+     * Any negative value indicates no max, i.e. one chunk only.
+     * 
+ * + * int32 recv_buf_max_chunk = 4; + */ + int getRecvBufMaxChunk(); + + /** + *
+     * If true, and supported by the platform, the runtime will attempt to
+     * use NUMA affinity where applicable.  One consequence will be the
+     * existence of as many CPU devices as there are available NUMA nodes.
+     * 
+ * + * bool use_numa_affinity = 5; + */ + boolean getUseNumaAffinity(); + + /** + *
+     * If true, make collective op execution order sequential and deterministic
+     * for potentially concurrent collective instances.
+     * 
+ * + * bool collective_deterministic_sequential_execution = 6; + */ + boolean getCollectiveDeterministicSequentialExecution(); + + /** + *
+     * If true, use NCCL for CollectiveOps.  This feature is highly
+     * experimental.
+     * 
+ * + * bool collective_nccl = 7; + */ + boolean getCollectiveNccl(); + + /** + *
+     * In the following, session state means the value of a variable, elements
+     * in a hash table, or any other resource, accessible by worker sessions
+     * held by a TF server.
+     * When ClusterSpec propagation is enabled, the value of
+     * isolate_session_state is ignored when deciding whether to share session
+     * states in a TF server (for backwards compatibility reasons).
+     * - If share_session_state_in_clusterspec_propagation is true, the session
+     * states are shared.
+     * - If share_session_state_in_clusterspec_propagation is false, session
+     * states are isolated.
+     * When clusterspec propagation is not used, the value of
+     * share_session_state_in_clusterspec_propagation is ignored when deciding
+     * whether to share session states in a TF server.
+     * - If isolate_session_state is true, session states are isolated.
+     * - If isolate_session_state is false, session states are shared.
+     * TODO(b/129330037): Add a single API that consistently treats
+     * isolate_session_state and ClusterSpec propagation.
+     * 
+ * + * bool share_session_state_in_clusterspec_propagation = 8; + */ + boolean getShareSessionStateInClusterspecPropagation(); + + /** + *
+     * If using a direct session, disable spinning while waiting for work in
+     * the thread pool. This may result in higher latency for completing ops,
+     * but in the case where there is a lot of spinning may result in lower
+     * CPU usage.
+     * 
+ * + * bool disable_thread_spinning = 9; + */ + boolean getDisableThreadSpinning(); + + /** + *
+     * This was promoted to a non-experimental API. Please use
+     * ConfigProto.share_cluster_devices_in_session instead.
+     * 
+ * + * bool share_cluster_devices_in_session = 10; + */ + boolean getShareClusterDevicesInSession(); + + /** + *
+     * Metadata about the session.
+     * If set, this can be used by the runtime and the Ops for debugging,
+     * monitoring, etc.
+     * NOTE: This is currently used and propagated only by the direct session.
+     * 
+ * + * .tensorflow.SessionMetadata session_metadata = 11; + */ + boolean hasSessionMetadata(); + /** + *
+     * Metadata about the session.
+     * If set, this can be used by the runtime and the Ops for debugging,
+     * monitoring, etc.
+     * NOTE: This is currently used and propagated only by the direct session.
+     * 
+ * + * .tensorflow.SessionMetadata session_metadata = 11; + */ + org.tensorflow.proto.framework.SessionMetadata getSessionMetadata(); + /** + *
+     * Metadata about the session.
+     * If set, this can be used by the runtime and the Ops for debugging,
+     * monitoring, etc.
+     * NOTE: This is currently used and propagated only by the direct session.
+     * 
+ * + * .tensorflow.SessionMetadata session_metadata = 11; + */ + org.tensorflow.proto.framework.SessionMetadataOrBuilder getSessionMetadataOrBuilder(); + + /** + *
+     * If true, the session may treat the graph as being static for optimization
+     * purposes.
+     * If this option is set to true when a session is created, the full
+     * GraphDef must be passed in a single call to Session::Create(), and
+     * Session::Extend() may not be supported.
+     * 
+ * + * bool optimize_for_static_graph = 12; + */ + boolean getOptimizeForStaticGraph(); + + /** + *
+     * Whether to enable the MLIR-based TF->XLA bridge.
+     * This is a replacement to the existing bridge, and not ready for
+     * production usage yet.
+     * If this option is set to true when a session is created, MLIR is used to
+     * perform the set of graph transformations to put the graph in a form that
+     * can be executed with delegation of some computations to an accelerator.
+     * This builds on the model of XLA where a subset of the graph is
+     * encapsulated and attached to a "compile" operation, whose result is fed
+     * to an "execute" operation. The kernel for these operations is responsible
+     * to lower the encapsulated graph to a particular device.
+     * 
+ * + * bool enable_mlir_bridge = 13; + */ + boolean getEnableMlirBridge(); + + /** + *
+     * If true, the session will not store an additional copy of the graph for
+     * each subgraph.
+     * If this option is set to true when a session is created, the
+     * `RunOptions.output_partition_graphs` options must not be set.
+     * 
+ * + * bool disable_output_partition_graphs = 14; + */ + boolean getDisableOutputPartitionGraphs(); + + /** + *
+     * Minimum number of batches run through the XLA graph before XLA fusion
+     * autotuner is enabled. Default value of zero disables the autotuner.
+     * The XLA fusion autotuner can improve performance by executing a heuristic
+     * search on the compiler parameters.
+     * 
+ * + * int64 xla_fusion_autotuner_thresh = 15; + */ + long getXlaFusionAutotunerThresh(); + } + /** + *
+   * Everything inside Experimental is subject to change and is not subject
+   * to API stability guarantees in
+   * https://www.tensorflow.org/guide/version_compat.
+   * 
+ * + * Protobuf type {@code tensorflow.ConfigProto.Experimental} + */ + public static final class Experimental extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ConfigProto.Experimental) + ExperimentalOrBuilder { + private static final long serialVersionUID = 0L; + // Use Experimental.newBuilder() to construct. + private Experimental(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Experimental() { + collectiveGroupLeader_ = ""; + executorType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Experimental(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Experimental( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + collectiveGroupLeader_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + executorType_ = s; + break; + } + case 32: { + + recvBufMaxChunk_ = input.readInt32(); + break; + } + case 40: { + + useNumaAffinity_ = input.readBool(); + break; + } + case 48: { + + collectiveDeterministicSequentialExecution_ = input.readBool(); + break; + } + case 56: { + + collectiveNccl_ = input.readBool(); + break; + } + case 64: { + + shareSessionStateInClusterspecPropagation_ = input.readBool(); + break; + } + case 72: { + + disableThreadSpinning_ = input.readBool(); + break; + } + case 80: { + + shareClusterDevicesInSession_ = input.readBool(); + break; + } + case 90: { + org.tensorflow.proto.framework.SessionMetadata.Builder subBuilder = null; + if (sessionMetadata_ != null) { + subBuilder = sessionMetadata_.toBuilder(); + } + sessionMetadata_ = input.readMessage(org.tensorflow.proto.framework.SessionMetadata.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sessionMetadata_); + sessionMetadata_ = subBuilder.buildPartial(); + } + + break; + } + case 96: { + + optimizeForStaticGraph_ = input.readBool(); + break; + } + case 104: { + + enableMlirBridge_ = input.readBool(); + break; + } + case 112: { + + disableOutputPartitionGraphs_ = input.readBool(); + break; + } + case 120: { + + xlaFusionAutotunerThresh_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_Experimental_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_Experimental_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ConfigProto.Experimental.class, org.tensorflow.proto.framework.ConfigProto.Experimental.Builder.class); + } + + public static final int COLLECTIVE_GROUP_LEADER_FIELD_NUMBER = 1; + private volatile java.lang.Object collectiveGroupLeader_; + /** + *
+     * Task name for group resolution.
+     * 
+ * + * string collective_group_leader = 1; + */ + public java.lang.String getCollectiveGroupLeader() { + java.lang.Object ref = collectiveGroupLeader_; + 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(); + collectiveGroupLeader_ = s; + return s; + } + } + /** + *
+     * Task name for group resolution.
+     * 
+ * + * string collective_group_leader = 1; + */ + public com.google.protobuf.ByteString + getCollectiveGroupLeaderBytes() { + java.lang.Object ref = collectiveGroupLeader_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collectiveGroupLeader_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXECUTOR_TYPE_FIELD_NUMBER = 3; + private volatile java.lang.Object executorType_; + /** + *
+     * Which executor to use, the default executor will be used
+     * if it is an empty string or "DEFAULT"
+     * 
+ * + * string executor_type = 3; + */ + public java.lang.String getExecutorType() { + java.lang.Object ref = executorType_; + 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(); + executorType_ = s; + return s; + } + } + /** + *
+     * Which executor to use, the default executor will be used
+     * if it is an empty string or "DEFAULT"
+     * 
+ * + * string executor_type = 3; + */ + public com.google.protobuf.ByteString + getExecutorTypeBytes() { + java.lang.Object ref = executorType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + executorType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECV_BUF_MAX_CHUNK_FIELD_NUMBER = 4; + private int recvBufMaxChunk_; + /** + *
+     * Guidance to formatting of large RecvBuf fields for transfer.
+     * Any positive value sets the max chunk size.  0 defaults to 4096.
+     * Any negative value indicates no max, i.e. one chunk only.
+     * 
+ * + * int32 recv_buf_max_chunk = 4; + */ + public int getRecvBufMaxChunk() { + return recvBufMaxChunk_; + } + + public static final int USE_NUMA_AFFINITY_FIELD_NUMBER = 5; + private boolean useNumaAffinity_; + /** + *
+     * If true, and supported by the platform, the runtime will attempt to
+     * use NUMA affinity where applicable.  One consequence will be the
+     * existence of as many CPU devices as there are available NUMA nodes.
+     * 
+ * + * bool use_numa_affinity = 5; + */ + public boolean getUseNumaAffinity() { + return useNumaAffinity_; + } + + public static final int COLLECTIVE_DETERMINISTIC_SEQUENTIAL_EXECUTION_FIELD_NUMBER = 6; + private boolean collectiveDeterministicSequentialExecution_; + /** + *
+     * If true, make collective op execution order sequential and deterministic
+     * for potentially concurrent collective instances.
+     * 
+ * + * bool collective_deterministic_sequential_execution = 6; + */ + public boolean getCollectiveDeterministicSequentialExecution() { + return collectiveDeterministicSequentialExecution_; + } + + public static final int COLLECTIVE_NCCL_FIELD_NUMBER = 7; + private boolean collectiveNccl_; + /** + *
+     * If true, use NCCL for CollectiveOps.  This feature is highly
+     * experimental.
+     * 
+ * + * bool collective_nccl = 7; + */ + public boolean getCollectiveNccl() { + return collectiveNccl_; + } + + public static final int SHARE_SESSION_STATE_IN_CLUSTERSPEC_PROPAGATION_FIELD_NUMBER = 8; + private boolean shareSessionStateInClusterspecPropagation_; + /** + *
+     * In the following, session state means the value of a variable, elements
+     * in a hash table, or any other resource, accessible by worker sessions
+     * held by a TF server.
+     * When ClusterSpec propagation is enabled, the value of
+     * isolate_session_state is ignored when deciding whether to share session
+     * states in a TF server (for backwards compatibility reasons).
+     * - If share_session_state_in_clusterspec_propagation is true, the session
+     * states are shared.
+     * - If share_session_state_in_clusterspec_propagation is false, session
+     * states are isolated.
+     * When clusterspec propagation is not used, the value of
+     * share_session_state_in_clusterspec_propagation is ignored when deciding
+     * whether to share session states in a TF server.
+     * - If isolate_session_state is true, session states are isolated.
+     * - If isolate_session_state is false, session states are shared.
+     * TODO(b/129330037): Add a single API that consistently treats
+     * isolate_session_state and ClusterSpec propagation.
+     * 
+ * + * bool share_session_state_in_clusterspec_propagation = 8; + */ + public boolean getShareSessionStateInClusterspecPropagation() { + return shareSessionStateInClusterspecPropagation_; + } + + public static final int DISABLE_THREAD_SPINNING_FIELD_NUMBER = 9; + private boolean disableThreadSpinning_; + /** + *
+     * If using a direct session, disable spinning while waiting for work in
+     * the thread pool. This may result in higher latency for completing ops,
+     * but in the case where there is a lot of spinning may result in lower
+     * CPU usage.
+     * 
+ * + * bool disable_thread_spinning = 9; + */ + public boolean getDisableThreadSpinning() { + return disableThreadSpinning_; + } + + public static final int SHARE_CLUSTER_DEVICES_IN_SESSION_FIELD_NUMBER = 10; + private boolean shareClusterDevicesInSession_; + /** + *
+     * This was promoted to a non-experimental API. Please use
+     * ConfigProto.share_cluster_devices_in_session instead.
+     * 
+ * + * bool share_cluster_devices_in_session = 10; + */ + public boolean getShareClusterDevicesInSession() { + return shareClusterDevicesInSession_; + } + + public static final int SESSION_METADATA_FIELD_NUMBER = 11; + private org.tensorflow.proto.framework.SessionMetadata sessionMetadata_; + /** + *
+     * Metadata about the session.
+     * If set, this can be used by the runtime and the Ops for debugging,
+     * monitoring, etc.
+     * NOTE: This is currently used and propagated only by the direct session.
+     * 
+ * + * .tensorflow.SessionMetadata session_metadata = 11; + */ + public boolean hasSessionMetadata() { + return sessionMetadata_ != null; + } + /** + *
+     * Metadata about the session.
+     * If set, this can be used by the runtime and the Ops for debugging,
+     * monitoring, etc.
+     * NOTE: This is currently used and propagated only by the direct session.
+     * 
+ * + * .tensorflow.SessionMetadata session_metadata = 11; + */ + public org.tensorflow.proto.framework.SessionMetadata getSessionMetadata() { + return sessionMetadata_ == null ? org.tensorflow.proto.framework.SessionMetadata.getDefaultInstance() : sessionMetadata_; + } + /** + *
+     * Metadata about the session.
+     * If set, this can be used by the runtime and the Ops for debugging,
+     * monitoring, etc.
+     * NOTE: This is currently used and propagated only by the direct session.
+     * 
+ * + * .tensorflow.SessionMetadata session_metadata = 11; + */ + public org.tensorflow.proto.framework.SessionMetadataOrBuilder getSessionMetadataOrBuilder() { + return getSessionMetadata(); + } + + public static final int OPTIMIZE_FOR_STATIC_GRAPH_FIELD_NUMBER = 12; + private boolean optimizeForStaticGraph_; + /** + *
+     * If true, the session may treat the graph as being static for optimization
+     * purposes.
+     * If this option is set to true when a session is created, the full
+     * GraphDef must be passed in a single call to Session::Create(), and
+     * Session::Extend() may not be supported.
+     * 
+ * + * bool optimize_for_static_graph = 12; + */ + public boolean getOptimizeForStaticGraph() { + return optimizeForStaticGraph_; + } + + public static final int ENABLE_MLIR_BRIDGE_FIELD_NUMBER = 13; + private boolean enableMlirBridge_; + /** + *
+     * Whether to enable the MLIR-based TF->XLA bridge.
+     * This is a replacement to the existing bridge, and not ready for
+     * production usage yet.
+     * If this option is set to true when a session is created, MLIR is used to
+     * perform the set of graph transformations to put the graph in a form that
+     * can be executed with delegation of some computations to an accelerator.
+     * This builds on the model of XLA where a subset of the graph is
+     * encapsulated and attached to a "compile" operation, whose result is fed
+     * to an "execute" operation. The kernel for these operations is responsible
+     * to lower the encapsulated graph to a particular device.
+     * 
+ * + * bool enable_mlir_bridge = 13; + */ + public boolean getEnableMlirBridge() { + return enableMlirBridge_; + } + + public static final int DISABLE_OUTPUT_PARTITION_GRAPHS_FIELD_NUMBER = 14; + private boolean disableOutputPartitionGraphs_; + /** + *
+     * If true, the session will not store an additional copy of the graph for
+     * each subgraph.
+     * If this option is set to true when a session is created, the
+     * `RunOptions.output_partition_graphs` options must not be set.
+     * 
+ * + * bool disable_output_partition_graphs = 14; + */ + public boolean getDisableOutputPartitionGraphs() { + return disableOutputPartitionGraphs_; + } + + public static final int XLA_FUSION_AUTOTUNER_THRESH_FIELD_NUMBER = 15; + private long xlaFusionAutotunerThresh_; + /** + *
+     * Minimum number of batches run through the XLA graph before XLA fusion
+     * autotuner is enabled. Default value of zero disables the autotuner.
+     * The XLA fusion autotuner can improve performance by executing a heuristic
+     * search on the compiler parameters.
+     * 
+ * + * int64 xla_fusion_autotuner_thresh = 15; + */ + public long getXlaFusionAutotunerThresh() { + return xlaFusionAutotunerThresh_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getCollectiveGroupLeaderBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, collectiveGroupLeader_); + } + if (!getExecutorTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, executorType_); + } + if (recvBufMaxChunk_ != 0) { + output.writeInt32(4, recvBufMaxChunk_); + } + if (useNumaAffinity_ != false) { + output.writeBool(5, useNumaAffinity_); + } + if (collectiveDeterministicSequentialExecution_ != false) { + output.writeBool(6, collectiveDeterministicSequentialExecution_); + } + if (collectiveNccl_ != false) { + output.writeBool(7, collectiveNccl_); + } + if (shareSessionStateInClusterspecPropagation_ != false) { + output.writeBool(8, shareSessionStateInClusterspecPropagation_); + } + if (disableThreadSpinning_ != false) { + output.writeBool(9, disableThreadSpinning_); + } + if (shareClusterDevicesInSession_ != false) { + output.writeBool(10, shareClusterDevicesInSession_); + } + if (sessionMetadata_ != null) { + output.writeMessage(11, getSessionMetadata()); + } + if (optimizeForStaticGraph_ != false) { + output.writeBool(12, optimizeForStaticGraph_); + } + if (enableMlirBridge_ != false) { + output.writeBool(13, enableMlirBridge_); + } + if (disableOutputPartitionGraphs_ != false) { + output.writeBool(14, disableOutputPartitionGraphs_); + } + if (xlaFusionAutotunerThresh_ != 0L) { + output.writeInt64(15, xlaFusionAutotunerThresh_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCollectiveGroupLeaderBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, collectiveGroupLeader_); + } + if (!getExecutorTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, executorType_); + } + if (recvBufMaxChunk_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, recvBufMaxChunk_); + } + if (useNumaAffinity_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, useNumaAffinity_); + } + if (collectiveDeterministicSequentialExecution_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, collectiveDeterministicSequentialExecution_); + } + if (collectiveNccl_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, collectiveNccl_); + } + if (shareSessionStateInClusterspecPropagation_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, shareSessionStateInClusterspecPropagation_); + } + if (disableThreadSpinning_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, disableThreadSpinning_); + } + if (shareClusterDevicesInSession_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(10, shareClusterDevicesInSession_); + } + if (sessionMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getSessionMetadata()); + } + if (optimizeForStaticGraph_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(12, optimizeForStaticGraph_); + } + if (enableMlirBridge_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(13, enableMlirBridge_); + } + if (disableOutputPartitionGraphs_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(14, disableOutputPartitionGraphs_); + } + if (xlaFusionAutotunerThresh_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(15, xlaFusionAutotunerThresh_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.ConfigProto.Experimental)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.ConfigProto.Experimental other = (org.tensorflow.proto.framework.ConfigProto.Experimental) obj; + + if (!getCollectiveGroupLeader() + .equals(other.getCollectiveGroupLeader())) return false; + if (!getExecutorType() + .equals(other.getExecutorType())) return false; + if (getRecvBufMaxChunk() + != other.getRecvBufMaxChunk()) return false; + if (getUseNumaAffinity() + != other.getUseNumaAffinity()) return false; + if (getCollectiveDeterministicSequentialExecution() + != other.getCollectiveDeterministicSequentialExecution()) return false; + if (getCollectiveNccl() + != other.getCollectiveNccl()) return false; + if (getShareSessionStateInClusterspecPropagation() + != other.getShareSessionStateInClusterspecPropagation()) return false; + if (getDisableThreadSpinning() + != other.getDisableThreadSpinning()) return false; + if (getShareClusterDevicesInSession() + != other.getShareClusterDevicesInSession()) return false; + if (hasSessionMetadata() != other.hasSessionMetadata()) return false; + if (hasSessionMetadata()) { + if (!getSessionMetadata() + .equals(other.getSessionMetadata())) return false; + } + if (getOptimizeForStaticGraph() + != other.getOptimizeForStaticGraph()) return false; + if (getEnableMlirBridge() + != other.getEnableMlirBridge()) return false; + if (getDisableOutputPartitionGraphs() + != other.getDisableOutputPartitionGraphs()) return false; + if (getXlaFusionAutotunerThresh() + != other.getXlaFusionAutotunerThresh()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLLECTIVE_GROUP_LEADER_FIELD_NUMBER; + hash = (53 * hash) + getCollectiveGroupLeader().hashCode(); + hash = (37 * hash) + EXECUTOR_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getExecutorType().hashCode(); + hash = (37 * hash) + RECV_BUF_MAX_CHUNK_FIELD_NUMBER; + hash = (53 * hash) + getRecvBufMaxChunk(); + hash = (37 * hash) + USE_NUMA_AFFINITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUseNumaAffinity()); + hash = (37 * hash) + COLLECTIVE_DETERMINISTIC_SEQUENTIAL_EXECUTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCollectiveDeterministicSequentialExecution()); + hash = (37 * hash) + COLLECTIVE_NCCL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCollectiveNccl()); + hash = (37 * hash) + SHARE_SESSION_STATE_IN_CLUSTERSPEC_PROPAGATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getShareSessionStateInClusterspecPropagation()); + hash = (37 * hash) + DISABLE_THREAD_SPINNING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDisableThreadSpinning()); + hash = (37 * hash) + SHARE_CLUSTER_DEVICES_IN_SESSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getShareClusterDevicesInSession()); + if (hasSessionMetadata()) { + hash = (37 * hash) + SESSION_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getSessionMetadata().hashCode(); + } + hash = (37 * hash) + OPTIMIZE_FOR_STATIC_GRAPH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getOptimizeForStaticGraph()); + hash = (37 * hash) + ENABLE_MLIR_BRIDGE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnableMlirBridge()); + hash = (37 * hash) + DISABLE_OUTPUT_PARTITION_GRAPHS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDisableOutputPartitionGraphs()); + hash = (37 * hash) + XLA_FUSION_AUTOTUNER_THRESH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getXlaFusionAutotunerThresh()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.ConfigProto.Experimental parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ConfigProto.Experimental parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ConfigProto.Experimental parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ConfigProto.Experimental 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.proto.framework.ConfigProto.Experimental parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ConfigProto.Experimental parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ConfigProto.Experimental parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ConfigProto.Experimental parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ConfigProto.Experimental parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ConfigProto.Experimental parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ConfigProto.Experimental parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ConfigProto.Experimental parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.ConfigProto.Experimental prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Everything inside Experimental is subject to change and is not subject
+     * to API stability guarantees in
+     * https://www.tensorflow.org/guide/version_compat.
+     * 
+ * + * Protobuf type {@code tensorflow.ConfigProto.Experimental} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ConfigProto.Experimental) + org.tensorflow.proto.framework.ConfigProto.ExperimentalOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_Experimental_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_Experimental_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ConfigProto.Experimental.class, org.tensorflow.proto.framework.ConfigProto.Experimental.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.ConfigProto.Experimental.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + collectiveGroupLeader_ = ""; + + executorType_ = ""; + + recvBufMaxChunk_ = 0; + + useNumaAffinity_ = false; + + collectiveDeterministicSequentialExecution_ = false; + + collectiveNccl_ = false; + + shareSessionStateInClusterspecPropagation_ = false; + + disableThreadSpinning_ = false; + + shareClusterDevicesInSession_ = false; + + if (sessionMetadataBuilder_ == null) { + sessionMetadata_ = null; + } else { + sessionMetadata_ = null; + sessionMetadataBuilder_ = null; + } + optimizeForStaticGraph_ = false; + + enableMlirBridge_ = false; + + disableOutputPartitionGraphs_ = false; + + xlaFusionAutotunerThresh_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_Experimental_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ConfigProto.Experimental getDefaultInstanceForType() { + return org.tensorflow.proto.framework.ConfigProto.Experimental.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.ConfigProto.Experimental build() { + org.tensorflow.proto.framework.ConfigProto.Experimental result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ConfigProto.Experimental buildPartial() { + org.tensorflow.proto.framework.ConfigProto.Experimental result = new org.tensorflow.proto.framework.ConfigProto.Experimental(this); + result.collectiveGroupLeader_ = collectiveGroupLeader_; + result.executorType_ = executorType_; + result.recvBufMaxChunk_ = recvBufMaxChunk_; + result.useNumaAffinity_ = useNumaAffinity_; + result.collectiveDeterministicSequentialExecution_ = collectiveDeterministicSequentialExecution_; + result.collectiveNccl_ = collectiveNccl_; + result.shareSessionStateInClusterspecPropagation_ = shareSessionStateInClusterspecPropagation_; + result.disableThreadSpinning_ = disableThreadSpinning_; + result.shareClusterDevicesInSession_ = shareClusterDevicesInSession_; + if (sessionMetadataBuilder_ == null) { + result.sessionMetadata_ = sessionMetadata_; + } else { + result.sessionMetadata_ = sessionMetadataBuilder_.build(); + } + result.optimizeForStaticGraph_ = optimizeForStaticGraph_; + result.enableMlirBridge_ = enableMlirBridge_; + result.disableOutputPartitionGraphs_ = disableOutputPartitionGraphs_; + result.xlaFusionAutotunerThresh_ = xlaFusionAutotunerThresh_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.ConfigProto.Experimental) { + return mergeFrom((org.tensorflow.proto.framework.ConfigProto.Experimental)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.ConfigProto.Experimental other) { + if (other == org.tensorflow.proto.framework.ConfigProto.Experimental.getDefaultInstance()) return this; + if (!other.getCollectiveGroupLeader().isEmpty()) { + collectiveGroupLeader_ = other.collectiveGroupLeader_; + onChanged(); + } + if (!other.getExecutorType().isEmpty()) { + executorType_ = other.executorType_; + onChanged(); + } + if (other.getRecvBufMaxChunk() != 0) { + setRecvBufMaxChunk(other.getRecvBufMaxChunk()); + } + if (other.getUseNumaAffinity() != false) { + setUseNumaAffinity(other.getUseNumaAffinity()); + } + if (other.getCollectiveDeterministicSequentialExecution() != false) { + setCollectiveDeterministicSequentialExecution(other.getCollectiveDeterministicSequentialExecution()); + } + if (other.getCollectiveNccl() != false) { + setCollectiveNccl(other.getCollectiveNccl()); + } + if (other.getShareSessionStateInClusterspecPropagation() != false) { + setShareSessionStateInClusterspecPropagation(other.getShareSessionStateInClusterspecPropagation()); + } + if (other.getDisableThreadSpinning() != false) { + setDisableThreadSpinning(other.getDisableThreadSpinning()); + } + if (other.getShareClusterDevicesInSession() != false) { + setShareClusterDevicesInSession(other.getShareClusterDevicesInSession()); + } + if (other.hasSessionMetadata()) { + mergeSessionMetadata(other.getSessionMetadata()); + } + if (other.getOptimizeForStaticGraph() != false) { + setOptimizeForStaticGraph(other.getOptimizeForStaticGraph()); + } + if (other.getEnableMlirBridge() != false) { + setEnableMlirBridge(other.getEnableMlirBridge()); + } + if (other.getDisableOutputPartitionGraphs() != false) { + setDisableOutputPartitionGraphs(other.getDisableOutputPartitionGraphs()); + } + if (other.getXlaFusionAutotunerThresh() != 0L) { + setXlaFusionAutotunerThresh(other.getXlaFusionAutotunerThresh()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.ConfigProto.Experimental parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.ConfigProto.Experimental) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object collectiveGroupLeader_ = ""; + /** + *
+       * Task name for group resolution.
+       * 
+ * + * string collective_group_leader = 1; + */ + public java.lang.String getCollectiveGroupLeader() { + java.lang.Object ref = collectiveGroupLeader_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collectiveGroupLeader_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Task name for group resolution.
+       * 
+ * + * string collective_group_leader = 1; + */ + public com.google.protobuf.ByteString + getCollectiveGroupLeaderBytes() { + java.lang.Object ref = collectiveGroupLeader_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collectiveGroupLeader_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Task name for group resolution.
+       * 
+ * + * string collective_group_leader = 1; + */ + public Builder setCollectiveGroupLeader( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + collectiveGroupLeader_ = value; + onChanged(); + return this; + } + /** + *
+       * Task name for group resolution.
+       * 
+ * + * string collective_group_leader = 1; + */ + public Builder clearCollectiveGroupLeader() { + + collectiveGroupLeader_ = getDefaultInstance().getCollectiveGroupLeader(); + onChanged(); + return this; + } + /** + *
+       * Task name for group resolution.
+       * 
+ * + * string collective_group_leader = 1; + */ + public Builder setCollectiveGroupLeaderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + collectiveGroupLeader_ = value; + onChanged(); + return this; + } + + private java.lang.Object executorType_ = ""; + /** + *
+       * Which executor to use, the default executor will be used
+       * if it is an empty string or "DEFAULT"
+       * 
+ * + * string executor_type = 3; + */ + public java.lang.String getExecutorType() { + java.lang.Object ref = executorType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executorType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Which executor to use, the default executor will be used
+       * if it is an empty string or "DEFAULT"
+       * 
+ * + * string executor_type = 3; + */ + public com.google.protobuf.ByteString + getExecutorTypeBytes() { + java.lang.Object ref = executorType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + executorType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Which executor to use, the default executor will be used
+       * if it is an empty string or "DEFAULT"
+       * 
+ * + * string executor_type = 3; + */ + public Builder setExecutorType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + executorType_ = value; + onChanged(); + return this; + } + /** + *
+       * Which executor to use, the default executor will be used
+       * if it is an empty string or "DEFAULT"
+       * 
+ * + * string executor_type = 3; + */ + public Builder clearExecutorType() { + + executorType_ = getDefaultInstance().getExecutorType(); + onChanged(); + return this; + } + /** + *
+       * Which executor to use, the default executor will be used
+       * if it is an empty string or "DEFAULT"
+       * 
+ * + * string executor_type = 3; + */ + public Builder setExecutorTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + executorType_ = value; + onChanged(); + return this; + } + + private int recvBufMaxChunk_ ; + /** + *
+       * Guidance to formatting of large RecvBuf fields for transfer.
+       * Any positive value sets the max chunk size.  0 defaults to 4096.
+       * Any negative value indicates no max, i.e. one chunk only.
+       * 
+ * + * int32 recv_buf_max_chunk = 4; + */ + public int getRecvBufMaxChunk() { + return recvBufMaxChunk_; + } + /** + *
+       * Guidance to formatting of large RecvBuf fields for transfer.
+       * Any positive value sets the max chunk size.  0 defaults to 4096.
+       * Any negative value indicates no max, i.e. one chunk only.
+       * 
+ * + * int32 recv_buf_max_chunk = 4; + */ + public Builder setRecvBufMaxChunk(int value) { + + recvBufMaxChunk_ = value; + onChanged(); + return this; + } + /** + *
+       * Guidance to formatting of large RecvBuf fields for transfer.
+       * Any positive value sets the max chunk size.  0 defaults to 4096.
+       * Any negative value indicates no max, i.e. one chunk only.
+       * 
+ * + * int32 recv_buf_max_chunk = 4; + */ + public Builder clearRecvBufMaxChunk() { + + recvBufMaxChunk_ = 0; + onChanged(); + return this; + } + + private boolean useNumaAffinity_ ; + /** + *
+       * If true, and supported by the platform, the runtime will attempt to
+       * use NUMA affinity where applicable.  One consequence will be the
+       * existence of as many CPU devices as there are available NUMA nodes.
+       * 
+ * + * bool use_numa_affinity = 5; + */ + public boolean getUseNumaAffinity() { + return useNumaAffinity_; + } + /** + *
+       * If true, and supported by the platform, the runtime will attempt to
+       * use NUMA affinity where applicable.  One consequence will be the
+       * existence of as many CPU devices as there are available NUMA nodes.
+       * 
+ * + * bool use_numa_affinity = 5; + */ + public Builder setUseNumaAffinity(boolean value) { + + useNumaAffinity_ = value; + onChanged(); + return this; + } + /** + *
+       * If true, and supported by the platform, the runtime will attempt to
+       * use NUMA affinity where applicable.  One consequence will be the
+       * existence of as many CPU devices as there are available NUMA nodes.
+       * 
+ * + * bool use_numa_affinity = 5; + */ + public Builder clearUseNumaAffinity() { + + useNumaAffinity_ = false; + onChanged(); + return this; + } + + private boolean collectiveDeterministicSequentialExecution_ ; + /** + *
+       * If true, make collective op execution order sequential and deterministic
+       * for potentially concurrent collective instances.
+       * 
+ * + * bool collective_deterministic_sequential_execution = 6; + */ + public boolean getCollectiveDeterministicSequentialExecution() { + return collectiveDeterministicSequentialExecution_; + } + /** + *
+       * If true, make collective op execution order sequential and deterministic
+       * for potentially concurrent collective instances.
+       * 
+ * + * bool collective_deterministic_sequential_execution = 6; + */ + public Builder setCollectiveDeterministicSequentialExecution(boolean value) { + + collectiveDeterministicSequentialExecution_ = value; + onChanged(); + return this; + } + /** + *
+       * If true, make collective op execution order sequential and deterministic
+       * for potentially concurrent collective instances.
+       * 
+ * + * bool collective_deterministic_sequential_execution = 6; + */ + public Builder clearCollectiveDeterministicSequentialExecution() { + + collectiveDeterministicSequentialExecution_ = false; + onChanged(); + return this; + } + + private boolean collectiveNccl_ ; + /** + *
+       * If true, use NCCL for CollectiveOps.  This feature is highly
+       * experimental.
+       * 
+ * + * bool collective_nccl = 7; + */ + public boolean getCollectiveNccl() { + return collectiveNccl_; + } + /** + *
+       * If true, use NCCL for CollectiveOps.  This feature is highly
+       * experimental.
+       * 
+ * + * bool collective_nccl = 7; + */ + public Builder setCollectiveNccl(boolean value) { + + collectiveNccl_ = value; + onChanged(); + return this; + } + /** + *
+       * If true, use NCCL for CollectiveOps.  This feature is highly
+       * experimental.
+       * 
+ * + * bool collective_nccl = 7; + */ + public Builder clearCollectiveNccl() { + + collectiveNccl_ = false; + onChanged(); + return this; + } + + private boolean shareSessionStateInClusterspecPropagation_ ; + /** + *
+       * In the following, session state means the value of a variable, elements
+       * in a hash table, or any other resource, accessible by worker sessions
+       * held by a TF server.
+       * When ClusterSpec propagation is enabled, the value of
+       * isolate_session_state is ignored when deciding whether to share session
+       * states in a TF server (for backwards compatibility reasons).
+       * - If share_session_state_in_clusterspec_propagation is true, the session
+       * states are shared.
+       * - If share_session_state_in_clusterspec_propagation is false, session
+       * states are isolated.
+       * When clusterspec propagation is not used, the value of
+       * share_session_state_in_clusterspec_propagation is ignored when deciding
+       * whether to share session states in a TF server.
+       * - If isolate_session_state is true, session states are isolated.
+       * - If isolate_session_state is false, session states are shared.
+       * TODO(b/129330037): Add a single API that consistently treats
+       * isolate_session_state and ClusterSpec propagation.
+       * 
+ * + * bool share_session_state_in_clusterspec_propagation = 8; + */ + public boolean getShareSessionStateInClusterspecPropagation() { + return shareSessionStateInClusterspecPropagation_; + } + /** + *
+       * In the following, session state means the value of a variable, elements
+       * in a hash table, or any other resource, accessible by worker sessions
+       * held by a TF server.
+       * When ClusterSpec propagation is enabled, the value of
+       * isolate_session_state is ignored when deciding whether to share session
+       * states in a TF server (for backwards compatibility reasons).
+       * - If share_session_state_in_clusterspec_propagation is true, the session
+       * states are shared.
+       * - If share_session_state_in_clusterspec_propagation is false, session
+       * states are isolated.
+       * When clusterspec propagation is not used, the value of
+       * share_session_state_in_clusterspec_propagation is ignored when deciding
+       * whether to share session states in a TF server.
+       * - If isolate_session_state is true, session states are isolated.
+       * - If isolate_session_state is false, session states are shared.
+       * TODO(b/129330037): Add a single API that consistently treats
+       * isolate_session_state and ClusterSpec propagation.
+       * 
+ * + * bool share_session_state_in_clusterspec_propagation = 8; + */ + public Builder setShareSessionStateInClusterspecPropagation(boolean value) { + + shareSessionStateInClusterspecPropagation_ = value; + onChanged(); + return this; + } + /** + *
+       * In the following, session state means the value of a variable, elements
+       * in a hash table, or any other resource, accessible by worker sessions
+       * held by a TF server.
+       * When ClusterSpec propagation is enabled, the value of
+       * isolate_session_state is ignored when deciding whether to share session
+       * states in a TF server (for backwards compatibility reasons).
+       * - If share_session_state_in_clusterspec_propagation is true, the session
+       * states are shared.
+       * - If share_session_state_in_clusterspec_propagation is false, session
+       * states are isolated.
+       * When clusterspec propagation is not used, the value of
+       * share_session_state_in_clusterspec_propagation is ignored when deciding
+       * whether to share session states in a TF server.
+       * - If isolate_session_state is true, session states are isolated.
+       * - If isolate_session_state is false, session states are shared.
+       * TODO(b/129330037): Add a single API that consistently treats
+       * isolate_session_state and ClusterSpec propagation.
+       * 
+ * + * bool share_session_state_in_clusterspec_propagation = 8; + */ + public Builder clearShareSessionStateInClusterspecPropagation() { + + shareSessionStateInClusterspecPropagation_ = false; + onChanged(); + return this; + } + + private boolean disableThreadSpinning_ ; + /** + *
+       * If using a direct session, disable spinning while waiting for work in
+       * the thread pool. This may result in higher latency for completing ops,
+       * but in the case where there is a lot of spinning may result in lower
+       * CPU usage.
+       * 
+ * + * bool disable_thread_spinning = 9; + */ + public boolean getDisableThreadSpinning() { + return disableThreadSpinning_; + } + /** + *
+       * If using a direct session, disable spinning while waiting for work in
+       * the thread pool. This may result in higher latency for completing ops,
+       * but in the case where there is a lot of spinning may result in lower
+       * CPU usage.
+       * 
+ * + * bool disable_thread_spinning = 9; + */ + public Builder setDisableThreadSpinning(boolean value) { + + disableThreadSpinning_ = value; + onChanged(); + return this; + } + /** + *
+       * If using a direct session, disable spinning while waiting for work in
+       * the thread pool. This may result in higher latency for completing ops,
+       * but in the case where there is a lot of spinning may result in lower
+       * CPU usage.
+       * 
+ * + * bool disable_thread_spinning = 9; + */ + public Builder clearDisableThreadSpinning() { + + disableThreadSpinning_ = false; + onChanged(); + return this; + } + + private boolean shareClusterDevicesInSession_ ; + /** + *
+       * This was promoted to a non-experimental API. Please use
+       * ConfigProto.share_cluster_devices_in_session instead.
+       * 
+ * + * bool share_cluster_devices_in_session = 10; + */ + public boolean getShareClusterDevicesInSession() { + return shareClusterDevicesInSession_; + } + /** + *
+       * This was promoted to a non-experimental API. Please use
+       * ConfigProto.share_cluster_devices_in_session instead.
+       * 
+ * + * bool share_cluster_devices_in_session = 10; + */ + public Builder setShareClusterDevicesInSession(boolean value) { + + shareClusterDevicesInSession_ = value; + onChanged(); + return this; + } + /** + *
+       * This was promoted to a non-experimental API. Please use
+       * ConfigProto.share_cluster_devices_in_session instead.
+       * 
+ * + * bool share_cluster_devices_in_session = 10; + */ + public Builder clearShareClusterDevicesInSession() { + + shareClusterDevicesInSession_ = false; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.SessionMetadata sessionMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SessionMetadata, org.tensorflow.proto.framework.SessionMetadata.Builder, org.tensorflow.proto.framework.SessionMetadataOrBuilder> sessionMetadataBuilder_; + /** + *
+       * Metadata about the session.
+       * If set, this can be used by the runtime and the Ops for debugging,
+       * monitoring, etc.
+       * NOTE: This is currently used and propagated only by the direct session.
+       * 
+ * + * .tensorflow.SessionMetadata session_metadata = 11; + */ + public boolean hasSessionMetadata() { + return sessionMetadataBuilder_ != null || sessionMetadata_ != null; + } + /** + *
+       * Metadata about the session.
+       * If set, this can be used by the runtime and the Ops for debugging,
+       * monitoring, etc.
+       * NOTE: This is currently used and propagated only by the direct session.
+       * 
+ * + * .tensorflow.SessionMetadata session_metadata = 11; + */ + public org.tensorflow.proto.framework.SessionMetadata getSessionMetadata() { + if (sessionMetadataBuilder_ == null) { + return sessionMetadata_ == null ? org.tensorflow.proto.framework.SessionMetadata.getDefaultInstance() : sessionMetadata_; + } else { + return sessionMetadataBuilder_.getMessage(); + } + } + /** + *
+       * Metadata about the session.
+       * If set, this can be used by the runtime and the Ops for debugging,
+       * monitoring, etc.
+       * NOTE: This is currently used and propagated only by the direct session.
+       * 
+ * + * .tensorflow.SessionMetadata session_metadata = 11; + */ + public Builder setSessionMetadata(org.tensorflow.proto.framework.SessionMetadata value) { + if (sessionMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sessionMetadata_ = value; + onChanged(); + } else { + sessionMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Metadata about the session.
+       * If set, this can be used by the runtime and the Ops for debugging,
+       * monitoring, etc.
+       * NOTE: This is currently used and propagated only by the direct session.
+       * 
+ * + * .tensorflow.SessionMetadata session_metadata = 11; + */ + public Builder setSessionMetadata( + org.tensorflow.proto.framework.SessionMetadata.Builder builderForValue) { + if (sessionMetadataBuilder_ == null) { + sessionMetadata_ = builderForValue.build(); + onChanged(); + } else { + sessionMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Metadata about the session.
+       * If set, this can be used by the runtime and the Ops for debugging,
+       * monitoring, etc.
+       * NOTE: This is currently used and propagated only by the direct session.
+       * 
+ * + * .tensorflow.SessionMetadata session_metadata = 11; + */ + public Builder mergeSessionMetadata(org.tensorflow.proto.framework.SessionMetadata value) { + if (sessionMetadataBuilder_ == null) { + if (sessionMetadata_ != null) { + sessionMetadata_ = + org.tensorflow.proto.framework.SessionMetadata.newBuilder(sessionMetadata_).mergeFrom(value).buildPartial(); + } else { + sessionMetadata_ = value; + } + onChanged(); + } else { + sessionMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Metadata about the session.
+       * If set, this can be used by the runtime and the Ops for debugging,
+       * monitoring, etc.
+       * NOTE: This is currently used and propagated only by the direct session.
+       * 
+ * + * .tensorflow.SessionMetadata session_metadata = 11; + */ + public Builder clearSessionMetadata() { + if (sessionMetadataBuilder_ == null) { + sessionMetadata_ = null; + onChanged(); + } else { + sessionMetadata_ = null; + sessionMetadataBuilder_ = null; + } + + return this; + } + /** + *
+       * Metadata about the session.
+       * If set, this can be used by the runtime and the Ops for debugging,
+       * monitoring, etc.
+       * NOTE: This is currently used and propagated only by the direct session.
+       * 
+ * + * .tensorflow.SessionMetadata session_metadata = 11; + */ + public org.tensorflow.proto.framework.SessionMetadata.Builder getSessionMetadataBuilder() { + + onChanged(); + return getSessionMetadataFieldBuilder().getBuilder(); + } + /** + *
+       * Metadata about the session.
+       * If set, this can be used by the runtime and the Ops for debugging,
+       * monitoring, etc.
+       * NOTE: This is currently used and propagated only by the direct session.
+       * 
+ * + * .tensorflow.SessionMetadata session_metadata = 11; + */ + public org.tensorflow.proto.framework.SessionMetadataOrBuilder getSessionMetadataOrBuilder() { + if (sessionMetadataBuilder_ != null) { + return sessionMetadataBuilder_.getMessageOrBuilder(); + } else { + return sessionMetadata_ == null ? + org.tensorflow.proto.framework.SessionMetadata.getDefaultInstance() : sessionMetadata_; + } + } + /** + *
+       * Metadata about the session.
+       * If set, this can be used by the runtime and the Ops for debugging,
+       * monitoring, etc.
+       * NOTE: This is currently used and propagated only by the direct session.
+       * 
+ * + * .tensorflow.SessionMetadata session_metadata = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SessionMetadata, org.tensorflow.proto.framework.SessionMetadata.Builder, org.tensorflow.proto.framework.SessionMetadataOrBuilder> + getSessionMetadataFieldBuilder() { + if (sessionMetadataBuilder_ == null) { + sessionMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SessionMetadata, org.tensorflow.proto.framework.SessionMetadata.Builder, org.tensorflow.proto.framework.SessionMetadataOrBuilder>( + getSessionMetadata(), + getParentForChildren(), + isClean()); + sessionMetadata_ = null; + } + return sessionMetadataBuilder_; + } + + private boolean optimizeForStaticGraph_ ; + /** + *
+       * If true, the session may treat the graph as being static for optimization
+       * purposes.
+       * If this option is set to true when a session is created, the full
+       * GraphDef must be passed in a single call to Session::Create(), and
+       * Session::Extend() may not be supported.
+       * 
+ * + * bool optimize_for_static_graph = 12; + */ + public boolean getOptimizeForStaticGraph() { + return optimizeForStaticGraph_; + } + /** + *
+       * If true, the session may treat the graph as being static for optimization
+       * purposes.
+       * If this option is set to true when a session is created, the full
+       * GraphDef must be passed in a single call to Session::Create(), and
+       * Session::Extend() may not be supported.
+       * 
+ * + * bool optimize_for_static_graph = 12; + */ + public Builder setOptimizeForStaticGraph(boolean value) { + + optimizeForStaticGraph_ = value; + onChanged(); + return this; + } + /** + *
+       * If true, the session may treat the graph as being static for optimization
+       * purposes.
+       * If this option is set to true when a session is created, the full
+       * GraphDef must be passed in a single call to Session::Create(), and
+       * Session::Extend() may not be supported.
+       * 
+ * + * bool optimize_for_static_graph = 12; + */ + public Builder clearOptimizeForStaticGraph() { + + optimizeForStaticGraph_ = false; + onChanged(); + return this; + } + + private boolean enableMlirBridge_ ; + /** + *
+       * Whether to enable the MLIR-based TF->XLA bridge.
+       * This is a replacement to the existing bridge, and not ready for
+       * production usage yet.
+       * If this option is set to true when a session is created, MLIR is used to
+       * perform the set of graph transformations to put the graph in a form that
+       * can be executed with delegation of some computations to an accelerator.
+       * This builds on the model of XLA where a subset of the graph is
+       * encapsulated and attached to a "compile" operation, whose result is fed
+       * to an "execute" operation. The kernel for these operations is responsible
+       * to lower the encapsulated graph to a particular device.
+       * 
+ * + * bool enable_mlir_bridge = 13; + */ + public boolean getEnableMlirBridge() { + return enableMlirBridge_; + } + /** + *
+       * Whether to enable the MLIR-based TF->XLA bridge.
+       * This is a replacement to the existing bridge, and not ready for
+       * production usage yet.
+       * If this option is set to true when a session is created, MLIR is used to
+       * perform the set of graph transformations to put the graph in a form that
+       * can be executed with delegation of some computations to an accelerator.
+       * This builds on the model of XLA where a subset of the graph is
+       * encapsulated and attached to a "compile" operation, whose result is fed
+       * to an "execute" operation. The kernel for these operations is responsible
+       * to lower the encapsulated graph to a particular device.
+       * 
+ * + * bool enable_mlir_bridge = 13; + */ + public Builder setEnableMlirBridge(boolean value) { + + enableMlirBridge_ = value; + onChanged(); + return this; + } + /** + *
+       * Whether to enable the MLIR-based TF->XLA bridge.
+       * This is a replacement to the existing bridge, and not ready for
+       * production usage yet.
+       * If this option is set to true when a session is created, MLIR is used to
+       * perform the set of graph transformations to put the graph in a form that
+       * can be executed with delegation of some computations to an accelerator.
+       * This builds on the model of XLA where a subset of the graph is
+       * encapsulated and attached to a "compile" operation, whose result is fed
+       * to an "execute" operation. The kernel for these operations is responsible
+       * to lower the encapsulated graph to a particular device.
+       * 
+ * + * bool enable_mlir_bridge = 13; + */ + public Builder clearEnableMlirBridge() { + + enableMlirBridge_ = false; + onChanged(); + return this; + } + + private boolean disableOutputPartitionGraphs_ ; + /** + *
+       * If true, the session will not store an additional copy of the graph for
+       * each subgraph.
+       * If this option is set to true when a session is created, the
+       * `RunOptions.output_partition_graphs` options must not be set.
+       * 
+ * + * bool disable_output_partition_graphs = 14; + */ + public boolean getDisableOutputPartitionGraphs() { + return disableOutputPartitionGraphs_; + } + /** + *
+       * If true, the session will not store an additional copy of the graph for
+       * each subgraph.
+       * If this option is set to true when a session is created, the
+       * `RunOptions.output_partition_graphs` options must not be set.
+       * 
+ * + * bool disable_output_partition_graphs = 14; + */ + public Builder setDisableOutputPartitionGraphs(boolean value) { + + disableOutputPartitionGraphs_ = value; + onChanged(); + return this; + } + /** + *
+       * If true, the session will not store an additional copy of the graph for
+       * each subgraph.
+       * If this option is set to true when a session is created, the
+       * `RunOptions.output_partition_graphs` options must not be set.
+       * 
+ * + * bool disable_output_partition_graphs = 14; + */ + public Builder clearDisableOutputPartitionGraphs() { + + disableOutputPartitionGraphs_ = false; + onChanged(); + return this; + } + + private long xlaFusionAutotunerThresh_ ; + /** + *
+       * Minimum number of batches run through the XLA graph before XLA fusion
+       * autotuner is enabled. Default value of zero disables the autotuner.
+       * The XLA fusion autotuner can improve performance by executing a heuristic
+       * search on the compiler parameters.
+       * 
+ * + * int64 xla_fusion_autotuner_thresh = 15; + */ + public long getXlaFusionAutotunerThresh() { + return xlaFusionAutotunerThresh_; + } + /** + *
+       * Minimum number of batches run through the XLA graph before XLA fusion
+       * autotuner is enabled. Default value of zero disables the autotuner.
+       * The XLA fusion autotuner can improve performance by executing a heuristic
+       * search on the compiler parameters.
+       * 
+ * + * int64 xla_fusion_autotuner_thresh = 15; + */ + public Builder setXlaFusionAutotunerThresh(long value) { + + xlaFusionAutotunerThresh_ = value; + onChanged(); + return this; + } + /** + *
+       * Minimum number of batches run through the XLA graph before XLA fusion
+       * autotuner is enabled. Default value of zero disables the autotuner.
+       * The XLA fusion autotuner can improve performance by executing a heuristic
+       * search on the compiler parameters.
+       * 
+ * + * int64 xla_fusion_autotuner_thresh = 15; + */ + public Builder clearXlaFusionAutotunerThresh() { + + xlaFusionAutotunerThresh_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ConfigProto.Experimental) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ConfigProto.Experimental) + private static final org.tensorflow.proto.framework.ConfigProto.Experimental DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.ConfigProto.Experimental(); + } + + public static org.tensorflow.proto.framework.ConfigProto.Experimental getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Experimental parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Experimental(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ConfigProto.Experimental getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int DEVICE_COUNT_FIELD_NUMBER = 1; + private static final class DeviceCountDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.Integer> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_DeviceCountEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.INT32, + 0); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.Integer> deviceCount_; + private com.google.protobuf.MapField + internalGetDeviceCount() { + if (deviceCount_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DeviceCountDefaultEntryHolder.defaultEntry); + } + return deviceCount_; + } + + public int getDeviceCountCount() { + return internalGetDeviceCount().getMap().size(); + } + /** + *
+   * 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.
+   * 
+ * + * map<string, int32> device_count = 1; + */ + + public boolean containsDeviceCount( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetDeviceCount().getMap().containsKey(key); + } + /** + * Use {@link #getDeviceCountMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getDeviceCount() { + return getDeviceCountMap(); + } + /** + *
+   * 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.
+   * 
+ * + * map<string, int32> device_count = 1; + */ + + public java.util.Map getDeviceCountMap() { + return internalGetDeviceCount().getMap(); + } + /** + *
+   * 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.
+   * 
+ * + * map<string, int32> device_count = 1; + */ + + public int getDeviceCountOrDefault( + java.lang.String key, + int defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetDeviceCount().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * 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.
+   * 
+ * + * map<string, int32> device_count = 1; + */ + + public int getDeviceCountOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetDeviceCount().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int INTRA_OP_PARALLELISM_THREADS_FIELD_NUMBER = 2; + private int intraOpParallelismThreads_; + /** + *
+   * 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.
+   * If you create an ordinary session, e.g., from Python or C++,
+   * then there is exactly one intra op thread pool per process.
+   * The first session created determines the number of threads in this pool.
+   * All subsequent sessions reuse/share this one global pool.
+   * There are notable exceptions to the default behavior describe above:
+   * 1. There is an environment variable  for overriding this thread pool,
+   *    named TF_OVERRIDE_GLOBAL_THREADPOOL.
+   * 2. When connecting to a server, such as a remote `tf.train.Server`
+   *    instance, then this option will be ignored altogether.
+   * 
+ * + * int32 intra_op_parallelism_threads = 2; + */ + public int getIntraOpParallelismThreads() { + return intraOpParallelismThreads_; + } + + public static final int INTER_OP_PARALLELISM_THREADS_FIELD_NUMBER = 5; + private int interOpParallelismThreads_; + /** + *
+   * 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.
+   * Negative means all operations are performed in caller's thread.
+   * 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 or session_inter_op_thread_pool is configured.
+   * 
+ * + * int32 inter_op_parallelism_threads = 5; + */ + public int getInterOpParallelismThreads() { + return interOpParallelismThreads_; + } + + public static final int USE_PER_SESSION_THREADS_FIELD_NUMBER = 9; + private boolean usePerSessionThreads_; + /** + *
+   * 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, or the
+   * per-session thread pools configured by session_inter_op_thread_pool.
+   * This option is deprecated. The same effect can be achieved by setting
+   * session_inter_op_thread_pool to have one element, whose num_threads equals
+   * inter_op_parallelism_threads.
+   * 
+ * + * bool use_per_session_threads = 9; + */ + public boolean getUsePerSessionThreads() { + return usePerSessionThreads_; + } + + public static final int SESSION_INTER_OP_THREAD_POOL_FIELD_NUMBER = 12; + private java.util.List sessionInterOpThreadPool_; + /** + *
+   * This option is experimental - it may be replaced with a different mechanism
+   * in the future.
+   * Configures session thread pools. If this is configured, then RunOptions for
+   * a Run call can select the thread pool to use.
+   * The intended use is for when some session invocations need to run in a
+   * background pool limited to a small number of threads:
+   * - For example, a session may be configured to have one large pool (for
+   * regular compute) and one small pool (for periodic, low priority work);
+   * using the small pool is currently the mechanism for limiting the inter-op
+   * parallelism of the low priority work.  Note that it does not limit the
+   * parallelism of work spawned by a single op kernel implementation.
+   * - Using this setting is normally not needed in training, but may help some
+   * serving use cases.
+   * - It is also generally recommended to set the global_name field of this
+   * proto, to avoid creating multiple large pools. It is typically better to
+   * run the non-low-priority work, even across sessions, in a single large
+   * pool.
+   * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public java.util.List getSessionInterOpThreadPoolList() { + return sessionInterOpThreadPool_; + } + /** + *
+   * This option is experimental - it may be replaced with a different mechanism
+   * in the future.
+   * Configures session thread pools. If this is configured, then RunOptions for
+   * a Run call can select the thread pool to use.
+   * The intended use is for when some session invocations need to run in a
+   * background pool limited to a small number of threads:
+   * - For example, a session may be configured to have one large pool (for
+   * regular compute) and one small pool (for periodic, low priority work);
+   * using the small pool is currently the mechanism for limiting the inter-op
+   * parallelism of the low priority work.  Note that it does not limit the
+   * parallelism of work spawned by a single op kernel implementation.
+   * - Using this setting is normally not needed in training, but may help some
+   * serving use cases.
+   * - It is also generally recommended to set the global_name field of this
+   * proto, to avoid creating multiple large pools. It is typically better to
+   * run the non-low-priority work, even across sessions, in a single large
+   * pool.
+   * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public java.util.List + getSessionInterOpThreadPoolOrBuilderList() { + return sessionInterOpThreadPool_; + } + /** + *
+   * This option is experimental - it may be replaced with a different mechanism
+   * in the future.
+   * Configures session thread pools. If this is configured, then RunOptions for
+   * a Run call can select the thread pool to use.
+   * The intended use is for when some session invocations need to run in a
+   * background pool limited to a small number of threads:
+   * - For example, a session may be configured to have one large pool (for
+   * regular compute) and one small pool (for periodic, low priority work);
+   * using the small pool is currently the mechanism for limiting the inter-op
+   * parallelism of the low priority work.  Note that it does not limit the
+   * parallelism of work spawned by a single op kernel implementation.
+   * - Using this setting is normally not needed in training, but may help some
+   * serving use cases.
+   * - It is also generally recommended to set the global_name field of this
+   * proto, to avoid creating multiple large pools. It is typically better to
+   * run the non-low-priority work, even across sessions, in a single large
+   * pool.
+   * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public int getSessionInterOpThreadPoolCount() { + return sessionInterOpThreadPool_.size(); + } + /** + *
+   * This option is experimental - it may be replaced with a different mechanism
+   * in the future.
+   * Configures session thread pools. If this is configured, then RunOptions for
+   * a Run call can select the thread pool to use.
+   * The intended use is for when some session invocations need to run in a
+   * background pool limited to a small number of threads:
+   * - For example, a session may be configured to have one large pool (for
+   * regular compute) and one small pool (for periodic, low priority work);
+   * using the small pool is currently the mechanism for limiting the inter-op
+   * parallelism of the low priority work.  Note that it does not limit the
+   * parallelism of work spawned by a single op kernel implementation.
+   * - Using this setting is normally not needed in training, but may help some
+   * serving use cases.
+   * - It is also generally recommended to set the global_name field of this
+   * proto, to avoid creating multiple large pools. It is typically better to
+   * run the non-low-priority work, even across sessions, in a single large
+   * pool.
+   * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public org.tensorflow.proto.framework.ThreadPoolOptionProto getSessionInterOpThreadPool(int index) { + return sessionInterOpThreadPool_.get(index); + } + /** + *
+   * This option is experimental - it may be replaced with a different mechanism
+   * in the future.
+   * Configures session thread pools. If this is configured, then RunOptions for
+   * a Run call can select the thread pool to use.
+   * The intended use is for when some session invocations need to run in a
+   * background pool limited to a small number of threads:
+   * - For example, a session may be configured to have one large pool (for
+   * regular compute) and one small pool (for periodic, low priority work);
+   * using the small pool is currently the mechanism for limiting the inter-op
+   * parallelism of the low priority work.  Note that it does not limit the
+   * parallelism of work spawned by a single op kernel implementation.
+   * - Using this setting is normally not needed in training, but may help some
+   * serving use cases.
+   * - It is also generally recommended to set the global_name field of this
+   * proto, to avoid creating multiple large pools. It is typically better to
+   * run the non-low-priority work, even across sessions, in a single large
+   * pool.
+   * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public org.tensorflow.proto.framework.ThreadPoolOptionProtoOrBuilder getSessionInterOpThreadPoolOrBuilder( + int index) { + return sessionInterOpThreadPool_.get(index); + } + + public static final int PLACEMENT_PERIOD_FIELD_NUMBER = 3; + private int placementPeriod_; + /** + *
+   * 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).
+   * 
+ * + * int32 placement_period = 3; + */ + public int getPlacementPeriod() { + return placementPeriod_; + } + + public static final int DEVICE_FILTERS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList deviceFilters_; + /** + *
+   * 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.
+   * 
+ * + * repeated string device_filters = 4; + */ + public com.google.protobuf.ProtocolStringList + getDeviceFiltersList() { + return deviceFilters_; + } + /** + *
+   * 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.
+   * 
+ * + * repeated string device_filters = 4; + */ + public int getDeviceFiltersCount() { + return deviceFilters_.size(); + } + /** + *
+   * 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.
+   * 
+ * + * repeated string device_filters = 4; + */ + public java.lang.String getDeviceFilters(int index) { + return deviceFilters_.get(index); + } + /** + *
+   * 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.
+   * 
+ * + * repeated string device_filters = 4; + */ + public com.google.protobuf.ByteString + getDeviceFiltersBytes(int index) { + return deviceFilters_.getByteString(index); + } + + public static final int GPU_OPTIONS_FIELD_NUMBER = 6; + private org.tensorflow.proto.framework.GPUOptions gpuOptions_; + /** + *
+   * Options that apply to all GPUs.
+   * 
+ * + * .tensorflow.GPUOptions gpu_options = 6; + */ + public boolean hasGpuOptions() { + return gpuOptions_ != null; + } + /** + *
+   * Options that apply to all GPUs.
+   * 
+ * + * .tensorflow.GPUOptions gpu_options = 6; + */ + public org.tensorflow.proto.framework.GPUOptions getGpuOptions() { + return gpuOptions_ == null ? org.tensorflow.proto.framework.GPUOptions.getDefaultInstance() : gpuOptions_; + } + /** + *
+   * Options that apply to all GPUs.
+   * 
+ * + * .tensorflow.GPUOptions gpu_options = 6; + */ + public org.tensorflow.proto.framework.GPUOptionsOrBuilder getGpuOptionsOrBuilder() { + return getGpuOptions(); + } + + public static final int ALLOW_SOFT_PLACEMENT_FIELD_NUMBER = 7; + private boolean allowSoftPlacement_; + /** + *
+   * 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.
+   * 
+ * + * bool allow_soft_placement = 7; + */ + public boolean getAllowSoftPlacement() { + return allowSoftPlacement_; + } + + public static final int LOG_DEVICE_PLACEMENT_FIELD_NUMBER = 8; + private boolean logDevicePlacement_; + /** + *
+   * Whether device placements should be logged.
+   * 
+ * + * bool log_device_placement = 8; + */ + public boolean getLogDevicePlacement() { + return logDevicePlacement_; + } + + public static final int GRAPH_OPTIONS_FIELD_NUMBER = 10; + private org.tensorflow.proto.framework.GraphOptions graphOptions_; + /** + *
+   * Options that apply to all graphs.
+   * 
+ * + * .tensorflow.GraphOptions graph_options = 10; + */ + public boolean hasGraphOptions() { + return graphOptions_ != null; + } + /** + *
+   * Options that apply to all graphs.
+   * 
+ * + * .tensorflow.GraphOptions graph_options = 10; + */ + public org.tensorflow.proto.framework.GraphOptions getGraphOptions() { + return graphOptions_ == null ? org.tensorflow.proto.framework.GraphOptions.getDefaultInstance() : graphOptions_; + } + /** + *
+   * Options that apply to all graphs.
+   * 
+ * + * .tensorflow.GraphOptions graph_options = 10; + */ + public org.tensorflow.proto.framework.GraphOptionsOrBuilder getGraphOptionsOrBuilder() { + return getGraphOptions(); + } + + public static final int OPERATION_TIMEOUT_IN_MS_FIELD_NUMBER = 11; + private long operationTimeoutInMs_; + /** + *
+   * Global timeout for all blocking operations in this session.  If non-zero,
+   * and not overridden on a per-operation basis, this value will be used as the
+   * deadline for all blocking operations.
+   * 
+ * + * int64 operation_timeout_in_ms = 11; + */ + public long getOperationTimeoutInMs() { + return operationTimeoutInMs_; + } + + public static final int RPC_OPTIONS_FIELD_NUMBER = 13; + private org.tensorflow.proto.framework.RPCOptions rpcOptions_; + /** + *
+   * Options that apply when this session uses the distributed runtime.
+   * 
+ * + * .tensorflow.RPCOptions rpc_options = 13; + */ + public boolean hasRpcOptions() { + return rpcOptions_ != null; + } + /** + *
+   * Options that apply when this session uses the distributed runtime.
+   * 
+ * + * .tensorflow.RPCOptions rpc_options = 13; + */ + public org.tensorflow.proto.framework.RPCOptions getRpcOptions() { + return rpcOptions_ == null ? org.tensorflow.proto.framework.RPCOptions.getDefaultInstance() : rpcOptions_; + } + /** + *
+   * Options that apply when this session uses the distributed runtime.
+   * 
+ * + * .tensorflow.RPCOptions rpc_options = 13; + */ + public org.tensorflow.proto.framework.RPCOptionsOrBuilder getRpcOptionsOrBuilder() { + return getRpcOptions(); + } + + public static final int CLUSTER_DEF_FIELD_NUMBER = 14; + private org.tensorflow.proto.distruntime.ClusterDef clusterDef_; + /** + *
+   * Optional list of all workers to use in this session.
+   * 
+ * + * .tensorflow.ClusterDef cluster_def = 14; + */ + public boolean hasClusterDef() { + return clusterDef_ != null; + } + /** + *
+   * Optional list of all workers to use in this session.
+   * 
+ * + * .tensorflow.ClusterDef cluster_def = 14; + */ + public org.tensorflow.proto.distruntime.ClusterDef getClusterDef() { + return clusterDef_ == null ? org.tensorflow.proto.distruntime.ClusterDef.getDefaultInstance() : clusterDef_; + } + /** + *
+   * Optional list of all workers to use in this session.
+   * 
+ * + * .tensorflow.ClusterDef cluster_def = 14; + */ + public org.tensorflow.proto.distruntime.ClusterDefOrBuilder getClusterDefOrBuilder() { + return getClusterDef(); + } + + public static final int ISOLATE_SESSION_STATE_FIELD_NUMBER = 15; + private boolean isolateSessionState_; + /** + *
+   * If true, any resources such as Variables used in the session will not be
+   * shared with other sessions. However, when clusterspec propagation is
+   * enabled, this field is ignored and sessions are always isolated.
+   * 
+ * + * bool isolate_session_state = 15; + */ + public boolean getIsolateSessionState() { + return isolateSessionState_; + } + + public static final int SHARE_CLUSTER_DEVICES_IN_SESSION_FIELD_NUMBER = 17; + private boolean shareClusterDevicesInSession_; + /** + *
+   * When true, WorkerSessions are created with device attributes from the
+   * full cluster.
+   * This is helpful when a worker wants to partition a graph
+   * (for example during a PartitionedCallOp).
+   * 
+ * + * bool share_cluster_devices_in_session = 17; + */ + public boolean getShareClusterDevicesInSession() { + return shareClusterDevicesInSession_; + } + + public static final int EXPERIMENTAL_FIELD_NUMBER = 16; + private org.tensorflow.proto.framework.ConfigProto.Experimental experimental_; + /** + * .tensorflow.ConfigProto.Experimental experimental = 16; + */ + public boolean hasExperimental() { + return experimental_ != null; + } + /** + * .tensorflow.ConfigProto.Experimental experimental = 16; + */ + public org.tensorflow.proto.framework.ConfigProto.Experimental getExperimental() { + return experimental_ == null ? org.tensorflow.proto.framework.ConfigProto.Experimental.getDefaultInstance() : experimental_; + } + /** + * .tensorflow.ConfigProto.Experimental experimental = 16; + */ + public org.tensorflow.proto.framework.ConfigProto.ExperimentalOrBuilder getExperimentalOrBuilder() { + return getExperimental(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetDeviceCount(), + DeviceCountDefaultEntryHolder.defaultEntry, + 1); + if (intraOpParallelismThreads_ != 0) { + output.writeInt32(2, intraOpParallelismThreads_); + } + if (placementPeriod_ != 0) { + output.writeInt32(3, placementPeriod_); + } + for (int i = 0; i < deviceFilters_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, deviceFilters_.getRaw(i)); + } + if (interOpParallelismThreads_ != 0) { + output.writeInt32(5, interOpParallelismThreads_); + } + if (gpuOptions_ != null) { + output.writeMessage(6, getGpuOptions()); + } + if (allowSoftPlacement_ != false) { + output.writeBool(7, allowSoftPlacement_); + } + if (logDevicePlacement_ != false) { + output.writeBool(8, logDevicePlacement_); + } + if (usePerSessionThreads_ != false) { + output.writeBool(9, usePerSessionThreads_); + } + if (graphOptions_ != null) { + output.writeMessage(10, getGraphOptions()); + } + if (operationTimeoutInMs_ != 0L) { + output.writeInt64(11, operationTimeoutInMs_); + } + for (int i = 0; i < sessionInterOpThreadPool_.size(); i++) { + output.writeMessage(12, sessionInterOpThreadPool_.get(i)); + } + if (rpcOptions_ != null) { + output.writeMessage(13, getRpcOptions()); + } + if (clusterDef_ != null) { + output.writeMessage(14, getClusterDef()); + } + if (isolateSessionState_ != false) { + output.writeBool(15, isolateSessionState_); + } + if (experimental_ != null) { + output.writeMessage(16, getExperimental()); + } + if (shareClusterDevicesInSession_ != false) { + output.writeBool(17, shareClusterDevicesInSession_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetDeviceCount().getMap().entrySet()) { + com.google.protobuf.MapEntry + deviceCount__ = DeviceCountDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, deviceCount__); + } + if (intraOpParallelismThreads_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, intraOpParallelismThreads_); + } + if (placementPeriod_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, placementPeriod_); + } + { + int dataSize = 0; + for (int i = 0; i < deviceFilters_.size(); i++) { + dataSize += computeStringSizeNoTag(deviceFilters_.getRaw(i)); + } + size += dataSize; + size += 1 * getDeviceFiltersList().size(); + } + if (interOpParallelismThreads_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, interOpParallelismThreads_); + } + if (gpuOptions_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getGpuOptions()); + } + if (allowSoftPlacement_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, allowSoftPlacement_); + } + if (logDevicePlacement_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, logDevicePlacement_); + } + if (usePerSessionThreads_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, usePerSessionThreads_); + } + if (graphOptions_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getGraphOptions()); + } + if (operationTimeoutInMs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(11, operationTimeoutInMs_); + } + for (int i = 0; i < sessionInterOpThreadPool_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, sessionInterOpThreadPool_.get(i)); + } + if (rpcOptions_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, getRpcOptions()); + } + if (clusterDef_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getClusterDef()); + } + if (isolateSessionState_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(15, isolateSessionState_); + } + if (experimental_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getExperimental()); + } + if (shareClusterDevicesInSession_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(17, shareClusterDevicesInSession_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.ConfigProto)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.ConfigProto other = (org.tensorflow.proto.framework.ConfigProto) obj; + + if (!internalGetDeviceCount().equals( + other.internalGetDeviceCount())) return false; + if (getIntraOpParallelismThreads() + != other.getIntraOpParallelismThreads()) return false; + if (getInterOpParallelismThreads() + != other.getInterOpParallelismThreads()) return false; + if (getUsePerSessionThreads() + != other.getUsePerSessionThreads()) return false; + if (!getSessionInterOpThreadPoolList() + .equals(other.getSessionInterOpThreadPoolList())) return false; + if (getPlacementPeriod() + != other.getPlacementPeriod()) return false; + if (!getDeviceFiltersList() + .equals(other.getDeviceFiltersList())) return false; + if (hasGpuOptions() != other.hasGpuOptions()) return false; + if (hasGpuOptions()) { + if (!getGpuOptions() + .equals(other.getGpuOptions())) return false; + } + if (getAllowSoftPlacement() + != other.getAllowSoftPlacement()) return false; + if (getLogDevicePlacement() + != other.getLogDevicePlacement()) return false; + if (hasGraphOptions() != other.hasGraphOptions()) return false; + if (hasGraphOptions()) { + if (!getGraphOptions() + .equals(other.getGraphOptions())) return false; + } + if (getOperationTimeoutInMs() + != other.getOperationTimeoutInMs()) return false; + if (hasRpcOptions() != other.hasRpcOptions()) return false; + if (hasRpcOptions()) { + if (!getRpcOptions() + .equals(other.getRpcOptions())) return false; + } + if (hasClusterDef() != other.hasClusterDef()) return false; + if (hasClusterDef()) { + if (!getClusterDef() + .equals(other.getClusterDef())) return false; + } + if (getIsolateSessionState() + != other.getIsolateSessionState()) return false; + if (getShareClusterDevicesInSession() + != other.getShareClusterDevicesInSession()) return false; + if (hasExperimental() != other.hasExperimental()) return false; + if (hasExperimental()) { + if (!getExperimental() + .equals(other.getExperimental())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetDeviceCount().getMap().isEmpty()) { + hash = (37 * hash) + DEVICE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + internalGetDeviceCount().hashCode(); + } + hash = (37 * hash) + INTRA_OP_PARALLELISM_THREADS_FIELD_NUMBER; + hash = (53 * hash) + getIntraOpParallelismThreads(); + hash = (37 * hash) + INTER_OP_PARALLELISM_THREADS_FIELD_NUMBER; + hash = (53 * hash) + getInterOpParallelismThreads(); + hash = (37 * hash) + USE_PER_SESSION_THREADS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUsePerSessionThreads()); + if (getSessionInterOpThreadPoolCount() > 0) { + hash = (37 * hash) + SESSION_INTER_OP_THREAD_POOL_FIELD_NUMBER; + hash = (53 * hash) + getSessionInterOpThreadPoolList().hashCode(); + } + hash = (37 * hash) + PLACEMENT_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + getPlacementPeriod(); + if (getDeviceFiltersCount() > 0) { + hash = (37 * hash) + DEVICE_FILTERS_FIELD_NUMBER; + hash = (53 * hash) + getDeviceFiltersList().hashCode(); + } + if (hasGpuOptions()) { + hash = (37 * hash) + GPU_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getGpuOptions().hashCode(); + } + hash = (37 * hash) + ALLOW_SOFT_PLACEMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowSoftPlacement()); + hash = (37 * hash) + LOG_DEVICE_PLACEMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getLogDevicePlacement()); + if (hasGraphOptions()) { + hash = (37 * hash) + GRAPH_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getGraphOptions().hashCode(); + } + hash = (37 * hash) + OPERATION_TIMEOUT_IN_MS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOperationTimeoutInMs()); + if (hasRpcOptions()) { + hash = (37 * hash) + RPC_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getRpcOptions().hashCode(); + } + if (hasClusterDef()) { + hash = (37 * hash) + CLUSTER_DEF_FIELD_NUMBER; + hash = (53 * hash) + getClusterDef().hashCode(); + } + hash = (37 * hash) + ISOLATE_SESSION_STATE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsolateSessionState()); + hash = (37 * hash) + SHARE_CLUSTER_DEVICES_IN_SESSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getShareClusterDevicesInSession()); + if (hasExperimental()) { + hash = (37 * hash) + EXPERIMENTAL_FIELD_NUMBER; + hash = (53 * hash) + getExperimental().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.ConfigProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ConfigProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ConfigProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ConfigProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ConfigProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ConfigProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ConfigProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ConfigProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ConfigProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ConfigProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ConfigProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ConfigProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.ConfigProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Session configuration parameters.
+   * The system picks appropriate values for fields that are not set.
+   * 
+ * + * Protobuf type {@code tensorflow.ConfigProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ConfigProto) + org.tensorflow.proto.framework.ConfigProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetDeviceCount(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableDeviceCount(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ConfigProto.class, org.tensorflow.proto.framework.ConfigProto.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.ConfigProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSessionInterOpThreadPoolFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableDeviceCount().clear(); + intraOpParallelismThreads_ = 0; + + interOpParallelismThreads_ = 0; + + usePerSessionThreads_ = false; + + if (sessionInterOpThreadPoolBuilder_ == null) { + sessionInterOpThreadPool_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + sessionInterOpThreadPoolBuilder_.clear(); + } + placementPeriod_ = 0; + + deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + if (gpuOptionsBuilder_ == null) { + gpuOptions_ = null; + } else { + gpuOptions_ = null; + gpuOptionsBuilder_ = null; + } + allowSoftPlacement_ = false; + + logDevicePlacement_ = false; + + if (graphOptionsBuilder_ == null) { + graphOptions_ = null; + } else { + graphOptions_ = null; + graphOptionsBuilder_ = null; + } + operationTimeoutInMs_ = 0L; + + if (rpcOptionsBuilder_ == null) { + rpcOptions_ = null; + } else { + rpcOptions_ = null; + rpcOptionsBuilder_ = null; + } + if (clusterDefBuilder_ == null) { + clusterDef_ = null; + } else { + clusterDef_ = null; + clusterDefBuilder_ = null; + } + isolateSessionState_ = false; + + shareClusterDevicesInSession_ = false; + + if (experimentalBuilder_ == null) { + experimental_ = null; + } else { + experimental_ = null; + experimentalBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ConfigProto getDefaultInstanceForType() { + return org.tensorflow.proto.framework.ConfigProto.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.ConfigProto build() { + org.tensorflow.proto.framework.ConfigProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ConfigProto buildPartial() { + org.tensorflow.proto.framework.ConfigProto result = new org.tensorflow.proto.framework.ConfigProto(this); + int from_bitField0_ = bitField0_; + result.deviceCount_ = internalGetDeviceCount(); + result.deviceCount_.makeImmutable(); + result.intraOpParallelismThreads_ = intraOpParallelismThreads_; + result.interOpParallelismThreads_ = interOpParallelismThreads_; + result.usePerSessionThreads_ = usePerSessionThreads_; + if (sessionInterOpThreadPoolBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + sessionInterOpThreadPool_ = java.util.Collections.unmodifiableList(sessionInterOpThreadPool_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.sessionInterOpThreadPool_ = sessionInterOpThreadPool_; + } else { + result.sessionInterOpThreadPool_ = sessionInterOpThreadPoolBuilder_.build(); + } + result.placementPeriod_ = placementPeriod_; + if (((bitField0_ & 0x00000004) != 0)) { + deviceFilters_ = deviceFilters_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.deviceFilters_ = deviceFilters_; + if (gpuOptionsBuilder_ == null) { + result.gpuOptions_ = gpuOptions_; + } else { + result.gpuOptions_ = gpuOptionsBuilder_.build(); + } + result.allowSoftPlacement_ = allowSoftPlacement_; + result.logDevicePlacement_ = logDevicePlacement_; + if (graphOptionsBuilder_ == null) { + result.graphOptions_ = graphOptions_; + } else { + result.graphOptions_ = graphOptionsBuilder_.build(); + } + result.operationTimeoutInMs_ = operationTimeoutInMs_; + if (rpcOptionsBuilder_ == null) { + result.rpcOptions_ = rpcOptions_; + } else { + result.rpcOptions_ = rpcOptionsBuilder_.build(); + } + if (clusterDefBuilder_ == null) { + result.clusterDef_ = clusterDef_; + } else { + result.clusterDef_ = clusterDefBuilder_.build(); + } + result.isolateSessionState_ = isolateSessionState_; + result.shareClusterDevicesInSession_ = shareClusterDevicesInSession_; + if (experimentalBuilder_ == null) { + result.experimental_ = experimental_; + } else { + result.experimental_ = experimentalBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.ConfigProto) { + return mergeFrom((org.tensorflow.proto.framework.ConfigProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.ConfigProto other) { + if (other == org.tensorflow.proto.framework.ConfigProto.getDefaultInstance()) return this; + internalGetMutableDeviceCount().mergeFrom( + other.internalGetDeviceCount()); + if (other.getIntraOpParallelismThreads() != 0) { + setIntraOpParallelismThreads(other.getIntraOpParallelismThreads()); + } + if (other.getInterOpParallelismThreads() != 0) { + setInterOpParallelismThreads(other.getInterOpParallelismThreads()); + } + if (other.getUsePerSessionThreads() != false) { + setUsePerSessionThreads(other.getUsePerSessionThreads()); + } + if (sessionInterOpThreadPoolBuilder_ == null) { + if (!other.sessionInterOpThreadPool_.isEmpty()) { + if (sessionInterOpThreadPool_.isEmpty()) { + sessionInterOpThreadPool_ = other.sessionInterOpThreadPool_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSessionInterOpThreadPoolIsMutable(); + sessionInterOpThreadPool_.addAll(other.sessionInterOpThreadPool_); + } + onChanged(); + } + } else { + if (!other.sessionInterOpThreadPool_.isEmpty()) { + if (sessionInterOpThreadPoolBuilder_.isEmpty()) { + sessionInterOpThreadPoolBuilder_.dispose(); + sessionInterOpThreadPoolBuilder_ = null; + sessionInterOpThreadPool_ = other.sessionInterOpThreadPool_; + bitField0_ = (bitField0_ & ~0x00000002); + sessionInterOpThreadPoolBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSessionInterOpThreadPoolFieldBuilder() : null; + } else { + sessionInterOpThreadPoolBuilder_.addAllMessages(other.sessionInterOpThreadPool_); + } + } + } + if (other.getPlacementPeriod() != 0) { + setPlacementPeriod(other.getPlacementPeriod()); + } + if (!other.deviceFilters_.isEmpty()) { + if (deviceFilters_.isEmpty()) { + deviceFilters_ = other.deviceFilters_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureDeviceFiltersIsMutable(); + deviceFilters_.addAll(other.deviceFilters_); + } + onChanged(); + } + if (other.hasGpuOptions()) { + mergeGpuOptions(other.getGpuOptions()); + } + if (other.getAllowSoftPlacement() != false) { + setAllowSoftPlacement(other.getAllowSoftPlacement()); + } + if (other.getLogDevicePlacement() != false) { + setLogDevicePlacement(other.getLogDevicePlacement()); + } + if (other.hasGraphOptions()) { + mergeGraphOptions(other.getGraphOptions()); + } + if (other.getOperationTimeoutInMs() != 0L) { + setOperationTimeoutInMs(other.getOperationTimeoutInMs()); + } + if (other.hasRpcOptions()) { + mergeRpcOptions(other.getRpcOptions()); + } + if (other.hasClusterDef()) { + mergeClusterDef(other.getClusterDef()); + } + if (other.getIsolateSessionState() != false) { + setIsolateSessionState(other.getIsolateSessionState()); + } + if (other.getShareClusterDevicesInSession() != false) { + setShareClusterDevicesInSession(other.getShareClusterDevicesInSession()); + } + if (other.hasExperimental()) { + mergeExperimental(other.getExperimental()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.ConfigProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.ConfigProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, java.lang.Integer> deviceCount_; + private com.google.protobuf.MapField + internalGetDeviceCount() { + if (deviceCount_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DeviceCountDefaultEntryHolder.defaultEntry); + } + return deviceCount_; + } + private com.google.protobuf.MapField + internalGetMutableDeviceCount() { + onChanged();; + if (deviceCount_ == null) { + deviceCount_ = com.google.protobuf.MapField.newMapField( + DeviceCountDefaultEntryHolder.defaultEntry); + } + if (!deviceCount_.isMutable()) { + deviceCount_ = deviceCount_.copy(); + } + return deviceCount_; + } + + public int getDeviceCountCount() { + return internalGetDeviceCount().getMap().size(); + } + /** + *
+     * 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.
+     * 
+ * + * map<string, int32> device_count = 1; + */ + + public boolean containsDeviceCount( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetDeviceCount().getMap().containsKey(key); + } + /** + * Use {@link #getDeviceCountMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getDeviceCount() { + return getDeviceCountMap(); + } + /** + *
+     * 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.
+     * 
+ * + * map<string, int32> device_count = 1; + */ + + public java.util.Map getDeviceCountMap() { + return internalGetDeviceCount().getMap(); + } + /** + *
+     * 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.
+     * 
+ * + * map<string, int32> device_count = 1; + */ + + public int getDeviceCountOrDefault( + java.lang.String key, + int defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetDeviceCount().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * 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.
+     * 
+ * + * map<string, int32> device_count = 1; + */ + + public int getDeviceCountOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetDeviceCount().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearDeviceCount() { + internalGetMutableDeviceCount().getMutableMap() + .clear(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * map<string, int32> device_count = 1; + */ + + public Builder removeDeviceCount( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableDeviceCount().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableDeviceCount() { + return internalGetMutableDeviceCount().getMutableMap(); + } + /** + *
+     * 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.
+     * 
+ * + * map<string, int32> device_count = 1; + */ + public Builder putDeviceCount( + java.lang.String key, + int value) { + if (key == null) { throw new java.lang.NullPointerException(); } + + internalGetMutableDeviceCount().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * map<string, int32> device_count = 1; + */ + + public Builder putAllDeviceCount( + java.util.Map values) { + internalGetMutableDeviceCount().getMutableMap() + .putAll(values); + return this; + } + + private int intraOpParallelismThreads_ ; + /** + *
+     * 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.
+     * If you create an ordinary session, e.g., from Python or C++,
+     * then there is exactly one intra op thread pool per process.
+     * The first session created determines the number of threads in this pool.
+     * All subsequent sessions reuse/share this one global pool.
+     * There are notable exceptions to the default behavior describe above:
+     * 1. There is an environment variable  for overriding this thread pool,
+     *    named TF_OVERRIDE_GLOBAL_THREADPOOL.
+     * 2. When connecting to a server, such as a remote `tf.train.Server`
+     *    instance, then this option will be ignored altogether.
+     * 
+ * + * int32 intra_op_parallelism_threads = 2; + */ + public int getIntraOpParallelismThreads() { + return intraOpParallelismThreads_; + } + /** + *
+     * 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.
+     * If you create an ordinary session, e.g., from Python or C++,
+     * then there is exactly one intra op thread pool per process.
+     * The first session created determines the number of threads in this pool.
+     * All subsequent sessions reuse/share this one global pool.
+     * There are notable exceptions to the default behavior describe above:
+     * 1. There is an environment variable  for overriding this thread pool,
+     *    named TF_OVERRIDE_GLOBAL_THREADPOOL.
+     * 2. When connecting to a server, such as a remote `tf.train.Server`
+     *    instance, then this option will be ignored altogether.
+     * 
+ * + * int32 intra_op_parallelism_threads = 2; + */ + public Builder setIntraOpParallelismThreads(int value) { + + intraOpParallelismThreads_ = value; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * If you create an ordinary session, e.g., from Python or C++,
+     * then there is exactly one intra op thread pool per process.
+     * The first session created determines the number of threads in this pool.
+     * All subsequent sessions reuse/share this one global pool.
+     * There are notable exceptions to the default behavior describe above:
+     * 1. There is an environment variable  for overriding this thread pool,
+     *    named TF_OVERRIDE_GLOBAL_THREADPOOL.
+     * 2. When connecting to a server, such as a remote `tf.train.Server`
+     *    instance, then this option will be ignored altogether.
+     * 
+ * + * int32 intra_op_parallelism_threads = 2; + */ + public Builder clearIntraOpParallelismThreads() { + + intraOpParallelismThreads_ = 0; + onChanged(); + return this; + } + + private int interOpParallelismThreads_ ; + /** + *
+     * 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.
+     * Negative means all operations are performed in caller's thread.
+     * 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 or session_inter_op_thread_pool is configured.
+     * 
+ * + * int32 inter_op_parallelism_threads = 5; + */ + public int getInterOpParallelismThreads() { + return interOpParallelismThreads_; + } + /** + *
+     * 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.
+     * Negative means all operations are performed in caller's thread.
+     * 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 or session_inter_op_thread_pool is configured.
+     * 
+ * + * int32 inter_op_parallelism_threads = 5; + */ + public Builder setInterOpParallelismThreads(int value) { + + interOpParallelismThreads_ = value; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * Negative means all operations are performed in caller's thread.
+     * 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 or session_inter_op_thread_pool is configured.
+     * 
+ * + * int32 inter_op_parallelism_threads = 5; + */ + public Builder clearInterOpParallelismThreads() { + + interOpParallelismThreads_ = 0; + onChanged(); + return this; + } + + private boolean usePerSessionThreads_ ; + /** + *
+     * 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, or the
+     * per-session thread pools configured by session_inter_op_thread_pool.
+     * This option is deprecated. The same effect can be achieved by setting
+     * session_inter_op_thread_pool to have one element, whose num_threads equals
+     * inter_op_parallelism_threads.
+     * 
+ * + * bool use_per_session_threads = 9; + */ + public boolean getUsePerSessionThreads() { + return usePerSessionThreads_; + } + /** + *
+     * 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, or the
+     * per-session thread pools configured by session_inter_op_thread_pool.
+     * This option is deprecated. The same effect can be achieved by setting
+     * session_inter_op_thread_pool to have one element, whose num_threads equals
+     * inter_op_parallelism_threads.
+     * 
+ * + * bool use_per_session_threads = 9; + */ + public Builder setUsePerSessionThreads(boolean value) { + + usePerSessionThreads_ = value; + onChanged(); + return this; + } + /** + *
+     * 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, or the
+     * per-session thread pools configured by session_inter_op_thread_pool.
+     * This option is deprecated. The same effect can be achieved by setting
+     * session_inter_op_thread_pool to have one element, whose num_threads equals
+     * inter_op_parallelism_threads.
+     * 
+ * + * bool use_per_session_threads = 9; + */ + public Builder clearUsePerSessionThreads() { + + usePerSessionThreads_ = false; + onChanged(); + return this; + } + + private java.util.List sessionInterOpThreadPool_ = + java.util.Collections.emptyList(); + private void ensureSessionInterOpThreadPoolIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + sessionInterOpThreadPool_ = new java.util.ArrayList(sessionInterOpThreadPool_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ThreadPoolOptionProto, org.tensorflow.proto.framework.ThreadPoolOptionProto.Builder, org.tensorflow.proto.framework.ThreadPoolOptionProtoOrBuilder> sessionInterOpThreadPoolBuilder_; + + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public java.util.List getSessionInterOpThreadPoolList() { + if (sessionInterOpThreadPoolBuilder_ == null) { + return java.util.Collections.unmodifiableList(sessionInterOpThreadPool_); + } else { + return sessionInterOpThreadPoolBuilder_.getMessageList(); + } + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public int getSessionInterOpThreadPoolCount() { + if (sessionInterOpThreadPoolBuilder_ == null) { + return sessionInterOpThreadPool_.size(); + } else { + return sessionInterOpThreadPoolBuilder_.getCount(); + } + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public org.tensorflow.proto.framework.ThreadPoolOptionProto getSessionInterOpThreadPool(int index) { + if (sessionInterOpThreadPoolBuilder_ == null) { + return sessionInterOpThreadPool_.get(index); + } else { + return sessionInterOpThreadPoolBuilder_.getMessage(index); + } + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public Builder setSessionInterOpThreadPool( + int index, org.tensorflow.proto.framework.ThreadPoolOptionProto value) { + if (sessionInterOpThreadPoolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSessionInterOpThreadPoolIsMutable(); + sessionInterOpThreadPool_.set(index, value); + onChanged(); + } else { + sessionInterOpThreadPoolBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public Builder setSessionInterOpThreadPool( + int index, org.tensorflow.proto.framework.ThreadPoolOptionProto.Builder builderForValue) { + if (sessionInterOpThreadPoolBuilder_ == null) { + ensureSessionInterOpThreadPoolIsMutable(); + sessionInterOpThreadPool_.set(index, builderForValue.build()); + onChanged(); + } else { + sessionInterOpThreadPoolBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public Builder addSessionInterOpThreadPool(org.tensorflow.proto.framework.ThreadPoolOptionProto value) { + if (sessionInterOpThreadPoolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSessionInterOpThreadPoolIsMutable(); + sessionInterOpThreadPool_.add(value); + onChanged(); + } else { + sessionInterOpThreadPoolBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public Builder addSessionInterOpThreadPool( + int index, org.tensorflow.proto.framework.ThreadPoolOptionProto value) { + if (sessionInterOpThreadPoolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSessionInterOpThreadPoolIsMutable(); + sessionInterOpThreadPool_.add(index, value); + onChanged(); + } else { + sessionInterOpThreadPoolBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public Builder addSessionInterOpThreadPool( + org.tensorflow.proto.framework.ThreadPoolOptionProto.Builder builderForValue) { + if (sessionInterOpThreadPoolBuilder_ == null) { + ensureSessionInterOpThreadPoolIsMutable(); + sessionInterOpThreadPool_.add(builderForValue.build()); + onChanged(); + } else { + sessionInterOpThreadPoolBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public Builder addSessionInterOpThreadPool( + int index, org.tensorflow.proto.framework.ThreadPoolOptionProto.Builder builderForValue) { + if (sessionInterOpThreadPoolBuilder_ == null) { + ensureSessionInterOpThreadPoolIsMutable(); + sessionInterOpThreadPool_.add(index, builderForValue.build()); + onChanged(); + } else { + sessionInterOpThreadPoolBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public Builder addAllSessionInterOpThreadPool( + java.lang.Iterable values) { + if (sessionInterOpThreadPoolBuilder_ == null) { + ensureSessionInterOpThreadPoolIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, sessionInterOpThreadPool_); + onChanged(); + } else { + sessionInterOpThreadPoolBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public Builder clearSessionInterOpThreadPool() { + if (sessionInterOpThreadPoolBuilder_ == null) { + sessionInterOpThreadPool_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + sessionInterOpThreadPoolBuilder_.clear(); + } + return this; + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public Builder removeSessionInterOpThreadPool(int index) { + if (sessionInterOpThreadPoolBuilder_ == null) { + ensureSessionInterOpThreadPoolIsMutable(); + sessionInterOpThreadPool_.remove(index); + onChanged(); + } else { + sessionInterOpThreadPoolBuilder_.remove(index); + } + return this; + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public org.tensorflow.proto.framework.ThreadPoolOptionProto.Builder getSessionInterOpThreadPoolBuilder( + int index) { + return getSessionInterOpThreadPoolFieldBuilder().getBuilder(index); + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public org.tensorflow.proto.framework.ThreadPoolOptionProtoOrBuilder getSessionInterOpThreadPoolOrBuilder( + int index) { + if (sessionInterOpThreadPoolBuilder_ == null) { + return sessionInterOpThreadPool_.get(index); } else { + return sessionInterOpThreadPoolBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public java.util.List + getSessionInterOpThreadPoolOrBuilderList() { + if (sessionInterOpThreadPoolBuilder_ != null) { + return sessionInterOpThreadPoolBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sessionInterOpThreadPool_); + } + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public org.tensorflow.proto.framework.ThreadPoolOptionProto.Builder addSessionInterOpThreadPoolBuilder() { + return getSessionInterOpThreadPoolFieldBuilder().addBuilder( + org.tensorflow.proto.framework.ThreadPoolOptionProto.getDefaultInstance()); + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public org.tensorflow.proto.framework.ThreadPoolOptionProto.Builder addSessionInterOpThreadPoolBuilder( + int index) { + return getSessionInterOpThreadPoolFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.ThreadPoolOptionProto.getDefaultInstance()); + } + /** + *
+     * This option is experimental - it may be replaced with a different mechanism
+     * in the future.
+     * Configures session thread pools. If this is configured, then RunOptions for
+     * a Run call can select the thread pool to use.
+     * The intended use is for when some session invocations need to run in a
+     * background pool limited to a small number of threads:
+     * - For example, a session may be configured to have one large pool (for
+     * regular compute) and one small pool (for periodic, low priority work);
+     * using the small pool is currently the mechanism for limiting the inter-op
+     * parallelism of the low priority work.  Note that it does not limit the
+     * parallelism of work spawned by a single op kernel implementation.
+     * - Using this setting is normally not needed in training, but may help some
+     * serving use cases.
+     * - It is also generally recommended to set the global_name field of this
+     * proto, to avoid creating multiple large pools. It is typically better to
+     * run the non-low-priority work, even across sessions, in a single large
+     * pool.
+     * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + public java.util.List + getSessionInterOpThreadPoolBuilderList() { + return getSessionInterOpThreadPoolFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ThreadPoolOptionProto, org.tensorflow.proto.framework.ThreadPoolOptionProto.Builder, org.tensorflow.proto.framework.ThreadPoolOptionProtoOrBuilder> + getSessionInterOpThreadPoolFieldBuilder() { + if (sessionInterOpThreadPoolBuilder_ == null) { + sessionInterOpThreadPoolBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ThreadPoolOptionProto, org.tensorflow.proto.framework.ThreadPoolOptionProto.Builder, org.tensorflow.proto.framework.ThreadPoolOptionProtoOrBuilder>( + sessionInterOpThreadPool_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + sessionInterOpThreadPool_ = null; + } + return sessionInterOpThreadPoolBuilder_; + } + + private int placementPeriod_ ; + /** + *
+     * 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).
+     * 
+ * + * int32 placement_period = 3; + */ + public int getPlacementPeriod() { + return placementPeriod_; + } + /** + *
+     * 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).
+     * 
+ * + * int32 placement_period = 3; + */ + public Builder setPlacementPeriod(int value) { + + placementPeriod_ = value; + onChanged(); + return this; + } + /** + *
+     * 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).
+     * 
+ * + * int32 placement_period = 3; + */ + public Builder clearPlacementPeriod() { + + placementPeriod_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureDeviceFiltersIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + deviceFilters_ = new com.google.protobuf.LazyStringArrayList(deviceFilters_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * 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.
+     * 
+ * + * repeated string device_filters = 4; + */ + public com.google.protobuf.ProtocolStringList + getDeviceFiltersList() { + return deviceFilters_.getUnmodifiableView(); + } + /** + *
+     * 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.
+     * 
+ * + * repeated string device_filters = 4; + */ + public int getDeviceFiltersCount() { + return deviceFilters_.size(); + } + /** + *
+     * 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.
+     * 
+ * + * repeated string device_filters = 4; + */ + public java.lang.String getDeviceFilters(int index) { + return deviceFilters_.get(index); + } + /** + *
+     * 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.
+     * 
+ * + * repeated string device_filters = 4; + */ + public com.google.protobuf.ByteString + getDeviceFiltersBytes(int index) { + return deviceFilters_.getByteString(index); + } + /** + *
+     * 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.
+     * 
+ * + * repeated string device_filters = 4; + */ + public Builder setDeviceFilters( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceFiltersIsMutable(); + deviceFilters_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * repeated string device_filters = 4; + */ + public Builder addDeviceFilters( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceFiltersIsMutable(); + deviceFilters_.add(value); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * repeated string device_filters = 4; + */ + public Builder addAllDeviceFilters( + java.lang.Iterable values) { + ensureDeviceFiltersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, deviceFilters_); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * repeated string device_filters = 4; + */ + public Builder clearDeviceFilters() { + deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * repeated string device_filters = 4; + */ + 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.proto.framework.GPUOptions gpuOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GPUOptions, org.tensorflow.proto.framework.GPUOptions.Builder, org.tensorflow.proto.framework.GPUOptionsOrBuilder> gpuOptionsBuilder_; + /** + *
+     * Options that apply to all GPUs.
+     * 
+ * + * .tensorflow.GPUOptions gpu_options = 6; + */ + public boolean hasGpuOptions() { + return gpuOptionsBuilder_ != null || gpuOptions_ != null; + } + /** + *
+     * Options that apply to all GPUs.
+     * 
+ * + * .tensorflow.GPUOptions gpu_options = 6; + */ + public org.tensorflow.proto.framework.GPUOptions getGpuOptions() { + if (gpuOptionsBuilder_ == null) { + return gpuOptions_ == null ? org.tensorflow.proto.framework.GPUOptions.getDefaultInstance() : gpuOptions_; + } else { + return gpuOptionsBuilder_.getMessage(); + } + } + /** + *
+     * Options that apply to all GPUs.
+     * 
+ * + * .tensorflow.GPUOptions gpu_options = 6; + */ + public Builder setGpuOptions(org.tensorflow.proto.framework.GPUOptions value) { + if (gpuOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gpuOptions_ = value; + onChanged(); + } else { + gpuOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Options that apply to all GPUs.
+     * 
+ * + * .tensorflow.GPUOptions gpu_options = 6; + */ + public Builder setGpuOptions( + org.tensorflow.proto.framework.GPUOptions.Builder builderForValue) { + if (gpuOptionsBuilder_ == null) { + gpuOptions_ = builderForValue.build(); + onChanged(); + } else { + gpuOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Options that apply to all GPUs.
+     * 
+ * + * .tensorflow.GPUOptions gpu_options = 6; + */ + public Builder mergeGpuOptions(org.tensorflow.proto.framework.GPUOptions value) { + if (gpuOptionsBuilder_ == null) { + if (gpuOptions_ != null) { + gpuOptions_ = + org.tensorflow.proto.framework.GPUOptions.newBuilder(gpuOptions_).mergeFrom(value).buildPartial(); + } else { + gpuOptions_ = value; + } + onChanged(); + } else { + gpuOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Options that apply to all GPUs.
+     * 
+ * + * .tensorflow.GPUOptions gpu_options = 6; + */ + public Builder clearGpuOptions() { + if (gpuOptionsBuilder_ == null) { + gpuOptions_ = null; + onChanged(); + } else { + gpuOptions_ = null; + gpuOptionsBuilder_ = null; + } + + return this; + } + /** + *
+     * Options that apply to all GPUs.
+     * 
+ * + * .tensorflow.GPUOptions gpu_options = 6; + */ + public org.tensorflow.proto.framework.GPUOptions.Builder getGpuOptionsBuilder() { + + onChanged(); + return getGpuOptionsFieldBuilder().getBuilder(); + } + /** + *
+     * Options that apply to all GPUs.
+     * 
+ * + * .tensorflow.GPUOptions gpu_options = 6; + */ + public org.tensorflow.proto.framework.GPUOptionsOrBuilder getGpuOptionsOrBuilder() { + if (gpuOptionsBuilder_ != null) { + return gpuOptionsBuilder_.getMessageOrBuilder(); + } else { + return gpuOptions_ == null ? + org.tensorflow.proto.framework.GPUOptions.getDefaultInstance() : gpuOptions_; + } + } + /** + *
+     * Options that apply to all GPUs.
+     * 
+ * + * .tensorflow.GPUOptions gpu_options = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GPUOptions, org.tensorflow.proto.framework.GPUOptions.Builder, org.tensorflow.proto.framework.GPUOptionsOrBuilder> + getGpuOptionsFieldBuilder() { + if (gpuOptionsBuilder_ == null) { + gpuOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GPUOptions, org.tensorflow.proto.framework.GPUOptions.Builder, org.tensorflow.proto.framework.GPUOptionsOrBuilder>( + getGpuOptions(), + getParentForChildren(), + isClean()); + gpuOptions_ = null; + } + return gpuOptionsBuilder_; + } + + private boolean allowSoftPlacement_ ; + /** + *
+     * 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.
+     * 
+ * + * bool allow_soft_placement = 7; + */ + public boolean getAllowSoftPlacement() { + return allowSoftPlacement_; + } + /** + *
+     * 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.
+     * 
+ * + * bool allow_soft_placement = 7; + */ + public Builder setAllowSoftPlacement(boolean value) { + + allowSoftPlacement_ = value; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * bool allow_soft_placement = 7; + */ + public Builder clearAllowSoftPlacement() { + + allowSoftPlacement_ = false; + onChanged(); + return this; + } + + private boolean logDevicePlacement_ ; + /** + *
+     * Whether device placements should be logged.
+     * 
+ * + * bool log_device_placement = 8; + */ + public boolean getLogDevicePlacement() { + return logDevicePlacement_; + } + /** + *
+     * Whether device placements should be logged.
+     * 
+ * + * bool log_device_placement = 8; + */ + public Builder setLogDevicePlacement(boolean value) { + + logDevicePlacement_ = value; + onChanged(); + return this; + } + /** + *
+     * Whether device placements should be logged.
+     * 
+ * + * bool log_device_placement = 8; + */ + public Builder clearLogDevicePlacement() { + + logDevicePlacement_ = false; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.GraphOptions graphOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GraphOptions, org.tensorflow.proto.framework.GraphOptions.Builder, org.tensorflow.proto.framework.GraphOptionsOrBuilder> graphOptionsBuilder_; + /** + *
+     * Options that apply to all graphs.
+     * 
+ * + * .tensorflow.GraphOptions graph_options = 10; + */ + public boolean hasGraphOptions() { + return graphOptionsBuilder_ != null || graphOptions_ != null; + } + /** + *
+     * Options that apply to all graphs.
+     * 
+ * + * .tensorflow.GraphOptions graph_options = 10; + */ + public org.tensorflow.proto.framework.GraphOptions getGraphOptions() { + if (graphOptionsBuilder_ == null) { + return graphOptions_ == null ? org.tensorflow.proto.framework.GraphOptions.getDefaultInstance() : graphOptions_; + } else { + return graphOptionsBuilder_.getMessage(); + } + } + /** + *
+     * Options that apply to all graphs.
+     * 
+ * + * .tensorflow.GraphOptions graph_options = 10; + */ + public Builder setGraphOptions(org.tensorflow.proto.framework.GraphOptions value) { + if (graphOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + graphOptions_ = value; + onChanged(); + } else { + graphOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Options that apply to all graphs.
+     * 
+ * + * .tensorflow.GraphOptions graph_options = 10; + */ + public Builder setGraphOptions( + org.tensorflow.proto.framework.GraphOptions.Builder builderForValue) { + if (graphOptionsBuilder_ == null) { + graphOptions_ = builderForValue.build(); + onChanged(); + } else { + graphOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Options that apply to all graphs.
+     * 
+ * + * .tensorflow.GraphOptions graph_options = 10; + */ + public Builder mergeGraphOptions(org.tensorflow.proto.framework.GraphOptions value) { + if (graphOptionsBuilder_ == null) { + if (graphOptions_ != null) { + graphOptions_ = + org.tensorflow.proto.framework.GraphOptions.newBuilder(graphOptions_).mergeFrom(value).buildPartial(); + } else { + graphOptions_ = value; + } + onChanged(); + } else { + graphOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Options that apply to all graphs.
+     * 
+ * + * .tensorflow.GraphOptions graph_options = 10; + */ + public Builder clearGraphOptions() { + if (graphOptionsBuilder_ == null) { + graphOptions_ = null; + onChanged(); + } else { + graphOptions_ = null; + graphOptionsBuilder_ = null; + } + + return this; + } + /** + *
+     * Options that apply to all graphs.
+     * 
+ * + * .tensorflow.GraphOptions graph_options = 10; + */ + public org.tensorflow.proto.framework.GraphOptions.Builder getGraphOptionsBuilder() { + + onChanged(); + return getGraphOptionsFieldBuilder().getBuilder(); + } + /** + *
+     * Options that apply to all graphs.
+     * 
+ * + * .tensorflow.GraphOptions graph_options = 10; + */ + public org.tensorflow.proto.framework.GraphOptionsOrBuilder getGraphOptionsOrBuilder() { + if (graphOptionsBuilder_ != null) { + return graphOptionsBuilder_.getMessageOrBuilder(); + } else { + return graphOptions_ == null ? + org.tensorflow.proto.framework.GraphOptions.getDefaultInstance() : graphOptions_; + } + } + /** + *
+     * Options that apply to all graphs.
+     * 
+ * + * .tensorflow.GraphOptions graph_options = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GraphOptions, org.tensorflow.proto.framework.GraphOptions.Builder, org.tensorflow.proto.framework.GraphOptionsOrBuilder> + getGraphOptionsFieldBuilder() { + if (graphOptionsBuilder_ == null) { + graphOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GraphOptions, org.tensorflow.proto.framework.GraphOptions.Builder, org.tensorflow.proto.framework.GraphOptionsOrBuilder>( + getGraphOptions(), + getParentForChildren(), + isClean()); + graphOptions_ = null; + } + return graphOptionsBuilder_; + } + + private long operationTimeoutInMs_ ; + /** + *
+     * Global timeout for all blocking operations in this session.  If non-zero,
+     * and not overridden on a per-operation basis, this value will be used as the
+     * deadline for all blocking operations.
+     * 
+ * + * int64 operation_timeout_in_ms = 11; + */ + public long getOperationTimeoutInMs() { + return operationTimeoutInMs_; + } + /** + *
+     * Global timeout for all blocking operations in this session.  If non-zero,
+     * and not overridden on a per-operation basis, this value will be used as the
+     * deadline for all blocking operations.
+     * 
+ * + * int64 operation_timeout_in_ms = 11; + */ + public Builder setOperationTimeoutInMs(long value) { + + operationTimeoutInMs_ = value; + onChanged(); + return this; + } + /** + *
+     * Global timeout for all blocking operations in this session.  If non-zero,
+     * and not overridden on a per-operation basis, this value will be used as the
+     * deadline for all blocking operations.
+     * 
+ * + * int64 operation_timeout_in_ms = 11; + */ + public Builder clearOperationTimeoutInMs() { + + operationTimeoutInMs_ = 0L; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.RPCOptions rpcOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.RPCOptions, org.tensorflow.proto.framework.RPCOptions.Builder, org.tensorflow.proto.framework.RPCOptionsOrBuilder> rpcOptionsBuilder_; + /** + *
+     * Options that apply when this session uses the distributed runtime.
+     * 
+ * + * .tensorflow.RPCOptions rpc_options = 13; + */ + public boolean hasRpcOptions() { + return rpcOptionsBuilder_ != null || rpcOptions_ != null; + } + /** + *
+     * Options that apply when this session uses the distributed runtime.
+     * 
+ * + * .tensorflow.RPCOptions rpc_options = 13; + */ + public org.tensorflow.proto.framework.RPCOptions getRpcOptions() { + if (rpcOptionsBuilder_ == null) { + return rpcOptions_ == null ? org.tensorflow.proto.framework.RPCOptions.getDefaultInstance() : rpcOptions_; + } else { + return rpcOptionsBuilder_.getMessage(); + } + } + /** + *
+     * Options that apply when this session uses the distributed runtime.
+     * 
+ * + * .tensorflow.RPCOptions rpc_options = 13; + */ + public Builder setRpcOptions(org.tensorflow.proto.framework.RPCOptions value) { + if (rpcOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcOptions_ = value; + onChanged(); + } else { + rpcOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Options that apply when this session uses the distributed runtime.
+     * 
+ * + * .tensorflow.RPCOptions rpc_options = 13; + */ + public Builder setRpcOptions( + org.tensorflow.proto.framework.RPCOptions.Builder builderForValue) { + if (rpcOptionsBuilder_ == null) { + rpcOptions_ = builderForValue.build(); + onChanged(); + } else { + rpcOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Options that apply when this session uses the distributed runtime.
+     * 
+ * + * .tensorflow.RPCOptions rpc_options = 13; + */ + public Builder mergeRpcOptions(org.tensorflow.proto.framework.RPCOptions value) { + if (rpcOptionsBuilder_ == null) { + if (rpcOptions_ != null) { + rpcOptions_ = + org.tensorflow.proto.framework.RPCOptions.newBuilder(rpcOptions_).mergeFrom(value).buildPartial(); + } else { + rpcOptions_ = value; + } + onChanged(); + } else { + rpcOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Options that apply when this session uses the distributed runtime.
+     * 
+ * + * .tensorflow.RPCOptions rpc_options = 13; + */ + public Builder clearRpcOptions() { + if (rpcOptionsBuilder_ == null) { + rpcOptions_ = null; + onChanged(); + } else { + rpcOptions_ = null; + rpcOptionsBuilder_ = null; + } + + return this; + } + /** + *
+     * Options that apply when this session uses the distributed runtime.
+     * 
+ * + * .tensorflow.RPCOptions rpc_options = 13; + */ + public org.tensorflow.proto.framework.RPCOptions.Builder getRpcOptionsBuilder() { + + onChanged(); + return getRpcOptionsFieldBuilder().getBuilder(); + } + /** + *
+     * Options that apply when this session uses the distributed runtime.
+     * 
+ * + * .tensorflow.RPCOptions rpc_options = 13; + */ + public org.tensorflow.proto.framework.RPCOptionsOrBuilder getRpcOptionsOrBuilder() { + if (rpcOptionsBuilder_ != null) { + return rpcOptionsBuilder_.getMessageOrBuilder(); + } else { + return rpcOptions_ == null ? + org.tensorflow.proto.framework.RPCOptions.getDefaultInstance() : rpcOptions_; + } + } + /** + *
+     * Options that apply when this session uses the distributed runtime.
+     * 
+ * + * .tensorflow.RPCOptions rpc_options = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.RPCOptions, org.tensorflow.proto.framework.RPCOptions.Builder, org.tensorflow.proto.framework.RPCOptionsOrBuilder> + getRpcOptionsFieldBuilder() { + if (rpcOptionsBuilder_ == null) { + rpcOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.RPCOptions, org.tensorflow.proto.framework.RPCOptions.Builder, org.tensorflow.proto.framework.RPCOptionsOrBuilder>( + getRpcOptions(), + getParentForChildren(), + isClean()); + rpcOptions_ = null; + } + return rpcOptionsBuilder_; + } + + private org.tensorflow.proto.distruntime.ClusterDef clusterDef_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.distruntime.ClusterDef, org.tensorflow.proto.distruntime.ClusterDef.Builder, org.tensorflow.proto.distruntime.ClusterDefOrBuilder> clusterDefBuilder_; + /** + *
+     * Optional list of all workers to use in this session.
+     * 
+ * + * .tensorflow.ClusterDef cluster_def = 14; + */ + public boolean hasClusterDef() { + return clusterDefBuilder_ != null || clusterDef_ != null; + } + /** + *
+     * Optional list of all workers to use in this session.
+     * 
+ * + * .tensorflow.ClusterDef cluster_def = 14; + */ + public org.tensorflow.proto.distruntime.ClusterDef getClusterDef() { + if (clusterDefBuilder_ == null) { + return clusterDef_ == null ? org.tensorflow.proto.distruntime.ClusterDef.getDefaultInstance() : clusterDef_; + } else { + return clusterDefBuilder_.getMessage(); + } + } + /** + *
+     * Optional list of all workers to use in this session.
+     * 
+ * + * .tensorflow.ClusterDef cluster_def = 14; + */ + public Builder setClusterDef(org.tensorflow.proto.distruntime.ClusterDef value) { + if (clusterDefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clusterDef_ = value; + onChanged(); + } else { + clusterDefBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Optional list of all workers to use in this session.
+     * 
+ * + * .tensorflow.ClusterDef cluster_def = 14; + */ + public Builder setClusterDef( + org.tensorflow.proto.distruntime.ClusterDef.Builder builderForValue) { + if (clusterDefBuilder_ == null) { + clusterDef_ = builderForValue.build(); + onChanged(); + } else { + clusterDefBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Optional list of all workers to use in this session.
+     * 
+ * + * .tensorflow.ClusterDef cluster_def = 14; + */ + public Builder mergeClusterDef(org.tensorflow.proto.distruntime.ClusterDef value) { + if (clusterDefBuilder_ == null) { + if (clusterDef_ != null) { + clusterDef_ = + org.tensorflow.proto.distruntime.ClusterDef.newBuilder(clusterDef_).mergeFrom(value).buildPartial(); + } else { + clusterDef_ = value; + } + onChanged(); + } else { + clusterDefBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Optional list of all workers to use in this session.
+     * 
+ * + * .tensorflow.ClusterDef cluster_def = 14; + */ + public Builder clearClusterDef() { + if (clusterDefBuilder_ == null) { + clusterDef_ = null; + onChanged(); + } else { + clusterDef_ = null; + clusterDefBuilder_ = null; + } + + return this; + } + /** + *
+     * Optional list of all workers to use in this session.
+     * 
+ * + * .tensorflow.ClusterDef cluster_def = 14; + */ + public org.tensorflow.proto.distruntime.ClusterDef.Builder getClusterDefBuilder() { + + onChanged(); + return getClusterDefFieldBuilder().getBuilder(); + } + /** + *
+     * Optional list of all workers to use in this session.
+     * 
+ * + * .tensorflow.ClusterDef cluster_def = 14; + */ + public org.tensorflow.proto.distruntime.ClusterDefOrBuilder getClusterDefOrBuilder() { + if (clusterDefBuilder_ != null) { + return clusterDefBuilder_.getMessageOrBuilder(); + } else { + return clusterDef_ == null ? + org.tensorflow.proto.distruntime.ClusterDef.getDefaultInstance() : clusterDef_; + } + } + /** + *
+     * Optional list of all workers to use in this session.
+     * 
+ * + * .tensorflow.ClusterDef cluster_def = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.distruntime.ClusterDef, org.tensorflow.proto.distruntime.ClusterDef.Builder, org.tensorflow.proto.distruntime.ClusterDefOrBuilder> + getClusterDefFieldBuilder() { + if (clusterDefBuilder_ == null) { + clusterDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.distruntime.ClusterDef, org.tensorflow.proto.distruntime.ClusterDef.Builder, org.tensorflow.proto.distruntime.ClusterDefOrBuilder>( + getClusterDef(), + getParentForChildren(), + isClean()); + clusterDef_ = null; + } + return clusterDefBuilder_; + } + + private boolean isolateSessionState_ ; + /** + *
+     * If true, any resources such as Variables used in the session will not be
+     * shared with other sessions. However, when clusterspec propagation is
+     * enabled, this field is ignored and sessions are always isolated.
+     * 
+ * + * bool isolate_session_state = 15; + */ + public boolean getIsolateSessionState() { + return isolateSessionState_; + } + /** + *
+     * If true, any resources such as Variables used in the session will not be
+     * shared with other sessions. However, when clusterspec propagation is
+     * enabled, this field is ignored and sessions are always isolated.
+     * 
+ * + * bool isolate_session_state = 15; + */ + public Builder setIsolateSessionState(boolean value) { + + isolateSessionState_ = value; + onChanged(); + return this; + } + /** + *
+     * If true, any resources such as Variables used in the session will not be
+     * shared with other sessions. However, when clusterspec propagation is
+     * enabled, this field is ignored and sessions are always isolated.
+     * 
+ * + * bool isolate_session_state = 15; + */ + public Builder clearIsolateSessionState() { + + isolateSessionState_ = false; + onChanged(); + return this; + } + + private boolean shareClusterDevicesInSession_ ; + /** + *
+     * When true, WorkerSessions are created with device attributes from the
+     * full cluster.
+     * This is helpful when a worker wants to partition a graph
+     * (for example during a PartitionedCallOp).
+     * 
+ * + * bool share_cluster_devices_in_session = 17; + */ + public boolean getShareClusterDevicesInSession() { + return shareClusterDevicesInSession_; + } + /** + *
+     * When true, WorkerSessions are created with device attributes from the
+     * full cluster.
+     * This is helpful when a worker wants to partition a graph
+     * (for example during a PartitionedCallOp).
+     * 
+ * + * bool share_cluster_devices_in_session = 17; + */ + public Builder setShareClusterDevicesInSession(boolean value) { + + shareClusterDevicesInSession_ = value; + onChanged(); + return this; + } + /** + *
+     * When true, WorkerSessions are created with device attributes from the
+     * full cluster.
+     * This is helpful when a worker wants to partition a graph
+     * (for example during a PartitionedCallOp).
+     * 
+ * + * bool share_cluster_devices_in_session = 17; + */ + public Builder clearShareClusterDevicesInSession() { + + shareClusterDevicesInSession_ = false; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.ConfigProto.Experimental experimental_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.ConfigProto.Experimental, org.tensorflow.proto.framework.ConfigProto.Experimental.Builder, org.tensorflow.proto.framework.ConfigProto.ExperimentalOrBuilder> experimentalBuilder_; + /** + * .tensorflow.ConfigProto.Experimental experimental = 16; + */ + public boolean hasExperimental() { + return experimentalBuilder_ != null || experimental_ != null; + } + /** + * .tensorflow.ConfigProto.Experimental experimental = 16; + */ + public org.tensorflow.proto.framework.ConfigProto.Experimental getExperimental() { + if (experimentalBuilder_ == null) { + return experimental_ == null ? org.tensorflow.proto.framework.ConfigProto.Experimental.getDefaultInstance() : experimental_; + } else { + return experimentalBuilder_.getMessage(); + } + } + /** + * .tensorflow.ConfigProto.Experimental experimental = 16; + */ + public Builder setExperimental(org.tensorflow.proto.framework.ConfigProto.Experimental value) { + if (experimentalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + experimental_ = value; + onChanged(); + } else { + experimentalBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.ConfigProto.Experimental experimental = 16; + */ + public Builder setExperimental( + org.tensorflow.proto.framework.ConfigProto.Experimental.Builder builderForValue) { + if (experimentalBuilder_ == null) { + experimental_ = builderForValue.build(); + onChanged(); + } else { + experimentalBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.ConfigProto.Experimental experimental = 16; + */ + public Builder mergeExperimental(org.tensorflow.proto.framework.ConfigProto.Experimental value) { + if (experimentalBuilder_ == null) { + if (experimental_ != null) { + experimental_ = + org.tensorflow.proto.framework.ConfigProto.Experimental.newBuilder(experimental_).mergeFrom(value).buildPartial(); + } else { + experimental_ = value; + } + onChanged(); + } else { + experimentalBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.ConfigProto.Experimental experimental = 16; + */ + public Builder clearExperimental() { + if (experimentalBuilder_ == null) { + experimental_ = null; + onChanged(); + } else { + experimental_ = null; + experimentalBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.ConfigProto.Experimental experimental = 16; + */ + public org.tensorflow.proto.framework.ConfigProto.Experimental.Builder getExperimentalBuilder() { + + onChanged(); + return getExperimentalFieldBuilder().getBuilder(); + } + /** + * .tensorflow.ConfigProto.Experimental experimental = 16; + */ + public org.tensorflow.proto.framework.ConfigProto.ExperimentalOrBuilder getExperimentalOrBuilder() { + if (experimentalBuilder_ != null) { + return experimentalBuilder_.getMessageOrBuilder(); + } else { + return experimental_ == null ? + org.tensorflow.proto.framework.ConfigProto.Experimental.getDefaultInstance() : experimental_; + } + } + /** + * .tensorflow.ConfigProto.Experimental experimental = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.ConfigProto.Experimental, org.tensorflow.proto.framework.ConfigProto.Experimental.Builder, org.tensorflow.proto.framework.ConfigProto.ExperimentalOrBuilder> + getExperimentalFieldBuilder() { + if (experimentalBuilder_ == null) { + experimentalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.ConfigProto.Experimental, org.tensorflow.proto.framework.ConfigProto.Experimental.Builder, org.tensorflow.proto.framework.ConfigProto.ExperimentalOrBuilder>( + getExperimental(), + getParentForChildren(), + isClean()); + experimental_ = null; + } + return experimentalBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ConfigProto) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ConfigProto) + private static final org.tensorflow.proto.framework.ConfigProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.ConfigProto(); + } + + public static org.tensorflow.proto.framework.ConfigProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfigProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConfigProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ConfigProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ConfigProtoOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ConfigProtoOrBuilder.java new file mode 100644 index 00000000000..a13298b2bb5 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ConfigProtoOrBuilder.java @@ -0,0 +1,477 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +public interface ConfigProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ConfigProto) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * 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.
+   * 
+ * + * map<string, int32> device_count = 1; + */ + int getDeviceCountCount(); + /** + *
+   * 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.
+   * 
+ * + * map<string, int32> device_count = 1; + */ + boolean containsDeviceCount( + java.lang.String key); + /** + * Use {@link #getDeviceCountMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getDeviceCount(); + /** + *
+   * 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.
+   * 
+ * + * map<string, int32> device_count = 1; + */ + java.util.Map + getDeviceCountMap(); + /** + *
+   * 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.
+   * 
+ * + * map<string, int32> device_count = 1; + */ + + int getDeviceCountOrDefault( + java.lang.String key, + int defaultValue); + /** + *
+   * 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.
+   * 
+ * + * map<string, int32> device_count = 1; + */ + + int getDeviceCountOrThrow( + java.lang.String key); + + /** + *
+   * 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.
+   * If you create an ordinary session, e.g., from Python or C++,
+   * then there is exactly one intra op thread pool per process.
+   * The first session created determines the number of threads in this pool.
+   * All subsequent sessions reuse/share this one global pool.
+   * There are notable exceptions to the default behavior describe above:
+   * 1. There is an environment variable  for overriding this thread pool,
+   *    named TF_OVERRIDE_GLOBAL_THREADPOOL.
+   * 2. When connecting to a server, such as a remote `tf.train.Server`
+   *    instance, then this option will be ignored altogether.
+   * 
+ * + * int32 intra_op_parallelism_threads = 2; + */ + int getIntraOpParallelismThreads(); + + /** + *
+   * 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.
+   * Negative means all operations are performed in caller's thread.
+   * 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 or session_inter_op_thread_pool is configured.
+   * 
+ * + * int32 inter_op_parallelism_threads = 5; + */ + int getInterOpParallelismThreads(); + + /** + *
+   * 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, or the
+   * per-session thread pools configured by session_inter_op_thread_pool.
+   * This option is deprecated. The same effect can be achieved by setting
+   * session_inter_op_thread_pool to have one element, whose num_threads equals
+   * inter_op_parallelism_threads.
+   * 
+ * + * bool use_per_session_threads = 9; + */ + boolean getUsePerSessionThreads(); + + /** + *
+   * This option is experimental - it may be replaced with a different mechanism
+   * in the future.
+   * Configures session thread pools. If this is configured, then RunOptions for
+   * a Run call can select the thread pool to use.
+   * The intended use is for when some session invocations need to run in a
+   * background pool limited to a small number of threads:
+   * - For example, a session may be configured to have one large pool (for
+   * regular compute) and one small pool (for periodic, low priority work);
+   * using the small pool is currently the mechanism for limiting the inter-op
+   * parallelism of the low priority work.  Note that it does not limit the
+   * parallelism of work spawned by a single op kernel implementation.
+   * - Using this setting is normally not needed in training, but may help some
+   * serving use cases.
+   * - It is also generally recommended to set the global_name field of this
+   * proto, to avoid creating multiple large pools. It is typically better to
+   * run the non-low-priority work, even across sessions, in a single large
+   * pool.
+   * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + java.util.List + getSessionInterOpThreadPoolList(); + /** + *
+   * This option is experimental - it may be replaced with a different mechanism
+   * in the future.
+   * Configures session thread pools. If this is configured, then RunOptions for
+   * a Run call can select the thread pool to use.
+   * The intended use is for when some session invocations need to run in a
+   * background pool limited to a small number of threads:
+   * - For example, a session may be configured to have one large pool (for
+   * regular compute) and one small pool (for periodic, low priority work);
+   * using the small pool is currently the mechanism for limiting the inter-op
+   * parallelism of the low priority work.  Note that it does not limit the
+   * parallelism of work spawned by a single op kernel implementation.
+   * - Using this setting is normally not needed in training, but may help some
+   * serving use cases.
+   * - It is also generally recommended to set the global_name field of this
+   * proto, to avoid creating multiple large pools. It is typically better to
+   * run the non-low-priority work, even across sessions, in a single large
+   * pool.
+   * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + org.tensorflow.proto.framework.ThreadPoolOptionProto getSessionInterOpThreadPool(int index); + /** + *
+   * This option is experimental - it may be replaced with a different mechanism
+   * in the future.
+   * Configures session thread pools. If this is configured, then RunOptions for
+   * a Run call can select the thread pool to use.
+   * The intended use is for when some session invocations need to run in a
+   * background pool limited to a small number of threads:
+   * - For example, a session may be configured to have one large pool (for
+   * regular compute) and one small pool (for periodic, low priority work);
+   * using the small pool is currently the mechanism for limiting the inter-op
+   * parallelism of the low priority work.  Note that it does not limit the
+   * parallelism of work spawned by a single op kernel implementation.
+   * - Using this setting is normally not needed in training, but may help some
+   * serving use cases.
+   * - It is also generally recommended to set the global_name field of this
+   * proto, to avoid creating multiple large pools. It is typically better to
+   * run the non-low-priority work, even across sessions, in a single large
+   * pool.
+   * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + int getSessionInterOpThreadPoolCount(); + /** + *
+   * This option is experimental - it may be replaced with a different mechanism
+   * in the future.
+   * Configures session thread pools. If this is configured, then RunOptions for
+   * a Run call can select the thread pool to use.
+   * The intended use is for when some session invocations need to run in a
+   * background pool limited to a small number of threads:
+   * - For example, a session may be configured to have one large pool (for
+   * regular compute) and one small pool (for periodic, low priority work);
+   * using the small pool is currently the mechanism for limiting the inter-op
+   * parallelism of the low priority work.  Note that it does not limit the
+   * parallelism of work spawned by a single op kernel implementation.
+   * - Using this setting is normally not needed in training, but may help some
+   * serving use cases.
+   * - It is also generally recommended to set the global_name field of this
+   * proto, to avoid creating multiple large pools. It is typically better to
+   * run the non-low-priority work, even across sessions, in a single large
+   * pool.
+   * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + java.util.List + getSessionInterOpThreadPoolOrBuilderList(); + /** + *
+   * This option is experimental - it may be replaced with a different mechanism
+   * in the future.
+   * Configures session thread pools. If this is configured, then RunOptions for
+   * a Run call can select the thread pool to use.
+   * The intended use is for when some session invocations need to run in a
+   * background pool limited to a small number of threads:
+   * - For example, a session may be configured to have one large pool (for
+   * regular compute) and one small pool (for periodic, low priority work);
+   * using the small pool is currently the mechanism for limiting the inter-op
+   * parallelism of the low priority work.  Note that it does not limit the
+   * parallelism of work spawned by a single op kernel implementation.
+   * - Using this setting is normally not needed in training, but may help some
+   * serving use cases.
+   * - It is also generally recommended to set the global_name field of this
+   * proto, to avoid creating multiple large pools. It is typically better to
+   * run the non-low-priority work, even across sessions, in a single large
+   * pool.
+   * 
+ * + * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12; + */ + org.tensorflow.proto.framework.ThreadPoolOptionProtoOrBuilder getSessionInterOpThreadPoolOrBuilder( + int index); + + /** + *
+   * 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).
+   * 
+ * + * int32 placement_period = 3; + */ + int getPlacementPeriod(); + + /** + *
+   * 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.
+   * 
+ * + * repeated string device_filters = 4; + */ + java.util.List + getDeviceFiltersList(); + /** + *
+   * 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.
+   * 
+ * + * repeated string device_filters = 4; + */ + int getDeviceFiltersCount(); + /** + *
+   * 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.
+   * 
+ * + * repeated string device_filters = 4; + */ + java.lang.String getDeviceFilters(int index); + /** + *
+   * 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.
+   * 
+ * + * repeated string device_filters = 4; + */ + com.google.protobuf.ByteString + getDeviceFiltersBytes(int index); + + /** + *
+   * Options that apply to all GPUs.
+   * 
+ * + * .tensorflow.GPUOptions gpu_options = 6; + */ + boolean hasGpuOptions(); + /** + *
+   * Options that apply to all GPUs.
+   * 
+ * + * .tensorflow.GPUOptions gpu_options = 6; + */ + org.tensorflow.proto.framework.GPUOptions getGpuOptions(); + /** + *
+   * Options that apply to all GPUs.
+   * 
+ * + * .tensorflow.GPUOptions gpu_options = 6; + */ + org.tensorflow.proto.framework.GPUOptionsOrBuilder getGpuOptionsOrBuilder(); + + /** + *
+   * 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.
+   * 
+ * + * bool allow_soft_placement = 7; + */ + boolean getAllowSoftPlacement(); + + /** + *
+   * Whether device placements should be logged.
+   * 
+ * + * bool log_device_placement = 8; + */ + boolean getLogDevicePlacement(); + + /** + *
+   * Options that apply to all graphs.
+   * 
+ * + * .tensorflow.GraphOptions graph_options = 10; + */ + boolean hasGraphOptions(); + /** + *
+   * Options that apply to all graphs.
+   * 
+ * + * .tensorflow.GraphOptions graph_options = 10; + */ + org.tensorflow.proto.framework.GraphOptions getGraphOptions(); + /** + *
+   * Options that apply to all graphs.
+   * 
+ * + * .tensorflow.GraphOptions graph_options = 10; + */ + org.tensorflow.proto.framework.GraphOptionsOrBuilder getGraphOptionsOrBuilder(); + + /** + *
+   * Global timeout for all blocking operations in this session.  If non-zero,
+   * and not overridden on a per-operation basis, this value will be used as the
+   * deadline for all blocking operations.
+   * 
+ * + * int64 operation_timeout_in_ms = 11; + */ + long getOperationTimeoutInMs(); + + /** + *
+   * Options that apply when this session uses the distributed runtime.
+   * 
+ * + * .tensorflow.RPCOptions rpc_options = 13; + */ + boolean hasRpcOptions(); + /** + *
+   * Options that apply when this session uses the distributed runtime.
+   * 
+ * + * .tensorflow.RPCOptions rpc_options = 13; + */ + org.tensorflow.proto.framework.RPCOptions getRpcOptions(); + /** + *
+   * Options that apply when this session uses the distributed runtime.
+   * 
+ * + * .tensorflow.RPCOptions rpc_options = 13; + */ + org.tensorflow.proto.framework.RPCOptionsOrBuilder getRpcOptionsOrBuilder(); + + /** + *
+   * Optional list of all workers to use in this session.
+   * 
+ * + * .tensorflow.ClusterDef cluster_def = 14; + */ + boolean hasClusterDef(); + /** + *
+   * Optional list of all workers to use in this session.
+   * 
+ * + * .tensorflow.ClusterDef cluster_def = 14; + */ + org.tensorflow.proto.distruntime.ClusterDef getClusterDef(); + /** + *
+   * Optional list of all workers to use in this session.
+   * 
+ * + * .tensorflow.ClusterDef cluster_def = 14; + */ + org.tensorflow.proto.distruntime.ClusterDefOrBuilder getClusterDefOrBuilder(); + + /** + *
+   * If true, any resources such as Variables used in the session will not be
+   * shared with other sessions. However, when clusterspec propagation is
+   * enabled, this field is ignored and sessions are always isolated.
+   * 
+ * + * bool isolate_session_state = 15; + */ + boolean getIsolateSessionState(); + + /** + *
+   * When true, WorkerSessions are created with device attributes from the
+   * full cluster.
+   * This is helpful when a worker wants to partition a graph
+   * (for example during a PartitionedCallOp).
+   * 
+ * + * bool share_cluster_devices_in_session = 17; + */ + boolean getShareClusterDevicesInSession(); + + /** + * .tensorflow.ConfigProto.Experimental experimental = 16; + */ + boolean hasExperimental(); + /** + * .tensorflow.ConfigProto.Experimental experimental = 16; + */ + org.tensorflow.proto.framework.ConfigProto.Experimental getExperimental(); + /** + * .tensorflow.ConfigProto.Experimental experimental = 16; + */ + org.tensorflow.proto.framework.ConfigProto.ExperimentalOrBuilder getExperimentalOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ConfigProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ConfigProtos.java new file mode 100644 index 00000000000..892615e354e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ConfigProtos.java @@ -0,0 +1,377 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +public final class ConfigProtos { + private ConfigProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GPUOptions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GPUOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GPUOptions_Experimental_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GPUOptions_Experimental_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_OptimizerOptions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_OptimizerOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GraphOptions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GraphOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ThreadPoolOptionProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ThreadPoolOptionProto_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_RPCOptions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_RPCOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SessionMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SessionMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ConfigProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ConfigProto_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ConfigProto_DeviceCountEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ConfigProto_DeviceCountEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ConfigProto_Experimental_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ConfigProto_Experimental_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_RunOptions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_RunOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_RunOptions_Experimental_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_RunOptions_Experimental_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_RunMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_RunMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_RunMetadata_FunctionGraphs_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_RunMetadata_FunctionGraphs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_TensorConnection_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_TensorConnection_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_CallableOptions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_CallableOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_CallableOptions_FeedDevicesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_CallableOptions_FeedDevicesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_CallableOptions_FetchDevicesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_CallableOptions_FetchDevicesEntry_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/protobuf/config.proto\022" + + "\ntensorflow\032*tensorflow/core/framework/c" + + "ost_graph.proto\032%tensorflow/core/framewo" + + "rk/graph.proto\032*tensorflow/core/framewor" + + "k/step_stats.proto\032&tensorflow/core/prot" + + "obuf/cluster.proto\032$tensorflow/core/prot" + + "obuf/debug.proto\032.tensorflow/core/protob" + + "uf/rewriter_config.proto\"\267\005\n\nGPUOptions\022" + + "\'\n\037per_process_gpu_memory_fraction\030\001 \001(\001" + + "\022\024\n\014allow_growth\030\004 \001(\010\022\026\n\016allocator_type" + + "\030\002 \001(\t\022\037\n\027deferred_deletion_bytes\030\003 \001(\003\022" + + "\033\n\023visible_device_list\030\005 \001(\t\022\"\n\032polling_" + + "active_delay_usecs\030\006 \001(\005\022$\n\034polling_inac" + + "tive_delay_msecs\030\007 \001(\005\022\034\n\024force_gpu_comp" + + "atible\030\010 \001(\010\0229\n\014experimental\030\t \001(\0132#.ten" + + "sorflow.GPUOptions.Experimental\032\360\002\n\014Expe" + + "rimental\022K\n\017virtual_devices\030\001 \003(\01322.tens" + + "orflow.GPUOptions.Experimental.VirtualDe" + + "vices\022\032\n\022use_unified_memory\030\002 \001(\010\022#\n\033num" + + "_dev_to_dev_copy_streams\030\003 \001(\005\022\035\n\025collec" + + "tive_ring_order\030\004 \001(\t\022\035\n\025timestamped_all" + + "ocator\030\005 \001(\010\022#\n\033kernel_tracker_max_inter" + + "val\030\007 \001(\005\022 \n\030kernel_tracker_max_bytes\030\010 " + + "\001(\005\022\"\n\032kernel_tracker_max_pending\030\t \001(\005\032" + + ")\n\016VirtualDevices\022\027\n\017memory_limit_mb\030\001 \003" + + "(\002\"\205\003\n\020OptimizerOptions\022+\n#do_common_sub" + + "expression_elimination\030\001 \001(\010\022\033\n\023do_const" + + "ant_folding\030\002 \001(\010\022$\n\034max_folded_constant" + + "_in_bytes\030\006 \001(\003\022\034\n\024do_function_inlining\030" + + "\004 \001(\010\0225\n\topt_level\030\003 \001(\0162\".tensorflow.Op" + + "timizerOptions.Level\022E\n\020global_jit_level" + + "\030\005 \001(\0162+.tensorflow.OptimizerOptions.Glo" + + "balJitLevel\" \n\005Level\022\006\n\002L1\020\000\022\017\n\002L0\020\377\377\377\377\377" + + "\377\377\377\377\001\"C\n\016GlobalJitLevel\022\013\n\007DEFAULT\020\000\022\020\n\003" + + "OFF\020\377\377\377\377\377\377\377\377\377\001\022\010\n\004ON_1\020\001\022\010\n\004ON_2\020\002\"\356\002\n\014G" + + "raphOptions\022\036\n\026enable_recv_scheduling\030\002 " + + "\001(\010\0227\n\021optimizer_options\030\003 \001(\0132\034.tensorf" + + "low.OptimizerOptions\022\030\n\020build_cost_model" + + "\030\004 \001(\003\022\036\n\026build_cost_model_after\030\t \001(\003\022\024" + + "\n\014infer_shapes\030\005 \001(\010\022\032\n\022place_pruned_gra" + + "ph\030\006 \001(\010\022 \n\030enable_bfloat16_sendrecv\030\007 \001" + + "(\010\022\025\n\rtimeline_step\030\010 \001(\005\0223\n\017rewrite_opt" + + "ions\030\n \001(\0132\032.tensorflow.RewriterConfigJ\004" + + "\010\001\020\002R%skip_common_subexpression_eliminat" + + "ion\"A\n\025ThreadPoolOptionProto\022\023\n\013num_thre" + + "ads\030\001 \001(\005\022\023\n\013global_name\030\002 \001(\t\"\264\001\n\nRPCOp" + + "tions\022$\n\034use_rpc_for_inprocess_master\030\001 " + + "\001(\010\022\035\n\025compression_algorithm\030\002 \001(\t\022\031\n\021co" + + "mpression_level\030\003 \001(\005\022\032\n\022cache_rpc_respo" + + "nse\030\004 \001(\010\022*\n\"disable_session_connection_" + + "sharing\030\005 \001(\010\"0\n\017SessionMetadata\022\014\n\004name" + + "\030\001 \001(\t\022\017\n\007version\030\002 \001(\003\"\240\n\n\013ConfigProto\022" + + ">\n\014device_count\030\001 \003(\0132(.tensorflow.Confi" + + "gProto.DeviceCountEntry\022$\n\034intra_op_para" + + "llelism_threads\030\002 \001(\005\022$\n\034inter_op_parall" + + "elism_threads\030\005 \001(\005\022\037\n\027use_per_session_t" + + "hreads\030\t \001(\010\022G\n\034session_inter_op_thread_" + + "pool\030\014 \003(\0132!.tensorflow.ThreadPoolOption" + + "Proto\022\030\n\020placement_period\030\003 \001(\005\022\026\n\016devic" + + "e_filters\030\004 \003(\t\022+\n\013gpu_options\030\006 \001(\0132\026.t" + + "ensorflow.GPUOptions\022\034\n\024allow_soft_place" + + "ment\030\007 \001(\010\022\034\n\024log_device_placement\030\010 \001(\010" + + "\022/\n\rgraph_options\030\n \001(\0132\030.tensorflow.Gra" + + "phOptions\022\037\n\027operation_timeout_in_ms\030\013 \001" + + "(\003\022+\n\013rpc_options\030\r \001(\0132\026.tensorflow.RPC" + + "Options\022+\n\013cluster_def\030\016 \001(\0132\026.tensorflo" + + "w.ClusterDef\022\035\n\025isolate_session_state\030\017 " + + "\001(\010\022(\n share_cluster_devices_in_session\030" + + "\021 \001(\010\022:\n\014experimental\030\020 \001(\0132$.tensorflow" + + ".ConfigProto.Experimental\0322\n\020DeviceCount" + + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\032\232\004" + + "\n\014Experimental\022\037\n\027collective_group_leade" + + "r\030\001 \001(\t\022\025\n\rexecutor_type\030\003 \001(\t\022\032\n\022recv_b" + + "uf_max_chunk\030\004 \001(\005\022\031\n\021use_numa_affinity\030" + + "\005 \001(\010\0225\n-collective_deterministic_sequen" + + "tial_execution\030\006 \001(\010\022\027\n\017collective_nccl\030" + + "\007 \001(\010\0226\n.share_session_state_in_clusters" + + "pec_propagation\030\010 \001(\010\022\037\n\027disable_thread_" + + "spinning\030\t \001(\010\022(\n share_cluster_devices_" + + "in_session\030\n \001(\010\0225\n\020session_metadata\030\013 \001" + + "(\0132\033.tensorflow.SessionMetadata\022!\n\031optim" + + "ize_for_static_graph\030\014 \001(\010\022\032\n\022enable_mli" + + "r_bridge\030\r \001(\010\022\'\n\037disable_output_partiti" + + "on_graphs\030\016 \001(\010\022#\n\033xla_fusion_autotuner_" + + "thresh\030\017 \001(\003J\004\010\002\020\003\"\330\003\n\nRunOptions\0226\n\013tra" + + "ce_level\030\001 \001(\0162!.tensorflow.RunOptions.T" + + "raceLevel\022\025\n\rtimeout_in_ms\030\002 \001(\003\022\034\n\024inte" + + "r_op_thread_pool\030\003 \001(\005\022\037\n\027output_partiti" + + "on_graphs\030\005 \001(\010\022/\n\rdebug_options\030\006 \001(\0132\030" + + ".tensorflow.DebugOptions\022*\n\"report_tenso" + + "r_allocations_upon_oom\030\007 \001(\010\0229\n\014experime" + + "ntal\030\010 \001(\0132#.tensorflow.RunOptions.Exper" + + "imental\032J\n\014Experimental\022\034\n\024collective_gr" + + "aph_key\030\001 \001(\003\022\034\n\024use_run_handler_pool\030\002 " + + "\001(\010\"R\n\nTraceLevel\022\014\n\010NO_TRACE\020\000\022\022\n\016SOFTW" + + "ARE_TRACE\020\001\022\022\n\016HARDWARE_TRACE\020\002\022\016\n\nFULL_" + + "TRACE\020\003J\004\010\004\020\005\"\207\003\n\013RunMetadata\022)\n\nstep_st" + + "ats\030\001 \001(\0132\025.tensorflow.StepStats\022,\n\ncost" + + "_graph\030\002 \001(\0132\030.tensorflow.CostGraphDef\022." + + "\n\020partition_graphs\030\003 \003(\0132\024.tensorflow.Gr" + + "aphDef\022?\n\017function_graphs\030\004 \003(\0132&.tensor" + + "flow.RunMetadata.FunctionGraphs\032\255\001\n\016Func" + + "tionGraphs\022.\n\020partition_graphs\030\001 \003(\0132\024.t" + + "ensorflow.GraphDef\0224\n\026pre_optimization_g" + + "raph\030\002 \001(\0132\024.tensorflow.GraphDef\0225\n\027post" + + "_optimization_graph\030\003 \001(\0132\024.tensorflow.G" + + "raphDef\":\n\020TensorConnection\022\023\n\013from_tens" + + "or\030\001 \001(\t\022\021\n\tto_tensor\030\002 \001(\t\"\260\003\n\017Callable" + + "Options\022\014\n\004feed\030\001 \003(\t\022\r\n\005fetch\030\002 \003(\t\022\016\n\006" + + "target\030\003 \003(\t\022+\n\013run_options\030\004 \001(\0132\026.tens" + + "orflow.RunOptions\0227\n\021tensor_connection\030\005" + + " \003(\0132\034.tensorflow.TensorConnection\022B\n\014fe" + + "ed_devices\030\006 \003(\0132,.tensorflow.CallableOp" + + "tions.FeedDevicesEntry\022D\n\rfetch_devices\030" + + "\007 \003(\0132-.tensorflow.CallableOptions.Fetch" + + "DevicesEntry\022\027\n\017fetch_skip_sync\030\010 \001(\010\0322\n" + + "\020FeedDevicesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001\0323\n\021FetchDevicesEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B}\n\036org.tensorflow" + + ".proto.frameworkB\014ConfigProtosP\001ZHgithub" + + ".com/tensorflow/tensorflow/tensorflow/go" + + "/core/core_protos_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.CostGraphProtos.getDescriptor(), + org.tensorflow.proto.framework.GraphProtos.getDescriptor(), + org.tensorflow.proto.framework.StepStatsProtos.getDescriptor(), + org.tensorflow.proto.distruntime.ClusterProtos.getDescriptor(), + org.tensorflow.proto.framework.DebugProtos.getDescriptor(), + org.tensorflow.proto.framework.RewriterConfigProtos.getDescriptor(), + }); + internal_static_tensorflow_GPUOptions_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_GPUOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GPUOptions_descriptor, + new java.lang.String[] { "PerProcessGpuMemoryFraction", "AllowGrowth", "AllocatorType", "DeferredDeletionBytes", "VisibleDeviceList", "PollingActiveDelayUsecs", "PollingInactiveDelayMsecs", "ForceGpuCompatible", "Experimental", }); + internal_static_tensorflow_GPUOptions_Experimental_descriptor = + internal_static_tensorflow_GPUOptions_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_GPUOptions_Experimental_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GPUOptions_Experimental_descriptor, + new java.lang.String[] { "VirtualDevices", "UseUnifiedMemory", "NumDevToDevCopyStreams", "CollectiveRingOrder", "TimestampedAllocator", "KernelTrackerMaxInterval", "KernelTrackerMaxBytes", "KernelTrackerMaxPending", }); + internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_descriptor = + internal_static_tensorflow_GPUOptions_Experimental_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_descriptor, + new java.lang.String[] { "MemoryLimitMb", }); + internal_static_tensorflow_OptimizerOptions_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_OptimizerOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_OptimizerOptions_descriptor, + new java.lang.String[] { "DoCommonSubexpressionElimination", "DoConstantFolding", "MaxFoldedConstantInBytes", "DoFunctionInlining", "OptLevel", "GlobalJitLevel", }); + internal_static_tensorflow_GraphOptions_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_tensorflow_GraphOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GraphOptions_descriptor, + new java.lang.String[] { "EnableRecvScheduling", "OptimizerOptions", "BuildCostModel", "BuildCostModelAfter", "InferShapes", "PlacePrunedGraph", "EnableBfloat16Sendrecv", "TimelineStep", "RewriteOptions", }); + internal_static_tensorflow_ThreadPoolOptionProto_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_tensorflow_ThreadPoolOptionProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ThreadPoolOptionProto_descriptor, + new java.lang.String[] { "NumThreads", "GlobalName", }); + internal_static_tensorflow_RPCOptions_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_tensorflow_RPCOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_RPCOptions_descriptor, + new java.lang.String[] { "UseRpcForInprocessMaster", "CompressionAlgorithm", "CompressionLevel", "CacheRpcResponse", "DisableSessionConnectionSharing", }); + internal_static_tensorflow_SessionMetadata_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_tensorflow_SessionMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SessionMetadata_descriptor, + new java.lang.String[] { "Name", "Version", }); + internal_static_tensorflow_ConfigProto_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_tensorflow_ConfigProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ConfigProto_descriptor, + new java.lang.String[] { "DeviceCount", "IntraOpParallelismThreads", "InterOpParallelismThreads", "UsePerSessionThreads", "SessionInterOpThreadPool", "PlacementPeriod", "DeviceFilters", "GpuOptions", "AllowSoftPlacement", "LogDevicePlacement", "GraphOptions", "OperationTimeoutInMs", "RpcOptions", "ClusterDef", "IsolateSessionState", "ShareClusterDevicesInSession", "Experimental", }); + internal_static_tensorflow_ConfigProto_DeviceCountEntry_descriptor = + internal_static_tensorflow_ConfigProto_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_ConfigProto_DeviceCountEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ConfigProto_DeviceCountEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_ConfigProto_Experimental_descriptor = + internal_static_tensorflow_ConfigProto_descriptor.getNestedTypes().get(1); + internal_static_tensorflow_ConfigProto_Experimental_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ConfigProto_Experimental_descriptor, + new java.lang.String[] { "CollectiveGroupLeader", "ExecutorType", "RecvBufMaxChunk", "UseNumaAffinity", "CollectiveDeterministicSequentialExecution", "CollectiveNccl", "ShareSessionStateInClusterspecPropagation", "DisableThreadSpinning", "ShareClusterDevicesInSession", "SessionMetadata", "OptimizeForStaticGraph", "EnableMlirBridge", "DisableOutputPartitionGraphs", "XlaFusionAutotunerThresh", }); + internal_static_tensorflow_RunOptions_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_tensorflow_RunOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_RunOptions_descriptor, + new java.lang.String[] { "TraceLevel", "TimeoutInMs", "InterOpThreadPool", "OutputPartitionGraphs", "DebugOptions", "ReportTensorAllocationsUponOom", "Experimental", }); + internal_static_tensorflow_RunOptions_Experimental_descriptor = + internal_static_tensorflow_RunOptions_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_RunOptions_Experimental_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_RunOptions_Experimental_descriptor, + new java.lang.String[] { "CollectiveGraphKey", "UseRunHandlerPool", }); + internal_static_tensorflow_RunMetadata_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_tensorflow_RunMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_RunMetadata_descriptor, + new java.lang.String[] { "StepStats", "CostGraph", "PartitionGraphs", "FunctionGraphs", }); + internal_static_tensorflow_RunMetadata_FunctionGraphs_descriptor = + internal_static_tensorflow_RunMetadata_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_RunMetadata_FunctionGraphs_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_RunMetadata_FunctionGraphs_descriptor, + new java.lang.String[] { "PartitionGraphs", "PreOptimizationGraph", "PostOptimizationGraph", }); + internal_static_tensorflow_TensorConnection_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_tensorflow_TensorConnection_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_TensorConnection_descriptor, + new java.lang.String[] { "FromTensor", "ToTensor", }); + internal_static_tensorflow_CallableOptions_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_tensorflow_CallableOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_CallableOptions_descriptor, + new java.lang.String[] { "Feed", "Fetch", "Target", "RunOptions", "TensorConnection", "FeedDevices", "FetchDevices", "FetchSkipSync", }); + internal_static_tensorflow_CallableOptions_FeedDevicesEntry_descriptor = + internal_static_tensorflow_CallableOptions_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_CallableOptions_FeedDevicesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_CallableOptions_FeedDevicesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_CallableOptions_FetchDevicesEntry_descriptor = + internal_static_tensorflow_CallableOptions_descriptor.getNestedTypes().get(1); + internal_static_tensorflow_CallableOptions_FetchDevicesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_CallableOptions_FetchDevicesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + org.tensorflow.proto.framework.CostGraphProtos.getDescriptor(); + org.tensorflow.proto.framework.GraphProtos.getDescriptor(); + org.tensorflow.proto.framework.StepStatsProtos.getDescriptor(); + org.tensorflow.proto.distruntime.ClusterProtos.getDescriptor(); + org.tensorflow.proto.framework.DebugProtos.getDescriptor(); + org.tensorflow.proto.framework.RewriterConfigProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ControlFlowContextDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ControlFlowContextDef.java new file mode 100644 index 00000000000..48b3b2cd638 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ControlFlowContextDef.java @@ -0,0 +1,903 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/control_flow.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Container for any kind of control flow context. Any other control flow
+ * contexts that are added below should also be added here.
+ * 
+ * + * Protobuf type {@code tensorflow.ControlFlowContextDef} + */ +public final class ControlFlowContextDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ControlFlowContextDef) + ControlFlowContextDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use ControlFlowContextDef.newBuilder() to construct. + private ControlFlowContextDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ControlFlowContextDef() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ControlFlowContextDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ControlFlowContextDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.tensorflow.proto.framework.CondContextDef.Builder subBuilder = null; + if (ctxtCase_ == 1) { + subBuilder = ((org.tensorflow.proto.framework.CondContextDef) ctxt_).toBuilder(); + } + ctxt_ = + input.readMessage(org.tensorflow.proto.framework.CondContextDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.CondContextDef) ctxt_); + ctxt_ = subBuilder.buildPartial(); + } + ctxtCase_ = 1; + break; + } + case 18: { + org.tensorflow.proto.framework.WhileContextDef.Builder subBuilder = null; + if (ctxtCase_ == 2) { + subBuilder = ((org.tensorflow.proto.framework.WhileContextDef) ctxt_).toBuilder(); + } + ctxt_ = + input.readMessage(org.tensorflow.proto.framework.WhileContextDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.WhileContextDef) ctxt_); + ctxt_ = subBuilder.buildPartial(); + } + ctxtCase_ = 2; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ControlFlowProtos.internal_static_tensorflow_ControlFlowContextDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ControlFlowProtos.internal_static_tensorflow_ControlFlowContextDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ControlFlowContextDef.class, org.tensorflow.proto.framework.ControlFlowContextDef.Builder.class); + } + + private int ctxtCase_ = 0; + private java.lang.Object ctxt_; + public enum CtxtCase + implements com.google.protobuf.Internal.EnumLite { + COND_CTXT(1), + WHILE_CTXT(2), + CTXT_NOT_SET(0); + private final int value; + private CtxtCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CtxtCase valueOf(int value) { + return forNumber(value); + } + + public static CtxtCase forNumber(int value) { + switch (value) { + case 1: return COND_CTXT; + case 2: return WHILE_CTXT; + case 0: return CTXT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public CtxtCase + getCtxtCase() { + return CtxtCase.forNumber( + ctxtCase_); + } + + public static final int COND_CTXT_FIELD_NUMBER = 1; + /** + * .tensorflow.CondContextDef cond_ctxt = 1; + */ + public boolean hasCondCtxt() { + return ctxtCase_ == 1; + } + /** + * .tensorflow.CondContextDef cond_ctxt = 1; + */ + public org.tensorflow.proto.framework.CondContextDef getCondCtxt() { + if (ctxtCase_ == 1) { + return (org.tensorflow.proto.framework.CondContextDef) ctxt_; + } + return org.tensorflow.proto.framework.CondContextDef.getDefaultInstance(); + } + /** + * .tensorflow.CondContextDef cond_ctxt = 1; + */ + public org.tensorflow.proto.framework.CondContextDefOrBuilder getCondCtxtOrBuilder() { + if (ctxtCase_ == 1) { + return (org.tensorflow.proto.framework.CondContextDef) ctxt_; + } + return org.tensorflow.proto.framework.CondContextDef.getDefaultInstance(); + } + + public static final int WHILE_CTXT_FIELD_NUMBER = 2; + /** + * .tensorflow.WhileContextDef while_ctxt = 2; + */ + public boolean hasWhileCtxt() { + return ctxtCase_ == 2; + } + /** + * .tensorflow.WhileContextDef while_ctxt = 2; + */ + public org.tensorflow.proto.framework.WhileContextDef getWhileCtxt() { + if (ctxtCase_ == 2) { + return (org.tensorflow.proto.framework.WhileContextDef) ctxt_; + } + return org.tensorflow.proto.framework.WhileContextDef.getDefaultInstance(); + } + /** + * .tensorflow.WhileContextDef while_ctxt = 2; + */ + public org.tensorflow.proto.framework.WhileContextDefOrBuilder getWhileCtxtOrBuilder() { + if (ctxtCase_ == 2) { + return (org.tensorflow.proto.framework.WhileContextDef) ctxt_; + } + return org.tensorflow.proto.framework.WhileContextDef.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (ctxtCase_ == 1) { + output.writeMessage(1, (org.tensorflow.proto.framework.CondContextDef) ctxt_); + } + if (ctxtCase_ == 2) { + output.writeMessage(2, (org.tensorflow.proto.framework.WhileContextDef) ctxt_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (ctxtCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (org.tensorflow.proto.framework.CondContextDef) ctxt_); + } + if (ctxtCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (org.tensorflow.proto.framework.WhileContextDef) ctxt_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.ControlFlowContextDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.ControlFlowContextDef other = (org.tensorflow.proto.framework.ControlFlowContextDef) obj; + + if (!getCtxtCase().equals(other.getCtxtCase())) return false; + switch (ctxtCase_) { + case 1: + if (!getCondCtxt() + .equals(other.getCondCtxt())) return false; + break; + case 2: + if (!getWhileCtxt() + .equals(other.getWhileCtxt())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (ctxtCase_) { + case 1: + hash = (37 * hash) + COND_CTXT_FIELD_NUMBER; + hash = (53 * hash) + getCondCtxt().hashCode(); + break; + case 2: + hash = (37 * hash) + WHILE_CTXT_FIELD_NUMBER; + hash = (53 * hash) + getWhileCtxt().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.ControlFlowContextDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ControlFlowContextDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ControlFlowContextDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ControlFlowContextDef 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.proto.framework.ControlFlowContextDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ControlFlowContextDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ControlFlowContextDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ControlFlowContextDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ControlFlowContextDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ControlFlowContextDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ControlFlowContextDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ControlFlowContextDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.ControlFlowContextDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Container for any kind of control flow context. Any other control flow
+   * contexts that are added below should also be added here.
+   * 
+ * + * Protobuf type {@code tensorflow.ControlFlowContextDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ControlFlowContextDef) + org.tensorflow.proto.framework.ControlFlowContextDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ControlFlowProtos.internal_static_tensorflow_ControlFlowContextDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ControlFlowProtos.internal_static_tensorflow_ControlFlowContextDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ControlFlowContextDef.class, org.tensorflow.proto.framework.ControlFlowContextDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.ControlFlowContextDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + ctxtCase_ = 0; + ctxt_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ControlFlowProtos.internal_static_tensorflow_ControlFlowContextDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ControlFlowContextDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.ControlFlowContextDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.ControlFlowContextDef build() { + org.tensorflow.proto.framework.ControlFlowContextDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ControlFlowContextDef buildPartial() { + org.tensorflow.proto.framework.ControlFlowContextDef result = new org.tensorflow.proto.framework.ControlFlowContextDef(this); + if (ctxtCase_ == 1) { + if (condCtxtBuilder_ == null) { + result.ctxt_ = ctxt_; + } else { + result.ctxt_ = condCtxtBuilder_.build(); + } + } + if (ctxtCase_ == 2) { + if (whileCtxtBuilder_ == null) { + result.ctxt_ = ctxt_; + } else { + result.ctxt_ = whileCtxtBuilder_.build(); + } + } + result.ctxtCase_ = ctxtCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.ControlFlowContextDef) { + return mergeFrom((org.tensorflow.proto.framework.ControlFlowContextDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.ControlFlowContextDef other) { + if (other == org.tensorflow.proto.framework.ControlFlowContextDef.getDefaultInstance()) return this; + switch (other.getCtxtCase()) { + case COND_CTXT: { + mergeCondCtxt(other.getCondCtxt()); + break; + } + case WHILE_CTXT: { + mergeWhileCtxt(other.getWhileCtxt()); + break; + } + case CTXT_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.ControlFlowContextDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.ControlFlowContextDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int ctxtCase_ = 0; + private java.lang.Object ctxt_; + public CtxtCase + getCtxtCase() { + return CtxtCase.forNumber( + ctxtCase_); + } + + public Builder clearCtxt() { + ctxtCase_ = 0; + ctxt_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CondContextDef, org.tensorflow.proto.framework.CondContextDef.Builder, org.tensorflow.proto.framework.CondContextDefOrBuilder> condCtxtBuilder_; + /** + * .tensorflow.CondContextDef cond_ctxt = 1; + */ + public boolean hasCondCtxt() { + return ctxtCase_ == 1; + } + /** + * .tensorflow.CondContextDef cond_ctxt = 1; + */ + public org.tensorflow.proto.framework.CondContextDef getCondCtxt() { + if (condCtxtBuilder_ == null) { + if (ctxtCase_ == 1) { + return (org.tensorflow.proto.framework.CondContextDef) ctxt_; + } + return org.tensorflow.proto.framework.CondContextDef.getDefaultInstance(); + } else { + if (ctxtCase_ == 1) { + return condCtxtBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.CondContextDef.getDefaultInstance(); + } + } + /** + * .tensorflow.CondContextDef cond_ctxt = 1; + */ + public Builder setCondCtxt(org.tensorflow.proto.framework.CondContextDef value) { + if (condCtxtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ctxt_ = value; + onChanged(); + } else { + condCtxtBuilder_.setMessage(value); + } + ctxtCase_ = 1; + return this; + } + /** + * .tensorflow.CondContextDef cond_ctxt = 1; + */ + public Builder setCondCtxt( + org.tensorflow.proto.framework.CondContextDef.Builder builderForValue) { + if (condCtxtBuilder_ == null) { + ctxt_ = builderForValue.build(); + onChanged(); + } else { + condCtxtBuilder_.setMessage(builderForValue.build()); + } + ctxtCase_ = 1; + return this; + } + /** + * .tensorflow.CondContextDef cond_ctxt = 1; + */ + public Builder mergeCondCtxt(org.tensorflow.proto.framework.CondContextDef value) { + if (condCtxtBuilder_ == null) { + if (ctxtCase_ == 1 && + ctxt_ != org.tensorflow.proto.framework.CondContextDef.getDefaultInstance()) { + ctxt_ = org.tensorflow.proto.framework.CondContextDef.newBuilder((org.tensorflow.proto.framework.CondContextDef) ctxt_) + .mergeFrom(value).buildPartial(); + } else { + ctxt_ = value; + } + onChanged(); + } else { + if (ctxtCase_ == 1) { + condCtxtBuilder_.mergeFrom(value); + } + condCtxtBuilder_.setMessage(value); + } + ctxtCase_ = 1; + return this; + } + /** + * .tensorflow.CondContextDef cond_ctxt = 1; + */ + public Builder clearCondCtxt() { + if (condCtxtBuilder_ == null) { + if (ctxtCase_ == 1) { + ctxtCase_ = 0; + ctxt_ = null; + onChanged(); + } + } else { + if (ctxtCase_ == 1) { + ctxtCase_ = 0; + ctxt_ = null; + } + condCtxtBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.CondContextDef cond_ctxt = 1; + */ + public org.tensorflow.proto.framework.CondContextDef.Builder getCondCtxtBuilder() { + return getCondCtxtFieldBuilder().getBuilder(); + } + /** + * .tensorflow.CondContextDef cond_ctxt = 1; + */ + public org.tensorflow.proto.framework.CondContextDefOrBuilder getCondCtxtOrBuilder() { + if ((ctxtCase_ == 1) && (condCtxtBuilder_ != null)) { + return condCtxtBuilder_.getMessageOrBuilder(); + } else { + if (ctxtCase_ == 1) { + return (org.tensorflow.proto.framework.CondContextDef) ctxt_; + } + return org.tensorflow.proto.framework.CondContextDef.getDefaultInstance(); + } + } + /** + * .tensorflow.CondContextDef cond_ctxt = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CondContextDef, org.tensorflow.proto.framework.CondContextDef.Builder, org.tensorflow.proto.framework.CondContextDefOrBuilder> + getCondCtxtFieldBuilder() { + if (condCtxtBuilder_ == null) { + if (!(ctxtCase_ == 1)) { + ctxt_ = org.tensorflow.proto.framework.CondContextDef.getDefaultInstance(); + } + condCtxtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CondContextDef, org.tensorflow.proto.framework.CondContextDef.Builder, org.tensorflow.proto.framework.CondContextDefOrBuilder>( + (org.tensorflow.proto.framework.CondContextDef) ctxt_, + getParentForChildren(), + isClean()); + ctxt_ = null; + } + ctxtCase_ = 1; + onChanged();; + return condCtxtBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.WhileContextDef, org.tensorflow.proto.framework.WhileContextDef.Builder, org.tensorflow.proto.framework.WhileContextDefOrBuilder> whileCtxtBuilder_; + /** + * .tensorflow.WhileContextDef while_ctxt = 2; + */ + public boolean hasWhileCtxt() { + return ctxtCase_ == 2; + } + /** + * .tensorflow.WhileContextDef while_ctxt = 2; + */ + public org.tensorflow.proto.framework.WhileContextDef getWhileCtxt() { + if (whileCtxtBuilder_ == null) { + if (ctxtCase_ == 2) { + return (org.tensorflow.proto.framework.WhileContextDef) ctxt_; + } + return org.tensorflow.proto.framework.WhileContextDef.getDefaultInstance(); + } else { + if (ctxtCase_ == 2) { + return whileCtxtBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.WhileContextDef.getDefaultInstance(); + } + } + /** + * .tensorflow.WhileContextDef while_ctxt = 2; + */ + public Builder setWhileCtxt(org.tensorflow.proto.framework.WhileContextDef value) { + if (whileCtxtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ctxt_ = value; + onChanged(); + } else { + whileCtxtBuilder_.setMessage(value); + } + ctxtCase_ = 2; + return this; + } + /** + * .tensorflow.WhileContextDef while_ctxt = 2; + */ + public Builder setWhileCtxt( + org.tensorflow.proto.framework.WhileContextDef.Builder builderForValue) { + if (whileCtxtBuilder_ == null) { + ctxt_ = builderForValue.build(); + onChanged(); + } else { + whileCtxtBuilder_.setMessage(builderForValue.build()); + } + ctxtCase_ = 2; + return this; + } + /** + * .tensorflow.WhileContextDef while_ctxt = 2; + */ + public Builder mergeWhileCtxt(org.tensorflow.proto.framework.WhileContextDef value) { + if (whileCtxtBuilder_ == null) { + if (ctxtCase_ == 2 && + ctxt_ != org.tensorflow.proto.framework.WhileContextDef.getDefaultInstance()) { + ctxt_ = org.tensorflow.proto.framework.WhileContextDef.newBuilder((org.tensorflow.proto.framework.WhileContextDef) ctxt_) + .mergeFrom(value).buildPartial(); + } else { + ctxt_ = value; + } + onChanged(); + } else { + if (ctxtCase_ == 2) { + whileCtxtBuilder_.mergeFrom(value); + } + whileCtxtBuilder_.setMessage(value); + } + ctxtCase_ = 2; + return this; + } + /** + * .tensorflow.WhileContextDef while_ctxt = 2; + */ + public Builder clearWhileCtxt() { + if (whileCtxtBuilder_ == null) { + if (ctxtCase_ == 2) { + ctxtCase_ = 0; + ctxt_ = null; + onChanged(); + } + } else { + if (ctxtCase_ == 2) { + ctxtCase_ = 0; + ctxt_ = null; + } + whileCtxtBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.WhileContextDef while_ctxt = 2; + */ + public org.tensorflow.proto.framework.WhileContextDef.Builder getWhileCtxtBuilder() { + return getWhileCtxtFieldBuilder().getBuilder(); + } + /** + * .tensorflow.WhileContextDef while_ctxt = 2; + */ + public org.tensorflow.proto.framework.WhileContextDefOrBuilder getWhileCtxtOrBuilder() { + if ((ctxtCase_ == 2) && (whileCtxtBuilder_ != null)) { + return whileCtxtBuilder_.getMessageOrBuilder(); + } else { + if (ctxtCase_ == 2) { + return (org.tensorflow.proto.framework.WhileContextDef) ctxt_; + } + return org.tensorflow.proto.framework.WhileContextDef.getDefaultInstance(); + } + } + /** + * .tensorflow.WhileContextDef while_ctxt = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.WhileContextDef, org.tensorflow.proto.framework.WhileContextDef.Builder, org.tensorflow.proto.framework.WhileContextDefOrBuilder> + getWhileCtxtFieldBuilder() { + if (whileCtxtBuilder_ == null) { + if (!(ctxtCase_ == 2)) { + ctxt_ = org.tensorflow.proto.framework.WhileContextDef.getDefaultInstance(); + } + whileCtxtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.WhileContextDef, org.tensorflow.proto.framework.WhileContextDef.Builder, org.tensorflow.proto.framework.WhileContextDefOrBuilder>( + (org.tensorflow.proto.framework.WhileContextDef) ctxt_, + getParentForChildren(), + isClean()); + ctxt_ = null; + } + ctxtCase_ = 2; + onChanged();; + return whileCtxtBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ControlFlowContextDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ControlFlowContextDef) + private static final org.tensorflow.proto.framework.ControlFlowContextDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.ControlFlowContextDef(); + } + + public static org.tensorflow.proto.framework.ControlFlowContextDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ControlFlowContextDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ControlFlowContextDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ControlFlowContextDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ControlFlowContextDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ControlFlowContextDefOrBuilder.java new file mode 100644 index 00000000000..b4482047fd9 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ControlFlowContextDefOrBuilder.java @@ -0,0 +1,37 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/control_flow.proto + +package org.tensorflow.proto.framework; + +public interface ControlFlowContextDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ControlFlowContextDef) + com.google.protobuf.MessageOrBuilder { + + /** + * .tensorflow.CondContextDef cond_ctxt = 1; + */ + boolean hasCondCtxt(); + /** + * .tensorflow.CondContextDef cond_ctxt = 1; + */ + org.tensorflow.proto.framework.CondContextDef getCondCtxt(); + /** + * .tensorflow.CondContextDef cond_ctxt = 1; + */ + org.tensorflow.proto.framework.CondContextDefOrBuilder getCondCtxtOrBuilder(); + + /** + * .tensorflow.WhileContextDef while_ctxt = 2; + */ + boolean hasWhileCtxt(); + /** + * .tensorflow.WhileContextDef while_ctxt = 2; + */ + org.tensorflow.proto.framework.WhileContextDef getWhileCtxt(); + /** + * .tensorflow.WhileContextDef while_ctxt = 2; + */ + org.tensorflow.proto.framework.WhileContextDefOrBuilder getWhileCtxtOrBuilder(); + + public org.tensorflow.proto.framework.ControlFlowContextDef.CtxtCase getCtxtCase(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ControlFlowProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ControlFlowProtos.java new file mode 100644 index 00000000000..97a565aa465 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ControlFlowProtos.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/control_flow.proto + +package org.tensorflow.proto.framework; + +public final class ControlFlowProtos { + private ControlFlowProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ValuesDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ValuesDef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ValuesDef_ExternalValuesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ValuesDef_ExternalValuesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ControlFlowContextDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ControlFlowContextDef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_CondContextDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_CondContextDef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_WhileContextDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_WhileContextDef_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/protobuf/control_flow." + + "proto\022\ntensorflow\"\226\001\n\tValuesDef\022\016\n\006value" + + "s\030\001 \003(\t\022B\n\017external_values\030\002 \003(\0132).tenso" + + "rflow.ValuesDef.ExternalValuesEntry\0325\n\023E" + + "xternalValuesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\t:\0028\001\"\203\001\n\025ControlFlowContextDef\022/\n\t" + + "cond_ctxt\030\001 \001(\0132\032.tensorflow.CondContext" + + "DefH\000\0221\n\nwhile_ctxt\030\002 \001(\0132\033.tensorflow.W" + + "hileContextDefH\000B\006\n\004ctxt\"\304\001\n\016CondContext" + + "Def\022\024\n\014context_name\030\001 \001(\t\022\021\n\tpred_name\030\002" + + " \001(\t\022\022\n\npivot_name\030\003 \001(\t\022\016\n\006branch\030\004 \001(\005" + + "\022)\n\nvalues_def\030\005 \001(\0132\025.tensorflow.Values" + + "Def\022:\n\017nested_contexts\030\006 \003(\0132!.tensorflo" + + "w.ControlFlowContextDef\"\365\002\n\017WhileContext" + + "Def\022\024\n\014context_name\030\001 \001(\t\022\033\n\023parallel_it" + + "erations\030\002 \001(\005\022\021\n\tback_prop\030\003 \001(\010\022\023\n\013swa" + + "p_memory\030\004 \001(\010\022\022\n\npivot_name\030\005 \001(\t\022\033\n\023pi" + + "vot_for_pred_name\030\006 \001(\t\022\033\n\023pivot_for_bod" + + "y_name\030\007 \001(\t\022\027\n\017loop_exit_names\030\010 \003(\t\022\030\n" + + "\020loop_enter_names\030\n \003(\t\022)\n\nvalues_def\030\t " + + "\001(\0132\025.tensorflow.ValuesDef\022\037\n\027maximum_it" + + "erations_name\030\013 \001(\t\022:\n\017nested_contexts\030\014" + + " \003(\0132!.tensorflow.ControlFlowContextDefB" + + "\202\001\n\036org.tensorflow.proto.frameworkB\021Cont" + + "rolFlowProtosP\001ZHgithub.com/tensorflow/t" + + "ensorflow/tensorflow/go/core/core_protos" + + "_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tensorflow_ValuesDef_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_ValuesDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ValuesDef_descriptor, + new java.lang.String[] { "Values", "ExternalValues", }); + internal_static_tensorflow_ValuesDef_ExternalValuesEntry_descriptor = + internal_static_tensorflow_ValuesDef_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_ValuesDef_ExternalValuesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ValuesDef_ExternalValuesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_ControlFlowContextDef_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_ControlFlowContextDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ControlFlowContextDef_descriptor, + new java.lang.String[] { "CondCtxt", "WhileCtxt", "Ctxt", }); + internal_static_tensorflow_CondContextDef_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_tensorflow_CondContextDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_CondContextDef_descriptor, + new java.lang.String[] { "ContextName", "PredName", "PivotName", "Branch", "ValuesDef", "NestedContexts", }); + internal_static_tensorflow_WhileContextDef_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_tensorflow_WhileContextDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_WhileContextDef_descriptor, + new java.lang.String[] { "ContextName", "ParallelIterations", "BackProp", "SwapMemory", "PivotName", "PivotForPredName", "PivotForBodyName", "LoopExitNames", "LoopEnterNames", "ValuesDef", "MaximumIterationsName", "NestedContexts", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CostGraphDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CostGraphDef.java new file mode 100644 index 00000000000..c8709931f3a --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CostGraphDef.java @@ -0,0 +1,4791 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/cost_graph.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.CostGraphDef} + */ +public final class CostGraphDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef) + CostGraphDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use CostGraphDef.newBuilder() to construct. + private CostGraphDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CostGraphDef() { + node_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CostGraphDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CostGraphDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + node_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + node_.add( + input.readMessage(org.tensorflow.proto.framework.CostGraphDef.Node.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + node_ = java.util.Collections.unmodifiableList(node_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CostGraphDef.class, org.tensorflow.proto.framework.CostGraphDef.Builder.class); + } + + public interface NodeOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.CostGraphDef.Node) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the node. Names are globally unique.
+     * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+     * The name of the node. Names are globally unique.
+     * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * The device of the node. Can be empty if the node is mapped to the
+     * default partition or partitioning hasn't been run yet.
+     * 
+ * + * string device = 2; + */ + java.lang.String getDevice(); + /** + *
+     * The device of the node. Can be empty if the node is mapped to the
+     * default partition or partitioning hasn't been run yet.
+     * 
+ * + * string device = 2; + */ + com.google.protobuf.ByteString + getDeviceBytes(); + + /** + *
+     * The id of the node. Node ids are only unique inside a partition.
+     * 
+ * + * int32 id = 3; + */ + int getId(); + + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + java.util.List + getInputInfoList(); + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo getInputInfo(int index); + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + int getInputInfoCount(); + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + java.util.List + getInputInfoOrBuilderList(); + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder getInputInfoOrBuilder( + int index); + + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + java.util.List + getOutputInfoList(); + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo getOutputInfo(int index); + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + int getOutputInfoCount(); + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + java.util.List + getOutputInfoOrBuilderList(); + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder getOutputInfoOrBuilder( + int index); + + /** + *
+     * Temporary memory used by this node.
+     * 
+ * + * int64 temporary_memory_size = 6; + */ + long getTemporaryMemorySize(); + + /** + *
+     * Persistent memory used by this node.
+     * 
+ * + * int64 persistent_memory_size = 12; + */ + long getPersistentMemorySize(); + + /** + * int64 host_temp_memory_size = 10 [deprecated = true]; + */ + @java.lang.Deprecated long getHostTempMemorySize(); + + /** + * int64 device_temp_memory_size = 11 [deprecated = true]; + */ + @java.lang.Deprecated long getDeviceTempMemorySize(); + + /** + * int64 device_persistent_memory_size = 16 [deprecated = true]; + */ + @java.lang.Deprecated long getDevicePersistentMemorySize(); + + /** + *
+     * Estimate of the computational cost of this node, in microseconds.
+     * 
+ * + * int64 compute_cost = 9; + */ + long getComputeCost(); + + /** + *
+     * Analytical estimate of the computational cost of this node, in
+     * microseconds.
+     * 
+ * + * int64 compute_time = 14; + */ + long getComputeTime(); + + /** + *
+     * Analytical estimate of the memory access cost of this node, in
+     * microseconds.
+     * 
+ * + * int64 memory_time = 15; + */ + long getMemoryTime(); + + /** + *
+     * If true, the output is permanent: it can't be discarded, because this
+     * node is part of the "final output". Nodes may depend on final nodes.
+     * 
+ * + * bool is_final = 7; + */ + boolean getIsFinal(); + + /** + *
+     * Ids of the control inputs for this node.
+     * 
+ * + * repeated int32 control_input = 8; + */ + java.util.List getControlInputList(); + /** + *
+     * Ids of the control inputs for this node.
+     * 
+ * + * repeated int32 control_input = 8; + */ + int getControlInputCount(); + /** + *
+     * Ids of the control inputs for this node.
+     * 
+ * + * repeated int32 control_input = 8; + */ + int getControlInput(int index); + + /** + *
+     * Are the costs inaccurate?
+     * 
+ * + * bool inaccurate = 17; + */ + boolean getInaccurate(); + } + /** + * Protobuf type {@code tensorflow.CostGraphDef.Node} + */ + public static final class Node extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef.Node) + NodeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Node.newBuilder() to construct. + private Node(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Node() { + name_ = ""; + device_ = ""; + inputInfo_ = java.util.Collections.emptyList(); + outputInfo_ = java.util.Collections.emptyList(); + controlInput_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Node(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Node( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + device_ = s; + break; + } + case 24: { + + id_ = input.readInt32(); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + inputInfo_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + inputInfo_.add( + input.readMessage(org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + outputInfo_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + outputInfo_.add( + input.readMessage(org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.parser(), extensionRegistry)); + break; + } + case 48: { + + temporaryMemorySize_ = input.readInt64(); + break; + } + case 56: { + + isFinal_ = input.readBool(); + break; + } + case 64: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + controlInput_ = newIntList(); + mutable_bitField0_ |= 0x00000004; + } + controlInput_.addInt(input.readInt32()); + break; + } + case 66: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { + controlInput_ = newIntList(); + mutable_bitField0_ |= 0x00000004; + } + while (input.getBytesUntilLimit() > 0) { + controlInput_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + case 72: { + + computeCost_ = input.readInt64(); + break; + } + case 80: { + + hostTempMemorySize_ = input.readInt64(); + break; + } + case 88: { + + deviceTempMemorySize_ = input.readInt64(); + break; + } + case 96: { + + persistentMemorySize_ = input.readInt64(); + break; + } + case 112: { + + computeTime_ = input.readInt64(); + break; + } + case 120: { + + memoryTime_ = input.readInt64(); + break; + } + case 128: { + + devicePersistentMemorySize_ = input.readInt64(); + break; + } + case 136: { + + inaccurate_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + inputInfo_ = java.util.Collections.unmodifiableList(inputInfo_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + outputInfo_ = java.util.Collections.unmodifiableList(outputInfo_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + controlInput_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CostGraphDef.Node.class, org.tensorflow.proto.framework.CostGraphDef.Node.Builder.class); + } + + public interface InputInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.CostGraphDef.Node.InputInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 preceding_node = 1; + */ + int getPrecedingNode(); + + /** + * int32 preceding_port = 2; + */ + int getPrecedingPort(); + } + /** + *
+     * Inputs of this node. They must be executed before this node can be
+     * executed. An input is a particular output of another node, specified
+     * by the node id and the output index.
+     * 
+ * + * Protobuf type {@code tensorflow.CostGraphDef.Node.InputInfo} + */ + public static final class InputInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef.Node.InputInfo) + InputInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use InputInfo.newBuilder() to construct. + private InputInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InputInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InputInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InputInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + precedingNode_ = input.readInt32(); + break; + } + case 16: { + + precedingPort_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_InputInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_InputInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.class, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder.class); + } + + public static final int PRECEDING_NODE_FIELD_NUMBER = 1; + private int precedingNode_; + /** + * int32 preceding_node = 1; + */ + public int getPrecedingNode() { + return precedingNode_; + } + + public static final int PRECEDING_PORT_FIELD_NUMBER = 2; + private int precedingPort_; + /** + * int32 preceding_port = 2; + */ + public int getPrecedingPort() { + return precedingPort_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (precedingNode_ != 0) { + output.writeInt32(1, precedingNode_); + } + if (precedingPort_ != 0) { + output.writeInt32(2, precedingPort_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (precedingNode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, precedingNode_); + } + if (precedingPort_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, precedingPort_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo other = (org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo) obj; + + if (getPrecedingNode() + != other.getPrecedingNode()) return false; + if (getPrecedingPort() + != other.getPrecedingPort()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRECEDING_NODE_FIELD_NUMBER; + hash = (53 * hash) + getPrecedingNode(); + hash = (37 * hash) + PRECEDING_PORT_FIELD_NUMBER; + hash = (53 * hash) + getPrecedingPort(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo 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.proto.framework.CostGraphDef.Node.InputInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Inputs of this node. They must be executed before this node can be
+       * executed. An input is a particular output of another node, specified
+       * by the node id and the output index.
+       * 
+ * + * Protobuf type {@code tensorflow.CostGraphDef.Node.InputInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.CostGraphDef.Node.InputInfo) + org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_InputInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_InputInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.class, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + precedingNode_ = 0; + + precedingPort_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_InputInfo_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo getDefaultInstanceForType() { + return org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo build() { + org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo buildPartial() { + org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo result = new org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo(this); + result.precedingNode_ = precedingNode_; + result.precedingPort_ = precedingPort_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo) { + return mergeFrom((org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo other) { + if (other == org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.getDefaultInstance()) return this; + if (other.getPrecedingNode() != 0) { + setPrecedingNode(other.getPrecedingNode()); + } + if (other.getPrecedingPort() != 0) { + setPrecedingPort(other.getPrecedingPort()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int precedingNode_ ; + /** + * int32 preceding_node = 1; + */ + public int getPrecedingNode() { + return precedingNode_; + } + /** + * int32 preceding_node = 1; + */ + public Builder setPrecedingNode(int value) { + + precedingNode_ = value; + onChanged(); + return this; + } + /** + * int32 preceding_node = 1; + */ + public Builder clearPrecedingNode() { + + precedingNode_ = 0; + onChanged(); + return this; + } + + private int precedingPort_ ; + /** + * int32 preceding_port = 2; + */ + public int getPrecedingPort() { + return precedingPort_; + } + /** + * int32 preceding_port = 2; + */ + public Builder setPrecedingPort(int value) { + + precedingPort_ = value; + onChanged(); + return this; + } + /** + * int32 preceding_port = 2; + */ + public Builder clearPrecedingPort() { + + precedingPort_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef.Node.InputInfo) + } + + // @@protoc_insertion_point(class_scope:tensorflow.CostGraphDef.Node.InputInfo) + private static final org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo(); + } + + public static org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InputInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InputInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface OutputInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.CostGraphDef.Node.OutputInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 size = 1; + */ + long getSize(); + + /** + *
+       * If >= 0, the output is an alias of an input. Note that an alias input
+       * may itself be an alias. The algorithm will therefore need to follow
+       * those pointers.
+       * 
+ * + * int64 alias_input_port = 2; + */ + long getAliasInputPort(); + + /** + * .tensorflow.TensorShapeProto shape = 3; + */ + boolean hasShape(); + /** + * .tensorflow.TensorShapeProto shape = 3; + */ + org.tensorflow.proto.framework.TensorShapeProto getShape(); + /** + * .tensorflow.TensorShapeProto shape = 3; + */ + org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder(); + + /** + * .tensorflow.DataType dtype = 4; + */ + int getDtypeValue(); + /** + * .tensorflow.DataType dtype = 4; + */ + org.tensorflow.proto.framework.DataType getDtype(); + } + /** + *
+     * Outputs of this node.
+     * 
+ * + * Protobuf type {@code tensorflow.CostGraphDef.Node.OutputInfo} + */ + public static final class OutputInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef.Node.OutputInfo) + OutputInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use OutputInfo.newBuilder() to construct. + private OutputInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OutputInfo() { + dtype_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OutputInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OutputInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + size_ = input.readInt64(); + break; + } + case 16: { + + aliasInputPort_ = input.readInt64(); + break; + } + case 26: { + org.tensorflow.proto.framework.TensorShapeProto.Builder subBuilder = null; + if (shape_ != null) { + subBuilder = shape_.toBuilder(); + } + shape_ = input.readMessage(org.tensorflow.proto.framework.TensorShapeProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(shape_); + shape_ = subBuilder.buildPartial(); + } + + break; + } + case 32: { + int rawValue = input.readEnum(); + + dtype_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_OutputInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_OutputInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.class, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder.class); + } + + public static final int SIZE_FIELD_NUMBER = 1; + private long size_; + /** + * int64 size = 1; + */ + public long getSize() { + return size_; + } + + public static final int ALIAS_INPUT_PORT_FIELD_NUMBER = 2; + private long aliasInputPort_; + /** + *
+       * If >= 0, the output is an alias of an input. Note that an alias input
+       * may itself be an alias. The algorithm will therefore need to follow
+       * those pointers.
+       * 
+ * + * int64 alias_input_port = 2; + */ + public long getAliasInputPort() { + return aliasInputPort_; + } + + public static final int SHAPE_FIELD_NUMBER = 3; + private org.tensorflow.proto.framework.TensorShapeProto shape_; + /** + * .tensorflow.TensorShapeProto shape = 3; + */ + public boolean hasShape() { + return shape_ != null; + } + /** + * .tensorflow.TensorShapeProto shape = 3; + */ + public org.tensorflow.proto.framework.TensorShapeProto getShape() { + return shape_ == null ? org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } + /** + * .tensorflow.TensorShapeProto shape = 3; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { + return getShape(); + } + + public static final int DTYPE_FIELD_NUMBER = 4; + private int dtype_; + /** + * .tensorflow.DataType dtype = 4; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 4; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (size_ != 0L) { + output.writeInt64(1, size_); + } + if (aliasInputPort_ != 0L) { + output.writeInt64(2, aliasInputPort_); + } + if (shape_ != null) { + output.writeMessage(3, getShape()); + } + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + output.writeEnum(4, dtype_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (size_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, size_); + } + if (aliasInputPort_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, aliasInputPort_); + } + if (shape_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getShape()); + } + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, dtype_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo other = (org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo) obj; + + if (getSize() + != other.getSize()) return false; + if (getAliasInputPort() + != other.getAliasInputPort()) return false; + if (hasShape() != other.hasShape()) return false; + if (hasShape()) { + if (!getShape() + .equals(other.getShape())) return false; + } + if (dtype_ != other.dtype_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSize()); + hash = (37 * hash) + ALIAS_INPUT_PORT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAliasInputPort()); + if (hasShape()) { + hash = (37 * hash) + SHAPE_FIELD_NUMBER; + hash = (53 * hash) + getShape().hashCode(); + } + hash = (37 * hash) + DTYPE_FIELD_NUMBER; + hash = (53 * hash) + dtype_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo 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.proto.framework.CostGraphDef.Node.OutputInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Outputs of this node.
+       * 
+ * + * Protobuf type {@code tensorflow.CostGraphDef.Node.OutputInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.CostGraphDef.Node.OutputInfo) + org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_OutputInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_OutputInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.class, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + size_ = 0L; + + aliasInputPort_ = 0L; + + if (shapeBuilder_ == null) { + shape_ = null; + } else { + shape_ = null; + shapeBuilder_ = null; + } + dtype_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_OutputInfo_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo getDefaultInstanceForType() { + return org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo build() { + org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo buildPartial() { + org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo result = new org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo(this); + result.size_ = size_; + result.aliasInputPort_ = aliasInputPort_; + if (shapeBuilder_ == null) { + result.shape_ = shape_; + } else { + result.shape_ = shapeBuilder_.build(); + } + result.dtype_ = dtype_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo) { + return mergeFrom((org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo other) { + if (other == org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.getDefaultInstance()) return this; + if (other.getSize() != 0L) { + setSize(other.getSize()); + } + if (other.getAliasInputPort() != 0L) { + setAliasInputPort(other.getAliasInputPort()); + } + if (other.hasShape()) { + mergeShape(other.getShape()); + } + if (other.dtype_ != 0) { + setDtypeValue(other.getDtypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long size_ ; + /** + * int64 size = 1; + */ + public long getSize() { + return size_; + } + /** + * int64 size = 1; + */ + public Builder setSize(long value) { + + size_ = value; + onChanged(); + return this; + } + /** + * int64 size = 1; + */ + public Builder clearSize() { + + size_ = 0L; + onChanged(); + return this; + } + + private long aliasInputPort_ ; + /** + *
+         * If >= 0, the output is an alias of an input. Note that an alias input
+         * may itself be an alias. The algorithm will therefore need to follow
+         * those pointers.
+         * 
+ * + * int64 alias_input_port = 2; + */ + public long getAliasInputPort() { + return aliasInputPort_; + } + /** + *
+         * If >= 0, the output is an alias of an input. Note that an alias input
+         * may itself be an alias. The algorithm will therefore need to follow
+         * those pointers.
+         * 
+ * + * int64 alias_input_port = 2; + */ + public Builder setAliasInputPort(long value) { + + aliasInputPort_ = value; + onChanged(); + return this; + } + /** + *
+         * If >= 0, the output is an alias of an input. Note that an alias input
+         * may itself be an alias. The algorithm will therefore need to follow
+         * those pointers.
+         * 
+ * + * int64 alias_input_port = 2; + */ + public Builder clearAliasInputPort() { + + aliasInputPort_ = 0L; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.TensorShapeProto shape_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> shapeBuilder_; + /** + * .tensorflow.TensorShapeProto shape = 3; + */ + public boolean hasShape() { + return shapeBuilder_ != null || shape_ != null; + } + /** + * .tensorflow.TensorShapeProto shape = 3; + */ + public org.tensorflow.proto.framework.TensorShapeProto getShape() { + if (shapeBuilder_ == null) { + return shape_ == null ? org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } else { + return shapeBuilder_.getMessage(); + } + } + /** + * .tensorflow.TensorShapeProto shape = 3; + */ + public Builder setShape(org.tensorflow.proto.framework.TensorShapeProto value) { + if (shapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shape_ = value; + onChanged(); + } else { + shapeBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 3; + */ + public Builder setShape( + org.tensorflow.proto.framework.TensorShapeProto.Builder builderForValue) { + if (shapeBuilder_ == null) { + shape_ = builderForValue.build(); + onChanged(); + } else { + shapeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 3; + */ + public Builder mergeShape(org.tensorflow.proto.framework.TensorShapeProto value) { + if (shapeBuilder_ == null) { + if (shape_ != null) { + shape_ = + org.tensorflow.proto.framework.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial(); + } else { + shape_ = value; + } + onChanged(); + } else { + shapeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 3; + */ + public Builder clearShape() { + if (shapeBuilder_ == null) { + shape_ = null; + onChanged(); + } else { + shape_ = null; + shapeBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 3; + */ + public org.tensorflow.proto.framework.TensorShapeProto.Builder getShapeBuilder() { + + onChanged(); + return getShapeFieldBuilder().getBuilder(); + } + /** + * .tensorflow.TensorShapeProto shape = 3; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { + if (shapeBuilder_ != null) { + return shapeBuilder_.getMessageOrBuilder(); + } else { + return shape_ == null ? + org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } + } + /** + * .tensorflow.TensorShapeProto shape = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> + getShapeFieldBuilder() { + if (shapeBuilder_ == null) { + shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder>( + getShape(), + getParentForChildren(), + isClean()); + shape_ = null; + } + return shapeBuilder_; + } + + private int dtype_ = 0; + /** + * .tensorflow.DataType dtype = 4; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 4; + */ + public Builder setDtypeValue(int value) { + dtype_ = value; + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 4; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + /** + * .tensorflow.DataType dtype = 4; + */ + public Builder setDtype(org.tensorflow.proto.framework.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + + dtype_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 4; + */ + public Builder clearDtype() { + + dtype_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef.Node.OutputInfo) + } + + // @@protoc_insertion_point(class_scope:tensorflow.CostGraphDef.Node.OutputInfo) + private static final org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo(); + } + + public static org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * The name of the node. Names are globally unique.
+     * 
+ * + * 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; + } + } + /** + *
+     * The name of the node. Names are globally unique.
+     * 
+ * + * 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_FIELD_NUMBER = 2; + private volatile java.lang.Object device_; + /** + *
+     * The device of the node. Can be empty if the node is mapped to the
+     * default partition or partitioning hasn't been run yet.
+     * 
+ * + * string device = 2; + */ + 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; + } + } + /** + *
+     * The device of the node. Can be empty if the node is mapped to the
+     * default partition or partitioning hasn't been run yet.
+     * 
+ * + * string device = 2; + */ + 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 ID_FIELD_NUMBER = 3; + private int id_; + /** + *
+     * The id of the node. Node ids are only unique inside a partition.
+     * 
+ * + * int32 id = 3; + */ + public int getId() { + return id_; + } + + public static final int INPUT_INFO_FIELD_NUMBER = 4; + private java.util.List inputInfo_; + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public java.util.List getInputInfoList() { + return inputInfo_; + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public java.util.List + getInputInfoOrBuilderList() { + return inputInfo_; + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public int getInputInfoCount() { + return inputInfo_.size(); + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo getInputInfo(int index) { + return inputInfo_.get(index); + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder getInputInfoOrBuilder( + int index) { + return inputInfo_.get(index); + } + + public static final int OUTPUT_INFO_FIELD_NUMBER = 5; + private java.util.List outputInfo_; + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public java.util.List getOutputInfoList() { + return outputInfo_; + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public java.util.List + getOutputInfoOrBuilderList() { + return outputInfo_; + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public int getOutputInfoCount() { + return outputInfo_.size(); + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo getOutputInfo(int index) { + return outputInfo_.get(index); + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder getOutputInfoOrBuilder( + int index) { + return outputInfo_.get(index); + } + + public static final int TEMPORARY_MEMORY_SIZE_FIELD_NUMBER = 6; + private long temporaryMemorySize_; + /** + *
+     * Temporary memory used by this node.
+     * 
+ * + * int64 temporary_memory_size = 6; + */ + public long getTemporaryMemorySize() { + return temporaryMemorySize_; + } + + public static final int PERSISTENT_MEMORY_SIZE_FIELD_NUMBER = 12; + private long persistentMemorySize_; + /** + *
+     * Persistent memory used by this node.
+     * 
+ * + * int64 persistent_memory_size = 12; + */ + public long getPersistentMemorySize() { + return persistentMemorySize_; + } + + public static final int HOST_TEMP_MEMORY_SIZE_FIELD_NUMBER = 10; + private long hostTempMemorySize_; + /** + * int64 host_temp_memory_size = 10 [deprecated = true]; + */ + @java.lang.Deprecated public long getHostTempMemorySize() { + return hostTempMemorySize_; + } + + public static final int DEVICE_TEMP_MEMORY_SIZE_FIELD_NUMBER = 11; + private long deviceTempMemorySize_; + /** + * int64 device_temp_memory_size = 11 [deprecated = true]; + */ + @java.lang.Deprecated public long getDeviceTempMemorySize() { + return deviceTempMemorySize_; + } + + public static final int DEVICE_PERSISTENT_MEMORY_SIZE_FIELD_NUMBER = 16; + private long devicePersistentMemorySize_; + /** + * int64 device_persistent_memory_size = 16 [deprecated = true]; + */ + @java.lang.Deprecated public long getDevicePersistentMemorySize() { + return devicePersistentMemorySize_; + } + + public static final int COMPUTE_COST_FIELD_NUMBER = 9; + private long computeCost_; + /** + *
+     * Estimate of the computational cost of this node, in microseconds.
+     * 
+ * + * int64 compute_cost = 9; + */ + public long getComputeCost() { + return computeCost_; + } + + public static final int COMPUTE_TIME_FIELD_NUMBER = 14; + private long computeTime_; + /** + *
+     * Analytical estimate of the computational cost of this node, in
+     * microseconds.
+     * 
+ * + * int64 compute_time = 14; + */ + public long getComputeTime() { + return computeTime_; + } + + public static final int MEMORY_TIME_FIELD_NUMBER = 15; + private long memoryTime_; + /** + *
+     * Analytical estimate of the memory access cost of this node, in
+     * microseconds.
+     * 
+ * + * int64 memory_time = 15; + */ + public long getMemoryTime() { + return memoryTime_; + } + + public static final int IS_FINAL_FIELD_NUMBER = 7; + private boolean isFinal_; + /** + *
+     * If true, the output is permanent: it can't be discarded, because this
+     * node is part of the "final output". Nodes may depend on final nodes.
+     * 
+ * + * bool is_final = 7; + */ + public boolean getIsFinal() { + return isFinal_; + } + + public static final int CONTROL_INPUT_FIELD_NUMBER = 8; + private com.google.protobuf.Internal.IntList controlInput_; + /** + *
+     * Ids of the control inputs for this node.
+     * 
+ * + * repeated int32 control_input = 8; + */ + public java.util.List + getControlInputList() { + return controlInput_; + } + /** + *
+     * Ids of the control inputs for this node.
+     * 
+ * + * repeated int32 control_input = 8; + */ + public int getControlInputCount() { + return controlInput_.size(); + } + /** + *
+     * Ids of the control inputs for this node.
+     * 
+ * + * repeated int32 control_input = 8; + */ + public int getControlInput(int index) { + return controlInput_.getInt(index); + } + private int controlInputMemoizedSerializedSize = -1; + + public static final int INACCURATE_FIELD_NUMBER = 17; + private boolean inaccurate_; + /** + *
+     * Are the costs inaccurate?
+     * 
+ * + * bool inaccurate = 17; + */ + public boolean getInaccurate() { + return inaccurate_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDeviceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, device_); + } + if (id_ != 0) { + output.writeInt32(3, id_); + } + for (int i = 0; i < inputInfo_.size(); i++) { + output.writeMessage(4, inputInfo_.get(i)); + } + for (int i = 0; i < outputInfo_.size(); i++) { + output.writeMessage(5, outputInfo_.get(i)); + } + if (temporaryMemorySize_ != 0L) { + output.writeInt64(6, temporaryMemorySize_); + } + if (isFinal_ != false) { + output.writeBool(7, isFinal_); + } + if (getControlInputList().size() > 0) { + output.writeUInt32NoTag(66); + output.writeUInt32NoTag(controlInputMemoizedSerializedSize); + } + for (int i = 0; i < controlInput_.size(); i++) { + output.writeInt32NoTag(controlInput_.getInt(i)); + } + if (computeCost_ != 0L) { + output.writeInt64(9, computeCost_); + } + if (hostTempMemorySize_ != 0L) { + output.writeInt64(10, hostTempMemorySize_); + } + if (deviceTempMemorySize_ != 0L) { + output.writeInt64(11, deviceTempMemorySize_); + } + if (persistentMemorySize_ != 0L) { + output.writeInt64(12, persistentMemorySize_); + } + if (computeTime_ != 0L) { + output.writeInt64(14, computeTime_); + } + if (memoryTime_ != 0L) { + output.writeInt64(15, memoryTime_); + } + if (devicePersistentMemorySize_ != 0L) { + output.writeInt64(16, devicePersistentMemorySize_); + } + if (inaccurate_ != false) { + output.writeBool(17, inaccurate_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDeviceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, device_); + } + if (id_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, id_); + } + for (int i = 0; i < inputInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, inputInfo_.get(i)); + } + for (int i = 0; i < outputInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, outputInfo_.get(i)); + } + if (temporaryMemorySize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, temporaryMemorySize_); + } + if (isFinal_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, isFinal_); + } + { + int dataSize = 0; + for (int i = 0; i < controlInput_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(controlInput_.getInt(i)); + } + size += dataSize; + if (!getControlInputList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + controlInputMemoizedSerializedSize = dataSize; + } + if (computeCost_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(9, computeCost_); + } + if (hostTempMemorySize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(10, hostTempMemorySize_); + } + if (deviceTempMemorySize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(11, deviceTempMemorySize_); + } + if (persistentMemorySize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(12, persistentMemorySize_); + } + if (computeTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(14, computeTime_); + } + if (memoryTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(15, memoryTime_); + } + if (devicePersistentMemorySize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(16, devicePersistentMemorySize_); + } + if (inaccurate_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(17, inaccurate_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.CostGraphDef.Node)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.CostGraphDef.Node other = (org.tensorflow.proto.framework.CostGraphDef.Node) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDevice() + .equals(other.getDevice())) return false; + if (getId() + != other.getId()) return false; + if (!getInputInfoList() + .equals(other.getInputInfoList())) return false; + if (!getOutputInfoList() + .equals(other.getOutputInfoList())) return false; + if (getTemporaryMemorySize() + != other.getTemporaryMemorySize()) return false; + if (getPersistentMemorySize() + != other.getPersistentMemorySize()) return false; + if (getHostTempMemorySize() + != other.getHostTempMemorySize()) return false; + if (getDeviceTempMemorySize() + != other.getDeviceTempMemorySize()) return false; + if (getDevicePersistentMemorySize() + != other.getDevicePersistentMemorySize()) return false; + if (getComputeCost() + != other.getComputeCost()) return false; + if (getComputeTime() + != other.getComputeTime()) return false; + if (getMemoryTime() + != other.getMemoryTime()) return false; + if (getIsFinal() + != other.getIsFinal()) return false; + if (!getControlInputList() + .equals(other.getControlInputList())) return false; + if (getInaccurate() + != other.getInaccurate()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DEVICE_FIELD_NUMBER; + hash = (53 * hash) + getDevice().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId(); + if (getInputInfoCount() > 0) { + hash = (37 * hash) + INPUT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getInputInfoList().hashCode(); + } + if (getOutputInfoCount() > 0) { + hash = (37 * hash) + OUTPUT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getOutputInfoList().hashCode(); + } + hash = (37 * hash) + TEMPORARY_MEMORY_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTemporaryMemorySize()); + hash = (37 * hash) + PERSISTENT_MEMORY_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPersistentMemorySize()); + hash = (37 * hash) + HOST_TEMP_MEMORY_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getHostTempMemorySize()); + hash = (37 * hash) + DEVICE_TEMP_MEMORY_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDeviceTempMemorySize()); + hash = (37 * hash) + DEVICE_PERSISTENT_MEMORY_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDevicePersistentMemorySize()); + hash = (37 * hash) + COMPUTE_COST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getComputeCost()); + hash = (37 * hash) + COMPUTE_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getComputeTime()); + hash = (37 * hash) + MEMORY_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMemoryTime()); + hash = (37 * hash) + IS_FINAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsFinal()); + if (getControlInputCount() > 0) { + hash = (37 * hash) + CONTROL_INPUT_FIELD_NUMBER; + hash = (53 * hash) + getControlInputList().hashCode(); + } + hash = (37 * hash) + INACCURATE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getInaccurate()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.CostGraphDef.Node parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CostGraphDef.Node parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.CostGraphDef.Node prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.CostGraphDef.Node} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.CostGraphDef.Node) + org.tensorflow.proto.framework.CostGraphDef.NodeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CostGraphDef.Node.class, org.tensorflow.proto.framework.CostGraphDef.Node.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.CostGraphDef.Node.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getInputInfoFieldBuilder(); + getOutputInfoFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + device_ = ""; + + id_ = 0; + + if (inputInfoBuilder_ == null) { + inputInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + inputInfoBuilder_.clear(); + } + if (outputInfoBuilder_ == null) { + outputInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + outputInfoBuilder_.clear(); + } + temporaryMemorySize_ = 0L; + + persistentMemorySize_ = 0L; + + hostTempMemorySize_ = 0L; + + deviceTempMemorySize_ = 0L; + + devicePersistentMemorySize_ = 0L; + + computeCost_ = 0L; + + computeTime_ = 0L; + + memoryTime_ = 0L; + + isFinal_ = false; + + controlInput_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000004); + inaccurate_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CostGraphDef.Node getDefaultInstanceForType() { + return org.tensorflow.proto.framework.CostGraphDef.Node.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.CostGraphDef.Node build() { + org.tensorflow.proto.framework.CostGraphDef.Node result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CostGraphDef.Node buildPartial() { + org.tensorflow.proto.framework.CostGraphDef.Node result = new org.tensorflow.proto.framework.CostGraphDef.Node(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.device_ = device_; + result.id_ = id_; + if (inputInfoBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + inputInfo_ = java.util.Collections.unmodifiableList(inputInfo_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.inputInfo_ = inputInfo_; + } else { + result.inputInfo_ = inputInfoBuilder_.build(); + } + if (outputInfoBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + outputInfo_ = java.util.Collections.unmodifiableList(outputInfo_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.outputInfo_ = outputInfo_; + } else { + result.outputInfo_ = outputInfoBuilder_.build(); + } + result.temporaryMemorySize_ = temporaryMemorySize_; + result.persistentMemorySize_ = persistentMemorySize_; + result.hostTempMemorySize_ = hostTempMemorySize_; + result.deviceTempMemorySize_ = deviceTempMemorySize_; + result.devicePersistentMemorySize_ = devicePersistentMemorySize_; + result.computeCost_ = computeCost_; + result.computeTime_ = computeTime_; + result.memoryTime_ = memoryTime_; + result.isFinal_ = isFinal_; + if (((bitField0_ & 0x00000004) != 0)) { + controlInput_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.controlInput_ = controlInput_; + result.inaccurate_ = inaccurate_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.CostGraphDef.Node) { + return mergeFrom((org.tensorflow.proto.framework.CostGraphDef.Node)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.CostGraphDef.Node other) { + if (other == org.tensorflow.proto.framework.CostGraphDef.Node.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDevice().isEmpty()) { + device_ = other.device_; + onChanged(); + } + if (other.getId() != 0) { + setId(other.getId()); + } + if (inputInfoBuilder_ == null) { + if (!other.inputInfo_.isEmpty()) { + if (inputInfo_.isEmpty()) { + inputInfo_ = other.inputInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInputInfoIsMutable(); + inputInfo_.addAll(other.inputInfo_); + } + onChanged(); + } + } else { + if (!other.inputInfo_.isEmpty()) { + if (inputInfoBuilder_.isEmpty()) { + inputInfoBuilder_.dispose(); + inputInfoBuilder_ = null; + inputInfo_ = other.inputInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + inputInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getInputInfoFieldBuilder() : null; + } else { + inputInfoBuilder_.addAllMessages(other.inputInfo_); + } + } + } + if (outputInfoBuilder_ == null) { + if (!other.outputInfo_.isEmpty()) { + if (outputInfo_.isEmpty()) { + outputInfo_ = other.outputInfo_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureOutputInfoIsMutable(); + outputInfo_.addAll(other.outputInfo_); + } + onChanged(); + } + } else { + if (!other.outputInfo_.isEmpty()) { + if (outputInfoBuilder_.isEmpty()) { + outputInfoBuilder_.dispose(); + outputInfoBuilder_ = null; + outputInfo_ = other.outputInfo_; + bitField0_ = (bitField0_ & ~0x00000002); + outputInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOutputInfoFieldBuilder() : null; + } else { + outputInfoBuilder_.addAllMessages(other.outputInfo_); + } + } + } + if (other.getTemporaryMemorySize() != 0L) { + setTemporaryMemorySize(other.getTemporaryMemorySize()); + } + if (other.getPersistentMemorySize() != 0L) { + setPersistentMemorySize(other.getPersistentMemorySize()); + } + if (other.getHostTempMemorySize() != 0L) { + setHostTempMemorySize(other.getHostTempMemorySize()); + } + if (other.getDeviceTempMemorySize() != 0L) { + setDeviceTempMemorySize(other.getDeviceTempMemorySize()); + } + if (other.getDevicePersistentMemorySize() != 0L) { + setDevicePersistentMemorySize(other.getDevicePersistentMemorySize()); + } + if (other.getComputeCost() != 0L) { + setComputeCost(other.getComputeCost()); + } + if (other.getComputeTime() != 0L) { + setComputeTime(other.getComputeTime()); + } + if (other.getMemoryTime() != 0L) { + setMemoryTime(other.getMemoryTime()); + } + if (other.getIsFinal() != false) { + setIsFinal(other.getIsFinal()); + } + if (!other.controlInput_.isEmpty()) { + if (controlInput_.isEmpty()) { + controlInput_ = other.controlInput_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureControlInputIsMutable(); + controlInput_.addAll(other.controlInput_); + } + onChanged(); + } + if (other.getInaccurate() != false) { + setInaccurate(other.getInaccurate()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.CostGraphDef.Node parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.CostGraphDef.Node) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+       * The name of the node. Names are globally unique.
+       * 
+ * + * 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; + } + } + /** + *
+       * The name of the node. Names are globally unique.
+       * 
+ * + * 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; + } + } + /** + *
+       * The name of the node. Names are globally unique.
+       * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the node. Names are globally unique.
+       * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * The name of the node. Names are globally unique.
+       * 
+ * + * 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 device_ = ""; + /** + *
+       * The device of the node. Can be empty if the node is mapped to the
+       * default partition or partitioning hasn't been run yet.
+       * 
+ * + * string device = 2; + */ + 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; + } + } + /** + *
+       * The device of the node. Can be empty if the node is mapped to the
+       * default partition or partitioning hasn't been run yet.
+       * 
+ * + * string device = 2; + */ + 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; + } + } + /** + *
+       * The device of the node. Can be empty if the node is mapped to the
+       * default partition or partitioning hasn't been run yet.
+       * 
+ * + * string device = 2; + */ + public Builder setDevice( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + device_ = value; + onChanged(); + return this; + } + /** + *
+       * The device of the node. Can be empty if the node is mapped to the
+       * default partition or partitioning hasn't been run yet.
+       * 
+ * + * string device = 2; + */ + public Builder clearDevice() { + + device_ = getDefaultInstance().getDevice(); + onChanged(); + return this; + } + /** + *
+       * The device of the node. Can be empty if the node is mapped to the
+       * default partition or partitioning hasn't been run yet.
+       * 
+ * + * string device = 2; + */ + public Builder setDeviceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + device_ = value; + onChanged(); + return this; + } + + private int id_ ; + /** + *
+       * The id of the node. Node ids are only unique inside a partition.
+       * 
+ * + * int32 id = 3; + */ + public int getId() { + return id_; + } + /** + *
+       * The id of the node. Node ids are only unique inside a partition.
+       * 
+ * + * int32 id = 3; + */ + public Builder setId(int value) { + + id_ = value; + onChanged(); + return this; + } + /** + *
+       * The id of the node. Node ids are only unique inside a partition.
+       * 
+ * + * int32 id = 3; + */ + public Builder clearId() { + + id_ = 0; + onChanged(); + return this; + } + + private java.util.List inputInfo_ = + java.util.Collections.emptyList(); + private void ensureInputInfoIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + inputInfo_ = new java.util.ArrayList(inputInfo_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder> inputInfoBuilder_; + + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public java.util.List getInputInfoList() { + if (inputInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(inputInfo_); + } else { + return inputInfoBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public int getInputInfoCount() { + if (inputInfoBuilder_ == null) { + return inputInfo_.size(); + } else { + return inputInfoBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo getInputInfo(int index) { + if (inputInfoBuilder_ == null) { + return inputInfo_.get(index); + } else { + return inputInfoBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public Builder setInputInfo( + int index, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo value) { + if (inputInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputInfoIsMutable(); + inputInfo_.set(index, value); + onChanged(); + } else { + inputInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public Builder setInputInfo( + int index, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder builderForValue) { + if (inputInfoBuilder_ == null) { + ensureInputInfoIsMutable(); + inputInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + inputInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public Builder addInputInfo(org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo value) { + if (inputInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputInfoIsMutable(); + inputInfo_.add(value); + onChanged(); + } else { + inputInfoBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public Builder addInputInfo( + int index, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo value) { + if (inputInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputInfoIsMutable(); + inputInfo_.add(index, value); + onChanged(); + } else { + inputInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public Builder addInputInfo( + org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder builderForValue) { + if (inputInfoBuilder_ == null) { + ensureInputInfoIsMutable(); + inputInfo_.add(builderForValue.build()); + onChanged(); + } else { + inputInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public Builder addInputInfo( + int index, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder builderForValue) { + if (inputInfoBuilder_ == null) { + ensureInputInfoIsMutable(); + inputInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + inputInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public Builder addAllInputInfo( + java.lang.Iterable values) { + if (inputInfoBuilder_ == null) { + ensureInputInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, inputInfo_); + onChanged(); + } else { + inputInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public Builder clearInputInfo() { + if (inputInfoBuilder_ == null) { + inputInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + inputInfoBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public Builder removeInputInfo(int index) { + if (inputInfoBuilder_ == null) { + ensureInputInfoIsMutable(); + inputInfo_.remove(index); + onChanged(); + } else { + inputInfoBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder getInputInfoBuilder( + int index) { + return getInputInfoFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder getInputInfoOrBuilder( + int index) { + if (inputInfoBuilder_ == null) { + return inputInfo_.get(index); } else { + return inputInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public java.util.List + getInputInfoOrBuilderList() { + if (inputInfoBuilder_ != null) { + return inputInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inputInfo_); + } + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder addInputInfoBuilder() { + return getInputInfoFieldBuilder().addBuilder( + org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.getDefaultInstance()); + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder addInputInfoBuilder( + int index) { + return getInputInfoFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.getDefaultInstance()); + } + /** + * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4; + */ + public java.util.List + getInputInfoBuilderList() { + return getInputInfoFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder> + getInputInfoFieldBuilder() { + if (inputInfoBuilder_ == null) { + inputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfo.Builder, org.tensorflow.proto.framework.CostGraphDef.Node.InputInfoOrBuilder>( + inputInfo_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + inputInfo_ = null; + } + return inputInfoBuilder_; + } + + private java.util.List outputInfo_ = + java.util.Collections.emptyList(); + private void ensureOutputInfoIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + outputInfo_ = new java.util.ArrayList(outputInfo_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder> outputInfoBuilder_; + + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public java.util.List getOutputInfoList() { + if (outputInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(outputInfo_); + } else { + return outputInfoBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public int getOutputInfoCount() { + if (outputInfoBuilder_ == null) { + return outputInfo_.size(); + } else { + return outputInfoBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo getOutputInfo(int index) { + if (outputInfoBuilder_ == null) { + return outputInfo_.get(index); + } else { + return outputInfoBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public Builder setOutputInfo( + int index, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo value) { + if (outputInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputInfoIsMutable(); + outputInfo_.set(index, value); + onChanged(); + } else { + outputInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public Builder setOutputInfo( + int index, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder builderForValue) { + if (outputInfoBuilder_ == null) { + ensureOutputInfoIsMutable(); + outputInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + outputInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public Builder addOutputInfo(org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo value) { + if (outputInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputInfoIsMutable(); + outputInfo_.add(value); + onChanged(); + } else { + outputInfoBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public Builder addOutputInfo( + int index, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo value) { + if (outputInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputInfoIsMutable(); + outputInfo_.add(index, value); + onChanged(); + } else { + outputInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public Builder addOutputInfo( + org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder builderForValue) { + if (outputInfoBuilder_ == null) { + ensureOutputInfoIsMutable(); + outputInfo_.add(builderForValue.build()); + onChanged(); + } else { + outputInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public Builder addOutputInfo( + int index, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder builderForValue) { + if (outputInfoBuilder_ == null) { + ensureOutputInfoIsMutable(); + outputInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + outputInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public Builder addAllOutputInfo( + java.lang.Iterable values) { + if (outputInfoBuilder_ == null) { + ensureOutputInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, outputInfo_); + onChanged(); + } else { + outputInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public Builder clearOutputInfo() { + if (outputInfoBuilder_ == null) { + outputInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + outputInfoBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public Builder removeOutputInfo(int index) { + if (outputInfoBuilder_ == null) { + ensureOutputInfoIsMutable(); + outputInfo_.remove(index); + onChanged(); + } else { + outputInfoBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder getOutputInfoBuilder( + int index) { + return getOutputInfoFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder getOutputInfoOrBuilder( + int index) { + if (outputInfoBuilder_ == null) { + return outputInfo_.get(index); } else { + return outputInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public java.util.List + getOutputInfoOrBuilderList() { + if (outputInfoBuilder_ != null) { + return outputInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(outputInfo_); + } + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder addOutputInfoBuilder() { + return getOutputInfoFieldBuilder().addBuilder( + org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.getDefaultInstance()); + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder addOutputInfoBuilder( + int index) { + return getOutputInfoFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.getDefaultInstance()); + } + /** + * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5; + */ + public java.util.List + getOutputInfoBuilderList() { + return getOutputInfoFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder> + getOutputInfoFieldBuilder() { + if (outputInfoBuilder_ == null) { + outputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfo.Builder, org.tensorflow.proto.framework.CostGraphDef.Node.OutputInfoOrBuilder>( + outputInfo_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + outputInfo_ = null; + } + return outputInfoBuilder_; + } + + private long temporaryMemorySize_ ; + /** + *
+       * Temporary memory used by this node.
+       * 
+ * + * int64 temporary_memory_size = 6; + */ + public long getTemporaryMemorySize() { + return temporaryMemorySize_; + } + /** + *
+       * Temporary memory used by this node.
+       * 
+ * + * int64 temporary_memory_size = 6; + */ + public Builder setTemporaryMemorySize(long value) { + + temporaryMemorySize_ = value; + onChanged(); + return this; + } + /** + *
+       * Temporary memory used by this node.
+       * 
+ * + * int64 temporary_memory_size = 6; + */ + public Builder clearTemporaryMemorySize() { + + temporaryMemorySize_ = 0L; + onChanged(); + return this; + } + + private long persistentMemorySize_ ; + /** + *
+       * Persistent memory used by this node.
+       * 
+ * + * int64 persistent_memory_size = 12; + */ + public long getPersistentMemorySize() { + return persistentMemorySize_; + } + /** + *
+       * Persistent memory used by this node.
+       * 
+ * + * int64 persistent_memory_size = 12; + */ + public Builder setPersistentMemorySize(long value) { + + persistentMemorySize_ = value; + onChanged(); + return this; + } + /** + *
+       * Persistent memory used by this node.
+       * 
+ * + * int64 persistent_memory_size = 12; + */ + public Builder clearPersistentMemorySize() { + + persistentMemorySize_ = 0L; + onChanged(); + return this; + } + + private long hostTempMemorySize_ ; + /** + * int64 host_temp_memory_size = 10 [deprecated = true]; + */ + @java.lang.Deprecated public long getHostTempMemorySize() { + return hostTempMemorySize_; + } + /** + * int64 host_temp_memory_size = 10 [deprecated = true]; + */ + @java.lang.Deprecated public Builder setHostTempMemorySize(long value) { + + hostTempMemorySize_ = value; + onChanged(); + return this; + } + /** + * int64 host_temp_memory_size = 10 [deprecated = true]; + */ + @java.lang.Deprecated public Builder clearHostTempMemorySize() { + + hostTempMemorySize_ = 0L; + onChanged(); + return this; + } + + private long deviceTempMemorySize_ ; + /** + * int64 device_temp_memory_size = 11 [deprecated = true]; + */ + @java.lang.Deprecated public long getDeviceTempMemorySize() { + return deviceTempMemorySize_; + } + /** + * int64 device_temp_memory_size = 11 [deprecated = true]; + */ + @java.lang.Deprecated public Builder setDeviceTempMemorySize(long value) { + + deviceTempMemorySize_ = value; + onChanged(); + return this; + } + /** + * int64 device_temp_memory_size = 11 [deprecated = true]; + */ + @java.lang.Deprecated public Builder clearDeviceTempMemorySize() { + + deviceTempMemorySize_ = 0L; + onChanged(); + return this; + } + + private long devicePersistentMemorySize_ ; + /** + * int64 device_persistent_memory_size = 16 [deprecated = true]; + */ + @java.lang.Deprecated public long getDevicePersistentMemorySize() { + return devicePersistentMemorySize_; + } + /** + * int64 device_persistent_memory_size = 16 [deprecated = true]; + */ + @java.lang.Deprecated public Builder setDevicePersistentMemorySize(long value) { + + devicePersistentMemorySize_ = value; + onChanged(); + return this; + } + /** + * int64 device_persistent_memory_size = 16 [deprecated = true]; + */ + @java.lang.Deprecated public Builder clearDevicePersistentMemorySize() { + + devicePersistentMemorySize_ = 0L; + onChanged(); + return this; + } + + private long computeCost_ ; + /** + *
+       * Estimate of the computational cost of this node, in microseconds.
+       * 
+ * + * int64 compute_cost = 9; + */ + public long getComputeCost() { + return computeCost_; + } + /** + *
+       * Estimate of the computational cost of this node, in microseconds.
+       * 
+ * + * int64 compute_cost = 9; + */ + public Builder setComputeCost(long value) { + + computeCost_ = value; + onChanged(); + return this; + } + /** + *
+       * Estimate of the computational cost of this node, in microseconds.
+       * 
+ * + * int64 compute_cost = 9; + */ + public Builder clearComputeCost() { + + computeCost_ = 0L; + onChanged(); + return this; + } + + private long computeTime_ ; + /** + *
+       * Analytical estimate of the computational cost of this node, in
+       * microseconds.
+       * 
+ * + * int64 compute_time = 14; + */ + public long getComputeTime() { + return computeTime_; + } + /** + *
+       * Analytical estimate of the computational cost of this node, in
+       * microseconds.
+       * 
+ * + * int64 compute_time = 14; + */ + public Builder setComputeTime(long value) { + + computeTime_ = value; + onChanged(); + return this; + } + /** + *
+       * Analytical estimate of the computational cost of this node, in
+       * microseconds.
+       * 
+ * + * int64 compute_time = 14; + */ + public Builder clearComputeTime() { + + computeTime_ = 0L; + onChanged(); + return this; + } + + private long memoryTime_ ; + /** + *
+       * Analytical estimate of the memory access cost of this node, in
+       * microseconds.
+       * 
+ * + * int64 memory_time = 15; + */ + public long getMemoryTime() { + return memoryTime_; + } + /** + *
+       * Analytical estimate of the memory access cost of this node, in
+       * microseconds.
+       * 
+ * + * int64 memory_time = 15; + */ + public Builder setMemoryTime(long value) { + + memoryTime_ = value; + onChanged(); + return this; + } + /** + *
+       * Analytical estimate of the memory access cost of this node, in
+       * microseconds.
+       * 
+ * + * int64 memory_time = 15; + */ + public Builder clearMemoryTime() { + + memoryTime_ = 0L; + onChanged(); + return this; + } + + private boolean isFinal_ ; + /** + *
+       * If true, the output is permanent: it can't be discarded, because this
+       * node is part of the "final output". Nodes may depend on final nodes.
+       * 
+ * + * bool is_final = 7; + */ + public boolean getIsFinal() { + return isFinal_; + } + /** + *
+       * If true, the output is permanent: it can't be discarded, because this
+       * node is part of the "final output". Nodes may depend on final nodes.
+       * 
+ * + * bool is_final = 7; + */ + public Builder setIsFinal(boolean value) { + + isFinal_ = value; + onChanged(); + return this; + } + /** + *
+       * If true, the output is permanent: it can't be discarded, because this
+       * node is part of the "final output". Nodes may depend on final nodes.
+       * 
+ * + * bool is_final = 7; + */ + public Builder clearIsFinal() { + + isFinal_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList controlInput_ = emptyIntList(); + private void ensureControlInputIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + controlInput_ = mutableCopy(controlInput_); + bitField0_ |= 0x00000004; + } + } + /** + *
+       * Ids of the control inputs for this node.
+       * 
+ * + * repeated int32 control_input = 8; + */ + public java.util.List + getControlInputList() { + return ((bitField0_ & 0x00000004) != 0) ? + java.util.Collections.unmodifiableList(controlInput_) : controlInput_; + } + /** + *
+       * Ids of the control inputs for this node.
+       * 
+ * + * repeated int32 control_input = 8; + */ + public int getControlInputCount() { + return controlInput_.size(); + } + /** + *
+       * Ids of the control inputs for this node.
+       * 
+ * + * repeated int32 control_input = 8; + */ + public int getControlInput(int index) { + return controlInput_.getInt(index); + } + /** + *
+       * Ids of the control inputs for this node.
+       * 
+ * + * repeated int32 control_input = 8; + */ + public Builder setControlInput( + int index, int value) { + ensureControlInputIsMutable(); + controlInput_.setInt(index, value); + onChanged(); + return this; + } + /** + *
+       * Ids of the control inputs for this node.
+       * 
+ * + * repeated int32 control_input = 8; + */ + public Builder addControlInput(int value) { + ensureControlInputIsMutable(); + controlInput_.addInt(value); + onChanged(); + return this; + } + /** + *
+       * Ids of the control inputs for this node.
+       * 
+ * + * repeated int32 control_input = 8; + */ + public Builder addAllControlInput( + java.lang.Iterable values) { + ensureControlInputIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, controlInput_); + onChanged(); + return this; + } + /** + *
+       * Ids of the control inputs for this node.
+       * 
+ * + * repeated int32 control_input = 8; + */ + public Builder clearControlInput() { + controlInput_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + private boolean inaccurate_ ; + /** + *
+       * Are the costs inaccurate?
+       * 
+ * + * bool inaccurate = 17; + */ + public boolean getInaccurate() { + return inaccurate_; + } + /** + *
+       * Are the costs inaccurate?
+       * 
+ * + * bool inaccurate = 17; + */ + public Builder setInaccurate(boolean value) { + + inaccurate_ = value; + onChanged(); + return this; + } + /** + *
+       * Are the costs inaccurate?
+       * 
+ * + * bool inaccurate = 17; + */ + public Builder clearInaccurate() { + + inaccurate_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef.Node) + } + + // @@protoc_insertion_point(class_scope:tensorflow.CostGraphDef.Node) + private static final org.tensorflow.proto.framework.CostGraphDef.Node DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.CostGraphDef.Node(); + } + + public static org.tensorflow.proto.framework.CostGraphDef.Node getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Node parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Node(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CostGraphDef.Node getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int NODE_FIELD_NUMBER = 1; + private java.util.List node_; + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public java.util.List getNodeList() { + return node_; + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public java.util.List + getNodeOrBuilderList() { + return node_; + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public int getNodeCount() { + return node_.size(); + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node getNode(int index) { + return node_.get(index); + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public org.tensorflow.proto.framework.CostGraphDef.NodeOrBuilder getNodeOrBuilder( + int index) { + return node_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < node_.size(); i++) { + output.writeMessage(1, node_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + 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)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.CostGraphDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.CostGraphDef other = (org.tensorflow.proto.framework.CostGraphDef) obj; + + if (!getNodeList() + .equals(other.getNodeList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNodeCount() > 0) { + hash = (37 * hash) + NODE_FIELD_NUMBER; + hash = (53 * hash) + getNodeList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.CostGraphDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CostGraphDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CostGraphDef 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.proto.framework.CostGraphDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.CostGraphDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CostGraphDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CostGraphDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.CostGraphDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.CostGraphDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.CostGraphDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.CostGraphDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.CostGraphDef) + org.tensorflow.proto.framework.CostGraphDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.CostGraphDef.class, org.tensorflow.proto.framework.CostGraphDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.CostGraphDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getNodeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (nodeBuilder_ == null) { + node_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + nodeBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CostGraphDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.CostGraphDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.CostGraphDef build() { + org.tensorflow.proto.framework.CostGraphDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CostGraphDef buildPartial() { + org.tensorflow.proto.framework.CostGraphDef result = new org.tensorflow.proto.framework.CostGraphDef(this); + int from_bitField0_ = bitField0_; + if (nodeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + node_ = java.util.Collections.unmodifiableList(node_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.node_ = node_; + } else { + result.node_ = nodeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.CostGraphDef) { + return mergeFrom((org.tensorflow.proto.framework.CostGraphDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.CostGraphDef other) { + if (other == org.tensorflow.proto.framework.CostGraphDef.getDefaultInstance()) return this; + if (nodeBuilder_ == null) { + if (!other.node_.isEmpty()) { + if (node_.isEmpty()) { + node_ = other.node_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNodeIsMutable(); + node_.addAll(other.node_); + } + onChanged(); + } + } else { + if (!other.node_.isEmpty()) { + if (nodeBuilder_.isEmpty()) { + nodeBuilder_.dispose(); + nodeBuilder_ = null; + node_ = other.node_; + bitField0_ = (bitField0_ & ~0x00000001); + nodeBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNodeFieldBuilder() : null; + } else { + nodeBuilder_.addAllMessages(other.node_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.CostGraphDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.CostGraphDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List node_ = + java.util.Collections.emptyList(); + private void ensureNodeIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + node_ = new java.util.ArrayList(node_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.CostGraphDef.Node, org.tensorflow.proto.framework.CostGraphDef.Node.Builder, org.tensorflow.proto.framework.CostGraphDef.NodeOrBuilder> nodeBuilder_; + + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public java.util.List getNodeList() { + if (nodeBuilder_ == null) { + return java.util.Collections.unmodifiableList(node_); + } else { + return nodeBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public int getNodeCount() { + if (nodeBuilder_ == null) { + return node_.size(); + } else { + return nodeBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node getNode(int index) { + if (nodeBuilder_ == null) { + return node_.get(index); + } else { + return nodeBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public Builder setNode( + int index, org.tensorflow.proto.framework.CostGraphDef.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.CostGraphDef.Node node = 1; + */ + public Builder setNode( + int index, org.tensorflow.proto.framework.CostGraphDef.Node.Builder builderForValue) { + if (nodeBuilder_ == null) { + ensureNodeIsMutable(); + node_.set(index, builderForValue.build()); + onChanged(); + } else { + nodeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public Builder addNode(org.tensorflow.proto.framework.CostGraphDef.Node value) { + if (nodeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeIsMutable(); + node_.add(value); + onChanged(); + } else { + nodeBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public Builder addNode( + int index, org.tensorflow.proto.framework.CostGraphDef.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.CostGraphDef.Node node = 1; + */ + public Builder addNode( + org.tensorflow.proto.framework.CostGraphDef.Node.Builder builderForValue) { + if (nodeBuilder_ == null) { + ensureNodeIsMutable(); + node_.add(builderForValue.build()); + onChanged(); + } else { + nodeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public Builder addNode( + int index, org.tensorflow.proto.framework.CostGraphDef.Node.Builder builderForValue) { + if (nodeBuilder_ == null) { + ensureNodeIsMutable(); + node_.add(index, builderForValue.build()); + onChanged(); + } else { + nodeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public Builder addAllNode( + java.lang.Iterable values) { + if (nodeBuilder_ == null) { + ensureNodeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, node_); + onChanged(); + } else { + nodeBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public Builder clearNode() { + if (nodeBuilder_ == null) { + node_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + nodeBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public Builder removeNode(int index) { + if (nodeBuilder_ == null) { + ensureNodeIsMutable(); + node_.remove(index); + onChanged(); + } else { + nodeBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.Builder getNodeBuilder( + int index) { + return getNodeFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public org.tensorflow.proto.framework.CostGraphDef.NodeOrBuilder getNodeOrBuilder( + int index) { + if (nodeBuilder_ == null) { + return node_.get(index); } else { + return nodeBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public java.util.List + getNodeOrBuilderList() { + if (nodeBuilder_ != null) { + return nodeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(node_); + } + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.Builder addNodeBuilder() { + return getNodeFieldBuilder().addBuilder( + org.tensorflow.proto.framework.CostGraphDef.Node.getDefaultInstance()); + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public org.tensorflow.proto.framework.CostGraphDef.Node.Builder addNodeBuilder( + int index) { + return getNodeFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.CostGraphDef.Node.getDefaultInstance()); + } + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + public java.util.List + getNodeBuilderList() { + return getNodeFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.CostGraphDef.Node, org.tensorflow.proto.framework.CostGraphDef.Node.Builder, org.tensorflow.proto.framework.CostGraphDef.NodeOrBuilder> + getNodeFieldBuilder() { + if (nodeBuilder_ == null) { + nodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.CostGraphDef.Node, org.tensorflow.proto.framework.CostGraphDef.Node.Builder, org.tensorflow.proto.framework.CostGraphDef.NodeOrBuilder>( + node_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + node_ = null; + } + return nodeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.CostGraphDef) + private static final org.tensorflow.proto.framework.CostGraphDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.CostGraphDef(); + } + + public static org.tensorflow.proto.framework.CostGraphDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CostGraphDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CostGraphDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.CostGraphDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CostGraphDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CostGraphDefOrBuilder.java new file mode 100644 index 00000000000..31bb9b8c5a0 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CostGraphDefOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/cost_graph.proto + +package org.tensorflow.proto.framework; + +public interface CostGraphDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.CostGraphDef) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + java.util.List + getNodeList(); + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + org.tensorflow.proto.framework.CostGraphDef.Node getNode(int index); + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + int getNodeCount(); + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + java.util.List + getNodeOrBuilderList(); + /** + * repeated .tensorflow.CostGraphDef.Node node = 1; + */ + org.tensorflow.proto.framework.CostGraphDef.NodeOrBuilder getNodeOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CostGraphProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CostGraphProtos.java new file mode 100644 index 00000000000..1cf0dbefbfb --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/CostGraphProtos.java @@ -0,0 +1,108 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/cost_graph.proto + +package org.tensorflow.proto.framework; + +public final class CostGraphProtos { + private CostGraphProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_CostGraphDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_CostGraphDef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_CostGraphDef_Node_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_CostGraphDef_Node_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_CostGraphDef_Node_InputInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_CostGraphDef_Node_InputInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_CostGraphDef_Node_OutputInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_CostGraphDef_Node_OutputInfo_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/cost_graph.p" + + "roto\022\ntensorflow\032,tensorflow/core/framew" + + "ork/tensor_shape.proto\032%tensorflow/core/" + + "framework/types.proto\"\340\005\n\014CostGraphDef\022+" + + "\n\004node\030\001 \003(\0132\035.tensorflow.CostGraphDef.N" + + "ode\032\242\005\n\004Node\022\014\n\004name\030\001 \001(\t\022\016\n\006device\030\002 \001" + + "(\t\022\n\n\002id\030\003 \001(\005\022;\n\ninput_info\030\004 \003(\0132\'.ten" + + "sorflow.CostGraphDef.Node.InputInfo\022=\n\013o" + + "utput_info\030\005 \003(\0132(.tensorflow.CostGraphD" + + "ef.Node.OutputInfo\022\035\n\025temporary_memory_s" + + "ize\030\006 \001(\003\022\036\n\026persistent_memory_size\030\014 \001(" + + "\003\022!\n\025host_temp_memory_size\030\n \001(\003B\002\030\001\022#\n\027" + + "device_temp_memory_size\030\013 \001(\003B\002\030\001\022)\n\035dev" + + "ice_persistent_memory_size\030\020 \001(\003B\002\030\001\022\024\n\014" + + "compute_cost\030\t \001(\003\022\024\n\014compute_time\030\016 \001(\003" + + "\022\023\n\013memory_time\030\017 \001(\003\022\020\n\010is_final\030\007 \001(\010\022" + + "\025\n\rcontrol_input\030\010 \003(\005\022\022\n\ninaccurate\030\021 \001" + + "(\010\032;\n\tInputInfo\022\026\n\016preceding_node\030\001 \001(\005\022" + + "\026\n\016preceding_port\030\002 \001(\005\032\206\001\n\nOutputInfo\022\014" + + "\n\004size\030\001 \001(\003\022\030\n\020alias_input_port\030\002 \001(\003\022+" + + "\n\005shape\030\003 \001(\0132\034.tensorflow.TensorShapePr" + + "oto\022#\n\005dtype\030\004 \001(\0162\024.tensorflow.DataType" + + "B\211\001\n\036org.tensorflow.proto.frameworkB\017Cos" + + "tGraphProtosP\001ZQgithub.com/tensorflow/te" + + "nsorflow/tensorflow/go/core/framework/co" + + "st_graph_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(), + org.tensorflow.proto.framework.TypesProtos.getDescriptor(), + }); + internal_static_tensorflow_CostGraphDef_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_CostGraphDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_CostGraphDef_descriptor, + new java.lang.String[] { "Node", }); + internal_static_tensorflow_CostGraphDef_Node_descriptor = + internal_static_tensorflow_CostGraphDef_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_CostGraphDef_Node_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_CostGraphDef_Node_descriptor, + new java.lang.String[] { "Name", "Device", "Id", "InputInfo", "OutputInfo", "TemporaryMemorySize", "PersistentMemorySize", "HostTempMemorySize", "DeviceTempMemorySize", "DevicePersistentMemorySize", "ComputeCost", "ComputeTime", "MemoryTime", "IsFinal", "ControlInput", "Inaccurate", }); + internal_static_tensorflow_CostGraphDef_Node_InputInfo_descriptor = + internal_static_tensorflow_CostGraphDef_Node_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_CostGraphDef_Node_InputInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_CostGraphDef_Node_InputInfo_descriptor, + new java.lang.String[] { "PrecedingNode", "PrecedingPort", }); + internal_static_tensorflow_CostGraphDef_Node_OutputInfo_descriptor = + internal_static_tensorflow_CostGraphDef_Node_descriptor.getNestedTypes().get(1); + internal_static_tensorflow_CostGraphDef_Node_OutputInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_CostGraphDef_Node_OutputInfo_descriptor, + new java.lang.String[] { "Size", "AliasInputPort", "Shape", "Dtype", }); + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(); + org.tensorflow.proto.framework.TypesProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DataClass.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DataClass.java new file mode 100644 index 00000000000..895366e817c --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DataClass.java @@ -0,0 +1,167 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/summary.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf enum {@code tensorflow.DataClass} + */ +public enum DataClass + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unknown data class, used (implicitly) for legacy data. Will not be
+   * processed by data ingestion pipelines.
+   * 
+ * + * DATA_CLASS_UNKNOWN = 0; + */ + DATA_CLASS_UNKNOWN(0), + /** + *
+   * Scalar time series. Each `Value` for the corresponding tag must have
+   * `tensor` set to a rank-0 tensor of floating-point dtype, which will be
+   * converted to float64.
+   * 
+ * + * DATA_CLASS_SCALAR = 1; + */ + DATA_CLASS_SCALAR(1), + /** + *
+   * Tensor time series. Each `Value` for the corresponding tag must have
+   * `tensor` set. The tensor value is arbitrary, but should be small to
+   * accommodate direct storage in database backends: an upper bound of a few
+   * kilobytes is a reasonable rule of thumb.
+   * 
+ * + * DATA_CLASS_TENSOR = 2; + */ + DATA_CLASS_TENSOR(2), + /** + *
+   * Blob sequence time series. Each `Value` for the corresponding tag must
+   * have `tensor` set to a rank-1 tensor of bytestring dtype.
+   * 
+ * + * DATA_CLASS_BLOB_SEQUENCE = 3; + */ + DATA_CLASS_BLOB_SEQUENCE(3), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unknown data class, used (implicitly) for legacy data. Will not be
+   * processed by data ingestion pipelines.
+   * 
+ * + * DATA_CLASS_UNKNOWN = 0; + */ + public static final int DATA_CLASS_UNKNOWN_VALUE = 0; + /** + *
+   * Scalar time series. Each `Value` for the corresponding tag must have
+   * `tensor` set to a rank-0 tensor of floating-point dtype, which will be
+   * converted to float64.
+   * 
+ * + * DATA_CLASS_SCALAR = 1; + */ + public static final int DATA_CLASS_SCALAR_VALUE = 1; + /** + *
+   * Tensor time series. Each `Value` for the corresponding tag must have
+   * `tensor` set. The tensor value is arbitrary, but should be small to
+   * accommodate direct storage in database backends: an upper bound of a few
+   * kilobytes is a reasonable rule of thumb.
+   * 
+ * + * DATA_CLASS_TENSOR = 2; + */ + public static final int DATA_CLASS_TENSOR_VALUE = 2; + /** + *
+   * Blob sequence time series. Each `Value` for the corresponding tag must
+   * have `tensor` set to a rank-1 tensor of bytestring dtype.
+   * 
+ * + * DATA_CLASS_BLOB_SEQUENCE = 3; + */ + public static final int DATA_CLASS_BLOB_SEQUENCE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataClass valueOf(int value) { + return forNumber(value); + } + + public static DataClass forNumber(int value) { + switch (value) { + case 0: return DATA_CLASS_UNKNOWN; + case 1: return DATA_CLASS_SCALAR; + case 2: return DATA_CLASS_TENSOR; + case 3: return DATA_CLASS_BLOB_SEQUENCE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DataClass> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DataClass findValueByNumber(int number) { + return DataClass.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.tensorflow.proto.framework.SummaryProtos.getDescriptor().getEnumTypes().get(0); + } + + private static final DataClass[] VALUES = values(); + + public static DataClass valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DataClass(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:tensorflow.DataClass) +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DataType.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DataType.java new file mode 100644 index 00000000000..6b836c8353a --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DataType.java @@ -0,0 +1,615 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/types.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * (== suppress_warning documentation-presence ==)
+ * LINT.IfChange
+ * 
+ * + * Protobuf enum {@code tensorflow.DataType} + */ +public enum DataType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Not a legal value for DataType.  Used to indicate a DataType field
+   * has not been set.
+   * 
+ * + * DT_INVALID = 0; + */ + DT_INVALID(0), + /** + *
+   * Data types that all computation devices are expected to be
+   * capable to support.
+   * 
+ * + * DT_FLOAT = 1; + */ + DT_FLOAT(1), + /** + * DT_DOUBLE = 2; + */ + DT_DOUBLE(2), + /** + * DT_INT32 = 3; + */ + DT_INT32(3), + /** + * DT_UINT8 = 4; + */ + DT_UINT8(4), + /** + * DT_INT16 = 5; + */ + DT_INT16(5), + /** + * DT_INT8 = 6; + */ + DT_INT8(6), + /** + * DT_STRING = 7; + */ + DT_STRING(7), + /** + *
+   * Single-precision complex
+   * 
+ * + * DT_COMPLEX64 = 8; + */ + DT_COMPLEX64(8), + /** + * DT_INT64 = 9; + */ + DT_INT64(9), + /** + * DT_BOOL = 10; + */ + DT_BOOL(10), + /** + *
+   * Quantized int8
+   * 
+ * + * DT_QINT8 = 11; + */ + DT_QINT8(11), + /** + *
+   * Quantized uint8
+   * 
+ * + * DT_QUINT8 = 12; + */ + DT_QUINT8(12), + /** + *
+   * Quantized int32
+   * 
+ * + * DT_QINT32 = 13; + */ + DT_QINT32(13), + /** + *
+   * Float32 truncated to 16 bits.  Only for cast ops.
+   * 
+ * + * DT_BFLOAT16 = 14; + */ + DT_BFLOAT16(14), + /** + *
+   * Quantized int16
+   * 
+ * + * DT_QINT16 = 15; + */ + DT_QINT16(15), + /** + *
+   * Quantized uint16
+   * 
+ * + * DT_QUINT16 = 16; + */ + DT_QUINT16(16), + /** + * DT_UINT16 = 17; + */ + DT_UINT16(17), + /** + *
+   * Double-precision complex
+   * 
+ * + * DT_COMPLEX128 = 18; + */ + DT_COMPLEX128(18), + /** + * DT_HALF = 19; + */ + DT_HALF(19), + /** + * DT_RESOURCE = 20; + */ + DT_RESOURCE(20), + /** + *
+   * Arbitrary C++ data types
+   * 
+ * + * DT_VARIANT = 21; + */ + DT_VARIANT(21), + /** + * DT_UINT32 = 22; + */ + DT_UINT32(22), + /** + * DT_UINT64 = 23; + */ + DT_UINT64(23), + /** + *
+   * Do not use!  These are only for parameters.  Every enum above
+   * should have a corresponding value below (verified by types_test).
+   * 
+ * + * DT_FLOAT_REF = 101; + */ + DT_FLOAT_REF(101), + /** + * DT_DOUBLE_REF = 102; + */ + DT_DOUBLE_REF(102), + /** + * DT_INT32_REF = 103; + */ + DT_INT32_REF(103), + /** + * DT_UINT8_REF = 104; + */ + DT_UINT8_REF(104), + /** + * DT_INT16_REF = 105; + */ + DT_INT16_REF(105), + /** + * DT_INT8_REF = 106; + */ + DT_INT8_REF(106), + /** + * DT_STRING_REF = 107; + */ + DT_STRING_REF(107), + /** + * DT_COMPLEX64_REF = 108; + */ + DT_COMPLEX64_REF(108), + /** + * DT_INT64_REF = 109; + */ + DT_INT64_REF(109), + /** + * DT_BOOL_REF = 110; + */ + DT_BOOL_REF(110), + /** + * DT_QINT8_REF = 111; + */ + DT_QINT8_REF(111), + /** + * DT_QUINT8_REF = 112; + */ + DT_QUINT8_REF(112), + /** + * DT_QINT32_REF = 113; + */ + DT_QINT32_REF(113), + /** + * DT_BFLOAT16_REF = 114; + */ + DT_BFLOAT16_REF(114), + /** + * DT_QINT16_REF = 115; + */ + DT_QINT16_REF(115), + /** + * DT_QUINT16_REF = 116; + */ + DT_QUINT16_REF(116), + /** + * DT_UINT16_REF = 117; + */ + DT_UINT16_REF(117), + /** + * DT_COMPLEX128_REF = 118; + */ + DT_COMPLEX128_REF(118), + /** + * DT_HALF_REF = 119; + */ + DT_HALF_REF(119), + /** + * DT_RESOURCE_REF = 120; + */ + DT_RESOURCE_REF(120), + /** + * DT_VARIANT_REF = 121; + */ + DT_VARIANT_REF(121), + /** + * DT_UINT32_REF = 122; + */ + DT_UINT32_REF(122), + /** + * DT_UINT64_REF = 123; + */ + DT_UINT64_REF(123), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Not a legal value for DataType.  Used to indicate a DataType field
+   * has not been set.
+   * 
+ * + * DT_INVALID = 0; + */ + public static final int DT_INVALID_VALUE = 0; + /** + *
+   * Data types that all computation devices are expected to be
+   * capable to support.
+   * 
+ * + * DT_FLOAT = 1; + */ + 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; + /** + *
+   * Single-precision complex
+   * 
+ * + * DT_COMPLEX64 = 8; + */ + 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; + /** + *
+   * Quantized int8
+   * 
+ * + * DT_QINT8 = 11; + */ + public static final int DT_QINT8_VALUE = 11; + /** + *
+   * Quantized uint8
+   * 
+ * + * DT_QUINT8 = 12; + */ + public static final int DT_QUINT8_VALUE = 12; + /** + *
+   * Quantized int32
+   * 
+ * + * DT_QINT32 = 13; + */ + public static final int DT_QINT32_VALUE = 13; + /** + *
+   * Float32 truncated to 16 bits.  Only for cast ops.
+   * 
+ * + * DT_BFLOAT16 = 14; + */ + public static final int DT_BFLOAT16_VALUE = 14; + /** + *
+   * Quantized int16
+   * 
+ * + * DT_QINT16 = 15; + */ + public static final int DT_QINT16_VALUE = 15; + /** + *
+   * Quantized uint16
+   * 
+ * + * DT_QUINT16 = 16; + */ + public static final int DT_QUINT16_VALUE = 16; + /** + * DT_UINT16 = 17; + */ + public static final int DT_UINT16_VALUE = 17; + /** + *
+   * Double-precision complex
+   * 
+ * + * DT_COMPLEX128 = 18; + */ + public static final int DT_COMPLEX128_VALUE = 18; + /** + * DT_HALF = 19; + */ + public static final int DT_HALF_VALUE = 19; + /** + * DT_RESOURCE = 20; + */ + public static final int DT_RESOURCE_VALUE = 20; + /** + *
+   * Arbitrary C++ data types
+   * 
+ * + * DT_VARIANT = 21; + */ + public static final int DT_VARIANT_VALUE = 21; + /** + * DT_UINT32 = 22; + */ + public static final int DT_UINT32_VALUE = 22; + /** + * DT_UINT64 = 23; + */ + public static final int DT_UINT64_VALUE = 23; + /** + *
+   * Do not use!  These are only for parameters.  Every enum above
+   * should have a corresponding value below (verified by types_test).
+   * 
+ * + * DT_FLOAT_REF = 101; + */ + 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; + /** + * DT_COMPLEX128_REF = 118; + */ + public static final int DT_COMPLEX128_REF_VALUE = 118; + /** + * DT_HALF_REF = 119; + */ + public static final int DT_HALF_REF_VALUE = 119; + /** + * DT_RESOURCE_REF = 120; + */ + public static final int DT_RESOURCE_REF_VALUE = 120; + /** + * DT_VARIANT_REF = 121; + */ + public static final int DT_VARIANT_REF_VALUE = 121; + /** + * DT_UINT32_REF = 122; + */ + public static final int DT_UINT32_REF_VALUE = 122; + /** + * DT_UINT64_REF = 123; + */ + public static final int DT_UINT64_REF_VALUE = 123; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataType valueOf(int value) { + return forNumber(value); + } + + public static DataType forNumber(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 18: return DT_COMPLEX128; + case 19: return DT_HALF; + case 20: return DT_RESOURCE; + case 21: return DT_VARIANT; + case 22: return DT_UINT32; + case 23: return DT_UINT64; + 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; + case 118: return DT_COMPLEX128_REF; + case 119: return DT_HALF_REF; + case 120: return DT_RESOURCE_REF; + case 121: return DT_VARIANT_REF; + case 122: return DT_UINT32_REF; + case 123: return DT_UINT64_REF; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DataType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DataType findValueByNumber(int number) { + return DataType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.tensorflow.proto.framework.TypesProtos.getDescriptor().getEnumTypes().get(0); + } + + private static final DataType[] VALUES = values(); + + public static DataType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DataType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:tensorflow.DataType) +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebugOptions.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebugOptions.java new file mode 100644 index 00000000000..73b4e10af4e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebugOptions.java @@ -0,0 +1,1033 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/debug.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Options for initializing DebuggerState in TensorFlow Debugger (tfdbg).
+ * 
+ * + * Protobuf type {@code tensorflow.DebugOptions} + */ +public final class DebugOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.DebugOptions) + DebugOptionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use DebugOptions.newBuilder() to construct. + private DebugOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DebugOptions() { + debugTensorWatchOpts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DebugOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DebugOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + debugTensorWatchOpts_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + debugTensorWatchOpts_.add( + input.readMessage(org.tensorflow.proto.framework.DebugTensorWatch.parser(), extensionRegistry)); + break; + } + case 80: { + + globalStep_ = input.readInt64(); + break; + } + case 88: { + + resetDiskByteUsage_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + debugTensorWatchOpts_ = java.util.Collections.unmodifiableList(debugTensorWatchOpts_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebugOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebugOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DebugOptions.class, org.tensorflow.proto.framework.DebugOptions.Builder.class); + } + + public static final int DEBUG_TENSOR_WATCH_OPTS_FIELD_NUMBER = 4; + private java.util.List debugTensorWatchOpts_; + /** + *
+   * Debugging options
+   * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public java.util.List getDebugTensorWatchOptsList() { + return debugTensorWatchOpts_; + } + /** + *
+   * Debugging options
+   * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public java.util.List + getDebugTensorWatchOptsOrBuilderList() { + return debugTensorWatchOpts_; + } + /** + *
+   * Debugging options
+   * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public int getDebugTensorWatchOptsCount() { + return debugTensorWatchOpts_.size(); + } + /** + *
+   * Debugging options
+   * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public org.tensorflow.proto.framework.DebugTensorWatch getDebugTensorWatchOpts(int index) { + return debugTensorWatchOpts_.get(index); + } + /** + *
+   * Debugging options
+   * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public org.tensorflow.proto.framework.DebugTensorWatchOrBuilder getDebugTensorWatchOptsOrBuilder( + int index) { + return debugTensorWatchOpts_.get(index); + } + + public static final int GLOBAL_STEP_FIELD_NUMBER = 10; + private long globalStep_; + /** + *
+   * Caller-specified global step count.
+   * Note that this is distinct from the session run count and the executor
+   * step count.
+   * 
+ * + * int64 global_step = 10; + */ + public long getGlobalStep() { + return globalStep_; + } + + public static final int RESET_DISK_BYTE_USAGE_FIELD_NUMBER = 11; + private boolean resetDiskByteUsage_; + /** + *
+   * Whether the total disk usage of tfdbg is to be reset to zero
+   * in this Session.run call. This is used by wrappers and hooks
+   * such as the local CLI ones to indicate that the dumped tensors
+   * are cleaned up from the disk after each Session.run.
+   * 
+ * + * bool reset_disk_byte_usage = 11; + */ + public boolean getResetDiskByteUsage() { + return resetDiskByteUsage_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < debugTensorWatchOpts_.size(); i++) { + output.writeMessage(4, debugTensorWatchOpts_.get(i)); + } + if (globalStep_ != 0L) { + output.writeInt64(10, globalStep_); + } + if (resetDiskByteUsage_ != false) { + output.writeBool(11, resetDiskByteUsage_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < debugTensorWatchOpts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, debugTensorWatchOpts_.get(i)); + } + if (globalStep_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(10, globalStep_); + } + if (resetDiskByteUsage_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(11, resetDiskByteUsage_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.DebugOptions)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.DebugOptions other = (org.tensorflow.proto.framework.DebugOptions) obj; + + if (!getDebugTensorWatchOptsList() + .equals(other.getDebugTensorWatchOptsList())) return false; + if (getGlobalStep() + != other.getGlobalStep()) return false; + if (getResetDiskByteUsage() + != other.getResetDiskByteUsage()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDebugTensorWatchOptsCount() > 0) { + hash = (37 * hash) + DEBUG_TENSOR_WATCH_OPTS_FIELD_NUMBER; + hash = (53 * hash) + getDebugTensorWatchOptsList().hashCode(); + } + hash = (37 * hash) + GLOBAL_STEP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGlobalStep()); + hash = (37 * hash) + RESET_DISK_BYTE_USAGE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getResetDiskByteUsage()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.DebugOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DebugOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DebugOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DebugOptions 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.proto.framework.DebugOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DebugOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DebugOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DebugOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DebugOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DebugOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DebugOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DebugOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.DebugOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Options for initializing DebuggerState in TensorFlow Debugger (tfdbg).
+   * 
+ * + * Protobuf type {@code tensorflow.DebugOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.DebugOptions) + org.tensorflow.proto.framework.DebugOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebugOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebugOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DebugOptions.class, org.tensorflow.proto.framework.DebugOptions.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.DebugOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDebugTensorWatchOptsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (debugTensorWatchOptsBuilder_ == null) { + debugTensorWatchOpts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + debugTensorWatchOptsBuilder_.clear(); + } + globalStep_ = 0L; + + resetDiskByteUsage_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebugOptions_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DebugOptions getDefaultInstanceForType() { + return org.tensorflow.proto.framework.DebugOptions.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.DebugOptions build() { + org.tensorflow.proto.framework.DebugOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DebugOptions buildPartial() { + org.tensorflow.proto.framework.DebugOptions result = new org.tensorflow.proto.framework.DebugOptions(this); + int from_bitField0_ = bitField0_; + if (debugTensorWatchOptsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + debugTensorWatchOpts_ = java.util.Collections.unmodifiableList(debugTensorWatchOpts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.debugTensorWatchOpts_ = debugTensorWatchOpts_; + } else { + result.debugTensorWatchOpts_ = debugTensorWatchOptsBuilder_.build(); + } + result.globalStep_ = globalStep_; + result.resetDiskByteUsage_ = resetDiskByteUsage_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.DebugOptions) { + return mergeFrom((org.tensorflow.proto.framework.DebugOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.DebugOptions other) { + if (other == org.tensorflow.proto.framework.DebugOptions.getDefaultInstance()) return this; + if (debugTensorWatchOptsBuilder_ == null) { + if (!other.debugTensorWatchOpts_.isEmpty()) { + if (debugTensorWatchOpts_.isEmpty()) { + debugTensorWatchOpts_ = other.debugTensorWatchOpts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDebugTensorWatchOptsIsMutable(); + debugTensorWatchOpts_.addAll(other.debugTensorWatchOpts_); + } + onChanged(); + } + } else { + if (!other.debugTensorWatchOpts_.isEmpty()) { + if (debugTensorWatchOptsBuilder_.isEmpty()) { + debugTensorWatchOptsBuilder_.dispose(); + debugTensorWatchOptsBuilder_ = null; + debugTensorWatchOpts_ = other.debugTensorWatchOpts_; + bitField0_ = (bitField0_ & ~0x00000001); + debugTensorWatchOptsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDebugTensorWatchOptsFieldBuilder() : null; + } else { + debugTensorWatchOptsBuilder_.addAllMessages(other.debugTensorWatchOpts_); + } + } + } + if (other.getGlobalStep() != 0L) { + setGlobalStep(other.getGlobalStep()); + } + if (other.getResetDiskByteUsage() != false) { + setResetDiskByteUsage(other.getResetDiskByteUsage()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.DebugOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.DebugOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List debugTensorWatchOpts_ = + java.util.Collections.emptyList(); + private void ensureDebugTensorWatchOptsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + debugTensorWatchOpts_ = new java.util.ArrayList(debugTensorWatchOpts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.DebugTensorWatch, org.tensorflow.proto.framework.DebugTensorWatch.Builder, org.tensorflow.proto.framework.DebugTensorWatchOrBuilder> debugTensorWatchOptsBuilder_; + + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public java.util.List getDebugTensorWatchOptsList() { + if (debugTensorWatchOptsBuilder_ == null) { + return java.util.Collections.unmodifiableList(debugTensorWatchOpts_); + } else { + return debugTensorWatchOptsBuilder_.getMessageList(); + } + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public int getDebugTensorWatchOptsCount() { + if (debugTensorWatchOptsBuilder_ == null) { + return debugTensorWatchOpts_.size(); + } else { + return debugTensorWatchOptsBuilder_.getCount(); + } + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public org.tensorflow.proto.framework.DebugTensorWatch getDebugTensorWatchOpts(int index) { + if (debugTensorWatchOptsBuilder_ == null) { + return debugTensorWatchOpts_.get(index); + } else { + return debugTensorWatchOptsBuilder_.getMessage(index); + } + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public Builder setDebugTensorWatchOpts( + int index, org.tensorflow.proto.framework.DebugTensorWatch value) { + if (debugTensorWatchOptsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDebugTensorWatchOptsIsMutable(); + debugTensorWatchOpts_.set(index, value); + onChanged(); + } else { + debugTensorWatchOptsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public Builder setDebugTensorWatchOpts( + int index, org.tensorflow.proto.framework.DebugTensorWatch.Builder builderForValue) { + if (debugTensorWatchOptsBuilder_ == null) { + ensureDebugTensorWatchOptsIsMutable(); + debugTensorWatchOpts_.set(index, builderForValue.build()); + onChanged(); + } else { + debugTensorWatchOptsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public Builder addDebugTensorWatchOpts(org.tensorflow.proto.framework.DebugTensorWatch value) { + if (debugTensorWatchOptsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDebugTensorWatchOptsIsMutable(); + debugTensorWatchOpts_.add(value); + onChanged(); + } else { + debugTensorWatchOptsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public Builder addDebugTensorWatchOpts( + int index, org.tensorflow.proto.framework.DebugTensorWatch value) { + if (debugTensorWatchOptsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDebugTensorWatchOptsIsMutable(); + debugTensorWatchOpts_.add(index, value); + onChanged(); + } else { + debugTensorWatchOptsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public Builder addDebugTensorWatchOpts( + org.tensorflow.proto.framework.DebugTensorWatch.Builder builderForValue) { + if (debugTensorWatchOptsBuilder_ == null) { + ensureDebugTensorWatchOptsIsMutable(); + debugTensorWatchOpts_.add(builderForValue.build()); + onChanged(); + } else { + debugTensorWatchOptsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public Builder addDebugTensorWatchOpts( + int index, org.tensorflow.proto.framework.DebugTensorWatch.Builder builderForValue) { + if (debugTensorWatchOptsBuilder_ == null) { + ensureDebugTensorWatchOptsIsMutable(); + debugTensorWatchOpts_.add(index, builderForValue.build()); + onChanged(); + } else { + debugTensorWatchOptsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public Builder addAllDebugTensorWatchOpts( + java.lang.Iterable values) { + if (debugTensorWatchOptsBuilder_ == null) { + ensureDebugTensorWatchOptsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, debugTensorWatchOpts_); + onChanged(); + } else { + debugTensorWatchOptsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public Builder clearDebugTensorWatchOpts() { + if (debugTensorWatchOptsBuilder_ == null) { + debugTensorWatchOpts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + debugTensorWatchOptsBuilder_.clear(); + } + return this; + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public Builder removeDebugTensorWatchOpts(int index) { + if (debugTensorWatchOptsBuilder_ == null) { + ensureDebugTensorWatchOptsIsMutable(); + debugTensorWatchOpts_.remove(index); + onChanged(); + } else { + debugTensorWatchOptsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public org.tensorflow.proto.framework.DebugTensorWatch.Builder getDebugTensorWatchOptsBuilder( + int index) { + return getDebugTensorWatchOptsFieldBuilder().getBuilder(index); + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public org.tensorflow.proto.framework.DebugTensorWatchOrBuilder getDebugTensorWatchOptsOrBuilder( + int index) { + if (debugTensorWatchOptsBuilder_ == null) { + return debugTensorWatchOpts_.get(index); } else { + return debugTensorWatchOptsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public java.util.List + getDebugTensorWatchOptsOrBuilderList() { + if (debugTensorWatchOptsBuilder_ != null) { + return debugTensorWatchOptsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(debugTensorWatchOpts_); + } + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public org.tensorflow.proto.framework.DebugTensorWatch.Builder addDebugTensorWatchOptsBuilder() { + return getDebugTensorWatchOptsFieldBuilder().addBuilder( + org.tensorflow.proto.framework.DebugTensorWatch.getDefaultInstance()); + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public org.tensorflow.proto.framework.DebugTensorWatch.Builder addDebugTensorWatchOptsBuilder( + int index) { + return getDebugTensorWatchOptsFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.DebugTensorWatch.getDefaultInstance()); + } + /** + *
+     * Debugging options
+     * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + public java.util.List + getDebugTensorWatchOptsBuilderList() { + return getDebugTensorWatchOptsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.DebugTensorWatch, org.tensorflow.proto.framework.DebugTensorWatch.Builder, org.tensorflow.proto.framework.DebugTensorWatchOrBuilder> + getDebugTensorWatchOptsFieldBuilder() { + if (debugTensorWatchOptsBuilder_ == null) { + debugTensorWatchOptsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.DebugTensorWatch, org.tensorflow.proto.framework.DebugTensorWatch.Builder, org.tensorflow.proto.framework.DebugTensorWatchOrBuilder>( + debugTensorWatchOpts_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + debugTensorWatchOpts_ = null; + } + return debugTensorWatchOptsBuilder_; + } + + private long globalStep_ ; + /** + *
+     * Caller-specified global step count.
+     * Note that this is distinct from the session run count and the executor
+     * step count.
+     * 
+ * + * int64 global_step = 10; + */ + public long getGlobalStep() { + return globalStep_; + } + /** + *
+     * Caller-specified global step count.
+     * Note that this is distinct from the session run count and the executor
+     * step count.
+     * 
+ * + * int64 global_step = 10; + */ + public Builder setGlobalStep(long value) { + + globalStep_ = value; + onChanged(); + return this; + } + /** + *
+     * Caller-specified global step count.
+     * Note that this is distinct from the session run count and the executor
+     * step count.
+     * 
+ * + * int64 global_step = 10; + */ + public Builder clearGlobalStep() { + + globalStep_ = 0L; + onChanged(); + return this; + } + + private boolean resetDiskByteUsage_ ; + /** + *
+     * Whether the total disk usage of tfdbg is to be reset to zero
+     * in this Session.run call. This is used by wrappers and hooks
+     * such as the local CLI ones to indicate that the dumped tensors
+     * are cleaned up from the disk after each Session.run.
+     * 
+ * + * bool reset_disk_byte_usage = 11; + */ + public boolean getResetDiskByteUsage() { + return resetDiskByteUsage_; + } + /** + *
+     * Whether the total disk usage of tfdbg is to be reset to zero
+     * in this Session.run call. This is used by wrappers and hooks
+     * such as the local CLI ones to indicate that the dumped tensors
+     * are cleaned up from the disk after each Session.run.
+     * 
+ * + * bool reset_disk_byte_usage = 11; + */ + public Builder setResetDiskByteUsage(boolean value) { + + resetDiskByteUsage_ = value; + onChanged(); + return this; + } + /** + *
+     * Whether the total disk usage of tfdbg is to be reset to zero
+     * in this Session.run call. This is used by wrappers and hooks
+     * such as the local CLI ones to indicate that the dumped tensors
+     * are cleaned up from the disk after each Session.run.
+     * 
+ * + * bool reset_disk_byte_usage = 11; + */ + public Builder clearResetDiskByteUsage() { + + resetDiskByteUsage_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.DebugOptions) + } + + // @@protoc_insertion_point(class_scope:tensorflow.DebugOptions) + private static final org.tensorflow.proto.framework.DebugOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.DebugOptions(); + } + + public static org.tensorflow.proto.framework.DebugOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DebugOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DebugOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DebugOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebugOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebugOptionsOrBuilder.java new file mode 100644 index 00000000000..65f0407737a --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebugOptionsOrBuilder.java @@ -0,0 +1,76 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/debug.proto + +package org.tensorflow.proto.framework; + +public interface DebugOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.DebugOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Debugging options
+   * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + java.util.List + getDebugTensorWatchOptsList(); + /** + *
+   * Debugging options
+   * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + org.tensorflow.proto.framework.DebugTensorWatch getDebugTensorWatchOpts(int index); + /** + *
+   * Debugging options
+   * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + int getDebugTensorWatchOptsCount(); + /** + *
+   * Debugging options
+   * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + java.util.List + getDebugTensorWatchOptsOrBuilderList(); + /** + *
+   * Debugging options
+   * 
+ * + * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4; + */ + org.tensorflow.proto.framework.DebugTensorWatchOrBuilder getDebugTensorWatchOptsOrBuilder( + int index); + + /** + *
+   * Caller-specified global step count.
+   * Note that this is distinct from the session run count and the executor
+   * step count.
+   * 
+ * + * int64 global_step = 10; + */ + long getGlobalStep(); + + /** + *
+   * Whether the total disk usage of tfdbg is to be reset to zero
+   * in this Session.run call. This is used by wrappers and hooks
+   * such as the local CLI ones to indicate that the dumped tensors
+   * are cleaned up from the disk after each Session.run.
+   * 
+ * + * bool reset_disk_byte_usage = 11; + */ + boolean getResetDiskByteUsage(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebugProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebugProtos.java new file mode 100644 index 00000000000..edc853e9376 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebugProtos.java @@ -0,0 +1,95 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/debug.proto + +package org.tensorflow.proto.framework; + +public final class DebugProtos { + private DebugProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_DebugTensorWatch_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_DebugTensorWatch_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_DebugOptions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_DebugOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_DebuggedSourceFile_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_DebuggedSourceFile_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_DebuggedSourceFiles_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_DebuggedSourceFiles_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/protobuf/debug.proto\022\n" + + "tensorflow\"\216\001\n\020DebugTensorWatch\022\021\n\tnode_" + + "name\030\001 \001(\t\022\023\n\013output_slot\030\002 \001(\005\022\021\n\tdebug" + + "_ops\030\003 \003(\t\022\022\n\ndebug_urls\030\004 \003(\t\022+\n#tolera" + + "te_debug_op_creation_failures\030\005 \001(\010\"\201\001\n\014" + + "DebugOptions\022=\n\027debug_tensor_watch_opts\030" + + "\004 \003(\0132\034.tensorflow.DebugTensorWatch\022\023\n\013g" + + "lobal_step\030\n \001(\003\022\035\n\025reset_disk_byte_usag" + + "e\030\013 \001(\010\"j\n\022DebuggedSourceFile\022\014\n\004host\030\001 " + + "\001(\t\022\021\n\tfile_path\030\002 \001(\t\022\025\n\rlast_modified\030" + + "\003 \001(\003\022\r\n\005bytes\030\004 \001(\003\022\r\n\005lines\030\005 \003(\t\"K\n\023D" + + "ebuggedSourceFiles\0224\n\014source_files\030\001 \003(\013" + + "2\036.tensorflow.DebuggedSourceFileB|\n\036org." + + "tensorflow.proto.frameworkB\013DebugProtosP" + + "\001ZHgithub.com/tensorflow/tensorflow/tens" + + "orflow/go/core/core_protos_go_proto\370\001\001b\006" + + "proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tensorflow_DebugTensorWatch_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_DebugTensorWatch_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_DebugTensorWatch_descriptor, + new java.lang.String[] { "NodeName", "OutputSlot", "DebugOps", "DebugUrls", "TolerateDebugOpCreationFailures", }); + internal_static_tensorflow_DebugOptions_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_DebugOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_DebugOptions_descriptor, + new java.lang.String[] { "DebugTensorWatchOpts", "GlobalStep", "ResetDiskByteUsage", }); + internal_static_tensorflow_DebuggedSourceFile_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_tensorflow_DebuggedSourceFile_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_DebuggedSourceFile_descriptor, + new java.lang.String[] { "Host", "FilePath", "LastModified", "Bytes", "Lines", }); + internal_static_tensorflow_DebuggedSourceFiles_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_tensorflow_DebuggedSourceFiles_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_DebuggedSourceFiles_descriptor, + new java.lang.String[] { "SourceFiles", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebugTensorWatch.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebugTensorWatch.java new file mode 100644 index 00000000000..6536f3402fc --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebugTensorWatch.java @@ -0,0 +1,1444 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/debug.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Option for watching a node in TensorFlow Debugger (tfdbg).
+ * 
+ * + * Protobuf type {@code tensorflow.DebugTensorWatch} + */ +public final class DebugTensorWatch extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.DebugTensorWatch) + DebugTensorWatchOrBuilder { +private static final long serialVersionUID = 0L; + // Use DebugTensorWatch.newBuilder() to construct. + private DebugTensorWatch(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DebugTensorWatch() { + nodeName_ = ""; + debugOps_ = com.google.protobuf.LazyStringArrayList.EMPTY; + debugUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DebugTensorWatch(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DebugTensorWatch( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + nodeName_ = s; + break; + } + case 16: { + + outputSlot_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + debugOps_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + debugOps_.add(s); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + debugUrls_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + debugUrls_.add(s); + break; + } + case 40: { + + tolerateDebugOpCreationFailures_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + debugOps_ = debugOps_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + debugUrls_ = debugUrls_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebugTensorWatch_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebugTensorWatch_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DebugTensorWatch.class, org.tensorflow.proto.framework.DebugTensorWatch.Builder.class); + } + + public static final int NODE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object nodeName_; + /** + *
+   * Name of the node to watch.
+   * Use "*" for wildcard. But note: currently, regex is not supported in
+   * general.
+   * 
+ * + * string node_name = 1; + */ + public java.lang.String getNodeName() { + java.lang.Object ref = nodeName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeName_ = s; + return s; + } + } + /** + *
+   * Name of the node to watch.
+   * Use "*" for wildcard. But note: currently, regex is not supported in
+   * general.
+   * 
+ * + * string node_name = 1; + */ + public com.google.protobuf.ByteString + getNodeNameBytes() { + java.lang.Object ref = nodeName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nodeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OUTPUT_SLOT_FIELD_NUMBER = 2; + private int outputSlot_; + /** + *
+   * Output slot to watch.
+   * The semantics of output_slot == -1 is that all outputs of the node
+   * will be watched (i.e., a wildcard).
+   * Other negative values of output_slot are invalid and will lead to
+   * errors currently.
+   * 
+ * + * int32 output_slot = 2; + */ + public int getOutputSlot() { + return outputSlot_; + } + + public static final int DEBUG_OPS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList debugOps_; + /** + *
+   * Name(s) of the debugging op(s).
+   * One or more than one probes on a tensor.
+   * e.g., {"DebugIdentity", "DebugNanCount"}
+   * 
+ * + * repeated string debug_ops = 3; + */ + public com.google.protobuf.ProtocolStringList + getDebugOpsList() { + return debugOps_; + } + /** + *
+   * Name(s) of the debugging op(s).
+   * One or more than one probes on a tensor.
+   * e.g., {"DebugIdentity", "DebugNanCount"}
+   * 
+ * + * repeated string debug_ops = 3; + */ + public int getDebugOpsCount() { + return debugOps_.size(); + } + /** + *
+   * Name(s) of the debugging op(s).
+   * One or more than one probes on a tensor.
+   * e.g., {"DebugIdentity", "DebugNanCount"}
+   * 
+ * + * repeated string debug_ops = 3; + */ + public java.lang.String getDebugOps(int index) { + return debugOps_.get(index); + } + /** + *
+   * Name(s) of the debugging op(s).
+   * One or more than one probes on a tensor.
+   * e.g., {"DebugIdentity", "DebugNanCount"}
+   * 
+ * + * repeated string debug_ops = 3; + */ + public com.google.protobuf.ByteString + getDebugOpsBytes(int index) { + return debugOps_.getByteString(index); + } + + public static final int DEBUG_URLS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList debugUrls_; + /** + *
+   * URL(s) for debug targets(s).
+   * Supported URL formats are:
+   *   - file:///foo/tfdbg_dump: Writes out Event content to file
+   *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+   *     already exist.
+   *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+   *     service running at localhost:11011 with the event.
+   *   - memcbk:///event_key: Routes tensors to clients using the
+   *     callback registered with the DebugCallbackRegistry for event_key.
+   * Each debug op listed in debug_ops will publish its output tensor (debug
+   * signal) to all URLs in debug_urls.
+   * N.B. Session::Run() supports concurrent invocations of the same inputs
+   * (feed keys), outputs and target nodes. If such concurrent invocations
+   * are to be debugged, the callers of Session::Run() must use distinct
+   * debug_urls to make sure that the streamed or dumped events do not overlap
+   * among the invocations.
+   * TODO(cais): More visible documentation of this in g3docs.
+   * 
+ * + * repeated string debug_urls = 4; + */ + public com.google.protobuf.ProtocolStringList + getDebugUrlsList() { + return debugUrls_; + } + /** + *
+   * URL(s) for debug targets(s).
+   * Supported URL formats are:
+   *   - file:///foo/tfdbg_dump: Writes out Event content to file
+   *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+   *     already exist.
+   *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+   *     service running at localhost:11011 with the event.
+   *   - memcbk:///event_key: Routes tensors to clients using the
+   *     callback registered with the DebugCallbackRegistry for event_key.
+   * Each debug op listed in debug_ops will publish its output tensor (debug
+   * signal) to all URLs in debug_urls.
+   * N.B. Session::Run() supports concurrent invocations of the same inputs
+   * (feed keys), outputs and target nodes. If such concurrent invocations
+   * are to be debugged, the callers of Session::Run() must use distinct
+   * debug_urls to make sure that the streamed or dumped events do not overlap
+   * among the invocations.
+   * TODO(cais): More visible documentation of this in g3docs.
+   * 
+ * + * repeated string debug_urls = 4; + */ + public int getDebugUrlsCount() { + return debugUrls_.size(); + } + /** + *
+   * URL(s) for debug targets(s).
+   * Supported URL formats are:
+   *   - file:///foo/tfdbg_dump: Writes out Event content to file
+   *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+   *     already exist.
+   *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+   *     service running at localhost:11011 with the event.
+   *   - memcbk:///event_key: Routes tensors to clients using the
+   *     callback registered with the DebugCallbackRegistry for event_key.
+   * Each debug op listed in debug_ops will publish its output tensor (debug
+   * signal) to all URLs in debug_urls.
+   * N.B. Session::Run() supports concurrent invocations of the same inputs
+   * (feed keys), outputs and target nodes. If such concurrent invocations
+   * are to be debugged, the callers of Session::Run() must use distinct
+   * debug_urls to make sure that the streamed or dumped events do not overlap
+   * among the invocations.
+   * TODO(cais): More visible documentation of this in g3docs.
+   * 
+ * + * repeated string debug_urls = 4; + */ + public java.lang.String getDebugUrls(int index) { + return debugUrls_.get(index); + } + /** + *
+   * URL(s) for debug targets(s).
+   * Supported URL formats are:
+   *   - file:///foo/tfdbg_dump: Writes out Event content to file
+   *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+   *     already exist.
+   *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+   *     service running at localhost:11011 with the event.
+   *   - memcbk:///event_key: Routes tensors to clients using the
+   *     callback registered with the DebugCallbackRegistry for event_key.
+   * Each debug op listed in debug_ops will publish its output tensor (debug
+   * signal) to all URLs in debug_urls.
+   * N.B. Session::Run() supports concurrent invocations of the same inputs
+   * (feed keys), outputs and target nodes. If such concurrent invocations
+   * are to be debugged, the callers of Session::Run() must use distinct
+   * debug_urls to make sure that the streamed or dumped events do not overlap
+   * among the invocations.
+   * TODO(cais): More visible documentation of this in g3docs.
+   * 
+ * + * repeated string debug_urls = 4; + */ + public com.google.protobuf.ByteString + getDebugUrlsBytes(int index) { + return debugUrls_.getByteString(index); + } + + public static final int TOLERATE_DEBUG_OP_CREATION_FAILURES_FIELD_NUMBER = 5; + private boolean tolerateDebugOpCreationFailures_; + /** + *
+   * Do not error out if debug op creation fails (e.g., due to dtype
+   * incompatibility). Instead, just log the failure.
+   * 
+ * + * bool tolerate_debug_op_creation_failures = 5; + */ + public boolean getTolerateDebugOpCreationFailures() { + return tolerateDebugOpCreationFailures_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNodeNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, nodeName_); + } + if (outputSlot_ != 0) { + output.writeInt32(2, outputSlot_); + } + for (int i = 0; i < debugOps_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, debugOps_.getRaw(i)); + } + for (int i = 0; i < debugUrls_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, debugUrls_.getRaw(i)); + } + if (tolerateDebugOpCreationFailures_ != false) { + output.writeBool(5, tolerateDebugOpCreationFailures_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNodeNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, nodeName_); + } + if (outputSlot_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, outputSlot_); + } + { + int dataSize = 0; + for (int i = 0; i < debugOps_.size(); i++) { + dataSize += computeStringSizeNoTag(debugOps_.getRaw(i)); + } + size += dataSize; + size += 1 * getDebugOpsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < debugUrls_.size(); i++) { + dataSize += computeStringSizeNoTag(debugUrls_.getRaw(i)); + } + size += dataSize; + size += 1 * getDebugUrlsList().size(); + } + if (tolerateDebugOpCreationFailures_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, tolerateDebugOpCreationFailures_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.DebugTensorWatch)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.DebugTensorWatch other = (org.tensorflow.proto.framework.DebugTensorWatch) obj; + + if (!getNodeName() + .equals(other.getNodeName())) return false; + if (getOutputSlot() + != other.getOutputSlot()) return false; + if (!getDebugOpsList() + .equals(other.getDebugOpsList())) return false; + if (!getDebugUrlsList() + .equals(other.getDebugUrlsList())) return false; + if (getTolerateDebugOpCreationFailures() + != other.getTolerateDebugOpCreationFailures()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NODE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getNodeName().hashCode(); + hash = (37 * hash) + OUTPUT_SLOT_FIELD_NUMBER; + hash = (53 * hash) + getOutputSlot(); + if (getDebugOpsCount() > 0) { + hash = (37 * hash) + DEBUG_OPS_FIELD_NUMBER; + hash = (53 * hash) + getDebugOpsList().hashCode(); + } + if (getDebugUrlsCount() > 0) { + hash = (37 * hash) + DEBUG_URLS_FIELD_NUMBER; + hash = (53 * hash) + getDebugUrlsList().hashCode(); + } + hash = (37 * hash) + TOLERATE_DEBUG_OP_CREATION_FAILURES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getTolerateDebugOpCreationFailures()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.DebugTensorWatch parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DebugTensorWatch parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DebugTensorWatch parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DebugTensorWatch 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.proto.framework.DebugTensorWatch parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DebugTensorWatch parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DebugTensorWatch parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DebugTensorWatch parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DebugTensorWatch parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DebugTensorWatch parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DebugTensorWatch parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DebugTensorWatch parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.DebugTensorWatch prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Option for watching a node in TensorFlow Debugger (tfdbg).
+   * 
+ * + * Protobuf type {@code tensorflow.DebugTensorWatch} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.DebugTensorWatch) + org.tensorflow.proto.framework.DebugTensorWatchOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebugTensorWatch_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebugTensorWatch_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DebugTensorWatch.class, org.tensorflow.proto.framework.DebugTensorWatch.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.DebugTensorWatch.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + nodeName_ = ""; + + outputSlot_ = 0; + + debugOps_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + debugUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + tolerateDebugOpCreationFailures_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebugTensorWatch_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DebugTensorWatch getDefaultInstanceForType() { + return org.tensorflow.proto.framework.DebugTensorWatch.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.DebugTensorWatch build() { + org.tensorflow.proto.framework.DebugTensorWatch result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DebugTensorWatch buildPartial() { + org.tensorflow.proto.framework.DebugTensorWatch result = new org.tensorflow.proto.framework.DebugTensorWatch(this); + int from_bitField0_ = bitField0_; + result.nodeName_ = nodeName_; + result.outputSlot_ = outputSlot_; + if (((bitField0_ & 0x00000001) != 0)) { + debugOps_ = debugOps_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.debugOps_ = debugOps_; + if (((bitField0_ & 0x00000002) != 0)) { + debugUrls_ = debugUrls_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.debugUrls_ = debugUrls_; + result.tolerateDebugOpCreationFailures_ = tolerateDebugOpCreationFailures_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.DebugTensorWatch) { + return mergeFrom((org.tensorflow.proto.framework.DebugTensorWatch)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.DebugTensorWatch other) { + if (other == org.tensorflow.proto.framework.DebugTensorWatch.getDefaultInstance()) return this; + if (!other.getNodeName().isEmpty()) { + nodeName_ = other.nodeName_; + onChanged(); + } + if (other.getOutputSlot() != 0) { + setOutputSlot(other.getOutputSlot()); + } + if (!other.debugOps_.isEmpty()) { + if (debugOps_.isEmpty()) { + debugOps_ = other.debugOps_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDebugOpsIsMutable(); + debugOps_.addAll(other.debugOps_); + } + onChanged(); + } + if (!other.debugUrls_.isEmpty()) { + if (debugUrls_.isEmpty()) { + debugUrls_ = other.debugUrls_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDebugUrlsIsMutable(); + debugUrls_.addAll(other.debugUrls_); + } + onChanged(); + } + if (other.getTolerateDebugOpCreationFailures() != false) { + setTolerateDebugOpCreationFailures(other.getTolerateDebugOpCreationFailures()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.DebugTensorWatch parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.DebugTensorWatch) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object nodeName_ = ""; + /** + *
+     * Name of the node to watch.
+     * Use "*" for wildcard. But note: currently, regex is not supported in
+     * general.
+     * 
+ * + * string node_name = 1; + */ + public java.lang.String getNodeName() { + java.lang.Object ref = nodeName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the node to watch.
+     * Use "*" for wildcard. But note: currently, regex is not supported in
+     * general.
+     * 
+ * + * string node_name = 1; + */ + public com.google.protobuf.ByteString + getNodeNameBytes() { + java.lang.Object ref = nodeName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nodeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the node to watch.
+     * Use "*" for wildcard. But note: currently, regex is not supported in
+     * general.
+     * 
+ * + * string node_name = 1; + */ + public Builder setNodeName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nodeName_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the node to watch.
+     * Use "*" for wildcard. But note: currently, regex is not supported in
+     * general.
+     * 
+ * + * string node_name = 1; + */ + public Builder clearNodeName() { + + nodeName_ = getDefaultInstance().getNodeName(); + onChanged(); + return this; + } + /** + *
+     * Name of the node to watch.
+     * Use "*" for wildcard. But note: currently, regex is not supported in
+     * general.
+     * 
+ * + * string node_name = 1; + */ + public Builder setNodeNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nodeName_ = value; + onChanged(); + return this; + } + + private int outputSlot_ ; + /** + *
+     * Output slot to watch.
+     * The semantics of output_slot == -1 is that all outputs of the node
+     * will be watched (i.e., a wildcard).
+     * Other negative values of output_slot are invalid and will lead to
+     * errors currently.
+     * 
+ * + * int32 output_slot = 2; + */ + public int getOutputSlot() { + return outputSlot_; + } + /** + *
+     * Output slot to watch.
+     * The semantics of output_slot == -1 is that all outputs of the node
+     * will be watched (i.e., a wildcard).
+     * Other negative values of output_slot are invalid and will lead to
+     * errors currently.
+     * 
+ * + * int32 output_slot = 2; + */ + public Builder setOutputSlot(int value) { + + outputSlot_ = value; + onChanged(); + return this; + } + /** + *
+     * Output slot to watch.
+     * The semantics of output_slot == -1 is that all outputs of the node
+     * will be watched (i.e., a wildcard).
+     * Other negative values of output_slot are invalid and will lead to
+     * errors currently.
+     * 
+ * + * int32 output_slot = 2; + */ + public Builder clearOutputSlot() { + + outputSlot_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList debugOps_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureDebugOpsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + debugOps_ = new com.google.protobuf.LazyStringArrayList(debugOps_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Name(s) of the debugging op(s).
+     * One or more than one probes on a tensor.
+     * e.g., {"DebugIdentity", "DebugNanCount"}
+     * 
+ * + * repeated string debug_ops = 3; + */ + public com.google.protobuf.ProtocolStringList + getDebugOpsList() { + return debugOps_.getUnmodifiableView(); + } + /** + *
+     * Name(s) of the debugging op(s).
+     * One or more than one probes on a tensor.
+     * e.g., {"DebugIdentity", "DebugNanCount"}
+     * 
+ * + * repeated string debug_ops = 3; + */ + public int getDebugOpsCount() { + return debugOps_.size(); + } + /** + *
+     * Name(s) of the debugging op(s).
+     * One or more than one probes on a tensor.
+     * e.g., {"DebugIdentity", "DebugNanCount"}
+     * 
+ * + * repeated string debug_ops = 3; + */ + public java.lang.String getDebugOps(int index) { + return debugOps_.get(index); + } + /** + *
+     * Name(s) of the debugging op(s).
+     * One or more than one probes on a tensor.
+     * e.g., {"DebugIdentity", "DebugNanCount"}
+     * 
+ * + * repeated string debug_ops = 3; + */ + public com.google.protobuf.ByteString + getDebugOpsBytes(int index) { + return debugOps_.getByteString(index); + } + /** + *
+     * Name(s) of the debugging op(s).
+     * One or more than one probes on a tensor.
+     * e.g., {"DebugIdentity", "DebugNanCount"}
+     * 
+ * + * repeated string debug_ops = 3; + */ + public Builder setDebugOps( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDebugOpsIsMutable(); + debugOps_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Name(s) of the debugging op(s).
+     * One or more than one probes on a tensor.
+     * e.g., {"DebugIdentity", "DebugNanCount"}
+     * 
+ * + * repeated string debug_ops = 3; + */ + public Builder addDebugOps( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDebugOpsIsMutable(); + debugOps_.add(value); + onChanged(); + return this; + } + /** + *
+     * Name(s) of the debugging op(s).
+     * One or more than one probes on a tensor.
+     * e.g., {"DebugIdentity", "DebugNanCount"}
+     * 
+ * + * repeated string debug_ops = 3; + */ + public Builder addAllDebugOps( + java.lang.Iterable values) { + ensureDebugOpsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, debugOps_); + onChanged(); + return this; + } + /** + *
+     * Name(s) of the debugging op(s).
+     * One or more than one probes on a tensor.
+     * e.g., {"DebugIdentity", "DebugNanCount"}
+     * 
+ * + * repeated string debug_ops = 3; + */ + public Builder clearDebugOps() { + debugOps_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Name(s) of the debugging op(s).
+     * One or more than one probes on a tensor.
+     * e.g., {"DebugIdentity", "DebugNanCount"}
+     * 
+ * + * repeated string debug_ops = 3; + */ + public Builder addDebugOpsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDebugOpsIsMutable(); + debugOps_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList debugUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureDebugUrlsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + debugUrls_ = new com.google.protobuf.LazyStringArrayList(debugUrls_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * URL(s) for debug targets(s).
+     * Supported URL formats are:
+     *   - file:///foo/tfdbg_dump: Writes out Event content to file
+     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+     *     already exist.
+     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+     *     service running at localhost:11011 with the event.
+     *   - memcbk:///event_key: Routes tensors to clients using the
+     *     callback registered with the DebugCallbackRegistry for event_key.
+     * Each debug op listed in debug_ops will publish its output tensor (debug
+     * signal) to all URLs in debug_urls.
+     * N.B. Session::Run() supports concurrent invocations of the same inputs
+     * (feed keys), outputs and target nodes. If such concurrent invocations
+     * are to be debugged, the callers of Session::Run() must use distinct
+     * debug_urls to make sure that the streamed or dumped events do not overlap
+     * among the invocations.
+     * TODO(cais): More visible documentation of this in g3docs.
+     * 
+ * + * repeated string debug_urls = 4; + */ + public com.google.protobuf.ProtocolStringList + getDebugUrlsList() { + return debugUrls_.getUnmodifiableView(); + } + /** + *
+     * URL(s) for debug targets(s).
+     * Supported URL formats are:
+     *   - file:///foo/tfdbg_dump: Writes out Event content to file
+     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+     *     already exist.
+     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+     *     service running at localhost:11011 with the event.
+     *   - memcbk:///event_key: Routes tensors to clients using the
+     *     callback registered with the DebugCallbackRegistry for event_key.
+     * Each debug op listed in debug_ops will publish its output tensor (debug
+     * signal) to all URLs in debug_urls.
+     * N.B. Session::Run() supports concurrent invocations of the same inputs
+     * (feed keys), outputs and target nodes. If such concurrent invocations
+     * are to be debugged, the callers of Session::Run() must use distinct
+     * debug_urls to make sure that the streamed or dumped events do not overlap
+     * among the invocations.
+     * TODO(cais): More visible documentation of this in g3docs.
+     * 
+ * + * repeated string debug_urls = 4; + */ + public int getDebugUrlsCount() { + return debugUrls_.size(); + } + /** + *
+     * URL(s) for debug targets(s).
+     * Supported URL formats are:
+     *   - file:///foo/tfdbg_dump: Writes out Event content to file
+     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+     *     already exist.
+     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+     *     service running at localhost:11011 with the event.
+     *   - memcbk:///event_key: Routes tensors to clients using the
+     *     callback registered with the DebugCallbackRegistry for event_key.
+     * Each debug op listed in debug_ops will publish its output tensor (debug
+     * signal) to all URLs in debug_urls.
+     * N.B. Session::Run() supports concurrent invocations of the same inputs
+     * (feed keys), outputs and target nodes. If such concurrent invocations
+     * are to be debugged, the callers of Session::Run() must use distinct
+     * debug_urls to make sure that the streamed or dumped events do not overlap
+     * among the invocations.
+     * TODO(cais): More visible documentation of this in g3docs.
+     * 
+ * + * repeated string debug_urls = 4; + */ + public java.lang.String getDebugUrls(int index) { + return debugUrls_.get(index); + } + /** + *
+     * URL(s) for debug targets(s).
+     * Supported URL formats are:
+     *   - file:///foo/tfdbg_dump: Writes out Event content to file
+     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+     *     already exist.
+     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+     *     service running at localhost:11011 with the event.
+     *   - memcbk:///event_key: Routes tensors to clients using the
+     *     callback registered with the DebugCallbackRegistry for event_key.
+     * Each debug op listed in debug_ops will publish its output tensor (debug
+     * signal) to all URLs in debug_urls.
+     * N.B. Session::Run() supports concurrent invocations of the same inputs
+     * (feed keys), outputs and target nodes. If such concurrent invocations
+     * are to be debugged, the callers of Session::Run() must use distinct
+     * debug_urls to make sure that the streamed or dumped events do not overlap
+     * among the invocations.
+     * TODO(cais): More visible documentation of this in g3docs.
+     * 
+ * + * repeated string debug_urls = 4; + */ + public com.google.protobuf.ByteString + getDebugUrlsBytes(int index) { + return debugUrls_.getByteString(index); + } + /** + *
+     * URL(s) for debug targets(s).
+     * Supported URL formats are:
+     *   - file:///foo/tfdbg_dump: Writes out Event content to file
+     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+     *     already exist.
+     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+     *     service running at localhost:11011 with the event.
+     *   - memcbk:///event_key: Routes tensors to clients using the
+     *     callback registered with the DebugCallbackRegistry for event_key.
+     * Each debug op listed in debug_ops will publish its output tensor (debug
+     * signal) to all URLs in debug_urls.
+     * N.B. Session::Run() supports concurrent invocations of the same inputs
+     * (feed keys), outputs and target nodes. If such concurrent invocations
+     * are to be debugged, the callers of Session::Run() must use distinct
+     * debug_urls to make sure that the streamed or dumped events do not overlap
+     * among the invocations.
+     * TODO(cais): More visible documentation of this in g3docs.
+     * 
+ * + * repeated string debug_urls = 4; + */ + public Builder setDebugUrls( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDebugUrlsIsMutable(); + debugUrls_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * URL(s) for debug targets(s).
+     * Supported URL formats are:
+     *   - file:///foo/tfdbg_dump: Writes out Event content to file
+     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+     *     already exist.
+     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+     *     service running at localhost:11011 with the event.
+     *   - memcbk:///event_key: Routes tensors to clients using the
+     *     callback registered with the DebugCallbackRegistry for event_key.
+     * Each debug op listed in debug_ops will publish its output tensor (debug
+     * signal) to all URLs in debug_urls.
+     * N.B. Session::Run() supports concurrent invocations of the same inputs
+     * (feed keys), outputs and target nodes. If such concurrent invocations
+     * are to be debugged, the callers of Session::Run() must use distinct
+     * debug_urls to make sure that the streamed or dumped events do not overlap
+     * among the invocations.
+     * TODO(cais): More visible documentation of this in g3docs.
+     * 
+ * + * repeated string debug_urls = 4; + */ + public Builder addDebugUrls( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDebugUrlsIsMutable(); + debugUrls_.add(value); + onChanged(); + return this; + } + /** + *
+     * URL(s) for debug targets(s).
+     * Supported URL formats are:
+     *   - file:///foo/tfdbg_dump: Writes out Event content to file
+     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+     *     already exist.
+     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+     *     service running at localhost:11011 with the event.
+     *   - memcbk:///event_key: Routes tensors to clients using the
+     *     callback registered with the DebugCallbackRegistry for event_key.
+     * Each debug op listed in debug_ops will publish its output tensor (debug
+     * signal) to all URLs in debug_urls.
+     * N.B. Session::Run() supports concurrent invocations of the same inputs
+     * (feed keys), outputs and target nodes. If such concurrent invocations
+     * are to be debugged, the callers of Session::Run() must use distinct
+     * debug_urls to make sure that the streamed or dumped events do not overlap
+     * among the invocations.
+     * TODO(cais): More visible documentation of this in g3docs.
+     * 
+ * + * repeated string debug_urls = 4; + */ + public Builder addAllDebugUrls( + java.lang.Iterable values) { + ensureDebugUrlsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, debugUrls_); + onChanged(); + return this; + } + /** + *
+     * URL(s) for debug targets(s).
+     * Supported URL formats are:
+     *   - file:///foo/tfdbg_dump: Writes out Event content to file
+     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+     *     already exist.
+     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+     *     service running at localhost:11011 with the event.
+     *   - memcbk:///event_key: Routes tensors to clients using the
+     *     callback registered with the DebugCallbackRegistry for event_key.
+     * Each debug op listed in debug_ops will publish its output tensor (debug
+     * signal) to all URLs in debug_urls.
+     * N.B. Session::Run() supports concurrent invocations of the same inputs
+     * (feed keys), outputs and target nodes. If such concurrent invocations
+     * are to be debugged, the callers of Session::Run() must use distinct
+     * debug_urls to make sure that the streamed or dumped events do not overlap
+     * among the invocations.
+     * TODO(cais): More visible documentation of this in g3docs.
+     * 
+ * + * repeated string debug_urls = 4; + */ + public Builder clearDebugUrls() { + debugUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * URL(s) for debug targets(s).
+     * Supported URL formats are:
+     *   - file:///foo/tfdbg_dump: Writes out Event content to file
+     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+     *     already exist.
+     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+     *     service running at localhost:11011 with the event.
+     *   - memcbk:///event_key: Routes tensors to clients using the
+     *     callback registered with the DebugCallbackRegistry for event_key.
+     * Each debug op listed in debug_ops will publish its output tensor (debug
+     * signal) to all URLs in debug_urls.
+     * N.B. Session::Run() supports concurrent invocations of the same inputs
+     * (feed keys), outputs and target nodes. If such concurrent invocations
+     * are to be debugged, the callers of Session::Run() must use distinct
+     * debug_urls to make sure that the streamed or dumped events do not overlap
+     * among the invocations.
+     * TODO(cais): More visible documentation of this in g3docs.
+     * 
+ * + * repeated string debug_urls = 4; + */ + public Builder addDebugUrlsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDebugUrlsIsMutable(); + debugUrls_.add(value); + onChanged(); + return this; + } + + private boolean tolerateDebugOpCreationFailures_ ; + /** + *
+     * Do not error out if debug op creation fails (e.g., due to dtype
+     * incompatibility). Instead, just log the failure.
+     * 
+ * + * bool tolerate_debug_op_creation_failures = 5; + */ + public boolean getTolerateDebugOpCreationFailures() { + return tolerateDebugOpCreationFailures_; + } + /** + *
+     * Do not error out if debug op creation fails (e.g., due to dtype
+     * incompatibility). Instead, just log the failure.
+     * 
+ * + * bool tolerate_debug_op_creation_failures = 5; + */ + public Builder setTolerateDebugOpCreationFailures(boolean value) { + + tolerateDebugOpCreationFailures_ = value; + onChanged(); + return this; + } + /** + *
+     * Do not error out if debug op creation fails (e.g., due to dtype
+     * incompatibility). Instead, just log the failure.
+     * 
+ * + * bool tolerate_debug_op_creation_failures = 5; + */ + public Builder clearTolerateDebugOpCreationFailures() { + + tolerateDebugOpCreationFailures_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.DebugTensorWatch) + } + + // @@protoc_insertion_point(class_scope:tensorflow.DebugTensorWatch) + private static final org.tensorflow.proto.framework.DebugTensorWatch DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.DebugTensorWatch(); + } + + public static org.tensorflow.proto.framework.DebugTensorWatch getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DebugTensorWatch parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DebugTensorWatch(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DebugTensorWatch getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebugTensorWatchOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebugTensorWatchOrBuilder.java new file mode 100644 index 00000000000..cce3536c5d1 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebugTensorWatchOrBuilder.java @@ -0,0 +1,196 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/debug.proto + +package org.tensorflow.proto.framework; + +public interface DebugTensorWatchOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.DebugTensorWatch) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Name of the node to watch.
+   * Use "*" for wildcard. But note: currently, regex is not supported in
+   * general.
+   * 
+ * + * string node_name = 1; + */ + java.lang.String getNodeName(); + /** + *
+   * Name of the node to watch.
+   * Use "*" for wildcard. But note: currently, regex is not supported in
+   * general.
+   * 
+ * + * string node_name = 1; + */ + com.google.protobuf.ByteString + getNodeNameBytes(); + + /** + *
+   * Output slot to watch.
+   * The semantics of output_slot == -1 is that all outputs of the node
+   * will be watched (i.e., a wildcard).
+   * Other negative values of output_slot are invalid and will lead to
+   * errors currently.
+   * 
+ * + * int32 output_slot = 2; + */ + int getOutputSlot(); + + /** + *
+   * Name(s) of the debugging op(s).
+   * One or more than one probes on a tensor.
+   * e.g., {"DebugIdentity", "DebugNanCount"}
+   * 
+ * + * repeated string debug_ops = 3; + */ + java.util.List + getDebugOpsList(); + /** + *
+   * Name(s) of the debugging op(s).
+   * One or more than one probes on a tensor.
+   * e.g., {"DebugIdentity", "DebugNanCount"}
+   * 
+ * + * repeated string debug_ops = 3; + */ + int getDebugOpsCount(); + /** + *
+   * Name(s) of the debugging op(s).
+   * One or more than one probes on a tensor.
+   * e.g., {"DebugIdentity", "DebugNanCount"}
+   * 
+ * + * repeated string debug_ops = 3; + */ + java.lang.String getDebugOps(int index); + /** + *
+   * Name(s) of the debugging op(s).
+   * One or more than one probes on a tensor.
+   * e.g., {"DebugIdentity", "DebugNanCount"}
+   * 
+ * + * repeated string debug_ops = 3; + */ + com.google.protobuf.ByteString + getDebugOpsBytes(int index); + + /** + *
+   * URL(s) for debug targets(s).
+   * Supported URL formats are:
+   *   - file:///foo/tfdbg_dump: Writes out Event content to file
+   *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+   *     already exist.
+   *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+   *     service running at localhost:11011 with the event.
+   *   - memcbk:///event_key: Routes tensors to clients using the
+   *     callback registered with the DebugCallbackRegistry for event_key.
+   * Each debug op listed in debug_ops will publish its output tensor (debug
+   * signal) to all URLs in debug_urls.
+   * N.B. Session::Run() supports concurrent invocations of the same inputs
+   * (feed keys), outputs and target nodes. If such concurrent invocations
+   * are to be debugged, the callers of Session::Run() must use distinct
+   * debug_urls to make sure that the streamed or dumped events do not overlap
+   * among the invocations.
+   * TODO(cais): More visible documentation of this in g3docs.
+   * 
+ * + * repeated string debug_urls = 4; + */ + java.util.List + getDebugUrlsList(); + /** + *
+   * URL(s) for debug targets(s).
+   * Supported URL formats are:
+   *   - file:///foo/tfdbg_dump: Writes out Event content to file
+   *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+   *     already exist.
+   *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+   *     service running at localhost:11011 with the event.
+   *   - memcbk:///event_key: Routes tensors to clients using the
+   *     callback registered with the DebugCallbackRegistry for event_key.
+   * Each debug op listed in debug_ops will publish its output tensor (debug
+   * signal) to all URLs in debug_urls.
+   * N.B. Session::Run() supports concurrent invocations of the same inputs
+   * (feed keys), outputs and target nodes. If such concurrent invocations
+   * are to be debugged, the callers of Session::Run() must use distinct
+   * debug_urls to make sure that the streamed or dumped events do not overlap
+   * among the invocations.
+   * TODO(cais): More visible documentation of this in g3docs.
+   * 
+ * + * repeated string debug_urls = 4; + */ + int getDebugUrlsCount(); + /** + *
+   * URL(s) for debug targets(s).
+   * Supported URL formats are:
+   *   - file:///foo/tfdbg_dump: Writes out Event content to file
+   *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+   *     already exist.
+   *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+   *     service running at localhost:11011 with the event.
+   *   - memcbk:///event_key: Routes tensors to clients using the
+   *     callback registered with the DebugCallbackRegistry for event_key.
+   * Each debug op listed in debug_ops will publish its output tensor (debug
+   * signal) to all URLs in debug_urls.
+   * N.B. Session::Run() supports concurrent invocations of the same inputs
+   * (feed keys), outputs and target nodes. If such concurrent invocations
+   * are to be debugged, the callers of Session::Run() must use distinct
+   * debug_urls to make sure that the streamed or dumped events do not overlap
+   * among the invocations.
+   * TODO(cais): More visible documentation of this in g3docs.
+   * 
+ * + * repeated string debug_urls = 4; + */ + java.lang.String getDebugUrls(int index); + /** + *
+   * URL(s) for debug targets(s).
+   * Supported URL formats are:
+   *   - file:///foo/tfdbg_dump: Writes out Event content to file
+   *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
+   *     already exist.
+   *   - grpc://localhost:11011: Sends an RPC request to an EventListener
+   *     service running at localhost:11011 with the event.
+   *   - memcbk:///event_key: Routes tensors to clients using the
+   *     callback registered with the DebugCallbackRegistry for event_key.
+   * Each debug op listed in debug_ops will publish its output tensor (debug
+   * signal) to all URLs in debug_urls.
+   * N.B. Session::Run() supports concurrent invocations of the same inputs
+   * (feed keys), outputs and target nodes. If such concurrent invocations
+   * are to be debugged, the callers of Session::Run() must use distinct
+   * debug_urls to make sure that the streamed or dumped events do not overlap
+   * among the invocations.
+   * TODO(cais): More visible documentation of this in g3docs.
+   * 
+ * + * repeated string debug_urls = 4; + */ + com.google.protobuf.ByteString + getDebugUrlsBytes(int index); + + /** + *
+   * Do not error out if debug op creation fails (e.g., due to dtype
+   * incompatibility). Instead, just log the failure.
+   * 
+ * + * bool tolerate_debug_op_creation_failures = 5; + */ + boolean getTolerateDebugOpCreationFailures(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebuggedSourceFile.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebuggedSourceFile.java new file mode 100644 index 00000000000..d0752d9022b --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebuggedSourceFile.java @@ -0,0 +1,1102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/debug.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.DebuggedSourceFile} + */ +public final class DebuggedSourceFile extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.DebuggedSourceFile) + DebuggedSourceFileOrBuilder { +private static final long serialVersionUID = 0L; + // Use DebuggedSourceFile.newBuilder() to construct. + private DebuggedSourceFile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DebuggedSourceFile() { + host_ = ""; + filePath_ = ""; + lines_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DebuggedSourceFile(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DebuggedSourceFile( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + host_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + filePath_ = s; + break; + } + case 24: { + + lastModified_ = input.readInt64(); + break; + } + case 32: { + + bytes_ = input.readInt64(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + lines_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + lines_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + lines_ = lines_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebuggedSourceFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebuggedSourceFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DebuggedSourceFile.class, org.tensorflow.proto.framework.DebuggedSourceFile.Builder.class); + } + + public static final int HOST_FIELD_NUMBER = 1; + private volatile java.lang.Object host_; + /** + *
+   * The host name on which a source code file is located.
+   * 
+ * + * string host = 1; + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + 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(); + host_ = s; + return s; + } + } + /** + *
+   * The host name on which a source code file is located.
+   * 
+ * + * string host = 1; + */ + public com.google.protobuf.ByteString + getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILE_PATH_FIELD_NUMBER = 2; + private volatile java.lang.Object filePath_; + /** + *
+   * Path to the source code file.
+   * 
+ * + * string file_path = 2; + */ + public java.lang.String getFilePath() { + java.lang.Object ref = filePath_; + 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(); + filePath_ = s; + return s; + } + } + /** + *
+   * Path to the source code file.
+   * 
+ * + * string file_path = 2; + */ + public com.google.protobuf.ByteString + getFilePathBytes() { + java.lang.Object ref = filePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_MODIFIED_FIELD_NUMBER = 3; + private long lastModified_; + /** + *
+   * The timestamp at which the source code file is last modified.
+   * 
+ * + * int64 last_modified = 3; + */ + public long getLastModified() { + return lastModified_; + } + + public static final int BYTES_FIELD_NUMBER = 4; + private long bytes_; + /** + *
+   * Byte size of the file.
+   * 
+ * + * int64 bytes = 4; + */ + public long getBytes() { + return bytes_; + } + + public static final int LINES_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList lines_; + /** + *
+   * Line-by-line content of the source code file.
+   * 
+ * + * repeated string lines = 5; + */ + public com.google.protobuf.ProtocolStringList + getLinesList() { + return lines_; + } + /** + *
+   * Line-by-line content of the source code file.
+   * 
+ * + * repeated string lines = 5; + */ + public int getLinesCount() { + return lines_.size(); + } + /** + *
+   * Line-by-line content of the source code file.
+   * 
+ * + * repeated string lines = 5; + */ + public java.lang.String getLines(int index) { + return lines_.get(index); + } + /** + *
+   * Line-by-line content of the source code file.
+   * 
+ * + * repeated string lines = 5; + */ + public com.google.protobuf.ByteString + getLinesBytes(int index) { + return lines_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getHostBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, host_); + } + if (!getFilePathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filePath_); + } + if (lastModified_ != 0L) { + output.writeInt64(3, lastModified_); + } + if (bytes_ != 0L) { + output.writeInt64(4, bytes_); + } + for (int i = 0; i < lines_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, lines_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getHostBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, host_); + } + if (!getFilePathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filePath_); + } + if (lastModified_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, lastModified_); + } + if (bytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, bytes_); + } + { + int dataSize = 0; + for (int i = 0; i < lines_.size(); i++) { + dataSize += computeStringSizeNoTag(lines_.getRaw(i)); + } + size += dataSize; + size += 1 * getLinesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.DebuggedSourceFile)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.DebuggedSourceFile other = (org.tensorflow.proto.framework.DebuggedSourceFile) obj; + + if (!getHost() + .equals(other.getHost())) return false; + if (!getFilePath() + .equals(other.getFilePath())) return false; + if (getLastModified() + != other.getLastModified()) return false; + if (getBytes() + != other.getBytes()) return false; + if (!getLinesList() + .equals(other.getLinesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HOST_FIELD_NUMBER; + hash = (53 * hash) + getHost().hashCode(); + hash = (37 * hash) + FILE_PATH_FIELD_NUMBER; + hash = (53 * hash) + getFilePath().hashCode(); + hash = (37 * hash) + LAST_MODIFIED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLastModified()); + hash = (37 * hash) + BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBytes()); + if (getLinesCount() > 0) { + hash = (37 * hash) + LINES_FIELD_NUMBER; + hash = (53 * hash) + getLinesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.DebuggedSourceFile parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DebuggedSourceFile parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DebuggedSourceFile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DebuggedSourceFile 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.proto.framework.DebuggedSourceFile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DebuggedSourceFile parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DebuggedSourceFile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DebuggedSourceFile parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DebuggedSourceFile parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DebuggedSourceFile parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DebuggedSourceFile parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DebuggedSourceFile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.DebuggedSourceFile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.DebuggedSourceFile} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.DebuggedSourceFile) + org.tensorflow.proto.framework.DebuggedSourceFileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebuggedSourceFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebuggedSourceFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DebuggedSourceFile.class, org.tensorflow.proto.framework.DebuggedSourceFile.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.DebuggedSourceFile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + host_ = ""; + + filePath_ = ""; + + lastModified_ = 0L; + + bytes_ = 0L; + + lines_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebuggedSourceFile_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DebuggedSourceFile getDefaultInstanceForType() { + return org.tensorflow.proto.framework.DebuggedSourceFile.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.DebuggedSourceFile build() { + org.tensorflow.proto.framework.DebuggedSourceFile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DebuggedSourceFile buildPartial() { + org.tensorflow.proto.framework.DebuggedSourceFile result = new org.tensorflow.proto.framework.DebuggedSourceFile(this); + int from_bitField0_ = bitField0_; + result.host_ = host_; + result.filePath_ = filePath_; + result.lastModified_ = lastModified_; + result.bytes_ = bytes_; + if (((bitField0_ & 0x00000001) != 0)) { + lines_ = lines_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.lines_ = lines_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.DebuggedSourceFile) { + return mergeFrom((org.tensorflow.proto.framework.DebuggedSourceFile)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.DebuggedSourceFile other) { + if (other == org.tensorflow.proto.framework.DebuggedSourceFile.getDefaultInstance()) return this; + if (!other.getHost().isEmpty()) { + host_ = other.host_; + onChanged(); + } + if (!other.getFilePath().isEmpty()) { + filePath_ = other.filePath_; + onChanged(); + } + if (other.getLastModified() != 0L) { + setLastModified(other.getLastModified()); + } + if (other.getBytes() != 0L) { + setBytes(other.getBytes()); + } + if (!other.lines_.isEmpty()) { + if (lines_.isEmpty()) { + lines_ = other.lines_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLinesIsMutable(); + lines_.addAll(other.lines_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.DebuggedSourceFile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.DebuggedSourceFile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object host_ = ""; + /** + *
+     * The host name on which a source code file is located.
+     * 
+ * + * string host = 1; + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The host name on which a source code file is located.
+     * 
+ * + * string host = 1; + */ + public com.google.protobuf.ByteString + getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The host name on which a source code file is located.
+     * 
+ * + * string host = 1; + */ + public Builder setHost( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + host_ = value; + onChanged(); + return this; + } + /** + *
+     * The host name on which a source code file is located.
+     * 
+ * + * string host = 1; + */ + public Builder clearHost() { + + host_ = getDefaultInstance().getHost(); + onChanged(); + return this; + } + /** + *
+     * The host name on which a source code file is located.
+     * 
+ * + * string host = 1; + */ + public Builder setHostBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + host_ = value; + onChanged(); + return this; + } + + private java.lang.Object filePath_ = ""; + /** + *
+     * Path to the source code file.
+     * 
+ * + * string file_path = 2; + */ + public java.lang.String getFilePath() { + java.lang.Object ref = filePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Path to the source code file.
+     * 
+ * + * string file_path = 2; + */ + public com.google.protobuf.ByteString + getFilePathBytes() { + java.lang.Object ref = filePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Path to the source code file.
+     * 
+ * + * string file_path = 2; + */ + public Builder setFilePath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filePath_ = value; + onChanged(); + return this; + } + /** + *
+     * Path to the source code file.
+     * 
+ * + * string file_path = 2; + */ + public Builder clearFilePath() { + + filePath_ = getDefaultInstance().getFilePath(); + onChanged(); + return this; + } + /** + *
+     * Path to the source code file.
+     * 
+ * + * string file_path = 2; + */ + public Builder setFilePathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filePath_ = value; + onChanged(); + return this; + } + + private long lastModified_ ; + /** + *
+     * The timestamp at which the source code file is last modified.
+     * 
+ * + * int64 last_modified = 3; + */ + public long getLastModified() { + return lastModified_; + } + /** + *
+     * The timestamp at which the source code file is last modified.
+     * 
+ * + * int64 last_modified = 3; + */ + public Builder setLastModified(long value) { + + lastModified_ = value; + onChanged(); + return this; + } + /** + *
+     * The timestamp at which the source code file is last modified.
+     * 
+ * + * int64 last_modified = 3; + */ + public Builder clearLastModified() { + + lastModified_ = 0L; + onChanged(); + return this; + } + + private long bytes_ ; + /** + *
+     * Byte size of the file.
+     * 
+ * + * int64 bytes = 4; + */ + public long getBytes() { + return bytes_; + } + /** + *
+     * Byte size of the file.
+     * 
+ * + * int64 bytes = 4; + */ + public Builder setBytes(long value) { + + bytes_ = value; + onChanged(); + return this; + } + /** + *
+     * Byte size of the file.
+     * 
+ * + * int64 bytes = 4; + */ + public Builder clearBytes() { + + bytes_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList lines_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureLinesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + lines_ = new com.google.protobuf.LazyStringArrayList(lines_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Line-by-line content of the source code file.
+     * 
+ * + * repeated string lines = 5; + */ + public com.google.protobuf.ProtocolStringList + getLinesList() { + return lines_.getUnmodifiableView(); + } + /** + *
+     * Line-by-line content of the source code file.
+     * 
+ * + * repeated string lines = 5; + */ + public int getLinesCount() { + return lines_.size(); + } + /** + *
+     * Line-by-line content of the source code file.
+     * 
+ * + * repeated string lines = 5; + */ + public java.lang.String getLines(int index) { + return lines_.get(index); + } + /** + *
+     * Line-by-line content of the source code file.
+     * 
+ * + * repeated string lines = 5; + */ + public com.google.protobuf.ByteString + getLinesBytes(int index) { + return lines_.getByteString(index); + } + /** + *
+     * Line-by-line content of the source code file.
+     * 
+ * + * repeated string lines = 5; + */ + public Builder setLines( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinesIsMutable(); + lines_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Line-by-line content of the source code file.
+     * 
+ * + * repeated string lines = 5; + */ + public Builder addLines( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinesIsMutable(); + lines_.add(value); + onChanged(); + return this; + } + /** + *
+     * Line-by-line content of the source code file.
+     * 
+ * + * repeated string lines = 5; + */ + public Builder addAllLines( + java.lang.Iterable values) { + ensureLinesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, lines_); + onChanged(); + return this; + } + /** + *
+     * Line-by-line content of the source code file.
+     * 
+ * + * repeated string lines = 5; + */ + public Builder clearLines() { + lines_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Line-by-line content of the source code file.
+     * 
+ * + * repeated string lines = 5; + */ + public Builder addLinesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLinesIsMutable(); + lines_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.DebuggedSourceFile) + } + + // @@protoc_insertion_point(class_scope:tensorflow.DebuggedSourceFile) + private static final org.tensorflow.proto.framework.DebuggedSourceFile DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.DebuggedSourceFile(); + } + + public static org.tensorflow.proto.framework.DebuggedSourceFile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DebuggedSourceFile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DebuggedSourceFile(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DebuggedSourceFile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebuggedSourceFileOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebuggedSourceFileOrBuilder.java new file mode 100644 index 00000000000..1a855dc8a07 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebuggedSourceFileOrBuilder.java @@ -0,0 +1,98 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/debug.proto + +package org.tensorflow.proto.framework; + +public interface DebuggedSourceFileOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.DebuggedSourceFile) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The host name on which a source code file is located.
+   * 
+ * + * string host = 1; + */ + java.lang.String getHost(); + /** + *
+   * The host name on which a source code file is located.
+   * 
+ * + * string host = 1; + */ + com.google.protobuf.ByteString + getHostBytes(); + + /** + *
+   * Path to the source code file.
+   * 
+ * + * string file_path = 2; + */ + java.lang.String getFilePath(); + /** + *
+   * Path to the source code file.
+   * 
+ * + * string file_path = 2; + */ + com.google.protobuf.ByteString + getFilePathBytes(); + + /** + *
+   * The timestamp at which the source code file is last modified.
+   * 
+ * + * int64 last_modified = 3; + */ + long getLastModified(); + + /** + *
+   * Byte size of the file.
+   * 
+ * + * int64 bytes = 4; + */ + long getBytes(); + + /** + *
+   * Line-by-line content of the source code file.
+   * 
+ * + * repeated string lines = 5; + */ + java.util.List + getLinesList(); + /** + *
+   * Line-by-line content of the source code file.
+   * 
+ * + * repeated string lines = 5; + */ + int getLinesCount(); + /** + *
+   * Line-by-line content of the source code file.
+   * 
+ * + * repeated string lines = 5; + */ + java.lang.String getLines(int index); + /** + *
+   * Line-by-line content of the source code file.
+   * 
+ * + * repeated string lines = 5; + */ + com.google.protobuf.ByteString + getLinesBytes(int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebuggedSourceFiles.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebuggedSourceFiles.java new file mode 100644 index 00000000000..c5d014b4bb6 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebuggedSourceFiles.java @@ -0,0 +1,857 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/debug.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.DebuggedSourceFiles} + */ +public final class DebuggedSourceFiles extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.DebuggedSourceFiles) + DebuggedSourceFilesOrBuilder { +private static final long serialVersionUID = 0L; + // Use DebuggedSourceFiles.newBuilder() to construct. + private DebuggedSourceFiles(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DebuggedSourceFiles() { + sourceFiles_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DebuggedSourceFiles(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DebuggedSourceFiles( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + sourceFiles_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + sourceFiles_.add( + input.readMessage(org.tensorflow.proto.framework.DebuggedSourceFile.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + sourceFiles_ = java.util.Collections.unmodifiableList(sourceFiles_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebuggedSourceFiles_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebuggedSourceFiles_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DebuggedSourceFiles.class, org.tensorflow.proto.framework.DebuggedSourceFiles.Builder.class); + } + + public static final int SOURCE_FILES_FIELD_NUMBER = 1; + private java.util.List sourceFiles_; + /** + *
+   * A collection of source code files.
+   * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public java.util.List getSourceFilesList() { + return sourceFiles_; + } + /** + *
+   * A collection of source code files.
+   * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public java.util.List + getSourceFilesOrBuilderList() { + return sourceFiles_; + } + /** + *
+   * A collection of source code files.
+   * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public int getSourceFilesCount() { + return sourceFiles_.size(); + } + /** + *
+   * A collection of source code files.
+   * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public org.tensorflow.proto.framework.DebuggedSourceFile getSourceFiles(int index) { + return sourceFiles_.get(index); + } + /** + *
+   * A collection of source code files.
+   * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public org.tensorflow.proto.framework.DebuggedSourceFileOrBuilder getSourceFilesOrBuilder( + int index) { + return sourceFiles_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < sourceFiles_.size(); i++) { + output.writeMessage(1, sourceFiles_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < sourceFiles_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, sourceFiles_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.DebuggedSourceFiles)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.DebuggedSourceFiles other = (org.tensorflow.proto.framework.DebuggedSourceFiles) obj; + + if (!getSourceFilesList() + .equals(other.getSourceFilesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSourceFilesCount() > 0) { + hash = (37 * hash) + SOURCE_FILES_FIELD_NUMBER; + hash = (53 * hash) + getSourceFilesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.DebuggedSourceFiles parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DebuggedSourceFiles parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DebuggedSourceFiles parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DebuggedSourceFiles 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.proto.framework.DebuggedSourceFiles parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DebuggedSourceFiles parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DebuggedSourceFiles parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DebuggedSourceFiles parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DebuggedSourceFiles parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DebuggedSourceFiles parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DebuggedSourceFiles parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DebuggedSourceFiles parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.DebuggedSourceFiles prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.DebuggedSourceFiles} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.DebuggedSourceFiles) + org.tensorflow.proto.framework.DebuggedSourceFilesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebuggedSourceFiles_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebuggedSourceFiles_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DebuggedSourceFiles.class, org.tensorflow.proto.framework.DebuggedSourceFiles.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.DebuggedSourceFiles.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSourceFilesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (sourceFilesBuilder_ == null) { + sourceFiles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + sourceFilesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.DebugProtos.internal_static_tensorflow_DebuggedSourceFiles_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DebuggedSourceFiles getDefaultInstanceForType() { + return org.tensorflow.proto.framework.DebuggedSourceFiles.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.DebuggedSourceFiles build() { + org.tensorflow.proto.framework.DebuggedSourceFiles result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DebuggedSourceFiles buildPartial() { + org.tensorflow.proto.framework.DebuggedSourceFiles result = new org.tensorflow.proto.framework.DebuggedSourceFiles(this); + int from_bitField0_ = bitField0_; + if (sourceFilesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + sourceFiles_ = java.util.Collections.unmodifiableList(sourceFiles_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.sourceFiles_ = sourceFiles_; + } else { + result.sourceFiles_ = sourceFilesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.DebuggedSourceFiles) { + return mergeFrom((org.tensorflow.proto.framework.DebuggedSourceFiles)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.DebuggedSourceFiles other) { + if (other == org.tensorflow.proto.framework.DebuggedSourceFiles.getDefaultInstance()) return this; + if (sourceFilesBuilder_ == null) { + if (!other.sourceFiles_.isEmpty()) { + if (sourceFiles_.isEmpty()) { + sourceFiles_ = other.sourceFiles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSourceFilesIsMutable(); + sourceFiles_.addAll(other.sourceFiles_); + } + onChanged(); + } + } else { + if (!other.sourceFiles_.isEmpty()) { + if (sourceFilesBuilder_.isEmpty()) { + sourceFilesBuilder_.dispose(); + sourceFilesBuilder_ = null; + sourceFiles_ = other.sourceFiles_; + bitField0_ = (bitField0_ & ~0x00000001); + sourceFilesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSourceFilesFieldBuilder() : null; + } else { + sourceFilesBuilder_.addAllMessages(other.sourceFiles_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.DebuggedSourceFiles parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.DebuggedSourceFiles) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List sourceFiles_ = + java.util.Collections.emptyList(); + private void ensureSourceFilesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + sourceFiles_ = new java.util.ArrayList(sourceFiles_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.DebuggedSourceFile, org.tensorflow.proto.framework.DebuggedSourceFile.Builder, org.tensorflow.proto.framework.DebuggedSourceFileOrBuilder> sourceFilesBuilder_; + + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public java.util.List getSourceFilesList() { + if (sourceFilesBuilder_ == null) { + return java.util.Collections.unmodifiableList(sourceFiles_); + } else { + return sourceFilesBuilder_.getMessageList(); + } + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public int getSourceFilesCount() { + if (sourceFilesBuilder_ == null) { + return sourceFiles_.size(); + } else { + return sourceFilesBuilder_.getCount(); + } + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public org.tensorflow.proto.framework.DebuggedSourceFile getSourceFiles(int index) { + if (sourceFilesBuilder_ == null) { + return sourceFiles_.get(index); + } else { + return sourceFilesBuilder_.getMessage(index); + } + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public Builder setSourceFiles( + int index, org.tensorflow.proto.framework.DebuggedSourceFile value) { + if (sourceFilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceFilesIsMutable(); + sourceFiles_.set(index, value); + onChanged(); + } else { + sourceFilesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public Builder setSourceFiles( + int index, org.tensorflow.proto.framework.DebuggedSourceFile.Builder builderForValue) { + if (sourceFilesBuilder_ == null) { + ensureSourceFilesIsMutable(); + sourceFiles_.set(index, builderForValue.build()); + onChanged(); + } else { + sourceFilesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public Builder addSourceFiles(org.tensorflow.proto.framework.DebuggedSourceFile value) { + if (sourceFilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceFilesIsMutable(); + sourceFiles_.add(value); + onChanged(); + } else { + sourceFilesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public Builder addSourceFiles( + int index, org.tensorflow.proto.framework.DebuggedSourceFile value) { + if (sourceFilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceFilesIsMutable(); + sourceFiles_.add(index, value); + onChanged(); + } else { + sourceFilesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public Builder addSourceFiles( + org.tensorflow.proto.framework.DebuggedSourceFile.Builder builderForValue) { + if (sourceFilesBuilder_ == null) { + ensureSourceFilesIsMutable(); + sourceFiles_.add(builderForValue.build()); + onChanged(); + } else { + sourceFilesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public Builder addSourceFiles( + int index, org.tensorflow.proto.framework.DebuggedSourceFile.Builder builderForValue) { + if (sourceFilesBuilder_ == null) { + ensureSourceFilesIsMutable(); + sourceFiles_.add(index, builderForValue.build()); + onChanged(); + } else { + sourceFilesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public Builder addAllSourceFiles( + java.lang.Iterable values) { + if (sourceFilesBuilder_ == null) { + ensureSourceFilesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, sourceFiles_); + onChanged(); + } else { + sourceFilesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public Builder clearSourceFiles() { + if (sourceFilesBuilder_ == null) { + sourceFiles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + sourceFilesBuilder_.clear(); + } + return this; + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public Builder removeSourceFiles(int index) { + if (sourceFilesBuilder_ == null) { + ensureSourceFilesIsMutable(); + sourceFiles_.remove(index); + onChanged(); + } else { + sourceFilesBuilder_.remove(index); + } + return this; + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public org.tensorflow.proto.framework.DebuggedSourceFile.Builder getSourceFilesBuilder( + int index) { + return getSourceFilesFieldBuilder().getBuilder(index); + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public org.tensorflow.proto.framework.DebuggedSourceFileOrBuilder getSourceFilesOrBuilder( + int index) { + if (sourceFilesBuilder_ == null) { + return sourceFiles_.get(index); } else { + return sourceFilesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public java.util.List + getSourceFilesOrBuilderList() { + if (sourceFilesBuilder_ != null) { + return sourceFilesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sourceFiles_); + } + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public org.tensorflow.proto.framework.DebuggedSourceFile.Builder addSourceFilesBuilder() { + return getSourceFilesFieldBuilder().addBuilder( + org.tensorflow.proto.framework.DebuggedSourceFile.getDefaultInstance()); + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public org.tensorflow.proto.framework.DebuggedSourceFile.Builder addSourceFilesBuilder( + int index) { + return getSourceFilesFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.DebuggedSourceFile.getDefaultInstance()); + } + /** + *
+     * A collection of source code files.
+     * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + public java.util.List + getSourceFilesBuilderList() { + return getSourceFilesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.DebuggedSourceFile, org.tensorflow.proto.framework.DebuggedSourceFile.Builder, org.tensorflow.proto.framework.DebuggedSourceFileOrBuilder> + getSourceFilesFieldBuilder() { + if (sourceFilesBuilder_ == null) { + sourceFilesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.DebuggedSourceFile, org.tensorflow.proto.framework.DebuggedSourceFile.Builder, org.tensorflow.proto.framework.DebuggedSourceFileOrBuilder>( + sourceFiles_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + sourceFiles_ = null; + } + return sourceFilesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.DebuggedSourceFiles) + } + + // @@protoc_insertion_point(class_scope:tensorflow.DebuggedSourceFiles) + private static final org.tensorflow.proto.framework.DebuggedSourceFiles DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.DebuggedSourceFiles(); + } + + public static org.tensorflow.proto.framework.DebuggedSourceFiles getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DebuggedSourceFiles parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DebuggedSourceFiles(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DebuggedSourceFiles getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebuggedSourceFilesOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebuggedSourceFilesOrBuilder.java new file mode 100644 index 00000000000..3afc8e4f78f --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DebuggedSourceFilesOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/debug.proto + +package org.tensorflow.proto.framework; + +public interface DebuggedSourceFilesOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.DebuggedSourceFiles) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A collection of source code files.
+   * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + java.util.List + getSourceFilesList(); + /** + *
+   * A collection of source code files.
+   * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + org.tensorflow.proto.framework.DebuggedSourceFile getSourceFiles(int index); + /** + *
+   * A collection of source code files.
+   * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + int getSourceFilesCount(); + /** + *
+   * A collection of source code files.
+   * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + java.util.List + getSourceFilesOrBuilderList(); + /** + *
+   * A collection of source code files.
+   * 
+ * + * repeated .tensorflow.DebuggedSourceFile source_files = 1; + */ + org.tensorflow.proto.framework.DebuggedSourceFileOrBuilder getSourceFilesOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/Device.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/Device.java new file mode 100644 index 00000000000..59507a00680 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/Device.java @@ -0,0 +1,977 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/trace_events.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * A 'device' is a physical entity in the system and is comprised of several
+ * resources.
+ * 
+ * + * Protobuf type {@code tensorflow.profiler.Device} + */ +public final class Device extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.profiler.Device) + DeviceOrBuilder { +private static final long serialVersionUID = 0L; + // Use Device.newBuilder() to construct. + private Device(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Device() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Device(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Device( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + deviceId_ = input.readUInt32(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + resources_ = com.google.protobuf.MapField.newMapField( + ResourcesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + resources__ = input.readMessage( + ResourcesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + resources_.getMutableMap().put( + resources__.getKey(), resources__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Device_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetResources(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Device_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.Device.class, org.tensorflow.proto.framework.Device.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The name of the device.
+   * 
+ * + * 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; + } + } + /** + *
+   * The name of the device.
+   * 
+ * + * 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_ID_FIELD_NUMBER = 2; + private int deviceId_; + /** + *
+   * The id of this device, unique in a single trace.
+   * 
+ * + * uint32 device_id = 2; + */ + public int getDeviceId() { + return deviceId_; + } + + public static final int RESOURCES_FIELD_NUMBER = 3; + private static final class ResourcesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, org.tensorflow.proto.framework.Resource> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Device_ResourcesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.UINT32, + 0, + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.framework.Resource.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.Integer, org.tensorflow.proto.framework.Resource> resources_; + private com.google.protobuf.MapField + internalGetResources() { + if (resources_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ResourcesDefaultEntryHolder.defaultEntry); + } + return resources_; + } + + public int getResourcesCount() { + return internalGetResources().getMap().size(); + } + /** + *
+   * The resources on this device, keyed by resource_id;
+   * 
+ * + * map<uint32, .tensorflow.profiler.Resource> resources = 3; + */ + + public boolean containsResources( + int key) { + + return internalGetResources().getMap().containsKey(key); + } + /** + * Use {@link #getResourcesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getResources() { + return getResourcesMap(); + } + /** + *
+   * The resources on this device, keyed by resource_id;
+   * 
+ * + * map<uint32, .tensorflow.profiler.Resource> resources = 3; + */ + + public java.util.Map getResourcesMap() { + return internalGetResources().getMap(); + } + /** + *
+   * The resources on this device, keyed by resource_id;
+   * 
+ * + * map<uint32, .tensorflow.profiler.Resource> resources = 3; + */ + + public org.tensorflow.proto.framework.Resource getResourcesOrDefault( + int key, + org.tensorflow.proto.framework.Resource defaultValue) { + + java.util.Map map = + internalGetResources().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * The resources on this device, keyed by resource_id;
+   * 
+ * + * map<uint32, .tensorflow.profiler.Resource> resources = 3; + */ + + public org.tensorflow.proto.framework.Resource getResourcesOrThrow( + int key) { + + java.util.Map map = + internalGetResources().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (deviceId_ != 0) { + output.writeUInt32(2, deviceId_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetResources(), + ResourcesDefaultEntryHolder.defaultEntry, + 3); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (deviceId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, deviceId_); + } + for (java.util.Map.Entry entry + : internalGetResources().getMap().entrySet()) { + com.google.protobuf.MapEntry + resources__ = ResourcesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, resources__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.Device)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.Device other = (org.tensorflow.proto.framework.Device) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getDeviceId() + != other.getDeviceId()) return false; + if (!internalGetResources().equals( + other.internalGetResources())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId(); + if (!internalGetResources().getMap().isEmpty()) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + internalGetResources().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.Device parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.Device parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.Device parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.Device 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.proto.framework.Device parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.Device parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.Device parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.Device parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.Device parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.Device parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.Device parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.Device parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.Device prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A 'device' is a physical entity in the system and is comprised of several
+   * resources.
+   * 
+ * + * Protobuf type {@code tensorflow.profiler.Device} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.profiler.Device) + org.tensorflow.proto.framework.DeviceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Device_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetResources(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 3: + return internalGetMutableResources(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Device_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.Device.class, org.tensorflow.proto.framework.Device.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.Device.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + deviceId_ = 0; + + internalGetMutableResources().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Device_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.Device getDefaultInstanceForType() { + return org.tensorflow.proto.framework.Device.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.Device build() { + org.tensorflow.proto.framework.Device result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.Device buildPartial() { + org.tensorflow.proto.framework.Device result = new org.tensorflow.proto.framework.Device(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.deviceId_ = deviceId_; + result.resources_ = internalGetResources(); + result.resources_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.Device) { + return mergeFrom((org.tensorflow.proto.framework.Device)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.Device other) { + if (other == org.tensorflow.proto.framework.Device.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getDeviceId() != 0) { + setDeviceId(other.getDeviceId()); + } + internalGetMutableResources().mergeFrom( + other.internalGetResources()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.Device parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.Device) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the device.
+     * 
+ * + * 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; + } + } + /** + *
+     * The name of the device.
+     * 
+ * + * 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; + } + } + /** + *
+     * The name of the device.
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The name of the device.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The name of the device.
+     * 
+ * + * 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 int deviceId_ ; + /** + *
+     * The id of this device, unique in a single trace.
+     * 
+ * + * uint32 device_id = 2; + */ + public int getDeviceId() { + return deviceId_; + } + /** + *
+     * The id of this device, unique in a single trace.
+     * 
+ * + * uint32 device_id = 2; + */ + public Builder setDeviceId(int value) { + + deviceId_ = value; + onChanged(); + return this; + } + /** + *
+     * The id of this device, unique in a single trace.
+     * 
+ * + * uint32 device_id = 2; + */ + public Builder clearDeviceId() { + + deviceId_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.Integer, org.tensorflow.proto.framework.Resource> resources_; + private com.google.protobuf.MapField + internalGetResources() { + if (resources_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ResourcesDefaultEntryHolder.defaultEntry); + } + return resources_; + } + private com.google.protobuf.MapField + internalGetMutableResources() { + onChanged();; + if (resources_ == null) { + resources_ = com.google.protobuf.MapField.newMapField( + ResourcesDefaultEntryHolder.defaultEntry); + } + if (!resources_.isMutable()) { + resources_ = resources_.copy(); + } + return resources_; + } + + public int getResourcesCount() { + return internalGetResources().getMap().size(); + } + /** + *
+     * The resources on this device, keyed by resource_id;
+     * 
+ * + * map<uint32, .tensorflow.profiler.Resource> resources = 3; + */ + + public boolean containsResources( + int key) { + + return internalGetResources().getMap().containsKey(key); + } + /** + * Use {@link #getResourcesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getResources() { + return getResourcesMap(); + } + /** + *
+     * The resources on this device, keyed by resource_id;
+     * 
+ * + * map<uint32, .tensorflow.profiler.Resource> resources = 3; + */ + + public java.util.Map getResourcesMap() { + return internalGetResources().getMap(); + } + /** + *
+     * The resources on this device, keyed by resource_id;
+     * 
+ * + * map<uint32, .tensorflow.profiler.Resource> resources = 3; + */ + + public org.tensorflow.proto.framework.Resource getResourcesOrDefault( + int key, + org.tensorflow.proto.framework.Resource defaultValue) { + + java.util.Map map = + internalGetResources().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The resources on this device, keyed by resource_id;
+     * 
+ * + * map<uint32, .tensorflow.profiler.Resource> resources = 3; + */ + + public org.tensorflow.proto.framework.Resource getResourcesOrThrow( + int key) { + + java.util.Map map = + internalGetResources().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearResources() { + internalGetMutableResources().getMutableMap() + .clear(); + return this; + } + /** + *
+     * The resources on this device, keyed by resource_id;
+     * 
+ * + * map<uint32, .tensorflow.profiler.Resource> resources = 3; + */ + + public Builder removeResources( + int key) { + + internalGetMutableResources().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableResources() { + return internalGetMutableResources().getMutableMap(); + } + /** + *
+     * The resources on this device, keyed by resource_id;
+     * 
+ * + * map<uint32, .tensorflow.profiler.Resource> resources = 3; + */ + public Builder putResources( + int key, + org.tensorflow.proto.framework.Resource value) { + + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableResources().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * The resources on this device, keyed by resource_id;
+     * 
+ * + * map<uint32, .tensorflow.profiler.Resource> resources = 3; + */ + + public Builder putAllResources( + java.util.Map values) { + internalGetMutableResources().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.profiler.Device) + } + + // @@protoc_insertion_point(class_scope:tensorflow.profiler.Device) + private static final org.tensorflow.proto.framework.Device DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.Device(); + } + + public static org.tensorflow.proto.framework.Device getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Device parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Device(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.Device getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceAttributes.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceAttributes.java new file mode 100644 index 00000000000..3da166dfbfd --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceAttributes.java @@ -0,0 +1,1277 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/device_attributes.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.DeviceAttributes} + */ +public final class DeviceAttributes extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.DeviceAttributes) + DeviceAttributesOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeviceAttributes.newBuilder() to construct. + private DeviceAttributes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeviceAttributes() { + name_ = ""; + deviceType_ = ""; + physicalDeviceDesc_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeviceAttributes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeviceAttributes( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + deviceType_ = s; + break; + } + case 32: { + + memoryLimit_ = input.readInt64(); + break; + } + case 42: { + org.tensorflow.proto.framework.DeviceLocality.Builder subBuilder = null; + if (locality_ != null) { + subBuilder = locality_.toBuilder(); + } + locality_ = input.readMessage(org.tensorflow.proto.framework.DeviceLocality.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(locality_); + locality_ = subBuilder.buildPartial(); + } + + break; + } + case 49: { + + incarnation_ = input.readFixed64(); + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + physicalDeviceDesc_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_DeviceAttributes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_DeviceAttributes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DeviceAttributes.class, org.tensorflow.proto.framework.DeviceAttributes.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Fully specified name of the device within a cluster.
+   * 
+ * + * 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; + } + } + /** + *
+   * Fully specified name of the device within a cluster.
+   * 
+ * + * 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_; + /** + *
+   * String representation of device_type.
+   * 
+ * + * string device_type = 2; + */ + 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; + } + } + /** + *
+   * String representation of device_type.
+   * 
+ * + * string device_type = 2; + */ + 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_; + /** + *
+   * Memory capacity of device in bytes.
+   * 
+ * + * int64 memory_limit = 4; + */ + public long getMemoryLimit() { + return memoryLimit_; + } + + public static final int LOCALITY_FIELD_NUMBER = 5; + private org.tensorflow.proto.framework.DeviceLocality locality_; + /** + *
+   * Platform-specific data about device that may be useful
+   * for supporting efficient data transfers.
+   * 
+ * + * .tensorflow.DeviceLocality locality = 5; + */ + public boolean hasLocality() { + return locality_ != null; + } + /** + *
+   * Platform-specific data about device that may be useful
+   * for supporting efficient data transfers.
+   * 
+ * + * .tensorflow.DeviceLocality locality = 5; + */ + public org.tensorflow.proto.framework.DeviceLocality getLocality() { + return locality_ == null ? org.tensorflow.proto.framework.DeviceLocality.getDefaultInstance() : locality_; + } + /** + *
+   * Platform-specific data about device that may be useful
+   * for supporting efficient data transfers.
+   * 
+ * + * .tensorflow.DeviceLocality locality = 5; + */ + public org.tensorflow.proto.framework.DeviceLocalityOrBuilder getLocalityOrBuilder() { + return getLocality(); + } + + public static final int INCARNATION_FIELD_NUMBER = 6; + private long incarnation_; + /** + *
+   * A device is assigned a global unique number each time it is
+   * initialized. "incarnation" should never be 0.
+   * 
+ * + * fixed64 incarnation = 6; + */ + public long getIncarnation() { + return incarnation_; + } + + public static final int PHYSICAL_DEVICE_DESC_FIELD_NUMBER = 7; + private volatile java.lang.Object physicalDeviceDesc_; + /** + *
+   * String representation of the physical device that this device maps to.
+   * 
+ * + * string physical_device_desc = 7; + */ + 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; + } + } + /** + *
+   * String representation of the physical device that this device maps to.
+   * 
+ * + * string physical_device_desc = 7; + */ + 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; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDeviceTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deviceType_); + } + if (memoryLimit_ != 0L) { + output.writeInt64(4, memoryLimit_); + } + if (locality_ != null) { + output.writeMessage(5, getLocality()); + } + if (incarnation_ != 0L) { + output.writeFixed64(6, incarnation_); + } + if (!getPhysicalDeviceDescBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, physicalDeviceDesc_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDeviceTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deviceType_); + } + if (memoryLimit_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, memoryLimit_); + } + if (locality_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getLocality()); + } + if (incarnation_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeFixed64Size(6, incarnation_); + } + if (!getPhysicalDeviceDescBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, physicalDeviceDesc_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.DeviceAttributes)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.DeviceAttributes other = (org.tensorflow.proto.framework.DeviceAttributes) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDeviceType() + .equals(other.getDeviceType())) return false; + if (getMemoryLimit() + != other.getMemoryLimit()) return false; + if (hasLocality() != other.hasLocality()) return false; + if (hasLocality()) { + if (!getLocality() + .equals(other.getLocality())) return false; + } + if (getIncarnation() + != other.getIncarnation()) return false; + if (!getPhysicalDeviceDesc() + .equals(other.getPhysicalDeviceDesc())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DEVICE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getDeviceType().hashCode(); + hash = (37 * hash) + MEMORY_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMemoryLimit()); + if (hasLocality()) { + hash = (37 * hash) + LOCALITY_FIELD_NUMBER; + hash = (53 * hash) + getLocality().hashCode(); + } + hash = (37 * hash) + INCARNATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getIncarnation()); + hash = (37 * hash) + PHYSICAL_DEVICE_DESC_FIELD_NUMBER; + hash = (53 * hash) + getPhysicalDeviceDesc().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.DeviceAttributes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DeviceAttributes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DeviceAttributes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.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.proto.framework.DeviceAttributes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DeviceAttributes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DeviceAttributes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DeviceAttributes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DeviceAttributes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DeviceAttributes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DeviceAttributes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DeviceAttributes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.DeviceAttributes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.DeviceAttributes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.DeviceAttributes) + org.tensorflow.proto.framework.DeviceAttributesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_DeviceAttributes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_DeviceAttributes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DeviceAttributes.class, org.tensorflow.proto.framework.DeviceAttributes.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.DeviceAttributes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + deviceType_ = ""; + + memoryLimit_ = 0L; + + if (localityBuilder_ == null) { + locality_ = null; + } else { + locality_ = null; + localityBuilder_ = null; + } + incarnation_ = 0L; + + physicalDeviceDesc_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_DeviceAttributes_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DeviceAttributes getDefaultInstanceForType() { + return org.tensorflow.proto.framework.DeviceAttributes.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.DeviceAttributes build() { + org.tensorflow.proto.framework.DeviceAttributes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DeviceAttributes buildPartial() { + org.tensorflow.proto.framework.DeviceAttributes result = new org.tensorflow.proto.framework.DeviceAttributes(this); + result.name_ = name_; + result.deviceType_ = deviceType_; + result.memoryLimit_ = memoryLimit_; + if (localityBuilder_ == null) { + result.locality_ = locality_; + } else { + result.locality_ = localityBuilder_.build(); + } + result.incarnation_ = incarnation_; + result.physicalDeviceDesc_ = physicalDeviceDesc_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.DeviceAttributes) { + return mergeFrom((org.tensorflow.proto.framework.DeviceAttributes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.DeviceAttributes other) { + if (other == org.tensorflow.proto.framework.DeviceAttributes.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDeviceType().isEmpty()) { + deviceType_ = other.deviceType_; + onChanged(); + } + if (other.getMemoryLimit() != 0L) { + setMemoryLimit(other.getMemoryLimit()); + } + if (other.hasLocality()) { + mergeLocality(other.getLocality()); + } + if (other.getIncarnation() != 0L) { + setIncarnation(other.getIncarnation()); + } + if (!other.getPhysicalDeviceDesc().isEmpty()) { + physicalDeviceDesc_ = other.physicalDeviceDesc_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.DeviceAttributes parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.DeviceAttributes) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Fully specified name of the device within a cluster.
+     * 
+ * + * 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; + } + } + /** + *
+     * Fully specified name of the device within a cluster.
+     * 
+ * + * 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; + } + } + /** + *
+     * Fully specified name of the device within a cluster.
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Fully specified name of the device within a cluster.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Fully specified name of the device within a cluster.
+     * 
+ * + * 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_ = ""; + /** + *
+     * String representation of device_type.
+     * 
+ * + * string device_type = 2; + */ + 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; + } + } + /** + *
+     * String representation of device_type.
+     * 
+ * + * string device_type = 2; + */ + 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; + } + } + /** + *
+     * String representation of device_type.
+     * 
+ * + * string device_type = 2; + */ + public Builder setDeviceType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deviceType_ = value; + onChanged(); + return this; + } + /** + *
+     * String representation of device_type.
+     * 
+ * + * string device_type = 2; + */ + public Builder clearDeviceType() { + + deviceType_ = getDefaultInstance().getDeviceType(); + onChanged(); + return this; + } + /** + *
+     * String representation of device_type.
+     * 
+ * + * string device_type = 2; + */ + public Builder setDeviceTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deviceType_ = value; + onChanged(); + return this; + } + + private long memoryLimit_ ; + /** + *
+     * Memory capacity of device in bytes.
+     * 
+ * + * int64 memory_limit = 4; + */ + public long getMemoryLimit() { + return memoryLimit_; + } + /** + *
+     * Memory capacity of device in bytes.
+     * 
+ * + * int64 memory_limit = 4; + */ + public Builder setMemoryLimit(long value) { + + memoryLimit_ = value; + onChanged(); + return this; + } + /** + *
+     * Memory capacity of device in bytes.
+     * 
+ * + * int64 memory_limit = 4; + */ + public Builder clearMemoryLimit() { + + memoryLimit_ = 0L; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.DeviceLocality locality_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.DeviceLocality, org.tensorflow.proto.framework.DeviceLocality.Builder, org.tensorflow.proto.framework.DeviceLocalityOrBuilder> localityBuilder_; + /** + *
+     * Platform-specific data about device that may be useful
+     * for supporting efficient data transfers.
+     * 
+ * + * .tensorflow.DeviceLocality locality = 5; + */ + public boolean hasLocality() { + return localityBuilder_ != null || locality_ != null; + } + /** + *
+     * Platform-specific data about device that may be useful
+     * for supporting efficient data transfers.
+     * 
+ * + * .tensorflow.DeviceLocality locality = 5; + */ + public org.tensorflow.proto.framework.DeviceLocality getLocality() { + if (localityBuilder_ == null) { + return locality_ == null ? org.tensorflow.proto.framework.DeviceLocality.getDefaultInstance() : locality_; + } else { + return localityBuilder_.getMessage(); + } + } + /** + *
+     * Platform-specific data about device that may be useful
+     * for supporting efficient data transfers.
+     * 
+ * + * .tensorflow.DeviceLocality locality = 5; + */ + public Builder setLocality(org.tensorflow.proto.framework.DeviceLocality value) { + if (localityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + locality_ = value; + onChanged(); + } else { + localityBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Platform-specific data about device that may be useful
+     * for supporting efficient data transfers.
+     * 
+ * + * .tensorflow.DeviceLocality locality = 5; + */ + public Builder setLocality( + org.tensorflow.proto.framework.DeviceLocality.Builder builderForValue) { + if (localityBuilder_ == null) { + locality_ = builderForValue.build(); + onChanged(); + } else { + localityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Platform-specific data about device that may be useful
+     * for supporting efficient data transfers.
+     * 
+ * + * .tensorflow.DeviceLocality locality = 5; + */ + public Builder mergeLocality(org.tensorflow.proto.framework.DeviceLocality value) { + if (localityBuilder_ == null) { + if (locality_ != null) { + locality_ = + org.tensorflow.proto.framework.DeviceLocality.newBuilder(locality_).mergeFrom(value).buildPartial(); + } else { + locality_ = value; + } + onChanged(); + } else { + localityBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Platform-specific data about device that may be useful
+     * for supporting efficient data transfers.
+     * 
+ * + * .tensorflow.DeviceLocality locality = 5; + */ + public Builder clearLocality() { + if (localityBuilder_ == null) { + locality_ = null; + onChanged(); + } else { + locality_ = null; + localityBuilder_ = null; + } + + return this; + } + /** + *
+     * Platform-specific data about device that may be useful
+     * for supporting efficient data transfers.
+     * 
+ * + * .tensorflow.DeviceLocality locality = 5; + */ + public org.tensorflow.proto.framework.DeviceLocality.Builder getLocalityBuilder() { + + onChanged(); + return getLocalityFieldBuilder().getBuilder(); + } + /** + *
+     * Platform-specific data about device that may be useful
+     * for supporting efficient data transfers.
+     * 
+ * + * .tensorflow.DeviceLocality locality = 5; + */ + public org.tensorflow.proto.framework.DeviceLocalityOrBuilder getLocalityOrBuilder() { + if (localityBuilder_ != null) { + return localityBuilder_.getMessageOrBuilder(); + } else { + return locality_ == null ? + org.tensorflow.proto.framework.DeviceLocality.getDefaultInstance() : locality_; + } + } + /** + *
+     * Platform-specific data about device that may be useful
+     * for supporting efficient data transfers.
+     * 
+ * + * .tensorflow.DeviceLocality locality = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.DeviceLocality, org.tensorflow.proto.framework.DeviceLocality.Builder, org.tensorflow.proto.framework.DeviceLocalityOrBuilder> + getLocalityFieldBuilder() { + if (localityBuilder_ == null) { + localityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.DeviceLocality, org.tensorflow.proto.framework.DeviceLocality.Builder, org.tensorflow.proto.framework.DeviceLocalityOrBuilder>( + getLocality(), + getParentForChildren(), + isClean()); + locality_ = null; + } + return localityBuilder_; + } + + private long incarnation_ ; + /** + *
+     * A device is assigned a global unique number each time it is
+     * initialized. "incarnation" should never be 0.
+     * 
+ * + * fixed64 incarnation = 6; + */ + public long getIncarnation() { + return incarnation_; + } + /** + *
+     * A device is assigned a global unique number each time it is
+     * initialized. "incarnation" should never be 0.
+     * 
+ * + * fixed64 incarnation = 6; + */ + public Builder setIncarnation(long value) { + + incarnation_ = value; + onChanged(); + return this; + } + /** + *
+     * A device is assigned a global unique number each time it is
+     * initialized. "incarnation" should never be 0.
+     * 
+ * + * fixed64 incarnation = 6; + */ + public Builder clearIncarnation() { + + incarnation_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object physicalDeviceDesc_ = ""; + /** + *
+     * String representation of the physical device that this device maps to.
+     * 
+ * + * string physical_device_desc = 7; + */ + 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; + } + } + /** + *
+     * String representation of the physical device that this device maps to.
+     * 
+ * + * string physical_device_desc = 7; + */ + 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; + } + } + /** + *
+     * String representation of the physical device that this device maps to.
+     * 
+ * + * string physical_device_desc = 7; + */ + public Builder setPhysicalDeviceDesc( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + physicalDeviceDesc_ = value; + onChanged(); + return this; + } + /** + *
+     * String representation of the physical device that this device maps to.
+     * 
+ * + * string physical_device_desc = 7; + */ + public Builder clearPhysicalDeviceDesc() { + + physicalDeviceDesc_ = getDefaultInstance().getPhysicalDeviceDesc(); + onChanged(); + return this; + } + /** + *
+     * String representation of the physical device that this device maps to.
+     * 
+ * + * string physical_device_desc = 7; + */ + public Builder setPhysicalDeviceDescBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + physicalDeviceDesc_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.DeviceAttributes) + } + + // @@protoc_insertion_point(class_scope:tensorflow.DeviceAttributes) + private static final org.tensorflow.proto.framework.DeviceAttributes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.DeviceAttributes(); + } + + public static org.tensorflow.proto.framework.DeviceAttributes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeviceAttributes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeviceAttributes(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DeviceAttributes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceAttributesOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceAttributesOrBuilder.java new file mode 100644 index 00000000000..bb8c806b325 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceAttributesOrBuilder.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/device_attributes.proto + +package org.tensorflow.proto.framework; + +public interface DeviceAttributesOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.DeviceAttributes) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Fully specified name of the device within a cluster.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * Fully specified name of the device within a cluster.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * String representation of device_type.
+   * 
+ * + * string device_type = 2; + */ + java.lang.String getDeviceType(); + /** + *
+   * String representation of device_type.
+   * 
+ * + * string device_type = 2; + */ + com.google.protobuf.ByteString + getDeviceTypeBytes(); + + /** + *
+   * Memory capacity of device in bytes.
+   * 
+ * + * int64 memory_limit = 4; + */ + long getMemoryLimit(); + + /** + *
+   * Platform-specific data about device that may be useful
+   * for supporting efficient data transfers.
+   * 
+ * + * .tensorflow.DeviceLocality locality = 5; + */ + boolean hasLocality(); + /** + *
+   * Platform-specific data about device that may be useful
+   * for supporting efficient data transfers.
+   * 
+ * + * .tensorflow.DeviceLocality locality = 5; + */ + org.tensorflow.proto.framework.DeviceLocality getLocality(); + /** + *
+   * Platform-specific data about device that may be useful
+   * for supporting efficient data transfers.
+   * 
+ * + * .tensorflow.DeviceLocality locality = 5; + */ + org.tensorflow.proto.framework.DeviceLocalityOrBuilder getLocalityOrBuilder(); + + /** + *
+   * A device is assigned a global unique number each time it is
+   * initialized. "incarnation" should never be 0.
+   * 
+ * + * fixed64 incarnation = 6; + */ + long getIncarnation(); + + /** + *
+   * String representation of the physical device that this device maps to.
+   * 
+ * + * string physical_device_desc = 7; + */ + java.lang.String getPhysicalDeviceDesc(); + /** + *
+   * String representation of the physical device that this device maps to.
+   * 
+ * + * string physical_device_desc = 7; + */ + com.google.protobuf.ByteString + getPhysicalDeviceDescBytes(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceAttributesProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceAttributesProtos.java new file mode 100644 index 00000000000..f9e2dac8a67 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceAttributesProtos.java @@ -0,0 +1,94 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/device_attributes.proto + +package org.tensorflow.proto.framework; + +public final class DeviceAttributesProtos { + private DeviceAttributesProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_InterconnectLink_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_InterconnectLink_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_LocalLinks_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_LocalLinks_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_DeviceLocality_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_DeviceLocality_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_DeviceAttributes_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.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\"E\n\020InterconnectL" + + "ink\022\021\n\tdevice_id\030\001 \001(\005\022\014\n\004type\030\002 \001(\t\022\020\n\010" + + "strength\030\003 \001(\005\"8\n\nLocalLinks\022*\n\004link\030\001 \003" + + "(\0132\034.tensorflow.InterconnectLink\"Z\n\016Devi" + + "ceLocality\022\016\n\006bus_id\030\001 \001(\005\022\021\n\tnuma_node\030" + + "\002 \001(\005\022%\n\005links\030\003 \001(\0132\026.tensorflow.LocalL" + + "inks\"\254\001\n\020DeviceAttributes\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\010locality\030\005 \001(\0132\032.tensorflow.Device" + + "Locality\022\023\n\013incarnation\030\006 \001(\006\022\034\n\024physica" + + "l_device_desc\030\007 \001(\tB\227\001\n\036org.tensorflow.p" + + "roto.frameworkB\026DeviceAttributesProtosP\001" + + "ZXgithub.com/tensorflow/tensorflow/tenso" + + "rflow/go/core/framework/device_attribute" + + "s_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tensorflow_InterconnectLink_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_InterconnectLink_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_InterconnectLink_descriptor, + new java.lang.String[] { "DeviceId", "Type", "Strength", }); + internal_static_tensorflow_LocalLinks_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_LocalLinks_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_LocalLinks_descriptor, + new java.lang.String[] { "Link", }); + internal_static_tensorflow_DeviceLocality_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_tensorflow_DeviceLocality_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_DeviceLocality_descriptor, + new java.lang.String[] { "BusId", "NumaNode", "Links", }); + internal_static_tensorflow_DeviceAttributes_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_tensorflow_DeviceAttributes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_DeviceAttributes_descriptor, + new java.lang.String[] { "Name", "DeviceType", "MemoryLimit", "Locality", "Incarnation", "PhysicalDeviceDesc", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceLocality.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceLocality.java new file mode 100644 index 00000000000..25d5784a00d --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceLocality.java @@ -0,0 +1,798 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/device_attributes.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.DeviceLocality} + */ +public final class DeviceLocality extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.DeviceLocality) + DeviceLocalityOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeviceLocality.newBuilder() to construct. + private DeviceLocality(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeviceLocality() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeviceLocality(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeviceLocality( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + busId_ = input.readInt32(); + break; + } + case 16: { + + numaNode_ = input.readInt32(); + break; + } + case 26: { + org.tensorflow.proto.framework.LocalLinks.Builder subBuilder = null; + if (links_ != null) { + subBuilder = links_.toBuilder(); + } + links_ = input.readMessage(org.tensorflow.proto.framework.LocalLinks.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(links_); + links_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_DeviceLocality_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_DeviceLocality_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DeviceLocality.class, org.tensorflow.proto.framework.DeviceLocality.Builder.class); + } + + public static final int BUS_ID_FIELD_NUMBER = 1; + private int busId_; + /** + *
+   * Optional bus locality of device.  Default value of 0 means
+   * no specific locality.  Specific localities are indexed from 1.
+   * 
+ * + * int32 bus_id = 1; + */ + public int getBusId() { + return busId_; + } + + public static final int NUMA_NODE_FIELD_NUMBER = 2; + private int numaNode_; + /** + *
+   * Optional NUMA locality of device.
+   * 
+ * + * int32 numa_node = 2; + */ + public int getNumaNode() { + return numaNode_; + } + + public static final int LINKS_FIELD_NUMBER = 3; + private org.tensorflow.proto.framework.LocalLinks links_; + /** + *
+   * Optional local interconnect links to other devices.
+   * 
+ * + * .tensorflow.LocalLinks links = 3; + */ + public boolean hasLinks() { + return links_ != null; + } + /** + *
+   * Optional local interconnect links to other devices.
+   * 
+ * + * .tensorflow.LocalLinks links = 3; + */ + public org.tensorflow.proto.framework.LocalLinks getLinks() { + return links_ == null ? org.tensorflow.proto.framework.LocalLinks.getDefaultInstance() : links_; + } + /** + *
+   * Optional local interconnect links to other devices.
+   * 
+ * + * .tensorflow.LocalLinks links = 3; + */ + public org.tensorflow.proto.framework.LocalLinksOrBuilder getLinksOrBuilder() { + return getLinks(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (busId_ != 0) { + output.writeInt32(1, busId_); + } + if (numaNode_ != 0) { + output.writeInt32(2, numaNode_); + } + if (links_ != null) { + output.writeMessage(3, getLinks()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (busId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, busId_); + } + if (numaNode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, numaNode_); + } + if (links_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getLinks()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.DeviceLocality)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.DeviceLocality other = (org.tensorflow.proto.framework.DeviceLocality) obj; + + if (getBusId() + != other.getBusId()) return false; + if (getNumaNode() + != other.getNumaNode()) return false; + if (hasLinks() != other.hasLinks()) return false; + if (hasLinks()) { + if (!getLinks() + .equals(other.getLinks())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BUS_ID_FIELD_NUMBER; + hash = (53 * hash) + getBusId(); + hash = (37 * hash) + NUMA_NODE_FIELD_NUMBER; + hash = (53 * hash) + getNumaNode(); + if (hasLinks()) { + hash = (37 * hash) + LINKS_FIELD_NUMBER; + hash = (53 * hash) + getLinks().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.DeviceLocality parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DeviceLocality parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DeviceLocality parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DeviceLocality 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.proto.framework.DeviceLocality parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DeviceLocality parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DeviceLocality parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DeviceLocality parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DeviceLocality parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DeviceLocality parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DeviceLocality parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DeviceLocality parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.DeviceLocality prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.DeviceLocality} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.DeviceLocality) + org.tensorflow.proto.framework.DeviceLocalityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_DeviceLocality_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_DeviceLocality_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DeviceLocality.class, org.tensorflow.proto.framework.DeviceLocality.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.DeviceLocality.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + busId_ = 0; + + numaNode_ = 0; + + if (linksBuilder_ == null) { + links_ = null; + } else { + links_ = null; + linksBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_DeviceLocality_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DeviceLocality getDefaultInstanceForType() { + return org.tensorflow.proto.framework.DeviceLocality.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.DeviceLocality build() { + org.tensorflow.proto.framework.DeviceLocality result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DeviceLocality buildPartial() { + org.tensorflow.proto.framework.DeviceLocality result = new org.tensorflow.proto.framework.DeviceLocality(this); + result.busId_ = busId_; + result.numaNode_ = numaNode_; + if (linksBuilder_ == null) { + result.links_ = links_; + } else { + result.links_ = linksBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.DeviceLocality) { + return mergeFrom((org.tensorflow.proto.framework.DeviceLocality)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.DeviceLocality other) { + if (other == org.tensorflow.proto.framework.DeviceLocality.getDefaultInstance()) return this; + if (other.getBusId() != 0) { + setBusId(other.getBusId()); + } + if (other.getNumaNode() != 0) { + setNumaNode(other.getNumaNode()); + } + if (other.hasLinks()) { + mergeLinks(other.getLinks()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.DeviceLocality parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.DeviceLocality) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int busId_ ; + /** + *
+     * Optional bus locality of device.  Default value of 0 means
+     * no specific locality.  Specific localities are indexed from 1.
+     * 
+ * + * int32 bus_id = 1; + */ + public int getBusId() { + return busId_; + } + /** + *
+     * Optional bus locality of device.  Default value of 0 means
+     * no specific locality.  Specific localities are indexed from 1.
+     * 
+ * + * int32 bus_id = 1; + */ + public Builder setBusId(int value) { + + busId_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional bus locality of device.  Default value of 0 means
+     * no specific locality.  Specific localities are indexed from 1.
+     * 
+ * + * int32 bus_id = 1; + */ + public Builder clearBusId() { + + busId_ = 0; + onChanged(); + return this; + } + + private int numaNode_ ; + /** + *
+     * Optional NUMA locality of device.
+     * 
+ * + * int32 numa_node = 2; + */ + public int getNumaNode() { + return numaNode_; + } + /** + *
+     * Optional NUMA locality of device.
+     * 
+ * + * int32 numa_node = 2; + */ + public Builder setNumaNode(int value) { + + numaNode_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional NUMA locality of device.
+     * 
+ * + * int32 numa_node = 2; + */ + public Builder clearNumaNode() { + + numaNode_ = 0; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.LocalLinks links_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.LocalLinks, org.tensorflow.proto.framework.LocalLinks.Builder, org.tensorflow.proto.framework.LocalLinksOrBuilder> linksBuilder_; + /** + *
+     * Optional local interconnect links to other devices.
+     * 
+ * + * .tensorflow.LocalLinks links = 3; + */ + public boolean hasLinks() { + return linksBuilder_ != null || links_ != null; + } + /** + *
+     * Optional local interconnect links to other devices.
+     * 
+ * + * .tensorflow.LocalLinks links = 3; + */ + public org.tensorflow.proto.framework.LocalLinks getLinks() { + if (linksBuilder_ == null) { + return links_ == null ? org.tensorflow.proto.framework.LocalLinks.getDefaultInstance() : links_; + } else { + return linksBuilder_.getMessage(); + } + } + /** + *
+     * Optional local interconnect links to other devices.
+     * 
+ * + * .tensorflow.LocalLinks links = 3; + */ + public Builder setLinks(org.tensorflow.proto.framework.LocalLinks value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + links_ = value; + onChanged(); + } else { + linksBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Optional local interconnect links to other devices.
+     * 
+ * + * .tensorflow.LocalLinks links = 3; + */ + public Builder setLinks( + org.tensorflow.proto.framework.LocalLinks.Builder builderForValue) { + if (linksBuilder_ == null) { + links_ = builderForValue.build(); + onChanged(); + } else { + linksBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Optional local interconnect links to other devices.
+     * 
+ * + * .tensorflow.LocalLinks links = 3; + */ + public Builder mergeLinks(org.tensorflow.proto.framework.LocalLinks value) { + if (linksBuilder_ == null) { + if (links_ != null) { + links_ = + org.tensorflow.proto.framework.LocalLinks.newBuilder(links_).mergeFrom(value).buildPartial(); + } else { + links_ = value; + } + onChanged(); + } else { + linksBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Optional local interconnect links to other devices.
+     * 
+ * + * .tensorflow.LocalLinks links = 3; + */ + public Builder clearLinks() { + if (linksBuilder_ == null) { + links_ = null; + onChanged(); + } else { + links_ = null; + linksBuilder_ = null; + } + + return this; + } + /** + *
+     * Optional local interconnect links to other devices.
+     * 
+ * + * .tensorflow.LocalLinks links = 3; + */ + public org.tensorflow.proto.framework.LocalLinks.Builder getLinksBuilder() { + + onChanged(); + return getLinksFieldBuilder().getBuilder(); + } + /** + *
+     * Optional local interconnect links to other devices.
+     * 
+ * + * .tensorflow.LocalLinks links = 3; + */ + public org.tensorflow.proto.framework.LocalLinksOrBuilder getLinksOrBuilder() { + if (linksBuilder_ != null) { + return linksBuilder_.getMessageOrBuilder(); + } else { + return links_ == null ? + org.tensorflow.proto.framework.LocalLinks.getDefaultInstance() : links_; + } + } + /** + *
+     * Optional local interconnect links to other devices.
+     * 
+ * + * .tensorflow.LocalLinks links = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.LocalLinks, org.tensorflow.proto.framework.LocalLinks.Builder, org.tensorflow.proto.framework.LocalLinksOrBuilder> + getLinksFieldBuilder() { + if (linksBuilder_ == null) { + linksBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.LocalLinks, org.tensorflow.proto.framework.LocalLinks.Builder, org.tensorflow.proto.framework.LocalLinksOrBuilder>( + getLinks(), + getParentForChildren(), + isClean()); + links_ = null; + } + return linksBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.DeviceLocality) + } + + // @@protoc_insertion_point(class_scope:tensorflow.DeviceLocality) + private static final org.tensorflow.proto.framework.DeviceLocality DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.DeviceLocality(); + } + + public static org.tensorflow.proto.framework.DeviceLocality getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeviceLocality parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeviceLocality(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DeviceLocality getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceLocalityOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceLocalityOrBuilder.java new file mode 100644 index 00000000000..cfb7b2c5287 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceLocalityOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/device_attributes.proto + +package org.tensorflow.proto.framework; + +public interface DeviceLocalityOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.DeviceLocality) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Optional bus locality of device.  Default value of 0 means
+   * no specific locality.  Specific localities are indexed from 1.
+   * 
+ * + * int32 bus_id = 1; + */ + int getBusId(); + + /** + *
+   * Optional NUMA locality of device.
+   * 
+ * + * int32 numa_node = 2; + */ + int getNumaNode(); + + /** + *
+   * Optional local interconnect links to other devices.
+   * 
+ * + * .tensorflow.LocalLinks links = 3; + */ + boolean hasLinks(); + /** + *
+   * Optional local interconnect links to other devices.
+   * 
+ * + * .tensorflow.LocalLinks links = 3; + */ + org.tensorflow.proto.framework.LocalLinks getLinks(); + /** + *
+   * Optional local interconnect links to other devices.
+   * 
+ * + * .tensorflow.LocalLinks links = 3; + */ + org.tensorflow.proto.framework.LocalLinksOrBuilder getLinksOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceOrBuilder.java new file mode 100644 index 00000000000..3ce193459ff --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceOrBuilder.java @@ -0,0 +1,90 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/trace_events.proto + +package org.tensorflow.proto.framework; + +public interface DeviceOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.profiler.Device) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the device.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * The name of the device.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The id of this device, unique in a single trace.
+   * 
+ * + * uint32 device_id = 2; + */ + int getDeviceId(); + + /** + *
+   * The resources on this device, keyed by resource_id;
+   * 
+ * + * map<uint32, .tensorflow.profiler.Resource> resources = 3; + */ + int getResourcesCount(); + /** + *
+   * The resources on this device, keyed by resource_id;
+   * 
+ * + * map<uint32, .tensorflow.profiler.Resource> resources = 3; + */ + boolean containsResources( + int key); + /** + * Use {@link #getResourcesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getResources(); + /** + *
+   * The resources on this device, keyed by resource_id;
+   * 
+ * + * map<uint32, .tensorflow.profiler.Resource> resources = 3; + */ + java.util.Map + getResourcesMap(); + /** + *
+   * The resources on this device, keyed by resource_id;
+   * 
+ * + * map<uint32, .tensorflow.profiler.Resource> resources = 3; + */ + + org.tensorflow.proto.framework.Resource getResourcesOrDefault( + int key, + org.tensorflow.proto.framework.Resource defaultValue); + /** + *
+   * The resources on this device, keyed by resource_id;
+   * 
+ * + * map<uint32, .tensorflow.profiler.Resource> resources = 3; + */ + + org.tensorflow.proto.framework.Resource getResourcesOrThrow( + int key); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceProperties.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceProperties.java new file mode 100644 index 00000000000..a6e16b28d1f --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceProperties.java @@ -0,0 +1,1885 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/device_properties.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.DeviceProperties} + */ +public final class DeviceProperties extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.DeviceProperties) + DevicePropertiesOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeviceProperties.newBuilder() to construct. + private DeviceProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeviceProperties() { + type_ = ""; + vendor_ = ""; + model_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeviceProperties(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeviceProperties( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + vendor_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + model_ = s; + break; + } + case 32: { + + frequency_ = input.readInt64(); + break; + } + case 40: { + + numCores_ = input.readInt64(); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + environment_ = com.google.protobuf.MapField.newMapField( + EnvironmentDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + environment__ = input.readMessage( + EnvironmentDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + environment_.getMutableMap().put( + environment__.getKey(), environment__.getValue()); + break; + } + case 56: { + + numRegisters_ = input.readInt64(); + break; + } + case 64: { + + l1CacheSize_ = input.readInt64(); + break; + } + case 72: { + + l2CacheSize_ = input.readInt64(); + break; + } + case 80: { + + l3CacheSize_ = input.readInt64(); + break; + } + case 88: { + + sharedMemorySizePerMultiprocessor_ = input.readInt64(); + break; + } + case 96: { + + memorySize_ = input.readInt64(); + break; + } + case 104: { + + bandwidth_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DevicePropertiesProtos.internal_static_tensorflow_DeviceProperties_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 6: + return internalGetEnvironment(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DevicePropertiesProtos.internal_static_tensorflow_DeviceProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DeviceProperties.class, org.tensorflow.proto.framework.DeviceProperties.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object type_; + /** + *
+   * Device type (CPU, GPU, ...)
+   * 
+ * + * string type = 1; + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+   * Device type (CPU, GPU, ...)
+   * 
+ * + * string type = 1; + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VENDOR_FIELD_NUMBER = 2; + private volatile java.lang.Object vendor_; + /** + *
+   * Vendor (Intel, nvidia, ...)
+   * 
+ * + * string vendor = 2; + */ + public java.lang.String getVendor() { + java.lang.Object ref = vendor_; + 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(); + vendor_ = s; + return s; + } + } + /** + *
+   * Vendor (Intel, nvidia, ...)
+   * 
+ * + * string vendor = 2; + */ + public com.google.protobuf.ByteString + getVendorBytes() { + java.lang.Object ref = vendor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + vendor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODEL_FIELD_NUMBER = 3; + private volatile java.lang.Object model_; + /** + *
+   * Model (Haswell, K40, ...)
+   * 
+ * + * string model = 3; + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + 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(); + model_ = s; + return s; + } + } + /** + *
+   * Model (Haswell, K40, ...)
+   * 
+ * + * string model = 3; + */ + public com.google.protobuf.ByteString + getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FREQUENCY_FIELD_NUMBER = 4; + private long frequency_; + /** + *
+   * Core Frequency in Mhz
+   * 
+ * + * int64 frequency = 4; + */ + public long getFrequency() { + return frequency_; + } + + public static final int NUM_CORES_FIELD_NUMBER = 5; + private long numCores_; + /** + *
+   * Number of cores
+   * 
+ * + * int64 num_cores = 5; + */ + public long getNumCores() { + return numCores_; + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 6; + private static final class EnvironmentDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.DevicePropertiesProtos.internal_static_tensorflow_DeviceProperties_EnvironmentEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> environment_; + private com.google.protobuf.MapField + internalGetEnvironment() { + if (environment_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EnvironmentDefaultEntryHolder.defaultEntry); + } + return environment_; + } + + public int getEnvironmentCount() { + return internalGetEnvironment().getMap().size(); + } + /** + *
+   * Version of the tools and libraries used with this device (e.g. gcc 4.9,
+   * cudnn 5.1)
+   * 
+ * + * map<string, string> environment = 6; + */ + + public boolean containsEnvironment( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetEnvironment().getMap().containsKey(key); + } + /** + * Use {@link #getEnvironmentMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getEnvironment() { + return getEnvironmentMap(); + } + /** + *
+   * Version of the tools and libraries used with this device (e.g. gcc 4.9,
+   * cudnn 5.1)
+   * 
+ * + * map<string, string> environment = 6; + */ + + public java.util.Map getEnvironmentMap() { + return internalGetEnvironment().getMap(); + } + /** + *
+   * Version of the tools and libraries used with this device (e.g. gcc 4.9,
+   * cudnn 5.1)
+   * 
+ * + * map<string, string> environment = 6; + */ + + public java.lang.String getEnvironmentOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetEnvironment().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Version of the tools and libraries used with this device (e.g. gcc 4.9,
+   * cudnn 5.1)
+   * 
+ * + * map<string, string> environment = 6; + */ + + public java.lang.String getEnvironmentOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetEnvironment().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NUM_REGISTERS_FIELD_NUMBER = 7; + private long numRegisters_; + /** + *
+   * Number of registers per core.
+   * 
+ * + * int64 num_registers = 7; + */ + public long getNumRegisters() { + return numRegisters_; + } + + public static final int L1_CACHE_SIZE_FIELD_NUMBER = 8; + private long l1CacheSize_; + /** + *
+   * L1 cache size in bytes
+   * 
+ * + * int64 l1_cache_size = 8; + */ + public long getL1CacheSize() { + return l1CacheSize_; + } + + public static final int L2_CACHE_SIZE_FIELD_NUMBER = 9; + private long l2CacheSize_; + /** + *
+   * L2 cache size in bytes
+   * 
+ * + * int64 l2_cache_size = 9; + */ + public long getL2CacheSize() { + return l2CacheSize_; + } + + public static final int L3_CACHE_SIZE_FIELD_NUMBER = 10; + private long l3CacheSize_; + /** + *
+   * L3 cache size in bytes
+   * 
+ * + * int64 l3_cache_size = 10; + */ + public long getL3CacheSize() { + return l3CacheSize_; + } + + public static final int SHARED_MEMORY_SIZE_PER_MULTIPROCESSOR_FIELD_NUMBER = 11; + private long sharedMemorySizePerMultiprocessor_; + /** + *
+   * Shared memory size per multiprocessor in bytes. This field is
+   * applicable to GPUs only.
+   * 
+ * + * int64 shared_memory_size_per_multiprocessor = 11; + */ + public long getSharedMemorySizePerMultiprocessor() { + return sharedMemorySizePerMultiprocessor_; + } + + public static final int MEMORY_SIZE_FIELD_NUMBER = 12; + private long memorySize_; + /** + *
+   * Memory size in bytes
+   * 
+ * + * int64 memory_size = 12; + */ + public long getMemorySize() { + return memorySize_; + } + + public static final int BANDWIDTH_FIELD_NUMBER = 13; + private long bandwidth_; + /** + *
+   * Memory bandwidth in KB/s
+   * 
+ * + * int64 bandwidth = 13; + */ + public long getBandwidth() { + return bandwidth_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (!getVendorBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vendor_); + } + if (!getModelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_); + } + if (frequency_ != 0L) { + output.writeInt64(4, frequency_); + } + if (numCores_ != 0L) { + output.writeInt64(5, numCores_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetEnvironment(), + EnvironmentDefaultEntryHolder.defaultEntry, + 6); + if (numRegisters_ != 0L) { + output.writeInt64(7, numRegisters_); + } + if (l1CacheSize_ != 0L) { + output.writeInt64(8, l1CacheSize_); + } + if (l2CacheSize_ != 0L) { + output.writeInt64(9, l2CacheSize_); + } + if (l3CacheSize_ != 0L) { + output.writeInt64(10, l3CacheSize_); + } + if (sharedMemorySizePerMultiprocessor_ != 0L) { + output.writeInt64(11, sharedMemorySizePerMultiprocessor_); + } + if (memorySize_ != 0L) { + output.writeInt64(12, memorySize_); + } + if (bandwidth_ != 0L) { + output.writeInt64(13, bandwidth_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (!getVendorBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vendor_); + } + if (!getModelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_); + } + if (frequency_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, frequency_); + } + if (numCores_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, numCores_); + } + for (java.util.Map.Entry entry + : internalGetEnvironment().getMap().entrySet()) { + com.google.protobuf.MapEntry + environment__ = EnvironmentDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, environment__); + } + if (numRegisters_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, numRegisters_); + } + if (l1CacheSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(8, l1CacheSize_); + } + if (l2CacheSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(9, l2CacheSize_); + } + if (l3CacheSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(10, l3CacheSize_); + } + if (sharedMemorySizePerMultiprocessor_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(11, sharedMemorySizePerMultiprocessor_); + } + if (memorySize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(12, memorySize_); + } + if (bandwidth_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(13, bandwidth_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.DeviceProperties)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.DeviceProperties other = (org.tensorflow.proto.framework.DeviceProperties) obj; + + if (!getType() + .equals(other.getType())) return false; + if (!getVendor() + .equals(other.getVendor())) return false; + if (!getModel() + .equals(other.getModel())) return false; + if (getFrequency() + != other.getFrequency()) return false; + if (getNumCores() + != other.getNumCores()) return false; + if (!internalGetEnvironment().equals( + other.internalGetEnvironment())) return false; + if (getNumRegisters() + != other.getNumRegisters()) return false; + if (getL1CacheSize() + != other.getL1CacheSize()) return false; + if (getL2CacheSize() + != other.getL2CacheSize()) return false; + if (getL3CacheSize() + != other.getL3CacheSize()) return false; + if (getSharedMemorySizePerMultiprocessor() + != other.getSharedMemorySizePerMultiprocessor()) return false; + if (getMemorySize() + != other.getMemorySize()) return false; + if (getBandwidth() + != other.getBandwidth()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + VENDOR_FIELD_NUMBER; + hash = (53 * hash) + getVendor().hashCode(); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + FREQUENCY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFrequency()); + hash = (37 * hash) + NUM_CORES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNumCores()); + if (!internalGetEnvironment().getMap().isEmpty()) { + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + internalGetEnvironment().hashCode(); + } + hash = (37 * hash) + NUM_REGISTERS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNumRegisters()); + hash = (37 * hash) + L1_CACHE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getL1CacheSize()); + hash = (37 * hash) + L2_CACHE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getL2CacheSize()); + hash = (37 * hash) + L3_CACHE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getL3CacheSize()); + hash = (37 * hash) + SHARED_MEMORY_SIZE_PER_MULTIPROCESSOR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSharedMemorySizePerMultiprocessor()); + hash = (37 * hash) + MEMORY_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMemorySize()); + hash = (37 * hash) + BANDWIDTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBandwidth()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.DeviceProperties parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DeviceProperties parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DeviceProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DeviceProperties 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.proto.framework.DeviceProperties parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DeviceProperties parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DeviceProperties parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DeviceProperties parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DeviceProperties parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DeviceProperties parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DeviceProperties parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DeviceProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.DeviceProperties prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.DeviceProperties} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.DeviceProperties) + org.tensorflow.proto.framework.DevicePropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DevicePropertiesProtos.internal_static_tensorflow_DeviceProperties_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 6: + return internalGetEnvironment(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 6: + return internalGetMutableEnvironment(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DevicePropertiesProtos.internal_static_tensorflow_DeviceProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DeviceProperties.class, org.tensorflow.proto.framework.DeviceProperties.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.DeviceProperties.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = ""; + + vendor_ = ""; + + model_ = ""; + + frequency_ = 0L; + + numCores_ = 0L; + + internalGetMutableEnvironment().clear(); + numRegisters_ = 0L; + + l1CacheSize_ = 0L; + + l2CacheSize_ = 0L; + + l3CacheSize_ = 0L; + + sharedMemorySizePerMultiprocessor_ = 0L; + + memorySize_ = 0L; + + bandwidth_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.DevicePropertiesProtos.internal_static_tensorflow_DeviceProperties_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DeviceProperties getDefaultInstanceForType() { + return org.tensorflow.proto.framework.DeviceProperties.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.DeviceProperties build() { + org.tensorflow.proto.framework.DeviceProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DeviceProperties buildPartial() { + org.tensorflow.proto.framework.DeviceProperties result = new org.tensorflow.proto.framework.DeviceProperties(this); + int from_bitField0_ = bitField0_; + result.type_ = type_; + result.vendor_ = vendor_; + result.model_ = model_; + result.frequency_ = frequency_; + result.numCores_ = numCores_; + result.environment_ = internalGetEnvironment(); + result.environment_.makeImmutable(); + result.numRegisters_ = numRegisters_; + result.l1CacheSize_ = l1CacheSize_; + result.l2CacheSize_ = l2CacheSize_; + result.l3CacheSize_ = l3CacheSize_; + result.sharedMemorySizePerMultiprocessor_ = sharedMemorySizePerMultiprocessor_; + result.memorySize_ = memorySize_; + result.bandwidth_ = bandwidth_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.DeviceProperties) { + return mergeFrom((org.tensorflow.proto.framework.DeviceProperties)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.DeviceProperties other) { + if (other == org.tensorflow.proto.framework.DeviceProperties.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (!other.getVendor().isEmpty()) { + vendor_ = other.vendor_; + onChanged(); + } + if (!other.getModel().isEmpty()) { + model_ = other.model_; + onChanged(); + } + if (other.getFrequency() != 0L) { + setFrequency(other.getFrequency()); + } + if (other.getNumCores() != 0L) { + setNumCores(other.getNumCores()); + } + internalGetMutableEnvironment().mergeFrom( + other.internalGetEnvironment()); + if (other.getNumRegisters() != 0L) { + setNumRegisters(other.getNumRegisters()); + } + if (other.getL1CacheSize() != 0L) { + setL1CacheSize(other.getL1CacheSize()); + } + if (other.getL2CacheSize() != 0L) { + setL2CacheSize(other.getL2CacheSize()); + } + if (other.getL3CacheSize() != 0L) { + setL3CacheSize(other.getL3CacheSize()); + } + if (other.getSharedMemorySizePerMultiprocessor() != 0L) { + setSharedMemorySizePerMultiprocessor(other.getSharedMemorySizePerMultiprocessor()); + } + if (other.getMemorySize() != 0L) { + setMemorySize(other.getMemorySize()); + } + if (other.getBandwidth() != 0L) { + setBandwidth(other.getBandwidth()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.DeviceProperties parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.DeviceProperties) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + *
+     * Device type (CPU, GPU, ...)
+     * 
+ * + * string type = 1; + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Device type (CPU, GPU, ...)
+     * 
+ * + * string type = 1; + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Device type (CPU, GPU, ...)
+     * 
+ * + * string type = 1; + */ + public Builder setType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * Device type (CPU, GPU, ...)
+     * 
+ * + * string type = 1; + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + *
+     * Device type (CPU, GPU, ...)
+     * 
+ * + * string type = 1; + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private java.lang.Object vendor_ = ""; + /** + *
+     * Vendor (Intel, nvidia, ...)
+     * 
+ * + * string vendor = 2; + */ + public java.lang.String getVendor() { + java.lang.Object ref = vendor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vendor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Vendor (Intel, nvidia, ...)
+     * 
+ * + * string vendor = 2; + */ + public com.google.protobuf.ByteString + getVendorBytes() { + java.lang.Object ref = vendor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + vendor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Vendor (Intel, nvidia, ...)
+     * 
+ * + * string vendor = 2; + */ + public Builder setVendor( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vendor_ = value; + onChanged(); + return this; + } + /** + *
+     * Vendor (Intel, nvidia, ...)
+     * 
+ * + * string vendor = 2; + */ + public Builder clearVendor() { + + vendor_ = getDefaultInstance().getVendor(); + onChanged(); + return this; + } + /** + *
+     * Vendor (Intel, nvidia, ...)
+     * 
+ * + * string vendor = 2; + */ + public Builder setVendorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vendor_ = value; + onChanged(); + return this; + } + + private java.lang.Object model_ = ""; + /** + *
+     * Model (Haswell, K40, ...)
+     * 
+ * + * string model = 3; + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Model (Haswell, K40, ...)
+     * 
+ * + * string model = 3; + */ + public com.google.protobuf.ByteString + getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Model (Haswell, K40, ...)
+     * 
+ * + * string model = 3; + */ + public Builder setModel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + model_ = value; + onChanged(); + return this; + } + /** + *
+     * Model (Haswell, K40, ...)
+     * 
+ * + * string model = 3; + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + *
+     * Model (Haswell, K40, ...)
+     * 
+ * + * string model = 3; + */ + public Builder setModelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + model_ = value; + onChanged(); + return this; + } + + private long frequency_ ; + /** + *
+     * Core Frequency in Mhz
+     * 
+ * + * int64 frequency = 4; + */ + public long getFrequency() { + return frequency_; + } + /** + *
+     * Core Frequency in Mhz
+     * 
+ * + * int64 frequency = 4; + */ + public Builder setFrequency(long value) { + + frequency_ = value; + onChanged(); + return this; + } + /** + *
+     * Core Frequency in Mhz
+     * 
+ * + * int64 frequency = 4; + */ + public Builder clearFrequency() { + + frequency_ = 0L; + onChanged(); + return this; + } + + private long numCores_ ; + /** + *
+     * Number of cores
+     * 
+ * + * int64 num_cores = 5; + */ + public long getNumCores() { + return numCores_; + } + /** + *
+     * Number of cores
+     * 
+ * + * int64 num_cores = 5; + */ + public Builder setNumCores(long value) { + + numCores_ = value; + onChanged(); + return this; + } + /** + *
+     * Number of cores
+     * 
+ * + * int64 num_cores = 5; + */ + public Builder clearNumCores() { + + numCores_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> environment_; + private com.google.protobuf.MapField + internalGetEnvironment() { + if (environment_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EnvironmentDefaultEntryHolder.defaultEntry); + } + return environment_; + } + private com.google.protobuf.MapField + internalGetMutableEnvironment() { + onChanged();; + if (environment_ == null) { + environment_ = com.google.protobuf.MapField.newMapField( + EnvironmentDefaultEntryHolder.defaultEntry); + } + if (!environment_.isMutable()) { + environment_ = environment_.copy(); + } + return environment_; + } + + public int getEnvironmentCount() { + return internalGetEnvironment().getMap().size(); + } + /** + *
+     * Version of the tools and libraries used with this device (e.g. gcc 4.9,
+     * cudnn 5.1)
+     * 
+ * + * map<string, string> environment = 6; + */ + + public boolean containsEnvironment( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetEnvironment().getMap().containsKey(key); + } + /** + * Use {@link #getEnvironmentMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getEnvironment() { + return getEnvironmentMap(); + } + /** + *
+     * Version of the tools and libraries used with this device (e.g. gcc 4.9,
+     * cudnn 5.1)
+     * 
+ * + * map<string, string> environment = 6; + */ + + public java.util.Map getEnvironmentMap() { + return internalGetEnvironment().getMap(); + } + /** + *
+     * Version of the tools and libraries used with this device (e.g. gcc 4.9,
+     * cudnn 5.1)
+     * 
+ * + * map<string, string> environment = 6; + */ + + public java.lang.String getEnvironmentOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetEnvironment().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Version of the tools and libraries used with this device (e.g. gcc 4.9,
+     * cudnn 5.1)
+     * 
+ * + * map<string, string> environment = 6; + */ + + public java.lang.String getEnvironmentOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetEnvironment().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearEnvironment() { + internalGetMutableEnvironment().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Version of the tools and libraries used with this device (e.g. gcc 4.9,
+     * cudnn 5.1)
+     * 
+ * + * map<string, string> environment = 6; + */ + + public Builder removeEnvironment( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableEnvironment().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableEnvironment() { + return internalGetMutableEnvironment().getMutableMap(); + } + /** + *
+     * Version of the tools and libraries used with this device (e.g. gcc 4.9,
+     * cudnn 5.1)
+     * 
+ * + * map<string, string> environment = 6; + */ + public Builder putEnvironment( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableEnvironment().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Version of the tools and libraries used with this device (e.g. gcc 4.9,
+     * cudnn 5.1)
+     * 
+ * + * map<string, string> environment = 6; + */ + + public Builder putAllEnvironment( + java.util.Map values) { + internalGetMutableEnvironment().getMutableMap() + .putAll(values); + return this; + } + + private long numRegisters_ ; + /** + *
+     * Number of registers per core.
+     * 
+ * + * int64 num_registers = 7; + */ + public long getNumRegisters() { + return numRegisters_; + } + /** + *
+     * Number of registers per core.
+     * 
+ * + * int64 num_registers = 7; + */ + public Builder setNumRegisters(long value) { + + numRegisters_ = value; + onChanged(); + return this; + } + /** + *
+     * Number of registers per core.
+     * 
+ * + * int64 num_registers = 7; + */ + public Builder clearNumRegisters() { + + numRegisters_ = 0L; + onChanged(); + return this; + } + + private long l1CacheSize_ ; + /** + *
+     * L1 cache size in bytes
+     * 
+ * + * int64 l1_cache_size = 8; + */ + public long getL1CacheSize() { + return l1CacheSize_; + } + /** + *
+     * L1 cache size in bytes
+     * 
+ * + * int64 l1_cache_size = 8; + */ + public Builder setL1CacheSize(long value) { + + l1CacheSize_ = value; + onChanged(); + return this; + } + /** + *
+     * L1 cache size in bytes
+     * 
+ * + * int64 l1_cache_size = 8; + */ + public Builder clearL1CacheSize() { + + l1CacheSize_ = 0L; + onChanged(); + return this; + } + + private long l2CacheSize_ ; + /** + *
+     * L2 cache size in bytes
+     * 
+ * + * int64 l2_cache_size = 9; + */ + public long getL2CacheSize() { + return l2CacheSize_; + } + /** + *
+     * L2 cache size in bytes
+     * 
+ * + * int64 l2_cache_size = 9; + */ + public Builder setL2CacheSize(long value) { + + l2CacheSize_ = value; + onChanged(); + return this; + } + /** + *
+     * L2 cache size in bytes
+     * 
+ * + * int64 l2_cache_size = 9; + */ + public Builder clearL2CacheSize() { + + l2CacheSize_ = 0L; + onChanged(); + return this; + } + + private long l3CacheSize_ ; + /** + *
+     * L3 cache size in bytes
+     * 
+ * + * int64 l3_cache_size = 10; + */ + public long getL3CacheSize() { + return l3CacheSize_; + } + /** + *
+     * L3 cache size in bytes
+     * 
+ * + * int64 l3_cache_size = 10; + */ + public Builder setL3CacheSize(long value) { + + l3CacheSize_ = value; + onChanged(); + return this; + } + /** + *
+     * L3 cache size in bytes
+     * 
+ * + * int64 l3_cache_size = 10; + */ + public Builder clearL3CacheSize() { + + l3CacheSize_ = 0L; + onChanged(); + return this; + } + + private long sharedMemorySizePerMultiprocessor_ ; + /** + *
+     * Shared memory size per multiprocessor in bytes. This field is
+     * applicable to GPUs only.
+     * 
+ * + * int64 shared_memory_size_per_multiprocessor = 11; + */ + public long getSharedMemorySizePerMultiprocessor() { + return sharedMemorySizePerMultiprocessor_; + } + /** + *
+     * Shared memory size per multiprocessor in bytes. This field is
+     * applicable to GPUs only.
+     * 
+ * + * int64 shared_memory_size_per_multiprocessor = 11; + */ + public Builder setSharedMemorySizePerMultiprocessor(long value) { + + sharedMemorySizePerMultiprocessor_ = value; + onChanged(); + return this; + } + /** + *
+     * Shared memory size per multiprocessor in bytes. This field is
+     * applicable to GPUs only.
+     * 
+ * + * int64 shared_memory_size_per_multiprocessor = 11; + */ + public Builder clearSharedMemorySizePerMultiprocessor() { + + sharedMemorySizePerMultiprocessor_ = 0L; + onChanged(); + return this; + } + + private long memorySize_ ; + /** + *
+     * Memory size in bytes
+     * 
+ * + * int64 memory_size = 12; + */ + public long getMemorySize() { + return memorySize_; + } + /** + *
+     * Memory size in bytes
+     * 
+ * + * int64 memory_size = 12; + */ + public Builder setMemorySize(long value) { + + memorySize_ = value; + onChanged(); + return this; + } + /** + *
+     * Memory size in bytes
+     * 
+ * + * int64 memory_size = 12; + */ + public Builder clearMemorySize() { + + memorySize_ = 0L; + onChanged(); + return this; + } + + private long bandwidth_ ; + /** + *
+     * Memory bandwidth in KB/s
+     * 
+ * + * int64 bandwidth = 13; + */ + public long getBandwidth() { + return bandwidth_; + } + /** + *
+     * Memory bandwidth in KB/s
+     * 
+ * + * int64 bandwidth = 13; + */ + public Builder setBandwidth(long value) { + + bandwidth_ = value; + onChanged(); + return this; + } + /** + *
+     * Memory bandwidth in KB/s
+     * 
+ * + * int64 bandwidth = 13; + */ + public Builder clearBandwidth() { + + bandwidth_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.DeviceProperties) + } + + // @@protoc_insertion_point(class_scope:tensorflow.DeviceProperties) + private static final org.tensorflow.proto.framework.DeviceProperties DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.DeviceProperties(); + } + + public static org.tensorflow.proto.framework.DeviceProperties getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeviceProperties parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeviceProperties(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DeviceProperties getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DevicePropertiesOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DevicePropertiesOrBuilder.java new file mode 100644 index 00000000000..675627a60fa --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DevicePropertiesOrBuilder.java @@ -0,0 +1,204 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/device_properties.proto + +package org.tensorflow.proto.framework; + +public interface DevicePropertiesOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.DeviceProperties) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Device type (CPU, GPU, ...)
+   * 
+ * + * string type = 1; + */ + java.lang.String getType(); + /** + *
+   * Device type (CPU, GPU, ...)
+   * 
+ * + * string type = 1; + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+   * Vendor (Intel, nvidia, ...)
+   * 
+ * + * string vendor = 2; + */ + java.lang.String getVendor(); + /** + *
+   * Vendor (Intel, nvidia, ...)
+   * 
+ * + * string vendor = 2; + */ + com.google.protobuf.ByteString + getVendorBytes(); + + /** + *
+   * Model (Haswell, K40, ...)
+   * 
+ * + * string model = 3; + */ + java.lang.String getModel(); + /** + *
+   * Model (Haswell, K40, ...)
+   * 
+ * + * string model = 3; + */ + com.google.protobuf.ByteString + getModelBytes(); + + /** + *
+   * Core Frequency in Mhz
+   * 
+ * + * int64 frequency = 4; + */ + long getFrequency(); + + /** + *
+   * Number of cores
+   * 
+ * + * int64 num_cores = 5; + */ + long getNumCores(); + + /** + *
+   * Version of the tools and libraries used with this device (e.g. gcc 4.9,
+   * cudnn 5.1)
+   * 
+ * + * map<string, string> environment = 6; + */ + int getEnvironmentCount(); + /** + *
+   * Version of the tools and libraries used with this device (e.g. gcc 4.9,
+   * cudnn 5.1)
+   * 
+ * + * map<string, string> environment = 6; + */ + boolean containsEnvironment( + java.lang.String key); + /** + * Use {@link #getEnvironmentMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getEnvironment(); + /** + *
+   * Version of the tools and libraries used with this device (e.g. gcc 4.9,
+   * cudnn 5.1)
+   * 
+ * + * map<string, string> environment = 6; + */ + java.util.Map + getEnvironmentMap(); + /** + *
+   * Version of the tools and libraries used with this device (e.g. gcc 4.9,
+   * cudnn 5.1)
+   * 
+ * + * map<string, string> environment = 6; + */ + + java.lang.String getEnvironmentOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+   * Version of the tools and libraries used with this device (e.g. gcc 4.9,
+   * cudnn 5.1)
+   * 
+ * + * map<string, string> environment = 6; + */ + + java.lang.String getEnvironmentOrThrow( + java.lang.String key); + + /** + *
+   * Number of registers per core.
+   * 
+ * + * int64 num_registers = 7; + */ + long getNumRegisters(); + + /** + *
+   * L1 cache size in bytes
+   * 
+ * + * int64 l1_cache_size = 8; + */ + long getL1CacheSize(); + + /** + *
+   * L2 cache size in bytes
+   * 
+ * + * int64 l2_cache_size = 9; + */ + long getL2CacheSize(); + + /** + *
+   * L3 cache size in bytes
+   * 
+ * + * int64 l3_cache_size = 10; + */ + long getL3CacheSize(); + + /** + *
+   * Shared memory size per multiprocessor in bytes. This field is
+   * applicable to GPUs only.
+   * 
+ * + * int64 shared_memory_size_per_multiprocessor = 11; + */ + long getSharedMemorySizePerMultiprocessor(); + + /** + *
+   * Memory size in bytes
+   * 
+ * + * int64 memory_size = 12; + */ + long getMemorySize(); + + /** + *
+   * Memory bandwidth in KB/s
+   * 
+ * + * int64 bandwidth = 13; + */ + long getBandwidth(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DevicePropertiesProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DevicePropertiesProtos.java new file mode 100644 index 00000000000..7f6f979fca2 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DevicePropertiesProtos.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/device_properties.proto + +package org.tensorflow.proto.framework; + +public final class DevicePropertiesProtos { + private DevicePropertiesProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_DeviceProperties_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_DeviceProperties_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_DeviceProperties_EnvironmentEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_DeviceProperties_EnvironmentEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_NamedDevice_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_NamedDevice_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n0tensorflow/core/protobuf/device_proper" + + "ties.proto\022\ntensorflow\"\220\003\n\020DevicePropert" + + "ies\022\014\n\004type\030\001 \001(\t\022\016\n\006vendor\030\002 \001(\t\022\r\n\005mod" + + "el\030\003 \001(\t\022\021\n\tfrequency\030\004 \001(\003\022\021\n\tnum_cores" + + "\030\005 \001(\003\022B\n\013environment\030\006 \003(\0132-.tensorflow" + + ".DeviceProperties.EnvironmentEntry\022\025\n\rnu" + + "m_registers\030\007 \001(\003\022\025\n\rl1_cache_size\030\010 \001(\003" + + "\022\025\n\rl2_cache_size\030\t \001(\003\022\025\n\rl3_cache_size" + + "\030\n \001(\003\022-\n%shared_memory_size_per_multipr" + + "ocessor\030\013 \001(\003\022\023\n\013memory_size\030\014 \001(\003\022\021\n\tba" + + "ndwidth\030\r \001(\003\0322\n\020EnvironmentEntry\022\013\n\003key" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"M\n\013NamedDevice" + + "\022\014\n\004name\030\001 \001(\t\0220\n\nproperties\030\002 \001(\0132\034.ten" + + "sorflow.DevicePropertiesB\207\001\n\036org.tensorf" + + "low.proto.frameworkB\026DevicePropertiesPro" + + "tosP\001ZHgithub.com/tensorflow/tensorflow/" + + "tensorflow/go/core/core_protos_go_proto\370" + + "\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tensorflow_DeviceProperties_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_DeviceProperties_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_DeviceProperties_descriptor, + new java.lang.String[] { "Type", "Vendor", "Model", "Frequency", "NumCores", "Environment", "NumRegisters", "L1CacheSize", "L2CacheSize", "L3CacheSize", "SharedMemorySizePerMultiprocessor", "MemorySize", "Bandwidth", }); + internal_static_tensorflow_DeviceProperties_EnvironmentEntry_descriptor = + internal_static_tensorflow_DeviceProperties_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_DeviceProperties_EnvironmentEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_DeviceProperties_EnvironmentEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_NamedDevice_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_NamedDevice_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_NamedDevice_descriptor, + new java.lang.String[] { "Name", "Properties", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceStepStats.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceStepStats.java new file mode 100644 index 00000000000..8da65e2b3d5 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceStepStats.java @@ -0,0 +1,1209 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/step_stats.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.DeviceStepStats} + */ +public final class DeviceStepStats extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.DeviceStepStats) + DeviceStepStatsOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeviceStepStats.newBuilder() to construct. + private DeviceStepStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeviceStepStats() { + device_ = ""; + nodeStats_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeviceStepStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeviceStepStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + device_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + nodeStats_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + nodeStats_.add( + input.readMessage(org.tensorflow.proto.framework.NodeExecStats.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + threadNames_ = com.google.protobuf.MapField.newMapField( + ThreadNamesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + threadNames__ = input.readMessage( + ThreadNamesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + threadNames_.getMutableMap().put( + threadNames__.getKey(), threadNames__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + nodeStats_ = java.util.Collections.unmodifiableList(nodeStats_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetThreadNames(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DeviceStepStats.class, org.tensorflow.proto.framework.DeviceStepStats.Builder.class); + } + + public static final int DEVICE_FIELD_NUMBER = 1; + private volatile java.lang.Object device_; + /** + * 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; + } + } + /** + * string device = 1; + */ + public com.google.protobuf.ByteString + getDeviceBytes() { + java.lang.Object ref = device_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + device_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NODE_STATS_FIELD_NUMBER = 2; + private java.util.List nodeStats_; + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + public java.util.List getNodeStatsList() { + return nodeStats_; + } + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + public java.util.List + getNodeStatsOrBuilderList() { + return nodeStats_; + } + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + public int getNodeStatsCount() { + return nodeStats_.size(); + } + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + public org.tensorflow.proto.framework.NodeExecStats getNodeStats(int index) { + return nodeStats_.get(index); + } + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + public org.tensorflow.proto.framework.NodeExecStatsOrBuilder getNodeStatsOrBuilder( + int index) { + return nodeStats_.get(index); + } + + public static final int THREAD_NAMES_FIELD_NUMBER = 3; + private static final class ThreadNamesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_ThreadNamesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.UINT32, + 0, + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.String> threadNames_; + private com.google.protobuf.MapField + internalGetThreadNames() { + if (threadNames_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ThreadNamesDefaultEntryHolder.defaultEntry); + } + return threadNames_; + } + + public int getThreadNamesCount() { + return internalGetThreadNames().getMap().size(); + } + /** + *
+   * Its key is thread id.
+   * 
+ * + * map<uint32, string> thread_names = 3; + */ + + public boolean containsThreadNames( + int key) { + + return internalGetThreadNames().getMap().containsKey(key); + } + /** + * Use {@link #getThreadNamesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getThreadNames() { + return getThreadNamesMap(); + } + /** + *
+   * Its key is thread id.
+   * 
+ * + * map<uint32, string> thread_names = 3; + */ + + public java.util.Map getThreadNamesMap() { + return internalGetThreadNames().getMap(); + } + /** + *
+   * Its key is thread id.
+   * 
+ * + * map<uint32, string> thread_names = 3; + */ + + public java.lang.String getThreadNamesOrDefault( + int key, + java.lang.String defaultValue) { + + java.util.Map map = + internalGetThreadNames().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Its key is thread id.
+   * 
+ * + * map<uint32, string> thread_names = 3; + */ + + public java.lang.String getThreadNamesOrThrow( + int key) { + + java.util.Map map = + internalGetThreadNames().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getDeviceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, device_); + } + for (int i = 0; i < nodeStats_.size(); i++) { + output.writeMessage(2, nodeStats_.get(i)); + } + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetThreadNames(), + ThreadNamesDefaultEntryHolder.defaultEntry, + 3); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDeviceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, device_); + } + for (int i = 0; i < nodeStats_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, nodeStats_.get(i)); + } + for (java.util.Map.Entry entry + : internalGetThreadNames().getMap().entrySet()) { + com.google.protobuf.MapEntry + threadNames__ = ThreadNamesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, threadNames__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.DeviceStepStats)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.DeviceStepStats other = (org.tensorflow.proto.framework.DeviceStepStats) obj; + + if (!getDevice() + .equals(other.getDevice())) return false; + if (!getNodeStatsList() + .equals(other.getNodeStatsList())) return false; + if (!internalGetThreadNames().equals( + other.internalGetThreadNames())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DEVICE_FIELD_NUMBER; + hash = (53 * hash) + getDevice().hashCode(); + if (getNodeStatsCount() > 0) { + hash = (37 * hash) + NODE_STATS_FIELD_NUMBER; + hash = (53 * hash) + getNodeStatsList().hashCode(); + } + if (!internalGetThreadNames().getMap().isEmpty()) { + hash = (37 * hash) + THREAD_NAMES_FIELD_NUMBER; + hash = (53 * hash) + internalGetThreadNames().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.DeviceStepStats parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DeviceStepStats parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DeviceStepStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.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.proto.framework.DeviceStepStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DeviceStepStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DeviceStepStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DeviceStepStats parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DeviceStepStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DeviceStepStats parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DeviceStepStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DeviceStepStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.DeviceStepStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.DeviceStepStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.DeviceStepStats) + org.tensorflow.proto.framework.DeviceStepStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetThreadNames(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 3: + return internalGetMutableThreadNames(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DeviceStepStats.class, org.tensorflow.proto.framework.DeviceStepStats.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.DeviceStepStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getNodeStatsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + device_ = ""; + + if (nodeStatsBuilder_ == null) { + nodeStats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + nodeStatsBuilder_.clear(); + } + internalGetMutableThreadNames().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DeviceStepStats getDefaultInstanceForType() { + return org.tensorflow.proto.framework.DeviceStepStats.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.DeviceStepStats build() { + org.tensorflow.proto.framework.DeviceStepStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DeviceStepStats buildPartial() { + org.tensorflow.proto.framework.DeviceStepStats result = new org.tensorflow.proto.framework.DeviceStepStats(this); + int from_bitField0_ = bitField0_; + result.device_ = device_; + if (nodeStatsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + nodeStats_ = java.util.Collections.unmodifiableList(nodeStats_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.nodeStats_ = nodeStats_; + } else { + result.nodeStats_ = nodeStatsBuilder_.build(); + } + result.threadNames_ = internalGetThreadNames(); + result.threadNames_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.DeviceStepStats) { + return mergeFrom((org.tensorflow.proto.framework.DeviceStepStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.DeviceStepStats other) { + if (other == org.tensorflow.proto.framework.DeviceStepStats.getDefaultInstance()) return this; + if (!other.getDevice().isEmpty()) { + device_ = other.device_; + onChanged(); + } + if (nodeStatsBuilder_ == null) { + if (!other.nodeStats_.isEmpty()) { + if (nodeStats_.isEmpty()) { + nodeStats_ = other.nodeStats_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNodeStatsIsMutable(); + nodeStats_.addAll(other.nodeStats_); + } + onChanged(); + } + } else { + if (!other.nodeStats_.isEmpty()) { + if (nodeStatsBuilder_.isEmpty()) { + nodeStatsBuilder_.dispose(); + nodeStatsBuilder_ = null; + nodeStats_ = other.nodeStats_; + bitField0_ = (bitField0_ & ~0x00000001); + nodeStatsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNodeStatsFieldBuilder() : null; + } else { + nodeStatsBuilder_.addAllMessages(other.nodeStats_); + } + } + } + internalGetMutableThreadNames().mergeFrom( + other.internalGetThreadNames()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.DeviceStepStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.DeviceStepStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object device_ = ""; + /** + * 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; + } + } + /** + * 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; + } + } + /** + * string device = 1; + */ + public Builder setDevice( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + device_ = value; + onChanged(); + return this; + } + /** + * string device = 1; + */ + public Builder clearDevice() { + + device_ = getDefaultInstance().getDevice(); + onChanged(); + return this; + } + /** + * string device = 1; + */ + public Builder setDeviceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + device_ = value; + onChanged(); + return this; + } + + private java.util.List nodeStats_ = + java.util.Collections.emptyList(); + private void ensureNodeStatsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + nodeStats_ = new java.util.ArrayList(nodeStats_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.NodeExecStats, org.tensorflow.proto.framework.NodeExecStats.Builder, org.tensorflow.proto.framework.NodeExecStatsOrBuilder> nodeStatsBuilder_; + + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + public java.util.List getNodeStatsList() { + if (nodeStatsBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodeStats_); + } else { + return nodeStatsBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + public int getNodeStatsCount() { + if (nodeStatsBuilder_ == null) { + return nodeStats_.size(); + } else { + return nodeStatsBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + public org.tensorflow.proto.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.proto.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.proto.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.proto.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.proto.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.proto.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.proto.framework.NodeExecStats.Builder builderForValue) { + if (nodeStatsBuilder_ == null) { + ensureNodeStatsIsMutable(); + nodeStats_.add(index, builderForValue.build()); + onChanged(); + } else { + nodeStatsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + public Builder addAllNodeStats( + java.lang.Iterable values) { + if (nodeStatsBuilder_ == null) { + ensureNodeStatsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nodeStats_); + onChanged(); + } else { + nodeStatsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + public Builder clearNodeStats() { + if (nodeStatsBuilder_ == null) { + nodeStats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + 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.proto.framework.NodeExecStats.Builder getNodeStatsBuilder( + int index) { + return getNodeStatsFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + public org.tensorflow.proto.framework.NodeExecStatsOrBuilder getNodeStatsOrBuilder( + int index) { + if (nodeStatsBuilder_ == null) { + return nodeStats_.get(index); } else { + return nodeStatsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + public java.util.List + getNodeStatsOrBuilderList() { + if (nodeStatsBuilder_ != null) { + return nodeStatsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodeStats_); + } + } + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + public org.tensorflow.proto.framework.NodeExecStats.Builder addNodeStatsBuilder() { + return getNodeStatsFieldBuilder().addBuilder( + org.tensorflow.proto.framework.NodeExecStats.getDefaultInstance()); + } + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + public org.tensorflow.proto.framework.NodeExecStats.Builder addNodeStatsBuilder( + int index) { + return getNodeStatsFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.NodeExecStats.getDefaultInstance()); + } + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + public java.util.List + getNodeStatsBuilderList() { + return getNodeStatsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.NodeExecStats, org.tensorflow.proto.framework.NodeExecStats.Builder, org.tensorflow.proto.framework.NodeExecStatsOrBuilder> + getNodeStatsFieldBuilder() { + if (nodeStatsBuilder_ == null) { + nodeStatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.NodeExecStats, org.tensorflow.proto.framework.NodeExecStats.Builder, org.tensorflow.proto.framework.NodeExecStatsOrBuilder>( + nodeStats_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + nodeStats_ = null; + } + return nodeStatsBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.String> threadNames_; + private com.google.protobuf.MapField + internalGetThreadNames() { + if (threadNames_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ThreadNamesDefaultEntryHolder.defaultEntry); + } + return threadNames_; + } + private com.google.protobuf.MapField + internalGetMutableThreadNames() { + onChanged();; + if (threadNames_ == null) { + threadNames_ = com.google.protobuf.MapField.newMapField( + ThreadNamesDefaultEntryHolder.defaultEntry); + } + if (!threadNames_.isMutable()) { + threadNames_ = threadNames_.copy(); + } + return threadNames_; + } + + public int getThreadNamesCount() { + return internalGetThreadNames().getMap().size(); + } + /** + *
+     * Its key is thread id.
+     * 
+ * + * map<uint32, string> thread_names = 3; + */ + + public boolean containsThreadNames( + int key) { + + return internalGetThreadNames().getMap().containsKey(key); + } + /** + * Use {@link #getThreadNamesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getThreadNames() { + return getThreadNamesMap(); + } + /** + *
+     * Its key is thread id.
+     * 
+ * + * map<uint32, string> thread_names = 3; + */ + + public java.util.Map getThreadNamesMap() { + return internalGetThreadNames().getMap(); + } + /** + *
+     * Its key is thread id.
+     * 
+ * + * map<uint32, string> thread_names = 3; + */ + + public java.lang.String getThreadNamesOrDefault( + int key, + java.lang.String defaultValue) { + + java.util.Map map = + internalGetThreadNames().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Its key is thread id.
+     * 
+ * + * map<uint32, string> thread_names = 3; + */ + + public java.lang.String getThreadNamesOrThrow( + int key) { + + java.util.Map map = + internalGetThreadNames().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearThreadNames() { + internalGetMutableThreadNames().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Its key is thread id.
+     * 
+ * + * map<uint32, string> thread_names = 3; + */ + + public Builder removeThreadNames( + int key) { + + internalGetMutableThreadNames().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableThreadNames() { + return internalGetMutableThreadNames().getMutableMap(); + } + /** + *
+     * Its key is thread id.
+     * 
+ * + * map<uint32, string> thread_names = 3; + */ + public Builder putThreadNames( + int key, + java.lang.String value) { + + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableThreadNames().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Its key is thread id.
+     * 
+ * + * map<uint32, string> thread_names = 3; + */ + + public Builder putAllThreadNames( + java.util.Map values) { + internalGetMutableThreadNames().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.DeviceStepStats) + } + + // @@protoc_insertion_point(class_scope:tensorflow.DeviceStepStats) + private static final org.tensorflow.proto.framework.DeviceStepStats DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.DeviceStepStats(); + } + + public static org.tensorflow.proto.framework.DeviceStepStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeviceStepStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeviceStepStats(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DeviceStepStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceStepStatsOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceStepStatsOrBuilder.java new file mode 100644 index 00000000000..d53ab25f2e0 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DeviceStepStatsOrBuilder.java @@ -0,0 +1,97 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/step_stats.proto + +package org.tensorflow.proto.framework; + +public interface DeviceStepStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.DeviceStepStats) + com.google.protobuf.MessageOrBuilder { + + /** + * string device = 1; + */ + java.lang.String getDevice(); + /** + * string device = 1; + */ + com.google.protobuf.ByteString + getDeviceBytes(); + + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + java.util.List + getNodeStatsList(); + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + org.tensorflow.proto.framework.NodeExecStats getNodeStats(int index); + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + int getNodeStatsCount(); + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + java.util.List + getNodeStatsOrBuilderList(); + /** + * repeated .tensorflow.NodeExecStats node_stats = 2; + */ + org.tensorflow.proto.framework.NodeExecStatsOrBuilder getNodeStatsOrBuilder( + int index); + + /** + *
+   * Its key is thread id.
+   * 
+ * + * map<uint32, string> thread_names = 3; + */ + int getThreadNamesCount(); + /** + *
+   * Its key is thread id.
+   * 
+ * + * map<uint32, string> thread_names = 3; + */ + boolean containsThreadNames( + int key); + /** + * Use {@link #getThreadNamesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getThreadNames(); + /** + *
+   * Its key is thread id.
+   * 
+ * + * map<uint32, string> thread_names = 3; + */ + java.util.Map + getThreadNamesMap(); + /** + *
+   * Its key is thread id.
+   * 
+ * + * map<uint32, string> thread_names = 3; + */ + + java.lang.String getThreadNamesOrDefault( + int key, + java.lang.String defaultValue); + /** + *
+   * Its key is thread id.
+   * 
+ * + * map<uint32, string> thread_names = 3; + */ + + java.lang.String getThreadNamesOrThrow( + int key); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DictValue.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DictValue.java new file mode 100644 index 00000000000..e8e6321372f --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DictValue.java @@ -0,0 +1,705 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/struct.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Represents a Python dict keyed by `str`.
+ * The comment on Unicode from Value.string_value applies analogously.
+ * 
+ * + * Protobuf type {@code tensorflow.DictValue} + */ +public final class DictValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.DictValue) + DictValueOrBuilder { +private static final long serialVersionUID = 0L; + // Use DictValue.newBuilder() to construct. + private DictValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DictValue() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DictValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DictValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fields_ = com.google.protobuf.MapField.newMapField( + FieldsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + fields__ = input.readMessage( + FieldsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + fields_.getMutableMap().put( + fields__.getKey(), fields__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_DictValue_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetFields(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_DictValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DictValue.class, org.tensorflow.proto.framework.DictValue.Builder.class); + } + + public static final int FIELDS_FIELD_NUMBER = 1; + private static final class FieldsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, org.tensorflow.proto.framework.StructuredValue> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_DictValue_FieldsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.framework.StructuredValue.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.StructuredValue> fields_; + private com.google.protobuf.MapField + internalGetFields() { + if (fields_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldsDefaultEntryHolder.defaultEntry); + } + return fields_; + } + + public int getFieldsCount() { + return internalGetFields().getMap().size(); + } + /** + * map<string, .tensorflow.StructuredValue> fields = 1; + */ + + public boolean containsFields( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFields().getMap().containsKey(key); + } + /** + * Use {@link #getFieldsMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getFields() { + return getFieldsMap(); + } + /** + * map<string, .tensorflow.StructuredValue> fields = 1; + */ + + public java.util.Map getFieldsMap() { + return internalGetFields().getMap(); + } + /** + * map<string, .tensorflow.StructuredValue> fields = 1; + */ + + public org.tensorflow.proto.framework.StructuredValue getFieldsOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.StructuredValue defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFields().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .tensorflow.StructuredValue> fields = 1; + */ + + public org.tensorflow.proto.framework.StructuredValue getFieldsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFields().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetFields(), + FieldsDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetFields().getMap().entrySet()) { + com.google.protobuf.MapEntry + fields__ = FieldsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, fields__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.DictValue)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.DictValue other = (org.tensorflow.proto.framework.DictValue) obj; + + if (!internalGetFields().equals( + other.internalGetFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetFields().getMap().isEmpty()) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + internalGetFields().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.DictValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DictValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DictValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DictValue 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.proto.framework.DictValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.DictValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.DictValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DictValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DictValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DictValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.DictValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.DictValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.DictValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a Python dict keyed by `str`.
+   * The comment on Unicode from Value.string_value applies analogously.
+   * 
+ * + * Protobuf type {@code tensorflow.DictValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.DictValue) + org.tensorflow.proto.framework.DictValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_DictValue_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetFields(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableFields(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_DictValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.DictValue.class, org.tensorflow.proto.framework.DictValue.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.DictValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableFields().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_DictValue_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DictValue getDefaultInstanceForType() { + return org.tensorflow.proto.framework.DictValue.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.DictValue build() { + org.tensorflow.proto.framework.DictValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DictValue buildPartial() { + org.tensorflow.proto.framework.DictValue result = new org.tensorflow.proto.framework.DictValue(this); + int from_bitField0_ = bitField0_; + result.fields_ = internalGetFields(); + result.fields_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.DictValue) { + return mergeFrom((org.tensorflow.proto.framework.DictValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.DictValue other) { + if (other == org.tensorflow.proto.framework.DictValue.getDefaultInstance()) return this; + internalGetMutableFields().mergeFrom( + other.internalGetFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.DictValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.DictValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.StructuredValue> fields_; + private com.google.protobuf.MapField + internalGetFields() { + if (fields_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldsDefaultEntryHolder.defaultEntry); + } + return fields_; + } + private com.google.protobuf.MapField + internalGetMutableFields() { + onChanged();; + if (fields_ == null) { + fields_ = com.google.protobuf.MapField.newMapField( + FieldsDefaultEntryHolder.defaultEntry); + } + if (!fields_.isMutable()) { + fields_ = fields_.copy(); + } + return fields_; + } + + public int getFieldsCount() { + return internalGetFields().getMap().size(); + } + /** + * map<string, .tensorflow.StructuredValue> fields = 1; + */ + + public boolean containsFields( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFields().getMap().containsKey(key); + } + /** + * Use {@link #getFieldsMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getFields() { + return getFieldsMap(); + } + /** + * map<string, .tensorflow.StructuredValue> fields = 1; + */ + + public java.util.Map getFieldsMap() { + return internalGetFields().getMap(); + } + /** + * map<string, .tensorflow.StructuredValue> fields = 1; + */ + + public org.tensorflow.proto.framework.StructuredValue getFieldsOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.StructuredValue defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFields().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .tensorflow.StructuredValue> fields = 1; + */ + + public org.tensorflow.proto.framework.StructuredValue getFieldsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFields().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearFields() { + internalGetMutableFields().getMutableMap() + .clear(); + return this; + } + /** + * map<string, .tensorflow.StructuredValue> fields = 1; + */ + + public Builder removeFields( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFields().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableFields() { + return internalGetMutableFields().getMutableMap(); + } + /** + * map<string, .tensorflow.StructuredValue> fields = 1; + */ + public Builder putFields( + java.lang.String key, + org.tensorflow.proto.framework.StructuredValue value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFields().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, .tensorflow.StructuredValue> fields = 1; + */ + + public Builder putAllFields( + java.util.Map values) { + internalGetMutableFields().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.DictValue) + } + + // @@protoc_insertion_point(class_scope:tensorflow.DictValue) + private static final org.tensorflow.proto.framework.DictValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.DictValue(); + } + + public static org.tensorflow.proto.framework.DictValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DictValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DictValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.DictValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DictValueOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DictValueOrBuilder.java new file mode 100644 index 00000000000..527fdffc935 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/DictValueOrBuilder.java @@ -0,0 +1,43 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/struct.proto + +package org.tensorflow.proto.framework; + +public interface DictValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.DictValue) + com.google.protobuf.MessageOrBuilder { + + /** + * map<string, .tensorflow.StructuredValue> fields = 1; + */ + int getFieldsCount(); + /** + * map<string, .tensorflow.StructuredValue> fields = 1; + */ + boolean containsFields( + java.lang.String key); + /** + * Use {@link #getFieldsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getFields(); + /** + * map<string, .tensorflow.StructuredValue> fields = 1; + */ + java.util.Map + getFieldsMap(); + /** + * map<string, .tensorflow.StructuredValue> fields = 1; + */ + + org.tensorflow.proto.framework.StructuredValue getFieldsOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.StructuredValue defaultValue); + /** + * map<string, .tensorflow.StructuredValue> fields = 1; + */ + + org.tensorflow.proto.framework.StructuredValue getFieldsOrThrow( + java.lang.String key); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ErrorCodes.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ErrorCodes.java new file mode 100644 index 00000000000..113b8465373 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ErrorCodes.java @@ -0,0 +1,40 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/lib/core/error_codes.proto + +package org.tensorflow.proto.framework; + +public final class ErrorCodes { + private ErrorCodes() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n*tensorflow/core/lib/core/error_codes.p" + + "roto\032*tensorflow/core/protobuf/error_cod" + + "es.protoB \n\036org.tensorflow.proto.framewo" + + "rkP\000b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.ErrorCodesProtos.getDescriptor(), + }); + org.tensorflow.proto.framework.ErrorCodesProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ErrorCodesProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ErrorCodesProtos.java new file mode 100644 index 00000000000..9e424017f74 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ErrorCodesProtos.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/error_codes.proto + +package org.tensorflow.proto.framework; + +public final class ErrorCodesProtos { + private ErrorCodesProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n*tensorflow/core/protobuf/error_codes.p" + + "roto\022\020tensorflow.error*\204\003\n\004Code\022\006\n\002OK\020\000\022" + + "\r\n\tCANCELLED\020\001\022\013\n\007UNKNOWN\020\002\022\024\n\020INVALID_A" + + "RGUMENT\020\003\022\025\n\021DEADLINE_EXCEEDED\020\004\022\r\n\tNOT_" + + "FOUND\020\005\022\022\n\016ALREADY_EXISTS\020\006\022\025\n\021PERMISSIO" + + "N_DENIED\020\007\022\023\n\017UNAUTHENTICATED\020\020\022\026\n\022RESOU" + + "RCE_EXHAUSTED\020\010\022\027\n\023FAILED_PRECONDITION\020\t" + + "\022\013\n\007ABORTED\020\n\022\020\n\014OUT_OF_RANGE\020\013\022\021\n\rUNIMP" + + "LEMENTED\020\014\022\014\n\010INTERNAL\020\r\022\017\n\013UNAVAILABLE\020" + + "\016\022\r\n\tDATA_LOSS\020\017\022K\nGDO_NOT_USE_RESERVED_" + + "FOR_FUTURE_EXPANSION_USE_DEFAULT_IN_SWIT" + + "CH_INSTEAD_\020\024B\201\001\n\036org.tensorflow.proto.f" + + "rameworkB\020ErrorCodesProtosP\001ZHgithub.com" + + "/tensorflow/tensorflow/tensorflow/go/cor" + + "e/core_protos_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionDef.java new file mode 100644 index 00000000000..3437857d610 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionDef.java @@ -0,0 +1,3415 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/function.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * 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.
+ * 
+ * + * Protobuf type {@code tensorflow.FunctionDef} + */ +public final class FunctionDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.FunctionDef) + FunctionDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use FunctionDef.newBuilder() to construct. + private FunctionDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FunctionDef() { + nodeDef_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FunctionDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FunctionDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.tensorflow.proto.framework.OpDef.Builder subBuilder = null; + if (signature_ != null) { + subBuilder = signature_.toBuilder(); + } + signature_ = input.readMessage(org.tensorflow.proto.framework.OpDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(signature_); + signature_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + nodeDef_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + nodeDef_.add( + input.readMessage(org.tensorflow.proto.framework.NodeDef.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + ret_ = com.google.protobuf.MapField.newMapField( + RetDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000010; + } + com.google.protobuf.MapEntry + ret__ = input.readMessage( + RetDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + ret_.getMutableMap().put( + ret__.getKey(), ret__.getValue()); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + attr_ = com.google.protobuf.MapField.newMapField( + AttrDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + attr__ = input.readMessage( + AttrDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + attr_.getMutableMap().put( + attr__.getKey(), attr__.getValue()); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + controlRet_ = com.google.protobuf.MapField.newMapField( + ControlRetDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000020; + } + com.google.protobuf.MapEntry + controlRet__ = input.readMessage( + ControlRetDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + controlRet_.getMutableMap().put( + controlRet__.getKey(), controlRet__.getValue()); + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + argAttr_ = com.google.protobuf.MapField.newMapField( + ArgAttrDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + argAttr__ = input.readMessage( + ArgAttrDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + argAttr_.getMutableMap().put( + argAttr__.getKey(), argAttr__.getValue()); + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + resourceArgUniqueId_ = com.google.protobuf.MapField.newMapField( + ResourceArgUniqueIdDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry + resourceArgUniqueId__ = input.readMessage( + ResourceArgUniqueIdDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + resourceArgUniqueId_.getMutableMap().put( + resourceArgUniqueId__.getKey(), resourceArgUniqueId__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000008) != 0)) { + nodeDef_ = java.util.Collections.unmodifiableList(nodeDef_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 5: + return internalGetAttr(); + case 7: + return internalGetArgAttr(); + case 8: + return internalGetResourceArgUniqueId(); + case 4: + return internalGetRet(); + case 6: + return internalGetControlRet(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.FunctionDef.class, org.tensorflow.proto.framework.FunctionDef.Builder.class); + } + + public interface ArgAttrsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.FunctionDef.ArgAttrs) + com.google.protobuf.MessageOrBuilder { + + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + int getAttrCount(); + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + boolean containsAttr( + java.lang.String key); + /** + * Use {@link #getAttrMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getAttr(); + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + java.util.Map + getAttrMap(); + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + + org.tensorflow.proto.framework.AttrValue getAttrOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue defaultValue); + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + + org.tensorflow.proto.framework.AttrValue getAttrOrThrow( + java.lang.String key); + } + /** + *
+   * Attributes for function arguments. These attributes are the same set of
+   * valid attributes as to _Arg nodes.
+   * 
+ * + * Protobuf type {@code tensorflow.FunctionDef.ArgAttrs} + */ + public static final class ArgAttrs extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.FunctionDef.ArgAttrs) + ArgAttrsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArgAttrs.newBuilder() to construct. + private ArgAttrs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ArgAttrs() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ArgAttrs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ArgAttrs( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + attr_ = com.google.protobuf.MapField.newMapField( + AttrDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + attr__ = input.readMessage( + AttrDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + attr_.getMutableMap().put( + attr__.getKey(), attr__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_ArgAttrs_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetAttr(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_ArgAttrs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.FunctionDef.ArgAttrs.class, org.tensorflow.proto.framework.FunctionDef.ArgAttrs.Builder.class); + } + + public static final int ATTR_FIELD_NUMBER = 1; + private static final class AttrDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, org.tensorflow.proto.framework.AttrValue> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_ArgAttrs_AttrEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.framework.AttrValue.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.AttrValue> attr_; + private com.google.protobuf.MapField + internalGetAttr() { + if (attr_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttrDefaultEntryHolder.defaultEntry); + } + return attr_; + } + + public int getAttrCount() { + return internalGetAttr().getMap().size(); + } + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + + public boolean containsAttr( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetAttr().getMap().containsKey(key); + } + /** + * Use {@link #getAttrMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getAttr() { + return getAttrMap(); + } + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + + public java.util.Map getAttrMap() { + return internalGetAttr().getMap(); + } + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + + public org.tensorflow.proto.framework.AttrValue getAttrOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttr().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + + public org.tensorflow.proto.framework.AttrValue getAttrOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttr().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetAttr(), + AttrDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetAttr().getMap().entrySet()) { + com.google.protobuf.MapEntry + attr__ = AttrDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, attr__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.FunctionDef.ArgAttrs)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.FunctionDef.ArgAttrs other = (org.tensorflow.proto.framework.FunctionDef.ArgAttrs) obj; + + if (!internalGetAttr().equals( + other.internalGetAttr())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetAttr().getMap().isEmpty()) { + hash = (37 * hash) + ATTR_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttr().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.FunctionDef.ArgAttrs parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.FunctionDef.ArgAttrs parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.FunctionDef.ArgAttrs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.FunctionDef.ArgAttrs 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.proto.framework.FunctionDef.ArgAttrs parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.FunctionDef.ArgAttrs parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.FunctionDef.ArgAttrs parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.FunctionDef.ArgAttrs parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.FunctionDef.ArgAttrs parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.FunctionDef.ArgAttrs parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.FunctionDef.ArgAttrs parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.FunctionDef.ArgAttrs parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.FunctionDef.ArgAttrs prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Attributes for function arguments. These attributes are the same set of
+     * valid attributes as to _Arg nodes.
+     * 
+ * + * Protobuf type {@code tensorflow.FunctionDef.ArgAttrs} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.FunctionDef.ArgAttrs) + org.tensorflow.proto.framework.FunctionDef.ArgAttrsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_ArgAttrs_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetAttr(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableAttr(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_ArgAttrs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.FunctionDef.ArgAttrs.class, org.tensorflow.proto.framework.FunctionDef.ArgAttrs.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.FunctionDef.ArgAttrs.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableAttr().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_ArgAttrs_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.FunctionDef.ArgAttrs getDefaultInstanceForType() { + return org.tensorflow.proto.framework.FunctionDef.ArgAttrs.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.FunctionDef.ArgAttrs build() { + org.tensorflow.proto.framework.FunctionDef.ArgAttrs result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.FunctionDef.ArgAttrs buildPartial() { + org.tensorflow.proto.framework.FunctionDef.ArgAttrs result = new org.tensorflow.proto.framework.FunctionDef.ArgAttrs(this); + int from_bitField0_ = bitField0_; + result.attr_ = internalGetAttr(); + result.attr_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.FunctionDef.ArgAttrs) { + return mergeFrom((org.tensorflow.proto.framework.FunctionDef.ArgAttrs)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.FunctionDef.ArgAttrs other) { + if (other == org.tensorflow.proto.framework.FunctionDef.ArgAttrs.getDefaultInstance()) return this; + internalGetMutableAttr().mergeFrom( + other.internalGetAttr()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.FunctionDef.ArgAttrs parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.FunctionDef.ArgAttrs) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.AttrValue> attr_; + private com.google.protobuf.MapField + internalGetAttr() { + if (attr_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttrDefaultEntryHolder.defaultEntry); + } + return attr_; + } + private com.google.protobuf.MapField + internalGetMutableAttr() { + onChanged();; + if (attr_ == null) { + attr_ = com.google.protobuf.MapField.newMapField( + AttrDefaultEntryHolder.defaultEntry); + } + if (!attr_.isMutable()) { + attr_ = attr_.copy(); + } + return attr_; + } + + public int getAttrCount() { + return internalGetAttr().getMap().size(); + } + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + + public boolean containsAttr( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetAttr().getMap().containsKey(key); + } + /** + * Use {@link #getAttrMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getAttr() { + return getAttrMap(); + } + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + + public java.util.Map getAttrMap() { + return internalGetAttr().getMap(); + } + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + + public org.tensorflow.proto.framework.AttrValue getAttrOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttr().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + + public org.tensorflow.proto.framework.AttrValue getAttrOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttr().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAttr() { + internalGetMutableAttr().getMutableMap() + .clear(); + return this; + } + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + + public Builder removeAttr( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableAttr().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableAttr() { + return internalGetMutableAttr().getMutableMap(); + } + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + public Builder putAttr( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableAttr().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + + public Builder putAllAttr( + java.util.Map values) { + internalGetMutableAttr().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.FunctionDef.ArgAttrs) + } + + // @@protoc_insertion_point(class_scope:tensorflow.FunctionDef.ArgAttrs) + private static final org.tensorflow.proto.framework.FunctionDef.ArgAttrs DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.FunctionDef.ArgAttrs(); + } + + public static org.tensorflow.proto.framework.FunctionDef.ArgAttrs getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArgAttrs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ArgAttrs(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.FunctionDef.ArgAttrs getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int SIGNATURE_FIELD_NUMBER = 1; + private org.tensorflow.proto.framework.OpDef signature_; + /** + *
+   * The definition of the function's name, arguments, return values,
+   * attrs etc.
+   * 
+ * + * .tensorflow.OpDef signature = 1; + */ + public boolean hasSignature() { + return signature_ != null; + } + /** + *
+   * The definition of the function's name, arguments, return values,
+   * attrs etc.
+   * 
+ * + * .tensorflow.OpDef signature = 1; + */ + public org.tensorflow.proto.framework.OpDef getSignature() { + return signature_ == null ? org.tensorflow.proto.framework.OpDef.getDefaultInstance() : signature_; + } + /** + *
+   * The definition of the function's name, arguments, return values,
+   * attrs etc.
+   * 
+ * + * .tensorflow.OpDef signature = 1; + */ + public org.tensorflow.proto.framework.OpDefOrBuilder getSignatureOrBuilder() { + return getSignature(); + } + + public static final int ATTR_FIELD_NUMBER = 5; + private static final class AttrDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, org.tensorflow.proto.framework.AttrValue> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_AttrEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.framework.AttrValue.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.AttrValue> attr_; + private com.google.protobuf.MapField + internalGetAttr() { + if (attr_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttrDefaultEntryHolder.defaultEntry); + } + return attr_; + } + + public int getAttrCount() { + return internalGetAttr().getMap().size(); + } + /** + *
+   * Attributes specific to this function definition.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public boolean containsAttr( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetAttr().getMap().containsKey(key); + } + /** + * Use {@link #getAttrMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getAttr() { + return getAttrMap(); + } + /** + *
+   * Attributes specific to this function definition.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public java.util.Map getAttrMap() { + return internalGetAttr().getMap(); + } + /** + *
+   * Attributes specific to this function definition.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public org.tensorflow.proto.framework.AttrValue getAttrOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttr().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Attributes specific to this function definition.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public org.tensorflow.proto.framework.AttrValue getAttrOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttr().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ARG_ATTR_FIELD_NUMBER = 7; + private static final class ArgAttrDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, org.tensorflow.proto.framework.FunctionDef.ArgAttrs> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_ArgAttrEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.UINT32, + 0, + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.framework.FunctionDef.ArgAttrs.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.Integer, org.tensorflow.proto.framework.FunctionDef.ArgAttrs> argAttr_; + private com.google.protobuf.MapField + internalGetArgAttr() { + if (argAttr_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ArgAttrDefaultEntryHolder.defaultEntry); + } + return argAttr_; + } + + public int getArgAttrCount() { + return internalGetArgAttr().getMap().size(); + } + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + + public boolean containsArgAttr( + int key) { + + return internalGetArgAttr().getMap().containsKey(key); + } + /** + * Use {@link #getArgAttrMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getArgAttr() { + return getArgAttrMap(); + } + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + + public java.util.Map getArgAttrMap() { + return internalGetArgAttr().getMap(); + } + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + + public org.tensorflow.proto.framework.FunctionDef.ArgAttrs getArgAttrOrDefault( + int key, + org.tensorflow.proto.framework.FunctionDef.ArgAttrs defaultValue) { + + java.util.Map map = + internalGetArgAttr().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + + public org.tensorflow.proto.framework.FunctionDef.ArgAttrs getArgAttrOrThrow( + int key) { + + java.util.Map map = + internalGetArgAttr().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int RESOURCE_ARG_UNIQUE_ID_FIELD_NUMBER = 8; + private static final class ResourceArgUniqueIdDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, java.lang.Integer> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_ResourceArgUniqueIdEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.UINT32, + 0, + com.google.protobuf.WireFormat.FieldType.UINT32, + 0); + } + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.Integer> resourceArgUniqueId_; + private com.google.protobuf.MapField + internalGetResourceArgUniqueId() { + if (resourceArgUniqueId_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ResourceArgUniqueIdDefaultEntryHolder.defaultEntry); + } + return resourceArgUniqueId_; + } + + public int getResourceArgUniqueIdCount() { + return internalGetResourceArgUniqueId().getMap().size(); + } + /** + *
+   * Unique IDs for each resource argument, used to track aliasing resources. If
+   * Argument A and Argument B alias each other, then
+   * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
+   * If this field is empty, none of the arguments could alias; otherwise, every
+   * resource argument should have an entry in this field.
+   * When instantiated, the unique IDs will be attached to the _Arg nodes'
+   * "_resource_arg_unique_id" attribute.
+   * 
+ * + * map<uint32, uint32> resource_arg_unique_id = 8; + */ + + public boolean containsResourceArgUniqueId( + int key) { + + return internalGetResourceArgUniqueId().getMap().containsKey(key); + } + /** + * Use {@link #getResourceArgUniqueIdMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getResourceArgUniqueId() { + return getResourceArgUniqueIdMap(); + } + /** + *
+   * Unique IDs for each resource argument, used to track aliasing resources. If
+   * Argument A and Argument B alias each other, then
+   * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
+   * If this field is empty, none of the arguments could alias; otherwise, every
+   * resource argument should have an entry in this field.
+   * When instantiated, the unique IDs will be attached to the _Arg nodes'
+   * "_resource_arg_unique_id" attribute.
+   * 
+ * + * map<uint32, uint32> resource_arg_unique_id = 8; + */ + + public java.util.Map getResourceArgUniqueIdMap() { + return internalGetResourceArgUniqueId().getMap(); + } + /** + *
+   * Unique IDs for each resource argument, used to track aliasing resources. If
+   * Argument A and Argument B alias each other, then
+   * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
+   * If this field is empty, none of the arguments could alias; otherwise, every
+   * resource argument should have an entry in this field.
+   * When instantiated, the unique IDs will be attached to the _Arg nodes'
+   * "_resource_arg_unique_id" attribute.
+   * 
+ * + * map<uint32, uint32> resource_arg_unique_id = 8; + */ + + public int getResourceArgUniqueIdOrDefault( + int key, + int defaultValue) { + + java.util.Map map = + internalGetResourceArgUniqueId().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Unique IDs for each resource argument, used to track aliasing resources. If
+   * Argument A and Argument B alias each other, then
+   * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
+   * If this field is empty, none of the arguments could alias; otherwise, every
+   * resource argument should have an entry in this field.
+   * When instantiated, the unique IDs will be attached to the _Arg nodes'
+   * "_resource_arg_unique_id" attribute.
+   * 
+ * + * map<uint32, uint32> resource_arg_unique_id = 8; + */ + + public int getResourceArgUniqueIdOrThrow( + int key) { + + java.util.Map map = + internalGetResourceArgUniqueId().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NODE_DEF_FIELD_NUMBER = 3; + private java.util.List nodeDef_; + /** + *
+   * By convention, "op" in node_def is resolved by consulting with a
+   * user-defined library first. If not resolved, "func" is assumed to
+   * be a builtin op.
+   * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public java.util.List getNodeDefList() { + return nodeDef_; + } + /** + *
+   * By convention, "op" in node_def is resolved by consulting with a
+   * user-defined library first. If not resolved, "func" is assumed to
+   * be a builtin op.
+   * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public java.util.List + getNodeDefOrBuilderList() { + return nodeDef_; + } + /** + *
+   * By convention, "op" in node_def is resolved by consulting with a
+   * user-defined library first. If not resolved, "func" is assumed to
+   * be a builtin op.
+   * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public int getNodeDefCount() { + return nodeDef_.size(); + } + /** + *
+   * By convention, "op" in node_def is resolved by consulting with a
+   * user-defined library first. If not resolved, "func" is assumed to
+   * be a builtin op.
+   * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public org.tensorflow.proto.framework.NodeDef getNodeDef(int index) { + return nodeDef_.get(index); + } + /** + *
+   * By convention, "op" in node_def is resolved by consulting with a
+   * user-defined library first. If not resolved, "func" is assumed to
+   * be a builtin op.
+   * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public org.tensorflow.proto.framework.NodeDefOrBuilder getNodeDefOrBuilder( + int index) { + return nodeDef_.get(index); + } + + public static final int RET_FIELD_NUMBER = 4; + private static final class RetDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_RetEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> ret_; + private com.google.protobuf.MapField + internalGetRet() { + if (ret_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RetDefaultEntryHolder.defaultEntry); + } + return ret_; + } + + public int getRetCount() { + return internalGetRet().getMap().size(); + } + /** + *
+   * A mapping from the output arg names from `signature` to the
+   * outputs from `node_def` that should be returned by the function.
+   * 
+ * + * map<string, string> ret = 4; + */ + + public boolean containsRet( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetRet().getMap().containsKey(key); + } + /** + * Use {@link #getRetMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getRet() { + return getRetMap(); + } + /** + *
+   * A mapping from the output arg names from `signature` to the
+   * outputs from `node_def` that should be returned by the function.
+   * 
+ * + * map<string, string> ret = 4; + */ + + public java.util.Map getRetMap() { + return internalGetRet().getMap(); + } + /** + *
+   * A mapping from the output arg names from `signature` to the
+   * outputs from `node_def` that should be returned by the function.
+   * 
+ * + * map<string, string> ret = 4; + */ + + public java.lang.String getRetOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetRet().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A mapping from the output arg names from `signature` to the
+   * outputs from `node_def` that should be returned by the function.
+   * 
+ * + * map<string, string> ret = 4; + */ + + public java.lang.String getRetOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetRet().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CONTROL_RET_FIELD_NUMBER = 6; + private static final class ControlRetDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_ControlRetEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> controlRet_; + private com.google.protobuf.MapField + internalGetControlRet() { + if (controlRet_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ControlRetDefaultEntryHolder.defaultEntry); + } + return controlRet_; + } + + public int getControlRetCount() { + return internalGetControlRet().getMap().size(); + } + /** + *
+   * A mapping from control output names from `signature` to node names in
+   * `node_def` which should be control outputs of this function.
+   * 
+ * + * map<string, string> control_ret = 6; + */ + + public boolean containsControlRet( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetControlRet().getMap().containsKey(key); + } + /** + * Use {@link #getControlRetMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getControlRet() { + return getControlRetMap(); + } + /** + *
+   * A mapping from control output names from `signature` to node names in
+   * `node_def` which should be control outputs of this function.
+   * 
+ * + * map<string, string> control_ret = 6; + */ + + public java.util.Map getControlRetMap() { + return internalGetControlRet().getMap(); + } + /** + *
+   * A mapping from control output names from `signature` to node names in
+   * `node_def` which should be control outputs of this function.
+   * 
+ * + * map<string, string> control_ret = 6; + */ + + public java.lang.String getControlRetOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetControlRet().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A mapping from control output names from `signature` to node names in
+   * `node_def` which should be control outputs of this function.
+   * 
+ * + * map<string, string> control_ret = 6; + */ + + public java.lang.String getControlRetOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetControlRet().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (signature_ != null) { + output.writeMessage(1, getSignature()); + } + for (int i = 0; i < nodeDef_.size(); i++) { + output.writeMessage(3, nodeDef_.get(i)); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetRet(), + RetDefaultEntryHolder.defaultEntry, + 4); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetAttr(), + AttrDefaultEntryHolder.defaultEntry, + 5); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetControlRet(), + ControlRetDefaultEntryHolder.defaultEntry, + 6); + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetArgAttr(), + ArgAttrDefaultEntryHolder.defaultEntry, + 7); + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetResourceArgUniqueId(), + ResourceArgUniqueIdDefaultEntryHolder.defaultEntry, + 8); + unknownFields.writeTo(output); + } + + @java.lang.Override + 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 < nodeDef_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, nodeDef_.get(i)); + } + for (java.util.Map.Entry entry + : internalGetRet().getMap().entrySet()) { + com.google.protobuf.MapEntry + ret__ = RetDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, ret__); + } + for (java.util.Map.Entry entry + : internalGetAttr().getMap().entrySet()) { + com.google.protobuf.MapEntry + attr__ = AttrDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, attr__); + } + for (java.util.Map.Entry entry + : internalGetControlRet().getMap().entrySet()) { + com.google.protobuf.MapEntry + controlRet__ = ControlRetDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, controlRet__); + } + for (java.util.Map.Entry entry + : internalGetArgAttr().getMap().entrySet()) { + com.google.protobuf.MapEntry + argAttr__ = ArgAttrDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, argAttr__); + } + for (java.util.Map.Entry entry + : internalGetResourceArgUniqueId().getMap().entrySet()) { + com.google.protobuf.MapEntry + resourceArgUniqueId__ = ResourceArgUniqueIdDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, resourceArgUniqueId__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.FunctionDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.FunctionDef other = (org.tensorflow.proto.framework.FunctionDef) obj; + + if (hasSignature() != other.hasSignature()) return false; + if (hasSignature()) { + if (!getSignature() + .equals(other.getSignature())) return false; + } + if (!internalGetAttr().equals( + other.internalGetAttr())) return false; + if (!internalGetArgAttr().equals( + other.internalGetArgAttr())) return false; + if (!internalGetResourceArgUniqueId().equals( + other.internalGetResourceArgUniqueId())) return false; + if (!getNodeDefList() + .equals(other.getNodeDefList())) return false; + if (!internalGetRet().equals( + other.internalGetRet())) return false; + if (!internalGetControlRet().equals( + other.internalGetControlRet())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSignature()) { + hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getSignature().hashCode(); + } + if (!internalGetAttr().getMap().isEmpty()) { + hash = (37 * hash) + ATTR_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttr().hashCode(); + } + if (!internalGetArgAttr().getMap().isEmpty()) { + hash = (37 * hash) + ARG_ATTR_FIELD_NUMBER; + hash = (53 * hash) + internalGetArgAttr().hashCode(); + } + if (!internalGetResourceArgUniqueId().getMap().isEmpty()) { + hash = (37 * hash) + RESOURCE_ARG_UNIQUE_ID_FIELD_NUMBER; + hash = (53 * hash) + internalGetResourceArgUniqueId().hashCode(); + } + if (getNodeDefCount() > 0) { + hash = (37 * hash) + NODE_DEF_FIELD_NUMBER; + hash = (53 * hash) + getNodeDefList().hashCode(); + } + if (!internalGetRet().getMap().isEmpty()) { + hash = (37 * hash) + RET_FIELD_NUMBER; + hash = (53 * hash) + internalGetRet().hashCode(); + } + if (!internalGetControlRet().getMap().isEmpty()) { + hash = (37 * hash) + CONTROL_RET_FIELD_NUMBER; + hash = (53 * hash) + internalGetControlRet().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.FunctionDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.FunctionDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.FunctionDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.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.proto.framework.FunctionDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.FunctionDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.FunctionDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.FunctionDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.FunctionDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.FunctionDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.FunctionDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.FunctionDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.FunctionDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * 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.
+   * 
+ * + * Protobuf type {@code tensorflow.FunctionDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.FunctionDef) + org.tensorflow.proto.framework.FunctionDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 5: + return internalGetAttr(); + case 7: + return internalGetArgAttr(); + case 8: + return internalGetResourceArgUniqueId(); + case 4: + return internalGetRet(); + case 6: + return internalGetControlRet(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 5: + return internalGetMutableAttr(); + case 7: + return internalGetMutableArgAttr(); + case 8: + return internalGetMutableResourceArgUniqueId(); + case 4: + return internalGetMutableRet(); + case 6: + return internalGetMutableControlRet(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.FunctionDef.class, org.tensorflow.proto.framework.FunctionDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.FunctionDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getNodeDefFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (signatureBuilder_ == null) { + signature_ = null; + } else { + signature_ = null; + signatureBuilder_ = null; + } + internalGetMutableAttr().clear(); + internalGetMutableArgAttr().clear(); + internalGetMutableResourceArgUniqueId().clear(); + if (nodeDefBuilder_ == null) { + nodeDef_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + nodeDefBuilder_.clear(); + } + internalGetMutableRet().clear(); + internalGetMutableControlRet().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.FunctionDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.FunctionDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.FunctionDef build() { + org.tensorflow.proto.framework.FunctionDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.FunctionDef buildPartial() { + org.tensorflow.proto.framework.FunctionDef result = new org.tensorflow.proto.framework.FunctionDef(this); + int from_bitField0_ = bitField0_; + if (signatureBuilder_ == null) { + result.signature_ = signature_; + } else { + result.signature_ = signatureBuilder_.build(); + } + result.attr_ = internalGetAttr(); + result.attr_.makeImmutable(); + result.argAttr_ = internalGetArgAttr(); + result.argAttr_.makeImmutable(); + result.resourceArgUniqueId_ = internalGetResourceArgUniqueId(); + result.resourceArgUniqueId_.makeImmutable(); + if (nodeDefBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + nodeDef_ = java.util.Collections.unmodifiableList(nodeDef_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.nodeDef_ = nodeDef_; + } else { + result.nodeDef_ = nodeDefBuilder_.build(); + } + result.ret_ = internalGetRet(); + result.ret_.makeImmutable(); + result.controlRet_ = internalGetControlRet(); + result.controlRet_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.FunctionDef) { + return mergeFrom((org.tensorflow.proto.framework.FunctionDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.FunctionDef other) { + if (other == org.tensorflow.proto.framework.FunctionDef.getDefaultInstance()) return this; + if (other.hasSignature()) { + mergeSignature(other.getSignature()); + } + internalGetMutableAttr().mergeFrom( + other.internalGetAttr()); + internalGetMutableArgAttr().mergeFrom( + other.internalGetArgAttr()); + internalGetMutableResourceArgUniqueId().mergeFrom( + other.internalGetResourceArgUniqueId()); + if (nodeDefBuilder_ == null) { + if (!other.nodeDef_.isEmpty()) { + if (nodeDef_.isEmpty()) { + nodeDef_ = other.nodeDef_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureNodeDefIsMutable(); + nodeDef_.addAll(other.nodeDef_); + } + onChanged(); + } + } else { + if (!other.nodeDef_.isEmpty()) { + if (nodeDefBuilder_.isEmpty()) { + nodeDefBuilder_.dispose(); + nodeDefBuilder_ = null; + nodeDef_ = other.nodeDef_; + bitField0_ = (bitField0_ & ~0x00000008); + nodeDefBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNodeDefFieldBuilder() : null; + } else { + nodeDefBuilder_.addAllMessages(other.nodeDef_); + } + } + } + internalGetMutableRet().mergeFrom( + other.internalGetRet()); + internalGetMutableControlRet().mergeFrom( + other.internalGetControlRet()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.FunctionDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.FunctionDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private org.tensorflow.proto.framework.OpDef signature_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.OpDef, org.tensorflow.proto.framework.OpDef.Builder, org.tensorflow.proto.framework.OpDefOrBuilder> signatureBuilder_; + /** + *
+     * The definition of the function's name, arguments, return values,
+     * attrs etc.
+     * 
+ * + * .tensorflow.OpDef signature = 1; + */ + public boolean hasSignature() { + return signatureBuilder_ != null || signature_ != null; + } + /** + *
+     * The definition of the function's name, arguments, return values,
+     * attrs etc.
+     * 
+ * + * .tensorflow.OpDef signature = 1; + */ + public org.tensorflow.proto.framework.OpDef getSignature() { + if (signatureBuilder_ == null) { + return signature_ == null ? org.tensorflow.proto.framework.OpDef.getDefaultInstance() : signature_; + } else { + return signatureBuilder_.getMessage(); + } + } + /** + *
+     * The definition of the function's name, arguments, return values,
+     * attrs etc.
+     * 
+ * + * .tensorflow.OpDef signature = 1; + */ + public Builder setSignature(org.tensorflow.proto.framework.OpDef value) { + if (signatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + signature_ = value; + onChanged(); + } else { + signatureBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The definition of the function's name, arguments, return values,
+     * attrs etc.
+     * 
+ * + * .tensorflow.OpDef signature = 1; + */ + public Builder setSignature( + org.tensorflow.proto.framework.OpDef.Builder builderForValue) { + if (signatureBuilder_ == null) { + signature_ = builderForValue.build(); + onChanged(); + } else { + signatureBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The definition of the function's name, arguments, return values,
+     * attrs etc.
+     * 
+ * + * .tensorflow.OpDef signature = 1; + */ + public Builder mergeSignature(org.tensorflow.proto.framework.OpDef value) { + if (signatureBuilder_ == null) { + if (signature_ != null) { + signature_ = + org.tensorflow.proto.framework.OpDef.newBuilder(signature_).mergeFrom(value).buildPartial(); + } else { + signature_ = value; + } + onChanged(); + } else { + signatureBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The definition of the function's name, arguments, return values,
+     * attrs etc.
+     * 
+ * + * .tensorflow.OpDef signature = 1; + */ + public Builder clearSignature() { + if (signatureBuilder_ == null) { + signature_ = null; + onChanged(); + } else { + signature_ = null; + signatureBuilder_ = null; + } + + return this; + } + /** + *
+     * The definition of the function's name, arguments, return values,
+     * attrs etc.
+     * 
+ * + * .tensorflow.OpDef signature = 1; + */ + public org.tensorflow.proto.framework.OpDef.Builder getSignatureBuilder() { + + onChanged(); + return getSignatureFieldBuilder().getBuilder(); + } + /** + *
+     * The definition of the function's name, arguments, return values,
+     * attrs etc.
+     * 
+ * + * .tensorflow.OpDef signature = 1; + */ + public org.tensorflow.proto.framework.OpDefOrBuilder getSignatureOrBuilder() { + if (signatureBuilder_ != null) { + return signatureBuilder_.getMessageOrBuilder(); + } else { + return signature_ == null ? + org.tensorflow.proto.framework.OpDef.getDefaultInstance() : signature_; + } + } + /** + *
+     * The definition of the function's name, arguments, return values,
+     * attrs etc.
+     * 
+ * + * .tensorflow.OpDef signature = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.OpDef, org.tensorflow.proto.framework.OpDef.Builder, org.tensorflow.proto.framework.OpDefOrBuilder> + getSignatureFieldBuilder() { + if (signatureBuilder_ == null) { + signatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.OpDef, org.tensorflow.proto.framework.OpDef.Builder, org.tensorflow.proto.framework.OpDefOrBuilder>( + getSignature(), + getParentForChildren(), + isClean()); + signature_ = null; + } + return signatureBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.AttrValue> attr_; + private com.google.protobuf.MapField + internalGetAttr() { + if (attr_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttrDefaultEntryHolder.defaultEntry); + } + return attr_; + } + private com.google.protobuf.MapField + internalGetMutableAttr() { + onChanged();; + if (attr_ == null) { + attr_ = com.google.protobuf.MapField.newMapField( + AttrDefaultEntryHolder.defaultEntry); + } + if (!attr_.isMutable()) { + attr_ = attr_.copy(); + } + return attr_; + } + + public int getAttrCount() { + return internalGetAttr().getMap().size(); + } + /** + *
+     * Attributes specific to this function definition.
+     * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public boolean containsAttr( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetAttr().getMap().containsKey(key); + } + /** + * Use {@link #getAttrMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getAttr() { + return getAttrMap(); + } + /** + *
+     * Attributes specific to this function definition.
+     * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public java.util.Map getAttrMap() { + return internalGetAttr().getMap(); + } + /** + *
+     * Attributes specific to this function definition.
+     * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public org.tensorflow.proto.framework.AttrValue getAttrOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttr().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Attributes specific to this function definition.
+     * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public org.tensorflow.proto.framework.AttrValue getAttrOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttr().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAttr() { + internalGetMutableAttr().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Attributes specific to this function definition.
+     * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public Builder removeAttr( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableAttr().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableAttr() { + return internalGetMutableAttr().getMutableMap(); + } + /** + *
+     * Attributes specific to this function definition.
+     * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + public Builder putAttr( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableAttr().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Attributes specific to this function definition.
+     * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public Builder putAllAttr( + java.util.Map values) { + internalGetMutableAttr().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.Integer, org.tensorflow.proto.framework.FunctionDef.ArgAttrs> argAttr_; + private com.google.protobuf.MapField + internalGetArgAttr() { + if (argAttr_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ArgAttrDefaultEntryHolder.defaultEntry); + } + return argAttr_; + } + private com.google.protobuf.MapField + internalGetMutableArgAttr() { + onChanged();; + if (argAttr_ == null) { + argAttr_ = com.google.protobuf.MapField.newMapField( + ArgAttrDefaultEntryHolder.defaultEntry); + } + if (!argAttr_.isMutable()) { + argAttr_ = argAttr_.copy(); + } + return argAttr_; + } + + public int getArgAttrCount() { + return internalGetArgAttr().getMap().size(); + } + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + + public boolean containsArgAttr( + int key) { + + return internalGetArgAttr().getMap().containsKey(key); + } + /** + * Use {@link #getArgAttrMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getArgAttr() { + return getArgAttrMap(); + } + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + + public java.util.Map getArgAttrMap() { + return internalGetArgAttr().getMap(); + } + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + + public org.tensorflow.proto.framework.FunctionDef.ArgAttrs getArgAttrOrDefault( + int key, + org.tensorflow.proto.framework.FunctionDef.ArgAttrs defaultValue) { + + java.util.Map map = + internalGetArgAttr().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + + public org.tensorflow.proto.framework.FunctionDef.ArgAttrs getArgAttrOrThrow( + int key) { + + java.util.Map map = + internalGetArgAttr().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearArgAttr() { + internalGetMutableArgAttr().getMutableMap() + .clear(); + return this; + } + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + + public Builder removeArgAttr( + int key) { + + internalGetMutableArgAttr().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableArgAttr() { + return internalGetMutableArgAttr().getMutableMap(); + } + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + public Builder putArgAttr( + int key, + org.tensorflow.proto.framework.FunctionDef.ArgAttrs value) { + + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableArgAttr().getMutableMap() + .put(key, value); + return this; + } + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + + public Builder putAllArgAttr( + java.util.Map values) { + internalGetMutableArgAttr().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.Integer> resourceArgUniqueId_; + private com.google.protobuf.MapField + internalGetResourceArgUniqueId() { + if (resourceArgUniqueId_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ResourceArgUniqueIdDefaultEntryHolder.defaultEntry); + } + return resourceArgUniqueId_; + } + private com.google.protobuf.MapField + internalGetMutableResourceArgUniqueId() { + onChanged();; + if (resourceArgUniqueId_ == null) { + resourceArgUniqueId_ = com.google.protobuf.MapField.newMapField( + ResourceArgUniqueIdDefaultEntryHolder.defaultEntry); + } + if (!resourceArgUniqueId_.isMutable()) { + resourceArgUniqueId_ = resourceArgUniqueId_.copy(); + } + return resourceArgUniqueId_; + } + + public int getResourceArgUniqueIdCount() { + return internalGetResourceArgUniqueId().getMap().size(); + } + /** + *
+     * Unique IDs for each resource argument, used to track aliasing resources. If
+     * Argument A and Argument B alias each other, then
+     * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
+     * If this field is empty, none of the arguments could alias; otherwise, every
+     * resource argument should have an entry in this field.
+     * When instantiated, the unique IDs will be attached to the _Arg nodes'
+     * "_resource_arg_unique_id" attribute.
+     * 
+ * + * map<uint32, uint32> resource_arg_unique_id = 8; + */ + + public boolean containsResourceArgUniqueId( + int key) { + + return internalGetResourceArgUniqueId().getMap().containsKey(key); + } + /** + * Use {@link #getResourceArgUniqueIdMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getResourceArgUniqueId() { + return getResourceArgUniqueIdMap(); + } + /** + *
+     * Unique IDs for each resource argument, used to track aliasing resources. If
+     * Argument A and Argument B alias each other, then
+     * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
+     * If this field is empty, none of the arguments could alias; otherwise, every
+     * resource argument should have an entry in this field.
+     * When instantiated, the unique IDs will be attached to the _Arg nodes'
+     * "_resource_arg_unique_id" attribute.
+     * 
+ * + * map<uint32, uint32> resource_arg_unique_id = 8; + */ + + public java.util.Map getResourceArgUniqueIdMap() { + return internalGetResourceArgUniqueId().getMap(); + } + /** + *
+     * Unique IDs for each resource argument, used to track aliasing resources. If
+     * Argument A and Argument B alias each other, then
+     * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
+     * If this field is empty, none of the arguments could alias; otherwise, every
+     * resource argument should have an entry in this field.
+     * When instantiated, the unique IDs will be attached to the _Arg nodes'
+     * "_resource_arg_unique_id" attribute.
+     * 
+ * + * map<uint32, uint32> resource_arg_unique_id = 8; + */ + + public int getResourceArgUniqueIdOrDefault( + int key, + int defaultValue) { + + java.util.Map map = + internalGetResourceArgUniqueId().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Unique IDs for each resource argument, used to track aliasing resources. If
+     * Argument A and Argument B alias each other, then
+     * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
+     * If this field is empty, none of the arguments could alias; otherwise, every
+     * resource argument should have an entry in this field.
+     * When instantiated, the unique IDs will be attached to the _Arg nodes'
+     * "_resource_arg_unique_id" attribute.
+     * 
+ * + * map<uint32, uint32> resource_arg_unique_id = 8; + */ + + public int getResourceArgUniqueIdOrThrow( + int key) { + + java.util.Map map = + internalGetResourceArgUniqueId().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearResourceArgUniqueId() { + internalGetMutableResourceArgUniqueId().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Unique IDs for each resource argument, used to track aliasing resources. If
+     * Argument A and Argument B alias each other, then
+     * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
+     * If this field is empty, none of the arguments could alias; otherwise, every
+     * resource argument should have an entry in this field.
+     * When instantiated, the unique IDs will be attached to the _Arg nodes'
+     * "_resource_arg_unique_id" attribute.
+     * 
+ * + * map<uint32, uint32> resource_arg_unique_id = 8; + */ + + public Builder removeResourceArgUniqueId( + int key) { + + internalGetMutableResourceArgUniqueId().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableResourceArgUniqueId() { + return internalGetMutableResourceArgUniqueId().getMutableMap(); + } + /** + *
+     * Unique IDs for each resource argument, used to track aliasing resources. If
+     * Argument A and Argument B alias each other, then
+     * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
+     * If this field is empty, none of the arguments could alias; otherwise, every
+     * resource argument should have an entry in this field.
+     * When instantiated, the unique IDs will be attached to the _Arg nodes'
+     * "_resource_arg_unique_id" attribute.
+     * 
+ * + * map<uint32, uint32> resource_arg_unique_id = 8; + */ + public Builder putResourceArgUniqueId( + int key, + int value) { + + + internalGetMutableResourceArgUniqueId().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Unique IDs for each resource argument, used to track aliasing resources. If
+     * Argument A and Argument B alias each other, then
+     * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
+     * If this field is empty, none of the arguments could alias; otherwise, every
+     * resource argument should have an entry in this field.
+     * When instantiated, the unique IDs will be attached to the _Arg nodes'
+     * "_resource_arg_unique_id" attribute.
+     * 
+ * + * map<uint32, uint32> resource_arg_unique_id = 8; + */ + + public Builder putAllResourceArgUniqueId( + java.util.Map values) { + internalGetMutableResourceArgUniqueId().getMutableMap() + .putAll(values); + return this; + } + + private java.util.List nodeDef_ = + java.util.Collections.emptyList(); + private void ensureNodeDefIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + nodeDef_ = new java.util.ArrayList(nodeDef_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.NodeDef, org.tensorflow.proto.framework.NodeDef.Builder, org.tensorflow.proto.framework.NodeDefOrBuilder> nodeDefBuilder_; + + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public java.util.List getNodeDefList() { + if (nodeDefBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodeDef_); + } else { + return nodeDefBuilder_.getMessageList(); + } + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public int getNodeDefCount() { + if (nodeDefBuilder_ == null) { + return nodeDef_.size(); + } else { + return nodeDefBuilder_.getCount(); + } + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public org.tensorflow.proto.framework.NodeDef getNodeDef(int index) { + if (nodeDefBuilder_ == null) { + return nodeDef_.get(index); + } else { + return nodeDefBuilder_.getMessage(index); + } + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public Builder setNodeDef( + int index, org.tensorflow.proto.framework.NodeDef value) { + if (nodeDefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeDefIsMutable(); + nodeDef_.set(index, value); + onChanged(); + } else { + nodeDefBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public Builder setNodeDef( + int index, org.tensorflow.proto.framework.NodeDef.Builder builderForValue) { + if (nodeDefBuilder_ == null) { + ensureNodeDefIsMutable(); + nodeDef_.set(index, builderForValue.build()); + onChanged(); + } else { + nodeDefBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public Builder addNodeDef(org.tensorflow.proto.framework.NodeDef value) { + if (nodeDefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeDefIsMutable(); + nodeDef_.add(value); + onChanged(); + } else { + nodeDefBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public Builder addNodeDef( + int index, org.tensorflow.proto.framework.NodeDef value) { + if (nodeDefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeDefIsMutable(); + nodeDef_.add(index, value); + onChanged(); + } else { + nodeDefBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public Builder addNodeDef( + org.tensorflow.proto.framework.NodeDef.Builder builderForValue) { + if (nodeDefBuilder_ == null) { + ensureNodeDefIsMutable(); + nodeDef_.add(builderForValue.build()); + onChanged(); + } else { + nodeDefBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public Builder addNodeDef( + int index, org.tensorflow.proto.framework.NodeDef.Builder builderForValue) { + if (nodeDefBuilder_ == null) { + ensureNodeDefIsMutable(); + nodeDef_.add(index, builderForValue.build()); + onChanged(); + } else { + nodeDefBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public Builder addAllNodeDef( + java.lang.Iterable values) { + if (nodeDefBuilder_ == null) { + ensureNodeDefIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nodeDef_); + onChanged(); + } else { + nodeDefBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public Builder clearNodeDef() { + if (nodeDefBuilder_ == null) { + nodeDef_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + nodeDefBuilder_.clear(); + } + return this; + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public Builder removeNodeDef(int index) { + if (nodeDefBuilder_ == null) { + ensureNodeDefIsMutable(); + nodeDef_.remove(index); + onChanged(); + } else { + nodeDefBuilder_.remove(index); + } + return this; + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public org.tensorflow.proto.framework.NodeDef.Builder getNodeDefBuilder( + int index) { + return getNodeDefFieldBuilder().getBuilder(index); + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public org.tensorflow.proto.framework.NodeDefOrBuilder getNodeDefOrBuilder( + int index) { + if (nodeDefBuilder_ == null) { + return nodeDef_.get(index); } else { + return nodeDefBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public java.util.List + getNodeDefOrBuilderList() { + if (nodeDefBuilder_ != null) { + return nodeDefBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodeDef_); + } + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public org.tensorflow.proto.framework.NodeDef.Builder addNodeDefBuilder() { + return getNodeDefFieldBuilder().addBuilder( + org.tensorflow.proto.framework.NodeDef.getDefaultInstance()); + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public org.tensorflow.proto.framework.NodeDef.Builder addNodeDefBuilder( + int index) { + return getNodeDefFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.NodeDef.getDefaultInstance()); + } + /** + *
+     * By convention, "op" in node_def is resolved by consulting with a
+     * user-defined library first. If not resolved, "func" is assumed to
+     * be a builtin op.
+     * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + public java.util.List + getNodeDefBuilderList() { + return getNodeDefFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.NodeDef, org.tensorflow.proto.framework.NodeDef.Builder, org.tensorflow.proto.framework.NodeDefOrBuilder> + getNodeDefFieldBuilder() { + if (nodeDefBuilder_ == null) { + nodeDefBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.NodeDef, org.tensorflow.proto.framework.NodeDef.Builder, org.tensorflow.proto.framework.NodeDefOrBuilder>( + nodeDef_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + nodeDef_ = null; + } + return nodeDefBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> ret_; + private com.google.protobuf.MapField + internalGetRet() { + if (ret_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RetDefaultEntryHolder.defaultEntry); + } + return ret_; + } + private com.google.protobuf.MapField + internalGetMutableRet() { + onChanged();; + if (ret_ == null) { + ret_ = com.google.protobuf.MapField.newMapField( + RetDefaultEntryHolder.defaultEntry); + } + if (!ret_.isMutable()) { + ret_ = ret_.copy(); + } + return ret_; + } + + public int getRetCount() { + return internalGetRet().getMap().size(); + } + /** + *
+     * A mapping from the output arg names from `signature` to the
+     * outputs from `node_def` that should be returned by the function.
+     * 
+ * + * map<string, string> ret = 4; + */ + + public boolean containsRet( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetRet().getMap().containsKey(key); + } + /** + * Use {@link #getRetMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getRet() { + return getRetMap(); + } + /** + *
+     * A mapping from the output arg names from `signature` to the
+     * outputs from `node_def` that should be returned by the function.
+     * 
+ * + * map<string, string> ret = 4; + */ + + public java.util.Map getRetMap() { + return internalGetRet().getMap(); + } + /** + *
+     * A mapping from the output arg names from `signature` to the
+     * outputs from `node_def` that should be returned by the function.
+     * 
+ * + * map<string, string> ret = 4; + */ + + public java.lang.String getRetOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetRet().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A mapping from the output arg names from `signature` to the
+     * outputs from `node_def` that should be returned by the function.
+     * 
+ * + * map<string, string> ret = 4; + */ + + public java.lang.String getRetOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetRet().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearRet() { + internalGetMutableRet().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A mapping from the output arg names from `signature` to the
+     * outputs from `node_def` that should be returned by the function.
+     * 
+ * + * map<string, string> ret = 4; + */ + + public Builder removeRet( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableRet().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableRet() { + return internalGetMutableRet().getMutableMap(); + } + /** + *
+     * A mapping from the output arg names from `signature` to the
+     * outputs from `node_def` that should be returned by the function.
+     * 
+ * + * map<string, string> ret = 4; + */ + public Builder putRet( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableRet().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * A mapping from the output arg names from `signature` to the
+     * outputs from `node_def` that should be returned by the function.
+     * 
+ * + * map<string, string> ret = 4; + */ + + public Builder putAllRet( + java.util.Map values) { + internalGetMutableRet().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> controlRet_; + private com.google.protobuf.MapField + internalGetControlRet() { + if (controlRet_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ControlRetDefaultEntryHolder.defaultEntry); + } + return controlRet_; + } + private com.google.protobuf.MapField + internalGetMutableControlRet() { + onChanged();; + if (controlRet_ == null) { + controlRet_ = com.google.protobuf.MapField.newMapField( + ControlRetDefaultEntryHolder.defaultEntry); + } + if (!controlRet_.isMutable()) { + controlRet_ = controlRet_.copy(); + } + return controlRet_; + } + + public int getControlRetCount() { + return internalGetControlRet().getMap().size(); + } + /** + *
+     * A mapping from control output names from `signature` to node names in
+     * `node_def` which should be control outputs of this function.
+     * 
+ * + * map<string, string> control_ret = 6; + */ + + public boolean containsControlRet( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetControlRet().getMap().containsKey(key); + } + /** + * Use {@link #getControlRetMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getControlRet() { + return getControlRetMap(); + } + /** + *
+     * A mapping from control output names from `signature` to node names in
+     * `node_def` which should be control outputs of this function.
+     * 
+ * + * map<string, string> control_ret = 6; + */ + + public java.util.Map getControlRetMap() { + return internalGetControlRet().getMap(); + } + /** + *
+     * A mapping from control output names from `signature` to node names in
+     * `node_def` which should be control outputs of this function.
+     * 
+ * + * map<string, string> control_ret = 6; + */ + + public java.lang.String getControlRetOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetControlRet().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A mapping from control output names from `signature` to node names in
+     * `node_def` which should be control outputs of this function.
+     * 
+ * + * map<string, string> control_ret = 6; + */ + + public java.lang.String getControlRetOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetControlRet().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearControlRet() { + internalGetMutableControlRet().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A mapping from control output names from `signature` to node names in
+     * `node_def` which should be control outputs of this function.
+     * 
+ * + * map<string, string> control_ret = 6; + */ + + public Builder removeControlRet( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableControlRet().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableControlRet() { + return internalGetMutableControlRet().getMutableMap(); + } + /** + *
+     * A mapping from control output names from `signature` to node names in
+     * `node_def` which should be control outputs of this function.
+     * 
+ * + * map<string, string> control_ret = 6; + */ + public Builder putControlRet( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableControlRet().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * A mapping from control output names from `signature` to node names in
+     * `node_def` which should be control outputs of this function.
+     * 
+ * + * map<string, string> control_ret = 6; + */ + + public Builder putAllControlRet( + java.util.Map values) { + internalGetMutableControlRet().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.FunctionDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.FunctionDef) + private static final org.tensorflow.proto.framework.FunctionDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.FunctionDef(); + } + + public static org.tensorflow.proto.framework.FunctionDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FunctionDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FunctionDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.FunctionDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionDefLibrary.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionDefLibrary.java new file mode 100644 index 00000000000..a4ad715f17c --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionDefLibrary.java @@ -0,0 +1,1116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/function.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * A library is a set of named functions.
+ * 
+ * + * Protobuf type {@code tensorflow.FunctionDefLibrary} + */ +public final class FunctionDefLibrary extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.FunctionDefLibrary) + FunctionDefLibraryOrBuilder { +private static final long serialVersionUID = 0L; + // Use FunctionDefLibrary.newBuilder() to construct. + private FunctionDefLibrary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FunctionDefLibrary() { + function_ = java.util.Collections.emptyList(); + gradient_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FunctionDefLibrary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FunctionDefLibrary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + function_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + function_.add( + input.readMessage(org.tensorflow.proto.framework.FunctionDef.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + gradient_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + gradient_.add( + input.readMessage(org.tensorflow.proto.framework.GradientDef.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + function_ = java.util.Collections.unmodifiableList(function_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + gradient_ = java.util.Collections.unmodifiableList(gradient_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.FunctionDefLibrary.class, org.tensorflow.proto.framework.FunctionDefLibrary.Builder.class); + } + + public static final int FUNCTION_FIELD_NUMBER = 1; + private java.util.List function_; + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public java.util.List getFunctionList() { + return function_; + } + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public java.util.List + getFunctionOrBuilderList() { + return function_; + } + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public int getFunctionCount() { + return function_.size(); + } + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public org.tensorflow.proto.framework.FunctionDef getFunction(int index) { + return function_.get(index); + } + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public org.tensorflow.proto.framework.FunctionDefOrBuilder getFunctionOrBuilder( + int index) { + return function_.get(index); + } + + public static final int GRADIENT_FIELD_NUMBER = 2; + private java.util.List gradient_; + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public java.util.List getGradientList() { + return gradient_; + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public java.util.List + getGradientOrBuilderList() { + return gradient_; + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public int getGradientCount() { + return gradient_.size(); + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public org.tensorflow.proto.framework.GradientDef getGradient(int index) { + return gradient_.get(index); + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public org.tensorflow.proto.framework.GradientDefOrBuilder getGradientOrBuilder( + int index) { + return gradient_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < function_.size(); i++) { + output.writeMessage(1, function_.get(i)); + } + for (int i = 0; i < gradient_.size(); i++) { + output.writeMessage(2, gradient_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + 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)); + } + for (int i = 0; i < gradient_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, gradient_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.FunctionDefLibrary)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.FunctionDefLibrary other = (org.tensorflow.proto.framework.FunctionDefLibrary) obj; + + if (!getFunctionList() + .equals(other.getFunctionList())) return false; + if (!getGradientList() + .equals(other.getGradientList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFunctionCount() > 0) { + hash = (37 * hash) + FUNCTION_FIELD_NUMBER; + hash = (53 * hash) + getFunctionList().hashCode(); + } + if (getGradientCount() > 0) { + hash = (37 * hash) + GRADIENT_FIELD_NUMBER; + hash = (53 * hash) + getGradientList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.FunctionDefLibrary parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.FunctionDefLibrary parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.FunctionDefLibrary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.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.proto.framework.FunctionDefLibrary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.FunctionDefLibrary parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.FunctionDefLibrary parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.FunctionDefLibrary parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.FunctionDefLibrary parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.FunctionDefLibrary parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.FunctionDefLibrary parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.FunctionDefLibrary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.FunctionDefLibrary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A library is a set of named functions.
+   * 
+ * + * Protobuf type {@code tensorflow.FunctionDefLibrary} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.FunctionDefLibrary) + org.tensorflow.proto.framework.FunctionDefLibraryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.FunctionDefLibrary.class, org.tensorflow.proto.framework.FunctionDefLibrary.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.FunctionDefLibrary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFunctionFieldBuilder(); + getGradientFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (functionBuilder_ == null) { + function_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + functionBuilder_.clear(); + } + if (gradientBuilder_ == null) { + gradient_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + gradientBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.FunctionDefLibrary getDefaultInstanceForType() { + return org.tensorflow.proto.framework.FunctionDefLibrary.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.FunctionDefLibrary build() { + org.tensorflow.proto.framework.FunctionDefLibrary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.FunctionDefLibrary buildPartial() { + org.tensorflow.proto.framework.FunctionDefLibrary result = new org.tensorflow.proto.framework.FunctionDefLibrary(this); + int from_bitField0_ = bitField0_; + if (functionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + function_ = java.util.Collections.unmodifiableList(function_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.function_ = function_; + } else { + result.function_ = functionBuilder_.build(); + } + if (gradientBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + gradient_ = java.util.Collections.unmodifiableList(gradient_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.gradient_ = gradient_; + } else { + result.gradient_ = gradientBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.FunctionDefLibrary) { + return mergeFrom((org.tensorflow.proto.framework.FunctionDefLibrary)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.FunctionDefLibrary other) { + if (other == org.tensorflow.proto.framework.FunctionDefLibrary.getDefaultInstance()) return this; + if (functionBuilder_ == null) { + if (!other.function_.isEmpty()) { + if (function_.isEmpty()) { + function_ = other.function_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFunctionIsMutable(); + function_.addAll(other.function_); + } + onChanged(); + } + } else { + if (!other.function_.isEmpty()) { + if (functionBuilder_.isEmpty()) { + functionBuilder_.dispose(); + functionBuilder_ = null; + function_ = other.function_; + bitField0_ = (bitField0_ & ~0x00000001); + functionBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFunctionFieldBuilder() : null; + } else { + functionBuilder_.addAllMessages(other.function_); + } + } + } + if (gradientBuilder_ == null) { + if (!other.gradient_.isEmpty()) { + if (gradient_.isEmpty()) { + gradient_ = other.gradient_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureGradientIsMutable(); + gradient_.addAll(other.gradient_); + } + onChanged(); + } + } else { + if (!other.gradient_.isEmpty()) { + if (gradientBuilder_.isEmpty()) { + gradientBuilder_.dispose(); + gradientBuilder_ = null; + gradient_ = other.gradient_; + bitField0_ = (bitField0_ & ~0x00000002); + gradientBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGradientFieldBuilder() : null; + } else { + gradientBuilder_.addAllMessages(other.gradient_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.FunctionDefLibrary parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.FunctionDefLibrary) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List function_ = + java.util.Collections.emptyList(); + private void ensureFunctionIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + function_ = new java.util.ArrayList(function_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.FunctionDef, org.tensorflow.proto.framework.FunctionDef.Builder, org.tensorflow.proto.framework.FunctionDefOrBuilder> functionBuilder_; + + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public java.util.List getFunctionList() { + if (functionBuilder_ == null) { + return java.util.Collections.unmodifiableList(function_); + } else { + return functionBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public int getFunctionCount() { + if (functionBuilder_ == null) { + return function_.size(); + } else { + return functionBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public org.tensorflow.proto.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.proto.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.proto.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.proto.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.proto.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.proto.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.proto.framework.FunctionDef.Builder builderForValue) { + if (functionBuilder_ == null) { + ensureFunctionIsMutable(); + function_.add(index, builderForValue.build()); + onChanged(); + } else { + functionBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public Builder addAllFunction( + java.lang.Iterable values) { + if (functionBuilder_ == null) { + ensureFunctionIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, function_); + onChanged(); + } else { + functionBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public Builder clearFunction() { + if (functionBuilder_ == null) { + function_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + functionBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public Builder removeFunction(int index) { + if (functionBuilder_ == null) { + ensureFunctionIsMutable(); + function_.remove(index); + onChanged(); + } else { + functionBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public org.tensorflow.proto.framework.FunctionDef.Builder getFunctionBuilder( + int index) { + return getFunctionFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public org.tensorflow.proto.framework.FunctionDefOrBuilder getFunctionOrBuilder( + int index) { + if (functionBuilder_ == null) { + return function_.get(index); } else { + return functionBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public java.util.List + getFunctionOrBuilderList() { + if (functionBuilder_ != null) { + return functionBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(function_); + } + } + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public org.tensorflow.proto.framework.FunctionDef.Builder addFunctionBuilder() { + return getFunctionFieldBuilder().addBuilder( + org.tensorflow.proto.framework.FunctionDef.getDefaultInstance()); + } + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public org.tensorflow.proto.framework.FunctionDef.Builder addFunctionBuilder( + int index) { + return getFunctionFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.FunctionDef.getDefaultInstance()); + } + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + public java.util.List + getFunctionBuilderList() { + return getFunctionFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.FunctionDef, org.tensorflow.proto.framework.FunctionDef.Builder, org.tensorflow.proto.framework.FunctionDefOrBuilder> + getFunctionFieldBuilder() { + if (functionBuilder_ == null) { + functionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.FunctionDef, org.tensorflow.proto.framework.FunctionDef.Builder, org.tensorflow.proto.framework.FunctionDefOrBuilder>( + function_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + function_ = null; + } + return functionBuilder_; + } + + private java.util.List gradient_ = + java.util.Collections.emptyList(); + private void ensureGradientIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + gradient_ = new java.util.ArrayList(gradient_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GradientDef, org.tensorflow.proto.framework.GradientDef.Builder, org.tensorflow.proto.framework.GradientDefOrBuilder> gradientBuilder_; + + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public java.util.List getGradientList() { + if (gradientBuilder_ == null) { + return java.util.Collections.unmodifiableList(gradient_); + } else { + return gradientBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public int getGradientCount() { + if (gradientBuilder_ == null) { + return gradient_.size(); + } else { + return gradientBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public org.tensorflow.proto.framework.GradientDef getGradient(int index) { + if (gradientBuilder_ == null) { + return gradient_.get(index); + } else { + return gradientBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public Builder setGradient( + int index, org.tensorflow.proto.framework.GradientDef value) { + if (gradientBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGradientIsMutable(); + gradient_.set(index, value); + onChanged(); + } else { + gradientBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public Builder setGradient( + int index, org.tensorflow.proto.framework.GradientDef.Builder builderForValue) { + if (gradientBuilder_ == null) { + ensureGradientIsMutable(); + gradient_.set(index, builderForValue.build()); + onChanged(); + } else { + gradientBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public Builder addGradient(org.tensorflow.proto.framework.GradientDef value) { + if (gradientBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGradientIsMutable(); + gradient_.add(value); + onChanged(); + } else { + gradientBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public Builder addGradient( + int index, org.tensorflow.proto.framework.GradientDef value) { + if (gradientBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGradientIsMutable(); + gradient_.add(index, value); + onChanged(); + } else { + gradientBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public Builder addGradient( + org.tensorflow.proto.framework.GradientDef.Builder builderForValue) { + if (gradientBuilder_ == null) { + ensureGradientIsMutable(); + gradient_.add(builderForValue.build()); + onChanged(); + } else { + gradientBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public Builder addGradient( + int index, org.tensorflow.proto.framework.GradientDef.Builder builderForValue) { + if (gradientBuilder_ == null) { + ensureGradientIsMutable(); + gradient_.add(index, builderForValue.build()); + onChanged(); + } else { + gradientBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public Builder addAllGradient( + java.lang.Iterable values) { + if (gradientBuilder_ == null) { + ensureGradientIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, gradient_); + onChanged(); + } else { + gradientBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public Builder clearGradient() { + if (gradientBuilder_ == null) { + gradient_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + gradientBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public Builder removeGradient(int index) { + if (gradientBuilder_ == null) { + ensureGradientIsMutable(); + gradient_.remove(index); + onChanged(); + } else { + gradientBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public org.tensorflow.proto.framework.GradientDef.Builder getGradientBuilder( + int index) { + return getGradientFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public org.tensorflow.proto.framework.GradientDefOrBuilder getGradientOrBuilder( + int index) { + if (gradientBuilder_ == null) { + return gradient_.get(index); } else { + return gradientBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public java.util.List + getGradientOrBuilderList() { + if (gradientBuilder_ != null) { + return gradientBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(gradient_); + } + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public org.tensorflow.proto.framework.GradientDef.Builder addGradientBuilder() { + return getGradientFieldBuilder().addBuilder( + org.tensorflow.proto.framework.GradientDef.getDefaultInstance()); + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public org.tensorflow.proto.framework.GradientDef.Builder addGradientBuilder( + int index) { + return getGradientFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.GradientDef.getDefaultInstance()); + } + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + public java.util.List + getGradientBuilderList() { + return getGradientFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GradientDef, org.tensorflow.proto.framework.GradientDef.Builder, org.tensorflow.proto.framework.GradientDefOrBuilder> + getGradientFieldBuilder() { + if (gradientBuilder_ == null) { + gradientBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GradientDef, org.tensorflow.proto.framework.GradientDef.Builder, org.tensorflow.proto.framework.GradientDefOrBuilder>( + gradient_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + gradient_ = null; + } + return gradientBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.FunctionDefLibrary) + } + + // @@protoc_insertion_point(class_scope:tensorflow.FunctionDefLibrary) + private static final org.tensorflow.proto.framework.FunctionDefLibrary DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.FunctionDefLibrary(); + } + + public static org.tensorflow.proto.framework.FunctionDefLibrary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FunctionDefLibrary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FunctionDefLibrary(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.FunctionDefLibrary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionDefLibraryOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionDefLibraryOrBuilder.java new file mode 100644 index 00000000000..cfb61e977ba --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionDefLibraryOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/function.proto + +package org.tensorflow.proto.framework; + +public interface FunctionDefLibraryOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.FunctionDefLibrary) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + java.util.List + getFunctionList(); + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + org.tensorflow.proto.framework.FunctionDef getFunction(int index); + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + int getFunctionCount(); + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + java.util.List + getFunctionOrBuilderList(); + /** + * repeated .tensorflow.FunctionDef function = 1; + */ + org.tensorflow.proto.framework.FunctionDefOrBuilder getFunctionOrBuilder( + int index); + + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + java.util.List + getGradientList(); + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + org.tensorflow.proto.framework.GradientDef getGradient(int index); + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + int getGradientCount(); + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + java.util.List + getGradientOrBuilderList(); + /** + * repeated .tensorflow.GradientDef gradient = 2; + */ + org.tensorflow.proto.framework.GradientDefOrBuilder getGradientOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionDefOrBuilder.java new file mode 100644 index 00000000000..ebae0875f50 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionDefOrBuilder.java @@ -0,0 +1,381 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/function.proto + +package org.tensorflow.proto.framework; + +public interface FunctionDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.FunctionDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The definition of the function's name, arguments, return values,
+   * attrs etc.
+   * 
+ * + * .tensorflow.OpDef signature = 1; + */ + boolean hasSignature(); + /** + *
+   * The definition of the function's name, arguments, return values,
+   * attrs etc.
+   * 
+ * + * .tensorflow.OpDef signature = 1; + */ + org.tensorflow.proto.framework.OpDef getSignature(); + /** + *
+   * The definition of the function's name, arguments, return values,
+   * attrs etc.
+   * 
+ * + * .tensorflow.OpDef signature = 1; + */ + org.tensorflow.proto.framework.OpDefOrBuilder getSignatureOrBuilder(); + + /** + *
+   * Attributes specific to this function definition.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + int getAttrCount(); + /** + *
+   * Attributes specific to this function definition.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + boolean containsAttr( + java.lang.String key); + /** + * Use {@link #getAttrMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getAttr(); + /** + *
+   * Attributes specific to this function definition.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + java.util.Map + getAttrMap(); + /** + *
+   * Attributes specific to this function definition.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + org.tensorflow.proto.framework.AttrValue getAttrOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue defaultValue); + /** + *
+   * Attributes specific to this function definition.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + org.tensorflow.proto.framework.AttrValue getAttrOrThrow( + java.lang.String key); + + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + int getArgAttrCount(); + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + boolean containsArgAttr( + int key); + /** + * Use {@link #getArgAttrMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getArgAttr(); + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + java.util.Map + getArgAttrMap(); + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + + org.tensorflow.proto.framework.FunctionDef.ArgAttrs getArgAttrOrDefault( + int key, + org.tensorflow.proto.framework.FunctionDef.ArgAttrs defaultValue); + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + + org.tensorflow.proto.framework.FunctionDef.ArgAttrs getArgAttrOrThrow( + int key); + + /** + *
+   * Unique IDs for each resource argument, used to track aliasing resources. If
+   * Argument A and Argument B alias each other, then
+   * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
+   * If this field is empty, none of the arguments could alias; otherwise, every
+   * resource argument should have an entry in this field.
+   * When instantiated, the unique IDs will be attached to the _Arg nodes'
+   * "_resource_arg_unique_id" attribute.
+   * 
+ * + * map<uint32, uint32> resource_arg_unique_id = 8; + */ + int getResourceArgUniqueIdCount(); + /** + *
+   * Unique IDs for each resource argument, used to track aliasing resources. If
+   * Argument A and Argument B alias each other, then
+   * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
+   * If this field is empty, none of the arguments could alias; otherwise, every
+   * resource argument should have an entry in this field.
+   * When instantiated, the unique IDs will be attached to the _Arg nodes'
+   * "_resource_arg_unique_id" attribute.
+   * 
+ * + * map<uint32, uint32> resource_arg_unique_id = 8; + */ + boolean containsResourceArgUniqueId( + int key); + /** + * Use {@link #getResourceArgUniqueIdMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getResourceArgUniqueId(); + /** + *
+   * Unique IDs for each resource argument, used to track aliasing resources. If
+   * Argument A and Argument B alias each other, then
+   * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
+   * If this field is empty, none of the arguments could alias; otherwise, every
+   * resource argument should have an entry in this field.
+   * When instantiated, the unique IDs will be attached to the _Arg nodes'
+   * "_resource_arg_unique_id" attribute.
+   * 
+ * + * map<uint32, uint32> resource_arg_unique_id = 8; + */ + java.util.Map + getResourceArgUniqueIdMap(); + /** + *
+   * Unique IDs for each resource argument, used to track aliasing resources. If
+   * Argument A and Argument B alias each other, then
+   * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
+   * If this field is empty, none of the arguments could alias; otherwise, every
+   * resource argument should have an entry in this field.
+   * When instantiated, the unique IDs will be attached to the _Arg nodes'
+   * "_resource_arg_unique_id" attribute.
+   * 
+ * + * map<uint32, uint32> resource_arg_unique_id = 8; + */ + + int getResourceArgUniqueIdOrDefault( + int key, + int defaultValue); + /** + *
+   * Unique IDs for each resource argument, used to track aliasing resources. If
+   * Argument A and Argument B alias each other, then
+   * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
+   * If this field is empty, none of the arguments could alias; otherwise, every
+   * resource argument should have an entry in this field.
+   * When instantiated, the unique IDs will be attached to the _Arg nodes'
+   * "_resource_arg_unique_id" attribute.
+   * 
+ * + * map<uint32, uint32> resource_arg_unique_id = 8; + */ + + int getResourceArgUniqueIdOrThrow( + int key); + + /** + *
+   * By convention, "op" in node_def is resolved by consulting with a
+   * user-defined library first. If not resolved, "func" is assumed to
+   * be a builtin op.
+   * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + java.util.List + getNodeDefList(); + /** + *
+   * By convention, "op" in node_def is resolved by consulting with a
+   * user-defined library first. If not resolved, "func" is assumed to
+   * be a builtin op.
+   * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + org.tensorflow.proto.framework.NodeDef getNodeDef(int index); + /** + *
+   * By convention, "op" in node_def is resolved by consulting with a
+   * user-defined library first. If not resolved, "func" is assumed to
+   * be a builtin op.
+   * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + int getNodeDefCount(); + /** + *
+   * By convention, "op" in node_def is resolved by consulting with a
+   * user-defined library first. If not resolved, "func" is assumed to
+   * be a builtin op.
+   * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + java.util.List + getNodeDefOrBuilderList(); + /** + *
+   * By convention, "op" in node_def is resolved by consulting with a
+   * user-defined library first. If not resolved, "func" is assumed to
+   * be a builtin op.
+   * 
+ * + * repeated .tensorflow.NodeDef node_def = 3; + */ + org.tensorflow.proto.framework.NodeDefOrBuilder getNodeDefOrBuilder( + int index); + + /** + *
+   * A mapping from the output arg names from `signature` to the
+   * outputs from `node_def` that should be returned by the function.
+   * 
+ * + * map<string, string> ret = 4; + */ + int getRetCount(); + /** + *
+   * A mapping from the output arg names from `signature` to the
+   * outputs from `node_def` that should be returned by the function.
+   * 
+ * + * map<string, string> ret = 4; + */ + boolean containsRet( + java.lang.String key); + /** + * Use {@link #getRetMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getRet(); + /** + *
+   * A mapping from the output arg names from `signature` to the
+   * outputs from `node_def` that should be returned by the function.
+   * 
+ * + * map<string, string> ret = 4; + */ + java.util.Map + getRetMap(); + /** + *
+   * A mapping from the output arg names from `signature` to the
+   * outputs from `node_def` that should be returned by the function.
+   * 
+ * + * map<string, string> ret = 4; + */ + + java.lang.String getRetOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+   * A mapping from the output arg names from `signature` to the
+   * outputs from `node_def` that should be returned by the function.
+   * 
+ * + * map<string, string> ret = 4; + */ + + java.lang.String getRetOrThrow( + java.lang.String key); + + /** + *
+   * A mapping from control output names from `signature` to node names in
+   * `node_def` which should be control outputs of this function.
+   * 
+ * + * map<string, string> control_ret = 6; + */ + int getControlRetCount(); + /** + *
+   * A mapping from control output names from `signature` to node names in
+   * `node_def` which should be control outputs of this function.
+   * 
+ * + * map<string, string> control_ret = 6; + */ + boolean containsControlRet( + java.lang.String key); + /** + * Use {@link #getControlRetMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getControlRet(); + /** + *
+   * A mapping from control output names from `signature` to node names in
+   * `node_def` which should be control outputs of this function.
+   * 
+ * + * map<string, string> control_ret = 6; + */ + java.util.Map + getControlRetMap(); + /** + *
+   * A mapping from control output names from `signature` to node names in
+   * `node_def` which should be control outputs of this function.
+   * 
+ * + * map<string, string> control_ret = 6; + */ + + java.lang.String getControlRetOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+   * A mapping from control output names from `signature` to node names in
+   * `node_def` which should be control outputs of this function.
+   * 
+ * + * map<string, string> control_ret = 6; + */ + + java.lang.String getControlRetOrThrow( + java.lang.String key); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionProtos.java new file mode 100644 index 00000000000..e33df603ca8 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionProtos.java @@ -0,0 +1,184 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/function.proto + +package org.tensorflow.proto.framework; + +public final class FunctionProtos { + private FunctionProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_FunctionDefLibrary_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_FunctionDefLibrary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_FunctionDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_FunctionDef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_FunctionDef_AttrEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_FunctionDef_AttrEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_FunctionDef_ArgAttrs_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_FunctionDef_ArgAttrs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_FunctionDef_ArgAttrs_AttrEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_FunctionDef_ArgAttrs_AttrEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_FunctionDef_ArgAttrEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_FunctionDef_ArgAttrEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_FunctionDef_ResourceArgUniqueIdEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_FunctionDef_ResourceArgUniqueIdEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_FunctionDef_RetEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_FunctionDef_RetEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_FunctionDef_ControlRetEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_FunctionDef_ControlRetEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GradientDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GradientDef_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/node_def.proto\032&tensorflow/core/fr" + + "amework/op_def.proto\"j\n\022FunctionDefLibra" + + "ry\022)\n\010function\030\001 \003(\0132\027.tensorflow.Functi" + + "onDef\022)\n\010gradient\030\002 \003(\0132\027.tensorflow.Gra" + + "dientDef\"\304\006\n\013FunctionDef\022$\n\tsignature\030\001 " + + "\001(\0132\021.tensorflow.OpDef\022/\n\004attr\030\005 \003(\0132!.t" + + "ensorflow.FunctionDef.AttrEntry\0226\n\010arg_a" + + "ttr\030\007 \003(\0132$.tensorflow.FunctionDef.ArgAt" + + "trEntry\022P\n\026resource_arg_unique_id\030\010 \003(\0132" + + "0.tensorflow.FunctionDef.ResourceArgUniq" + + "ueIdEntry\022%\n\010node_def\030\003 \003(\0132\023.tensorflow" + + ".NodeDef\022-\n\003ret\030\004 \003(\0132 .tensorflow.Funct" + + "ionDef.RetEntry\022<\n\013control_ret\030\006 \003(\0132\'.t" + + "ensorflow.FunctionDef.ControlRetEntry\032B\n" + + "\tAttrEntry\022\013\n\003key\030\001 \001(\t\022$\n\005value\030\002 \001(\0132\025" + + ".tensorflow.AttrValue:\0028\001\032\210\001\n\010ArgAttrs\0228" + + "\n\004attr\030\001 \003(\0132*.tensorflow.FunctionDef.Ar" + + "gAttrs.AttrEntry\032B\n\tAttrEntry\022\013\n\003key\030\001 \001" + + "(\t\022$\n\005value\030\002 \001(\0132\025.tensorflow.AttrValue" + + ":\0028\001\032P\n\014ArgAttrEntry\022\013\n\003key\030\001 \001(\r\022/\n\005val" + + "ue\030\002 \001(\0132 .tensorflow.FunctionDef.ArgAtt" + + "rs:\0028\001\032:\n\030ResourceArgUniqueIdEntry\022\013\n\003ke" + + "y\030\001 \001(\r\022\r\n\005value\030\002 \001(\r:\0028\001\032*\n\010RetEntry\022\013" + + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0321\n\017Contro" + + "lRetEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" + + "\001J\004\010\002\020\003\";\n\013GradientDef\022\025\n\rfunction_name\030" + + "\001 \001(\t\022\025\n\rgradient_func\030\002 \001(\tB\206\001\n\036org.ten" + + "sorflow.proto.frameworkB\016FunctionProtosP" + + "\001ZOgithub.com/tensorflow/tensorflow/tens" + + "orflow/go/core/framework/function_go_pro" + + "to\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.AttrValueProtos.getDescriptor(), + org.tensorflow.proto.framework.NodeProto.getDescriptor(), + org.tensorflow.proto.framework.OpDefProtos.getDescriptor(), + }); + internal_static_tensorflow_FunctionDefLibrary_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_FunctionDefLibrary_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_FunctionDefLibrary_descriptor, + new java.lang.String[] { "Function", "Gradient", }); + internal_static_tensorflow_FunctionDef_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_FunctionDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_FunctionDef_descriptor, + new java.lang.String[] { "Signature", "Attr", "ArgAttr", "ResourceArgUniqueId", "NodeDef", "Ret", "ControlRet", }); + internal_static_tensorflow_FunctionDef_AttrEntry_descriptor = + internal_static_tensorflow_FunctionDef_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_FunctionDef_AttrEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_FunctionDef_AttrEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_FunctionDef_ArgAttrs_descriptor = + internal_static_tensorflow_FunctionDef_descriptor.getNestedTypes().get(1); + internal_static_tensorflow_FunctionDef_ArgAttrs_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_FunctionDef_ArgAttrs_descriptor, + new java.lang.String[] { "Attr", }); + internal_static_tensorflow_FunctionDef_ArgAttrs_AttrEntry_descriptor = + internal_static_tensorflow_FunctionDef_ArgAttrs_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_FunctionDef_ArgAttrs_AttrEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_FunctionDef_ArgAttrs_AttrEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_FunctionDef_ArgAttrEntry_descriptor = + internal_static_tensorflow_FunctionDef_descriptor.getNestedTypes().get(2); + internal_static_tensorflow_FunctionDef_ArgAttrEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_FunctionDef_ArgAttrEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_FunctionDef_ResourceArgUniqueIdEntry_descriptor = + internal_static_tensorflow_FunctionDef_descriptor.getNestedTypes().get(3); + internal_static_tensorflow_FunctionDef_ResourceArgUniqueIdEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_FunctionDef_ResourceArgUniqueIdEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_FunctionDef_RetEntry_descriptor = + internal_static_tensorflow_FunctionDef_descriptor.getNestedTypes().get(4); + internal_static_tensorflow_FunctionDef_RetEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_FunctionDef_RetEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_FunctionDef_ControlRetEntry_descriptor = + internal_static_tensorflow_FunctionDef_descriptor.getNestedTypes().get(5); + internal_static_tensorflow_FunctionDef_ControlRetEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_FunctionDef_ControlRetEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_GradientDef_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_tensorflow_GradientDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GradientDef_descriptor, + new java.lang.String[] { "FunctionName", "GradientFunc", }); + org.tensorflow.proto.framework.AttrValueProtos.getDescriptor(); + org.tensorflow.proto.framework.NodeProto.getDescriptor(); + org.tensorflow.proto.framework.OpDefProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionSpec.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionSpec.java new file mode 100644 index 00000000000..0feaaf41951 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionSpec.java @@ -0,0 +1,961 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Represents `FunctionSpec` used in `Function`. This represents a
+ * function that has been wrapped as a TensorFlow `Function`.
+ * 
+ * + * Protobuf type {@code tensorflow.FunctionSpec} + */ +public final class FunctionSpec extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.FunctionSpec) + FunctionSpecOrBuilder { +private static final long serialVersionUID = 0L; + // Use FunctionSpec.newBuilder() to construct. + private FunctionSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FunctionSpec() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FunctionSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FunctionSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.tensorflow.proto.framework.StructuredValue.Builder subBuilder = null; + if (fullargspec_ != null) { + subBuilder = fullargspec_.toBuilder(); + } + fullargspec_ = input.readMessage(org.tensorflow.proto.framework.StructuredValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fullargspec_); + fullargspec_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + isMethod_ = input.readBool(); + break; + } + case 42: { + org.tensorflow.proto.framework.StructuredValue.Builder subBuilder = null; + if (inputSignature_ != null) { + subBuilder = inputSignature_.toBuilder(); + } + inputSignature_ = input.readMessage(org.tensorflow.proto.framework.StructuredValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputSignature_); + inputSignature_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_FunctionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_FunctionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.FunctionSpec.class, org.tensorflow.proto.framework.FunctionSpec.Builder.class); + } + + public static final int FULLARGSPEC_FIELD_NUMBER = 1; + private org.tensorflow.proto.framework.StructuredValue fullargspec_; + /** + *
+   * Full arg spec from inspect.getfullargspec().
+   * 
+ * + * .tensorflow.StructuredValue fullargspec = 1; + */ + public boolean hasFullargspec() { + return fullargspec_ != null; + } + /** + *
+   * Full arg spec from inspect.getfullargspec().
+   * 
+ * + * .tensorflow.StructuredValue fullargspec = 1; + */ + public org.tensorflow.proto.framework.StructuredValue getFullargspec() { + return fullargspec_ == null ? org.tensorflow.proto.framework.StructuredValue.getDefaultInstance() : fullargspec_; + } + /** + *
+   * Full arg spec from inspect.getfullargspec().
+   * 
+ * + * .tensorflow.StructuredValue fullargspec = 1; + */ + public org.tensorflow.proto.framework.StructuredValueOrBuilder getFullargspecOrBuilder() { + return getFullargspec(); + } + + public static final int IS_METHOD_FIELD_NUMBER = 2; + private boolean isMethod_; + /** + *
+   * Whether this represents a class method.
+   * 
+ * + * bool is_method = 2; + */ + public boolean getIsMethod() { + return isMethod_; + } + + public static final int INPUT_SIGNATURE_FIELD_NUMBER = 5; + private org.tensorflow.proto.framework.StructuredValue inputSignature_; + /** + *
+   * The input signature, if specified.
+   * 
+ * + * .tensorflow.StructuredValue input_signature = 5; + */ + public boolean hasInputSignature() { + return inputSignature_ != null; + } + /** + *
+   * The input signature, if specified.
+   * 
+ * + * .tensorflow.StructuredValue input_signature = 5; + */ + public org.tensorflow.proto.framework.StructuredValue getInputSignature() { + return inputSignature_ == null ? org.tensorflow.proto.framework.StructuredValue.getDefaultInstance() : inputSignature_; + } + /** + *
+   * The input signature, if specified.
+   * 
+ * + * .tensorflow.StructuredValue input_signature = 5; + */ + public org.tensorflow.proto.framework.StructuredValueOrBuilder getInputSignatureOrBuilder() { + return getInputSignature(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (fullargspec_ != null) { + output.writeMessage(1, getFullargspec()); + } + if (isMethod_ != false) { + output.writeBool(2, isMethod_); + } + if (inputSignature_ != null) { + output.writeMessage(5, getInputSignature()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (fullargspec_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getFullargspec()); + } + if (isMethod_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, isMethod_); + } + if (inputSignature_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getInputSignature()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.FunctionSpec)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.FunctionSpec other = (org.tensorflow.proto.framework.FunctionSpec) obj; + + if (hasFullargspec() != other.hasFullargspec()) return false; + if (hasFullargspec()) { + if (!getFullargspec() + .equals(other.getFullargspec())) return false; + } + if (getIsMethod() + != other.getIsMethod()) return false; + if (hasInputSignature() != other.hasInputSignature()) return false; + if (hasInputSignature()) { + if (!getInputSignature() + .equals(other.getInputSignature())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFullargspec()) { + hash = (37 * hash) + FULLARGSPEC_FIELD_NUMBER; + hash = (53 * hash) + getFullargspec().hashCode(); + } + hash = (37 * hash) + IS_METHOD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsMethod()); + if (hasInputSignature()) { + hash = (37 * hash) + INPUT_SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getInputSignature().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.FunctionSpec parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.FunctionSpec parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.FunctionSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.FunctionSpec 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.proto.framework.FunctionSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.FunctionSpec parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.FunctionSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.FunctionSpec parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.FunctionSpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.FunctionSpec parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.FunctionSpec parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.FunctionSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.FunctionSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents `FunctionSpec` used in `Function`. This represents a
+   * function that has been wrapped as a TensorFlow `Function`.
+   * 
+ * + * Protobuf type {@code tensorflow.FunctionSpec} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.FunctionSpec) + org.tensorflow.proto.framework.FunctionSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_FunctionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_FunctionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.FunctionSpec.class, org.tensorflow.proto.framework.FunctionSpec.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.FunctionSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fullargspecBuilder_ == null) { + fullargspec_ = null; + } else { + fullargspec_ = null; + fullargspecBuilder_ = null; + } + isMethod_ = false; + + if (inputSignatureBuilder_ == null) { + inputSignature_ = null; + } else { + inputSignature_ = null; + inputSignatureBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_FunctionSpec_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.FunctionSpec getDefaultInstanceForType() { + return org.tensorflow.proto.framework.FunctionSpec.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.FunctionSpec build() { + org.tensorflow.proto.framework.FunctionSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.FunctionSpec buildPartial() { + org.tensorflow.proto.framework.FunctionSpec result = new org.tensorflow.proto.framework.FunctionSpec(this); + if (fullargspecBuilder_ == null) { + result.fullargspec_ = fullargspec_; + } else { + result.fullargspec_ = fullargspecBuilder_.build(); + } + result.isMethod_ = isMethod_; + if (inputSignatureBuilder_ == null) { + result.inputSignature_ = inputSignature_; + } else { + result.inputSignature_ = inputSignatureBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.FunctionSpec) { + return mergeFrom((org.tensorflow.proto.framework.FunctionSpec)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.FunctionSpec other) { + if (other == org.tensorflow.proto.framework.FunctionSpec.getDefaultInstance()) return this; + if (other.hasFullargspec()) { + mergeFullargspec(other.getFullargspec()); + } + if (other.getIsMethod() != false) { + setIsMethod(other.getIsMethod()); + } + if (other.hasInputSignature()) { + mergeInputSignature(other.getInputSignature()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.FunctionSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.FunctionSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private org.tensorflow.proto.framework.StructuredValue fullargspec_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder> fullargspecBuilder_; + /** + *
+     * Full arg spec from inspect.getfullargspec().
+     * 
+ * + * .tensorflow.StructuredValue fullargspec = 1; + */ + public boolean hasFullargspec() { + return fullargspecBuilder_ != null || fullargspec_ != null; + } + /** + *
+     * Full arg spec from inspect.getfullargspec().
+     * 
+ * + * .tensorflow.StructuredValue fullargspec = 1; + */ + public org.tensorflow.proto.framework.StructuredValue getFullargspec() { + if (fullargspecBuilder_ == null) { + return fullargspec_ == null ? org.tensorflow.proto.framework.StructuredValue.getDefaultInstance() : fullargspec_; + } else { + return fullargspecBuilder_.getMessage(); + } + } + /** + *
+     * Full arg spec from inspect.getfullargspec().
+     * 
+ * + * .tensorflow.StructuredValue fullargspec = 1; + */ + public Builder setFullargspec(org.tensorflow.proto.framework.StructuredValue value) { + if (fullargspecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fullargspec_ = value; + onChanged(); + } else { + fullargspecBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Full arg spec from inspect.getfullargspec().
+     * 
+ * + * .tensorflow.StructuredValue fullargspec = 1; + */ + public Builder setFullargspec( + org.tensorflow.proto.framework.StructuredValue.Builder builderForValue) { + if (fullargspecBuilder_ == null) { + fullargspec_ = builderForValue.build(); + onChanged(); + } else { + fullargspecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Full arg spec from inspect.getfullargspec().
+     * 
+ * + * .tensorflow.StructuredValue fullargspec = 1; + */ + public Builder mergeFullargspec(org.tensorflow.proto.framework.StructuredValue value) { + if (fullargspecBuilder_ == null) { + if (fullargspec_ != null) { + fullargspec_ = + org.tensorflow.proto.framework.StructuredValue.newBuilder(fullargspec_).mergeFrom(value).buildPartial(); + } else { + fullargspec_ = value; + } + onChanged(); + } else { + fullargspecBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Full arg spec from inspect.getfullargspec().
+     * 
+ * + * .tensorflow.StructuredValue fullargspec = 1; + */ + public Builder clearFullargspec() { + if (fullargspecBuilder_ == null) { + fullargspec_ = null; + onChanged(); + } else { + fullargspec_ = null; + fullargspecBuilder_ = null; + } + + return this; + } + /** + *
+     * Full arg spec from inspect.getfullargspec().
+     * 
+ * + * .tensorflow.StructuredValue fullargspec = 1; + */ + public org.tensorflow.proto.framework.StructuredValue.Builder getFullargspecBuilder() { + + onChanged(); + return getFullargspecFieldBuilder().getBuilder(); + } + /** + *
+     * Full arg spec from inspect.getfullargspec().
+     * 
+ * + * .tensorflow.StructuredValue fullargspec = 1; + */ + public org.tensorflow.proto.framework.StructuredValueOrBuilder getFullargspecOrBuilder() { + if (fullargspecBuilder_ != null) { + return fullargspecBuilder_.getMessageOrBuilder(); + } else { + return fullargspec_ == null ? + org.tensorflow.proto.framework.StructuredValue.getDefaultInstance() : fullargspec_; + } + } + /** + *
+     * Full arg spec from inspect.getfullargspec().
+     * 
+ * + * .tensorflow.StructuredValue fullargspec = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder> + getFullargspecFieldBuilder() { + if (fullargspecBuilder_ == null) { + fullargspecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder>( + getFullargspec(), + getParentForChildren(), + isClean()); + fullargspec_ = null; + } + return fullargspecBuilder_; + } + + private boolean isMethod_ ; + /** + *
+     * Whether this represents a class method.
+     * 
+ * + * bool is_method = 2; + */ + public boolean getIsMethod() { + return isMethod_; + } + /** + *
+     * Whether this represents a class method.
+     * 
+ * + * bool is_method = 2; + */ + public Builder setIsMethod(boolean value) { + + isMethod_ = value; + onChanged(); + return this; + } + /** + *
+     * Whether this represents a class method.
+     * 
+ * + * bool is_method = 2; + */ + public Builder clearIsMethod() { + + isMethod_ = false; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.StructuredValue inputSignature_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder> inputSignatureBuilder_; + /** + *
+     * The input signature, if specified.
+     * 
+ * + * .tensorflow.StructuredValue input_signature = 5; + */ + public boolean hasInputSignature() { + return inputSignatureBuilder_ != null || inputSignature_ != null; + } + /** + *
+     * The input signature, if specified.
+     * 
+ * + * .tensorflow.StructuredValue input_signature = 5; + */ + public org.tensorflow.proto.framework.StructuredValue getInputSignature() { + if (inputSignatureBuilder_ == null) { + return inputSignature_ == null ? org.tensorflow.proto.framework.StructuredValue.getDefaultInstance() : inputSignature_; + } else { + return inputSignatureBuilder_.getMessage(); + } + } + /** + *
+     * The input signature, if specified.
+     * 
+ * + * .tensorflow.StructuredValue input_signature = 5; + */ + public Builder setInputSignature(org.tensorflow.proto.framework.StructuredValue value) { + if (inputSignatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputSignature_ = value; + onChanged(); + } else { + inputSignatureBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The input signature, if specified.
+     * 
+ * + * .tensorflow.StructuredValue input_signature = 5; + */ + public Builder setInputSignature( + org.tensorflow.proto.framework.StructuredValue.Builder builderForValue) { + if (inputSignatureBuilder_ == null) { + inputSignature_ = builderForValue.build(); + onChanged(); + } else { + inputSignatureBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The input signature, if specified.
+     * 
+ * + * .tensorflow.StructuredValue input_signature = 5; + */ + public Builder mergeInputSignature(org.tensorflow.proto.framework.StructuredValue value) { + if (inputSignatureBuilder_ == null) { + if (inputSignature_ != null) { + inputSignature_ = + org.tensorflow.proto.framework.StructuredValue.newBuilder(inputSignature_).mergeFrom(value).buildPartial(); + } else { + inputSignature_ = value; + } + onChanged(); + } else { + inputSignatureBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The input signature, if specified.
+     * 
+ * + * .tensorflow.StructuredValue input_signature = 5; + */ + public Builder clearInputSignature() { + if (inputSignatureBuilder_ == null) { + inputSignature_ = null; + onChanged(); + } else { + inputSignature_ = null; + inputSignatureBuilder_ = null; + } + + return this; + } + /** + *
+     * The input signature, if specified.
+     * 
+ * + * .tensorflow.StructuredValue input_signature = 5; + */ + public org.tensorflow.proto.framework.StructuredValue.Builder getInputSignatureBuilder() { + + onChanged(); + return getInputSignatureFieldBuilder().getBuilder(); + } + /** + *
+     * The input signature, if specified.
+     * 
+ * + * .tensorflow.StructuredValue input_signature = 5; + */ + public org.tensorflow.proto.framework.StructuredValueOrBuilder getInputSignatureOrBuilder() { + if (inputSignatureBuilder_ != null) { + return inputSignatureBuilder_.getMessageOrBuilder(); + } else { + return inputSignature_ == null ? + org.tensorflow.proto.framework.StructuredValue.getDefaultInstance() : inputSignature_; + } + } + /** + *
+     * The input signature, if specified.
+     * 
+ * + * .tensorflow.StructuredValue input_signature = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder> + getInputSignatureFieldBuilder() { + if (inputSignatureBuilder_ == null) { + inputSignatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder>( + getInputSignature(), + getParentForChildren(), + isClean()); + inputSignature_ = null; + } + return inputSignatureBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.FunctionSpec) + } + + // @@protoc_insertion_point(class_scope:tensorflow.FunctionSpec) + private static final org.tensorflow.proto.framework.FunctionSpec DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.FunctionSpec(); + } + + public static org.tensorflow.proto.framework.FunctionSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FunctionSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FunctionSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.FunctionSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionSpecOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionSpecOrBuilder.java new file mode 100644 index 00000000000..8c200ad6323 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/FunctionSpecOrBuilder.java @@ -0,0 +1,68 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +public interface FunctionSpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.FunctionSpec) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Full arg spec from inspect.getfullargspec().
+   * 
+ * + * .tensorflow.StructuredValue fullargspec = 1; + */ + boolean hasFullargspec(); + /** + *
+   * Full arg spec from inspect.getfullargspec().
+   * 
+ * + * .tensorflow.StructuredValue fullargspec = 1; + */ + org.tensorflow.proto.framework.StructuredValue getFullargspec(); + /** + *
+   * Full arg spec from inspect.getfullargspec().
+   * 
+ * + * .tensorflow.StructuredValue fullargspec = 1; + */ + org.tensorflow.proto.framework.StructuredValueOrBuilder getFullargspecOrBuilder(); + + /** + *
+   * Whether this represents a class method.
+   * 
+ * + * bool is_method = 2; + */ + boolean getIsMethod(); + + /** + *
+   * The input signature, if specified.
+   * 
+ * + * .tensorflow.StructuredValue input_signature = 5; + */ + boolean hasInputSignature(); + /** + *
+   * The input signature, if specified.
+   * 
+ * + * .tensorflow.StructuredValue input_signature = 5; + */ + org.tensorflow.proto.framework.StructuredValue getInputSignature(); + /** + *
+   * The input signature, if specified.
+   * 
+ * + * .tensorflow.StructuredValue input_signature = 5; + */ + org.tensorflow.proto.framework.StructuredValueOrBuilder getInputSignatureOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GPUOptions.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GPUOptions.java new file mode 100644 index 00000000000..8b66cc5a33e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GPUOptions.java @@ -0,0 +1,4746 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.GPUOptions} + */ +public final class GPUOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GPUOptions) + GPUOptionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use GPUOptions.newBuilder() to construct. + private GPUOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GPUOptions() { + allocatorType_ = ""; + visibleDeviceList_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GPUOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GPUOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: { + + perProcessGpuMemoryFraction_ = input.readDouble(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + allocatorType_ = s; + break; + } + case 24: { + + deferredDeletionBytes_ = input.readInt64(); + break; + } + case 32: { + + allowGrowth_ = input.readBool(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + visibleDeviceList_ = s; + break; + } + case 48: { + + pollingActiveDelayUsecs_ = input.readInt32(); + break; + } + case 56: { + + pollingInactiveDelayMsecs_ = input.readInt32(); + break; + } + case 64: { + + forceGpuCompatible_ = input.readBool(); + break; + } + case 74: { + org.tensorflow.proto.framework.GPUOptions.Experimental.Builder subBuilder = null; + if (experimental_ != null) { + subBuilder = experimental_.toBuilder(); + } + experimental_ = input.readMessage(org.tensorflow.proto.framework.GPUOptions.Experimental.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(experimental_); + experimental_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GPUOptions.class, org.tensorflow.proto.framework.GPUOptions.Builder.class); + } + + public interface ExperimentalOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GPUOptions.Experimental) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The multi virtual device settings. If empty (not set), it will create
+     * single virtual device on each visible GPU, according to the settings
+     * in "visible_device_list" above. Otherwise, the number of elements in the
+     * list must be the same as the number of visible GPUs (after
+     * "visible_device_list" filtering if it is set), and the string represented
+     * device names (e.g. /device:GPU:<id>) will refer to the virtual
+     * devices and have the <id> field assigned sequentially starting from 0,
+     * according to the order they appear in this list and the "memory_limit"
+     * list inside each element. For example,
+     *   visible_device_list = "1,0"
+     *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+     *   virtual_devices {}
+     * will create three virtual devices as:
+     *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+     *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+     *   /device:GPU:2 -> visible GPU 0 with all available memory
+     * NOTE:
+     * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+     *    at the same time.
+     * 2. Currently this setting is per-process, not per-session. Using
+     *    different settings in different sessions within same process will
+     *    result in undefined behavior.
+     * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + java.util.List + getVirtualDevicesList(); + /** + *
+     * The multi virtual device settings. If empty (not set), it will create
+     * single virtual device on each visible GPU, according to the settings
+     * in "visible_device_list" above. Otherwise, the number of elements in the
+     * list must be the same as the number of visible GPUs (after
+     * "visible_device_list" filtering if it is set), and the string represented
+     * device names (e.g. /device:GPU:<id>) will refer to the virtual
+     * devices and have the <id> field assigned sequentially starting from 0,
+     * according to the order they appear in this list and the "memory_limit"
+     * list inside each element. For example,
+     *   visible_device_list = "1,0"
+     *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+     *   virtual_devices {}
+     * will create three virtual devices as:
+     *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+     *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+     *   /device:GPU:2 -> visible GPU 0 with all available memory
+     * NOTE:
+     * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+     *    at the same time.
+     * 2. Currently this setting is per-process, not per-session. Using
+     *    different settings in different sessions within same process will
+     *    result in undefined behavior.
+     * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices getVirtualDevices(int index); + /** + *
+     * The multi virtual device settings. If empty (not set), it will create
+     * single virtual device on each visible GPU, according to the settings
+     * in "visible_device_list" above. Otherwise, the number of elements in the
+     * list must be the same as the number of visible GPUs (after
+     * "visible_device_list" filtering if it is set), and the string represented
+     * device names (e.g. /device:GPU:<id>) will refer to the virtual
+     * devices and have the <id> field assigned sequentially starting from 0,
+     * according to the order they appear in this list and the "memory_limit"
+     * list inside each element. For example,
+     *   visible_device_list = "1,0"
+     *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+     *   virtual_devices {}
+     * will create three virtual devices as:
+     *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+     *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+     *   /device:GPU:2 -> visible GPU 0 with all available memory
+     * NOTE:
+     * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+     *    at the same time.
+     * 2. Currently this setting is per-process, not per-session. Using
+     *    different settings in different sessions within same process will
+     *    result in undefined behavior.
+     * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + int getVirtualDevicesCount(); + /** + *
+     * The multi virtual device settings. If empty (not set), it will create
+     * single virtual device on each visible GPU, according to the settings
+     * in "visible_device_list" above. Otherwise, the number of elements in the
+     * list must be the same as the number of visible GPUs (after
+     * "visible_device_list" filtering if it is set), and the string represented
+     * device names (e.g. /device:GPU:<id>) will refer to the virtual
+     * devices and have the <id> field assigned sequentially starting from 0,
+     * according to the order they appear in this list and the "memory_limit"
+     * list inside each element. For example,
+     *   visible_device_list = "1,0"
+     *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+     *   virtual_devices {}
+     * will create three virtual devices as:
+     *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+     *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+     *   /device:GPU:2 -> visible GPU 0 with all available memory
+     * NOTE:
+     * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+     *    at the same time.
+     * 2. Currently this setting is per-process, not per-session. Using
+     *    different settings in different sessions within same process will
+     *    result in undefined behavior.
+     * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + java.util.List + getVirtualDevicesOrBuilderList(); + /** + *
+     * The multi virtual device settings. If empty (not set), it will create
+     * single virtual device on each visible GPU, according to the settings
+     * in "visible_device_list" above. Otherwise, the number of elements in the
+     * list must be the same as the number of visible GPUs (after
+     * "visible_device_list" filtering if it is set), and the string represented
+     * device names (e.g. /device:GPU:<id>) will refer to the virtual
+     * devices and have the <id> field assigned sequentially starting from 0,
+     * according to the order they appear in this list and the "memory_limit"
+     * list inside each element. For example,
+     *   visible_device_list = "1,0"
+     *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+     *   virtual_devices {}
+     * will create three virtual devices as:
+     *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+     *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+     *   /device:GPU:2 -> visible GPU 0 with all available memory
+     * NOTE:
+     * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+     *    at the same time.
+     * 2. Currently this setting is per-process, not per-session. Using
+     *    different settings in different sessions within same process will
+     *    result in undefined behavior.
+     * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevicesOrBuilder getVirtualDevicesOrBuilder( + int index); + + /** + *
+     * If true, uses CUDA unified memory for memory allocations. If
+     * per_process_gpu_memory_fraction option is greater than 1.0, then unified
+     * memory is used regardless of the value for this field. See comments for
+     * per_process_gpu_memory_fraction field for more details and requirements
+     * of the unified memory. This option is useful to oversubscribe memory if
+     * multiple processes are sharing a single GPU while individually using less
+     * than 1.0 per process memory fraction.
+     * 
+ * + * bool use_unified_memory = 2; + */ + boolean getUseUnifiedMemory(); + + /** + *
+     * If > 1, the number of device-to-device copy streams to create
+     * for each GPUDevice.  Default value is 0, which is automatically
+     * converted to 1.
+     * 
+ * + * int32 num_dev_to_dev_copy_streams = 3; + */ + int getNumDevToDevCopyStreams(); + + /** + *
+     * If non-empty, defines a good GPU ring order on a single worker based on
+     * device interconnect.  This assumes that all workers have the same GPU
+     * topology.  Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4".
+     * This ring order is used by the RingReducer implementation of
+     * CollectiveReduce, and serves as an override to automatic ring order
+     * generation in OrderTaskDeviceMap() during CollectiveParam resolution.
+     * 
+ * + * string collective_ring_order = 4; + */ + java.lang.String getCollectiveRingOrder(); + /** + *
+     * If non-empty, defines a good GPU ring order on a single worker based on
+     * device interconnect.  This assumes that all workers have the same GPU
+     * topology.  Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4".
+     * This ring order is used by the RingReducer implementation of
+     * CollectiveReduce, and serves as an override to automatic ring order
+     * generation in OrderTaskDeviceMap() during CollectiveParam resolution.
+     * 
+ * + * string collective_ring_order = 4; + */ + com.google.protobuf.ByteString + getCollectiveRingOrderBytes(); + + /** + *
+     * If true then extra work is done by GPUDevice and GPUBFCAllocator to
+     * keep track of when GPU memory is freed and when kernels actually
+     * complete so that we can know when a nominally free memory chunk
+     * is really not subject to pending use.
+     * 
+ * + * bool timestamped_allocator = 5; + */ + boolean getTimestampedAllocator(); + + /** + *
+     * Parameters for GPUKernelTracker.  By default no kernel tracking is done.
+     * Note that timestamped_allocator is only effective if some tracking is
+     * specified.
+     * If kernel_tracker_max_interval = n > 0, then a tracking event
+     * is inserted after every n kernels without an event.
+     * 
+ * + * int32 kernel_tracker_max_interval = 7; + */ + int getKernelTrackerMaxInterval(); + + /** + *
+     * If kernel_tracker_max_bytes = n > 0, then a tracking event is
+     * inserted after every series of kernels allocating a sum of
+     * memory >= n.  If one kernel allocates b * n bytes, then one
+     * event will be inserted after it, but it will count as b against
+     * the pending limit.
+     * 
+ * + * int32 kernel_tracker_max_bytes = 8; + */ + int getKernelTrackerMaxBytes(); + + /** + *
+     * If kernel_tracker_max_pending > 0 then no more than this many
+     * tracking events can be outstanding at a time.  An attempt to
+     * launch an additional kernel will stall until an event
+     * completes.
+     * 
+ * + * int32 kernel_tracker_max_pending = 9; + */ + int getKernelTrackerMaxPending(); + } + /** + * Protobuf type {@code tensorflow.GPUOptions.Experimental} + */ + public static final class Experimental extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GPUOptions.Experimental) + ExperimentalOrBuilder { + private static final long serialVersionUID = 0L; + // Use Experimental.newBuilder() to construct. + private Experimental(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Experimental() { + virtualDevices_ = java.util.Collections.emptyList(); + collectiveRingOrder_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Experimental(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Experimental( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + virtualDevices_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + virtualDevices_.add( + input.readMessage(org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.parser(), extensionRegistry)); + break; + } + case 16: { + + useUnifiedMemory_ = input.readBool(); + break; + } + case 24: { + + numDevToDevCopyStreams_ = input.readInt32(); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + collectiveRingOrder_ = s; + break; + } + case 40: { + + timestampedAllocator_ = input.readBool(); + break; + } + case 56: { + + kernelTrackerMaxInterval_ = input.readInt32(); + break; + } + case 64: { + + kernelTrackerMaxBytes_ = input.readInt32(); + break; + } + case 72: { + + kernelTrackerMaxPending_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + virtualDevices_ = java.util.Collections.unmodifiableList(virtualDevices_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GPUOptions.Experimental.class, org.tensorflow.proto.framework.GPUOptions.Experimental.Builder.class); + } + + public interface VirtualDevicesOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GPUOptions.Experimental.VirtualDevices) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Per "virtual" device memory limit, in MB. The number of elements in
+       * the list is the number of virtual devices to create on the
+       * corresponding visible GPU (see "virtual_devices" below).
+       * If empty, it will create single virtual device taking all available
+       * memory from the device.
+       * For the concept of "visible" and "virtual" GPU, see the comments for
+       * "visible_device_list" above for more information.
+       * 
+ * + * repeated float memory_limit_mb = 1; + */ + java.util.List getMemoryLimitMbList(); + /** + *
+       * Per "virtual" device memory limit, in MB. The number of elements in
+       * the list is the number of virtual devices to create on the
+       * corresponding visible GPU (see "virtual_devices" below).
+       * If empty, it will create single virtual device taking all available
+       * memory from the device.
+       * For the concept of "visible" and "virtual" GPU, see the comments for
+       * "visible_device_list" above for more information.
+       * 
+ * + * repeated float memory_limit_mb = 1; + */ + int getMemoryLimitMbCount(); + /** + *
+       * Per "virtual" device memory limit, in MB. The number of elements in
+       * the list is the number of virtual devices to create on the
+       * corresponding visible GPU (see "virtual_devices" below).
+       * If empty, it will create single virtual device taking all available
+       * memory from the device.
+       * For the concept of "visible" and "virtual" GPU, see the comments for
+       * "visible_device_list" above for more information.
+       * 
+ * + * repeated float memory_limit_mb = 1; + */ + float getMemoryLimitMb(int index); + } + /** + *
+     * Configuration for breaking down a visible GPU into multiple "virtual"
+     * devices.
+     * 
+ * + * Protobuf type {@code tensorflow.GPUOptions.Experimental.VirtualDevices} + */ + public static final class VirtualDevices extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GPUOptions.Experimental.VirtualDevices) + VirtualDevicesOrBuilder { + private static final long serialVersionUID = 0L; + // Use VirtualDevices.newBuilder() to construct. + private VirtualDevices(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private VirtualDevices() { + memoryLimitMb_ = emptyFloatList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new VirtualDevices(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private VirtualDevices( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + memoryLimitMb_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + memoryLimitMb_.addFloat(input.readFloat()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + memoryLimitMb_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + memoryLimitMb_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + memoryLimitMb_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.class, org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.Builder.class); + } + + public static final int MEMORY_LIMIT_MB_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.FloatList memoryLimitMb_; + /** + *
+       * Per "virtual" device memory limit, in MB. The number of elements in
+       * the list is the number of virtual devices to create on the
+       * corresponding visible GPU (see "virtual_devices" below).
+       * If empty, it will create single virtual device taking all available
+       * memory from the device.
+       * For the concept of "visible" and "virtual" GPU, see the comments for
+       * "visible_device_list" above for more information.
+       * 
+ * + * repeated float memory_limit_mb = 1; + */ + public java.util.List + getMemoryLimitMbList() { + return memoryLimitMb_; + } + /** + *
+       * Per "virtual" device memory limit, in MB. The number of elements in
+       * the list is the number of virtual devices to create on the
+       * corresponding visible GPU (see "virtual_devices" below).
+       * If empty, it will create single virtual device taking all available
+       * memory from the device.
+       * For the concept of "visible" and "virtual" GPU, see the comments for
+       * "visible_device_list" above for more information.
+       * 
+ * + * repeated float memory_limit_mb = 1; + */ + public int getMemoryLimitMbCount() { + return memoryLimitMb_.size(); + } + /** + *
+       * Per "virtual" device memory limit, in MB. The number of elements in
+       * the list is the number of virtual devices to create on the
+       * corresponding visible GPU (see "virtual_devices" below).
+       * If empty, it will create single virtual device taking all available
+       * memory from the device.
+       * For the concept of "visible" and "virtual" GPU, see the comments for
+       * "visible_device_list" above for more information.
+       * 
+ * + * repeated float memory_limit_mb = 1; + */ + public float getMemoryLimitMb(int index) { + return memoryLimitMb_.getFloat(index); + } + private int memoryLimitMbMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getMemoryLimitMbList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(memoryLimitMbMemoizedSerializedSize); + } + for (int i = 0; i < memoryLimitMb_.size(); i++) { + output.writeFloatNoTag(memoryLimitMb_.getFloat(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 4 * getMemoryLimitMbList().size(); + size += dataSize; + if (!getMemoryLimitMbList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + memoryLimitMbMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices other = (org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices) obj; + + if (!getMemoryLimitMbList() + .equals(other.getMemoryLimitMbList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMemoryLimitMbCount() > 0) { + hash = (37 * hash) + MEMORY_LIMIT_MB_FIELD_NUMBER; + hash = (53 * hash) + getMemoryLimitMbList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices 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.proto.framework.GPUOptions.Experimental.VirtualDevices parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Configuration for breaking down a visible GPU into multiple "virtual"
+       * devices.
+       * 
+ * + * Protobuf type {@code tensorflow.GPUOptions.Experimental.VirtualDevices} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GPUOptions.Experimental.VirtualDevices) + org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevicesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.class, org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + memoryLimitMb_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices build() { + org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices buildPartial() { + org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices result = new org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + memoryLimitMb_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.memoryLimitMb_ = memoryLimitMb_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices) { + return mergeFrom((org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices other) { + if (other == org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.getDefaultInstance()) return this; + if (!other.memoryLimitMb_.isEmpty()) { + if (memoryLimitMb_.isEmpty()) { + memoryLimitMb_ = other.memoryLimitMb_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMemoryLimitMbIsMutable(); + memoryLimitMb_.addAll(other.memoryLimitMb_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.FloatList memoryLimitMb_ = emptyFloatList(); + private void ensureMemoryLimitMbIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + memoryLimitMb_ = mutableCopy(memoryLimitMb_); + bitField0_ |= 0x00000001; + } + } + /** + *
+         * Per "virtual" device memory limit, in MB. The number of elements in
+         * the list is the number of virtual devices to create on the
+         * corresponding visible GPU (see "virtual_devices" below).
+         * If empty, it will create single virtual device taking all available
+         * memory from the device.
+         * For the concept of "visible" and "virtual" GPU, see the comments for
+         * "visible_device_list" above for more information.
+         * 
+ * + * repeated float memory_limit_mb = 1; + */ + public java.util.List + getMemoryLimitMbList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(memoryLimitMb_) : memoryLimitMb_; + } + /** + *
+         * Per "virtual" device memory limit, in MB. The number of elements in
+         * the list is the number of virtual devices to create on the
+         * corresponding visible GPU (see "virtual_devices" below).
+         * If empty, it will create single virtual device taking all available
+         * memory from the device.
+         * For the concept of "visible" and "virtual" GPU, see the comments for
+         * "visible_device_list" above for more information.
+         * 
+ * + * repeated float memory_limit_mb = 1; + */ + public int getMemoryLimitMbCount() { + return memoryLimitMb_.size(); + } + /** + *
+         * Per "virtual" device memory limit, in MB. The number of elements in
+         * the list is the number of virtual devices to create on the
+         * corresponding visible GPU (see "virtual_devices" below).
+         * If empty, it will create single virtual device taking all available
+         * memory from the device.
+         * For the concept of "visible" and "virtual" GPU, see the comments for
+         * "visible_device_list" above for more information.
+         * 
+ * + * repeated float memory_limit_mb = 1; + */ + public float getMemoryLimitMb(int index) { + return memoryLimitMb_.getFloat(index); + } + /** + *
+         * Per "virtual" device memory limit, in MB. The number of elements in
+         * the list is the number of virtual devices to create on the
+         * corresponding visible GPU (see "virtual_devices" below).
+         * If empty, it will create single virtual device taking all available
+         * memory from the device.
+         * For the concept of "visible" and "virtual" GPU, see the comments for
+         * "visible_device_list" above for more information.
+         * 
+ * + * repeated float memory_limit_mb = 1; + */ + public Builder setMemoryLimitMb( + int index, float value) { + ensureMemoryLimitMbIsMutable(); + memoryLimitMb_.setFloat(index, value); + onChanged(); + return this; + } + /** + *
+         * Per "virtual" device memory limit, in MB. The number of elements in
+         * the list is the number of virtual devices to create on the
+         * corresponding visible GPU (see "virtual_devices" below).
+         * If empty, it will create single virtual device taking all available
+         * memory from the device.
+         * For the concept of "visible" and "virtual" GPU, see the comments for
+         * "visible_device_list" above for more information.
+         * 
+ * + * repeated float memory_limit_mb = 1; + */ + public Builder addMemoryLimitMb(float value) { + ensureMemoryLimitMbIsMutable(); + memoryLimitMb_.addFloat(value); + onChanged(); + return this; + } + /** + *
+         * Per "virtual" device memory limit, in MB. The number of elements in
+         * the list is the number of virtual devices to create on the
+         * corresponding visible GPU (see "virtual_devices" below).
+         * If empty, it will create single virtual device taking all available
+         * memory from the device.
+         * For the concept of "visible" and "virtual" GPU, see the comments for
+         * "visible_device_list" above for more information.
+         * 
+ * + * repeated float memory_limit_mb = 1; + */ + public Builder addAllMemoryLimitMb( + java.lang.Iterable values) { + ensureMemoryLimitMbIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, memoryLimitMb_); + onChanged(); + return this; + } + /** + *
+         * Per "virtual" device memory limit, in MB. The number of elements in
+         * the list is the number of virtual devices to create on the
+         * corresponding visible GPU (see "virtual_devices" below).
+         * If empty, it will create single virtual device taking all available
+         * memory from the device.
+         * For the concept of "visible" and "virtual" GPU, see the comments for
+         * "visible_device_list" above for more information.
+         * 
+ * + * repeated float memory_limit_mb = 1; + */ + public Builder clearMemoryLimitMb() { + memoryLimitMb_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GPUOptions.Experimental.VirtualDevices) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GPUOptions.Experimental.VirtualDevices) + private static final org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices(); + } + + public static org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VirtualDevices parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VirtualDevices(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int VIRTUAL_DEVICES_FIELD_NUMBER = 1; + private java.util.List virtualDevices_; + /** + *
+     * The multi virtual device settings. If empty (not set), it will create
+     * single virtual device on each visible GPU, according to the settings
+     * in "visible_device_list" above. Otherwise, the number of elements in the
+     * list must be the same as the number of visible GPUs (after
+     * "visible_device_list" filtering if it is set), and the string represented
+     * device names (e.g. /device:GPU:<id>) will refer to the virtual
+     * devices and have the <id> field assigned sequentially starting from 0,
+     * according to the order they appear in this list and the "memory_limit"
+     * list inside each element. For example,
+     *   visible_device_list = "1,0"
+     *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+     *   virtual_devices {}
+     * will create three virtual devices as:
+     *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+     *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+     *   /device:GPU:2 -> visible GPU 0 with all available memory
+     * NOTE:
+     * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+     *    at the same time.
+     * 2. Currently this setting is per-process, not per-session. Using
+     *    different settings in different sessions within same process will
+     *    result in undefined behavior.
+     * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public java.util.List getVirtualDevicesList() { + return virtualDevices_; + } + /** + *
+     * The multi virtual device settings. If empty (not set), it will create
+     * single virtual device on each visible GPU, according to the settings
+     * in "visible_device_list" above. Otherwise, the number of elements in the
+     * list must be the same as the number of visible GPUs (after
+     * "visible_device_list" filtering if it is set), and the string represented
+     * device names (e.g. /device:GPU:<id>) will refer to the virtual
+     * devices and have the <id> field assigned sequentially starting from 0,
+     * according to the order they appear in this list and the "memory_limit"
+     * list inside each element. For example,
+     *   visible_device_list = "1,0"
+     *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+     *   virtual_devices {}
+     * will create three virtual devices as:
+     *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+     *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+     *   /device:GPU:2 -> visible GPU 0 with all available memory
+     * NOTE:
+     * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+     *    at the same time.
+     * 2. Currently this setting is per-process, not per-session. Using
+     *    different settings in different sessions within same process will
+     *    result in undefined behavior.
+     * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public java.util.List + getVirtualDevicesOrBuilderList() { + return virtualDevices_; + } + /** + *
+     * The multi virtual device settings. If empty (not set), it will create
+     * single virtual device on each visible GPU, according to the settings
+     * in "visible_device_list" above. Otherwise, the number of elements in the
+     * list must be the same as the number of visible GPUs (after
+     * "visible_device_list" filtering if it is set), and the string represented
+     * device names (e.g. /device:GPU:<id>) will refer to the virtual
+     * devices and have the <id> field assigned sequentially starting from 0,
+     * according to the order they appear in this list and the "memory_limit"
+     * list inside each element. For example,
+     *   visible_device_list = "1,0"
+     *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+     *   virtual_devices {}
+     * will create three virtual devices as:
+     *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+     *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+     *   /device:GPU:2 -> visible GPU 0 with all available memory
+     * NOTE:
+     * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+     *    at the same time.
+     * 2. Currently this setting is per-process, not per-session. Using
+     *    different settings in different sessions within same process will
+     *    result in undefined behavior.
+     * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public int getVirtualDevicesCount() { + return virtualDevices_.size(); + } + /** + *
+     * The multi virtual device settings. If empty (not set), it will create
+     * single virtual device on each visible GPU, according to the settings
+     * in "visible_device_list" above. Otherwise, the number of elements in the
+     * list must be the same as the number of visible GPUs (after
+     * "visible_device_list" filtering if it is set), and the string represented
+     * device names (e.g. /device:GPU:<id>) will refer to the virtual
+     * devices and have the <id> field assigned sequentially starting from 0,
+     * according to the order they appear in this list and the "memory_limit"
+     * list inside each element. For example,
+     *   visible_device_list = "1,0"
+     *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+     *   virtual_devices {}
+     * will create three virtual devices as:
+     *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+     *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+     *   /device:GPU:2 -> visible GPU 0 with all available memory
+     * NOTE:
+     * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+     *    at the same time.
+     * 2. Currently this setting is per-process, not per-session. Using
+     *    different settings in different sessions within same process will
+     *    result in undefined behavior.
+     * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices getVirtualDevices(int index) { + return virtualDevices_.get(index); + } + /** + *
+     * The multi virtual device settings. If empty (not set), it will create
+     * single virtual device on each visible GPU, according to the settings
+     * in "visible_device_list" above. Otherwise, the number of elements in the
+     * list must be the same as the number of visible GPUs (after
+     * "visible_device_list" filtering if it is set), and the string represented
+     * device names (e.g. /device:GPU:<id>) will refer to the virtual
+     * devices and have the <id> field assigned sequentially starting from 0,
+     * according to the order they appear in this list and the "memory_limit"
+     * list inside each element. For example,
+     *   visible_device_list = "1,0"
+     *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+     *   virtual_devices {}
+     * will create three virtual devices as:
+     *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+     *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+     *   /device:GPU:2 -> visible GPU 0 with all available memory
+     * NOTE:
+     * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+     *    at the same time.
+     * 2. Currently this setting is per-process, not per-session. Using
+     *    different settings in different sessions within same process will
+     *    result in undefined behavior.
+     * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevicesOrBuilder getVirtualDevicesOrBuilder( + int index) { + return virtualDevices_.get(index); + } + + public static final int USE_UNIFIED_MEMORY_FIELD_NUMBER = 2; + private boolean useUnifiedMemory_; + /** + *
+     * If true, uses CUDA unified memory for memory allocations. If
+     * per_process_gpu_memory_fraction option is greater than 1.0, then unified
+     * memory is used regardless of the value for this field. See comments for
+     * per_process_gpu_memory_fraction field for more details and requirements
+     * of the unified memory. This option is useful to oversubscribe memory if
+     * multiple processes are sharing a single GPU while individually using less
+     * than 1.0 per process memory fraction.
+     * 
+ * + * bool use_unified_memory = 2; + */ + public boolean getUseUnifiedMemory() { + return useUnifiedMemory_; + } + + public static final int NUM_DEV_TO_DEV_COPY_STREAMS_FIELD_NUMBER = 3; + private int numDevToDevCopyStreams_; + /** + *
+     * If > 1, the number of device-to-device copy streams to create
+     * for each GPUDevice.  Default value is 0, which is automatically
+     * converted to 1.
+     * 
+ * + * int32 num_dev_to_dev_copy_streams = 3; + */ + public int getNumDevToDevCopyStreams() { + return numDevToDevCopyStreams_; + } + + public static final int COLLECTIVE_RING_ORDER_FIELD_NUMBER = 4; + private volatile java.lang.Object collectiveRingOrder_; + /** + *
+     * If non-empty, defines a good GPU ring order on a single worker based on
+     * device interconnect.  This assumes that all workers have the same GPU
+     * topology.  Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4".
+     * This ring order is used by the RingReducer implementation of
+     * CollectiveReduce, and serves as an override to automatic ring order
+     * generation in OrderTaskDeviceMap() during CollectiveParam resolution.
+     * 
+ * + * string collective_ring_order = 4; + */ + public java.lang.String getCollectiveRingOrder() { + java.lang.Object ref = collectiveRingOrder_; + 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(); + collectiveRingOrder_ = s; + return s; + } + } + /** + *
+     * If non-empty, defines a good GPU ring order on a single worker based on
+     * device interconnect.  This assumes that all workers have the same GPU
+     * topology.  Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4".
+     * This ring order is used by the RingReducer implementation of
+     * CollectiveReduce, and serves as an override to automatic ring order
+     * generation in OrderTaskDeviceMap() during CollectiveParam resolution.
+     * 
+ * + * string collective_ring_order = 4; + */ + public com.google.protobuf.ByteString + getCollectiveRingOrderBytes() { + java.lang.Object ref = collectiveRingOrder_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collectiveRingOrder_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIMESTAMPED_ALLOCATOR_FIELD_NUMBER = 5; + private boolean timestampedAllocator_; + /** + *
+     * If true then extra work is done by GPUDevice and GPUBFCAllocator to
+     * keep track of when GPU memory is freed and when kernels actually
+     * complete so that we can know when a nominally free memory chunk
+     * is really not subject to pending use.
+     * 
+ * + * bool timestamped_allocator = 5; + */ + public boolean getTimestampedAllocator() { + return timestampedAllocator_; + } + + public static final int KERNEL_TRACKER_MAX_INTERVAL_FIELD_NUMBER = 7; + private int kernelTrackerMaxInterval_; + /** + *
+     * Parameters for GPUKernelTracker.  By default no kernel tracking is done.
+     * Note that timestamped_allocator is only effective if some tracking is
+     * specified.
+     * If kernel_tracker_max_interval = n > 0, then a tracking event
+     * is inserted after every n kernels without an event.
+     * 
+ * + * int32 kernel_tracker_max_interval = 7; + */ + public int getKernelTrackerMaxInterval() { + return kernelTrackerMaxInterval_; + } + + public static final int KERNEL_TRACKER_MAX_BYTES_FIELD_NUMBER = 8; + private int kernelTrackerMaxBytes_; + /** + *
+     * If kernel_tracker_max_bytes = n > 0, then a tracking event is
+     * inserted after every series of kernels allocating a sum of
+     * memory >= n.  If one kernel allocates b * n bytes, then one
+     * event will be inserted after it, but it will count as b against
+     * the pending limit.
+     * 
+ * + * int32 kernel_tracker_max_bytes = 8; + */ + public int getKernelTrackerMaxBytes() { + return kernelTrackerMaxBytes_; + } + + public static final int KERNEL_TRACKER_MAX_PENDING_FIELD_NUMBER = 9; + private int kernelTrackerMaxPending_; + /** + *
+     * If kernel_tracker_max_pending > 0 then no more than this many
+     * tracking events can be outstanding at a time.  An attempt to
+     * launch an additional kernel will stall until an event
+     * completes.
+     * 
+ * + * int32 kernel_tracker_max_pending = 9; + */ + public int getKernelTrackerMaxPending() { + return kernelTrackerMaxPending_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < virtualDevices_.size(); i++) { + output.writeMessage(1, virtualDevices_.get(i)); + } + if (useUnifiedMemory_ != false) { + output.writeBool(2, useUnifiedMemory_); + } + if (numDevToDevCopyStreams_ != 0) { + output.writeInt32(3, numDevToDevCopyStreams_); + } + if (!getCollectiveRingOrderBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, collectiveRingOrder_); + } + if (timestampedAllocator_ != false) { + output.writeBool(5, timestampedAllocator_); + } + if (kernelTrackerMaxInterval_ != 0) { + output.writeInt32(7, kernelTrackerMaxInterval_); + } + if (kernelTrackerMaxBytes_ != 0) { + output.writeInt32(8, kernelTrackerMaxBytes_); + } + if (kernelTrackerMaxPending_ != 0) { + output.writeInt32(9, kernelTrackerMaxPending_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < virtualDevices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, virtualDevices_.get(i)); + } + if (useUnifiedMemory_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, useUnifiedMemory_); + } + if (numDevToDevCopyStreams_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, numDevToDevCopyStreams_); + } + if (!getCollectiveRingOrderBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, collectiveRingOrder_); + } + if (timestampedAllocator_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, timestampedAllocator_); + } + if (kernelTrackerMaxInterval_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, kernelTrackerMaxInterval_); + } + if (kernelTrackerMaxBytes_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(8, kernelTrackerMaxBytes_); + } + if (kernelTrackerMaxPending_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, kernelTrackerMaxPending_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GPUOptions.Experimental)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GPUOptions.Experimental other = (org.tensorflow.proto.framework.GPUOptions.Experimental) obj; + + if (!getVirtualDevicesList() + .equals(other.getVirtualDevicesList())) return false; + if (getUseUnifiedMemory() + != other.getUseUnifiedMemory()) return false; + if (getNumDevToDevCopyStreams() + != other.getNumDevToDevCopyStreams()) return false; + if (!getCollectiveRingOrder() + .equals(other.getCollectiveRingOrder())) return false; + if (getTimestampedAllocator() + != other.getTimestampedAllocator()) return false; + if (getKernelTrackerMaxInterval() + != other.getKernelTrackerMaxInterval()) return false; + if (getKernelTrackerMaxBytes() + != other.getKernelTrackerMaxBytes()) return false; + if (getKernelTrackerMaxPending() + != other.getKernelTrackerMaxPending()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getVirtualDevicesCount() > 0) { + hash = (37 * hash) + VIRTUAL_DEVICES_FIELD_NUMBER; + hash = (53 * hash) + getVirtualDevicesList().hashCode(); + } + hash = (37 * hash) + USE_UNIFIED_MEMORY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUseUnifiedMemory()); + hash = (37 * hash) + NUM_DEV_TO_DEV_COPY_STREAMS_FIELD_NUMBER; + hash = (53 * hash) + getNumDevToDevCopyStreams(); + hash = (37 * hash) + COLLECTIVE_RING_ORDER_FIELD_NUMBER; + hash = (53 * hash) + getCollectiveRingOrder().hashCode(); + hash = (37 * hash) + TIMESTAMPED_ALLOCATOR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getTimestampedAllocator()); + hash = (37 * hash) + KERNEL_TRACKER_MAX_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getKernelTrackerMaxInterval(); + hash = (37 * hash) + KERNEL_TRACKER_MAX_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getKernelTrackerMaxBytes(); + hash = (37 * hash) + KERNEL_TRACKER_MAX_PENDING_FIELD_NUMBER; + hash = (53 * hash) + getKernelTrackerMaxPending(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GPUOptions.Experimental parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental 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.proto.framework.GPUOptions.Experimental parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GPUOptions.Experimental parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GPUOptions.Experimental prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.GPUOptions.Experimental} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GPUOptions.Experimental) + org.tensorflow.proto.framework.GPUOptions.ExperimentalOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GPUOptions.Experimental.class, org.tensorflow.proto.framework.GPUOptions.Experimental.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GPUOptions.Experimental.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getVirtualDevicesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (virtualDevicesBuilder_ == null) { + virtualDevices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + virtualDevicesBuilder_.clear(); + } + useUnifiedMemory_ = false; + + numDevToDevCopyStreams_ = 0; + + collectiveRingOrder_ = ""; + + timestampedAllocator_ = false; + + kernelTrackerMaxInterval_ = 0; + + kernelTrackerMaxBytes_ = 0; + + kernelTrackerMaxPending_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GPUOptions.Experimental getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GPUOptions.Experimental.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GPUOptions.Experimental build() { + org.tensorflow.proto.framework.GPUOptions.Experimental result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GPUOptions.Experimental buildPartial() { + org.tensorflow.proto.framework.GPUOptions.Experimental result = new org.tensorflow.proto.framework.GPUOptions.Experimental(this); + int from_bitField0_ = bitField0_; + if (virtualDevicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + virtualDevices_ = java.util.Collections.unmodifiableList(virtualDevices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.virtualDevices_ = virtualDevices_; + } else { + result.virtualDevices_ = virtualDevicesBuilder_.build(); + } + result.useUnifiedMemory_ = useUnifiedMemory_; + result.numDevToDevCopyStreams_ = numDevToDevCopyStreams_; + result.collectiveRingOrder_ = collectiveRingOrder_; + result.timestampedAllocator_ = timestampedAllocator_; + result.kernelTrackerMaxInterval_ = kernelTrackerMaxInterval_; + result.kernelTrackerMaxBytes_ = kernelTrackerMaxBytes_; + result.kernelTrackerMaxPending_ = kernelTrackerMaxPending_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GPUOptions.Experimental) { + return mergeFrom((org.tensorflow.proto.framework.GPUOptions.Experimental)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GPUOptions.Experimental other) { + if (other == org.tensorflow.proto.framework.GPUOptions.Experimental.getDefaultInstance()) return this; + if (virtualDevicesBuilder_ == null) { + if (!other.virtualDevices_.isEmpty()) { + if (virtualDevices_.isEmpty()) { + virtualDevices_ = other.virtualDevices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVirtualDevicesIsMutable(); + virtualDevices_.addAll(other.virtualDevices_); + } + onChanged(); + } + } else { + if (!other.virtualDevices_.isEmpty()) { + if (virtualDevicesBuilder_.isEmpty()) { + virtualDevicesBuilder_.dispose(); + virtualDevicesBuilder_ = null; + virtualDevices_ = other.virtualDevices_; + bitField0_ = (bitField0_ & ~0x00000001); + virtualDevicesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVirtualDevicesFieldBuilder() : null; + } else { + virtualDevicesBuilder_.addAllMessages(other.virtualDevices_); + } + } + } + if (other.getUseUnifiedMemory() != false) { + setUseUnifiedMemory(other.getUseUnifiedMemory()); + } + if (other.getNumDevToDevCopyStreams() != 0) { + setNumDevToDevCopyStreams(other.getNumDevToDevCopyStreams()); + } + if (!other.getCollectiveRingOrder().isEmpty()) { + collectiveRingOrder_ = other.collectiveRingOrder_; + onChanged(); + } + if (other.getTimestampedAllocator() != false) { + setTimestampedAllocator(other.getTimestampedAllocator()); + } + if (other.getKernelTrackerMaxInterval() != 0) { + setKernelTrackerMaxInterval(other.getKernelTrackerMaxInterval()); + } + if (other.getKernelTrackerMaxBytes() != 0) { + setKernelTrackerMaxBytes(other.getKernelTrackerMaxBytes()); + } + if (other.getKernelTrackerMaxPending() != 0) { + setKernelTrackerMaxPending(other.getKernelTrackerMaxPending()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GPUOptions.Experimental parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GPUOptions.Experimental) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List virtualDevices_ = + java.util.Collections.emptyList(); + private void ensureVirtualDevicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + virtualDevices_ = new java.util.ArrayList(virtualDevices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices, org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.Builder, org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevicesOrBuilder> virtualDevicesBuilder_; + + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public java.util.List getVirtualDevicesList() { + if (virtualDevicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(virtualDevices_); + } else { + return virtualDevicesBuilder_.getMessageList(); + } + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public int getVirtualDevicesCount() { + if (virtualDevicesBuilder_ == null) { + return virtualDevices_.size(); + } else { + return virtualDevicesBuilder_.getCount(); + } + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices getVirtualDevices(int index) { + if (virtualDevicesBuilder_ == null) { + return virtualDevices_.get(index); + } else { + return virtualDevicesBuilder_.getMessage(index); + } + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public Builder setVirtualDevices( + int index, org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices value) { + if (virtualDevicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVirtualDevicesIsMutable(); + virtualDevices_.set(index, value); + onChanged(); + } else { + virtualDevicesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public Builder setVirtualDevices( + int index, org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.Builder builderForValue) { + if (virtualDevicesBuilder_ == null) { + ensureVirtualDevicesIsMutable(); + virtualDevices_.set(index, builderForValue.build()); + onChanged(); + } else { + virtualDevicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public Builder addVirtualDevices(org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices value) { + if (virtualDevicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVirtualDevicesIsMutable(); + virtualDevices_.add(value); + onChanged(); + } else { + virtualDevicesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public Builder addVirtualDevices( + int index, org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices value) { + if (virtualDevicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVirtualDevicesIsMutable(); + virtualDevices_.add(index, value); + onChanged(); + } else { + virtualDevicesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public Builder addVirtualDevices( + org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.Builder builderForValue) { + if (virtualDevicesBuilder_ == null) { + ensureVirtualDevicesIsMutable(); + virtualDevices_.add(builderForValue.build()); + onChanged(); + } else { + virtualDevicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public Builder addVirtualDevices( + int index, org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.Builder builderForValue) { + if (virtualDevicesBuilder_ == null) { + ensureVirtualDevicesIsMutable(); + virtualDevices_.add(index, builderForValue.build()); + onChanged(); + } else { + virtualDevicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public Builder addAllVirtualDevices( + java.lang.Iterable values) { + if (virtualDevicesBuilder_ == null) { + ensureVirtualDevicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, virtualDevices_); + onChanged(); + } else { + virtualDevicesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public Builder clearVirtualDevices() { + if (virtualDevicesBuilder_ == null) { + virtualDevices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + virtualDevicesBuilder_.clear(); + } + return this; + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public Builder removeVirtualDevices(int index) { + if (virtualDevicesBuilder_ == null) { + ensureVirtualDevicesIsMutable(); + virtualDevices_.remove(index); + onChanged(); + } else { + virtualDevicesBuilder_.remove(index); + } + return this; + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.Builder getVirtualDevicesBuilder( + int index) { + return getVirtualDevicesFieldBuilder().getBuilder(index); + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevicesOrBuilder getVirtualDevicesOrBuilder( + int index) { + if (virtualDevicesBuilder_ == null) { + return virtualDevices_.get(index); } else { + return virtualDevicesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public java.util.List + getVirtualDevicesOrBuilderList() { + if (virtualDevicesBuilder_ != null) { + return virtualDevicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(virtualDevices_); + } + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.Builder addVirtualDevicesBuilder() { + return getVirtualDevicesFieldBuilder().addBuilder( + org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.getDefaultInstance()); + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.Builder addVirtualDevicesBuilder( + int index) { + return getVirtualDevicesFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.getDefaultInstance()); + } + /** + *
+       * The multi virtual device settings. If empty (not set), it will create
+       * single virtual device on each visible GPU, according to the settings
+       * in "visible_device_list" above. Otherwise, the number of elements in the
+       * list must be the same as the number of visible GPUs (after
+       * "visible_device_list" filtering if it is set), and the string represented
+       * device names (e.g. /device:GPU:<id>) will refer to the virtual
+       * devices and have the <id> field assigned sequentially starting from 0,
+       * according to the order they appear in this list and the "memory_limit"
+       * list inside each element. For example,
+       *   visible_device_list = "1,0"
+       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
+       *   virtual_devices {}
+       * will create three virtual devices as:
+       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
+       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
+       *   /device:GPU:2 -> visible GPU 0 with all available memory
+       * NOTE:
+       * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
+       *    at the same time.
+       * 2. Currently this setting is per-process, not per-session. Using
+       *    different settings in different sessions within same process will
+       *    result in undefined behavior.
+       * 
+ * + * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; + */ + public java.util.List + getVirtualDevicesBuilderList() { + return getVirtualDevicesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices, org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.Builder, org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevicesOrBuilder> + getVirtualDevicesFieldBuilder() { + if (virtualDevicesBuilder_ == null) { + virtualDevicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices, org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevices.Builder, org.tensorflow.proto.framework.GPUOptions.Experimental.VirtualDevicesOrBuilder>( + virtualDevices_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + virtualDevices_ = null; + } + return virtualDevicesBuilder_; + } + + private boolean useUnifiedMemory_ ; + /** + *
+       * If true, uses CUDA unified memory for memory allocations. If
+       * per_process_gpu_memory_fraction option is greater than 1.0, then unified
+       * memory is used regardless of the value for this field. See comments for
+       * per_process_gpu_memory_fraction field for more details and requirements
+       * of the unified memory. This option is useful to oversubscribe memory if
+       * multiple processes are sharing a single GPU while individually using less
+       * than 1.0 per process memory fraction.
+       * 
+ * + * bool use_unified_memory = 2; + */ + public boolean getUseUnifiedMemory() { + return useUnifiedMemory_; + } + /** + *
+       * If true, uses CUDA unified memory for memory allocations. If
+       * per_process_gpu_memory_fraction option is greater than 1.0, then unified
+       * memory is used regardless of the value for this field. See comments for
+       * per_process_gpu_memory_fraction field for more details and requirements
+       * of the unified memory. This option is useful to oversubscribe memory if
+       * multiple processes are sharing a single GPU while individually using less
+       * than 1.0 per process memory fraction.
+       * 
+ * + * bool use_unified_memory = 2; + */ + public Builder setUseUnifiedMemory(boolean value) { + + useUnifiedMemory_ = value; + onChanged(); + return this; + } + /** + *
+       * If true, uses CUDA unified memory for memory allocations. If
+       * per_process_gpu_memory_fraction option is greater than 1.0, then unified
+       * memory is used regardless of the value for this field. See comments for
+       * per_process_gpu_memory_fraction field for more details and requirements
+       * of the unified memory. This option is useful to oversubscribe memory if
+       * multiple processes are sharing a single GPU while individually using less
+       * than 1.0 per process memory fraction.
+       * 
+ * + * bool use_unified_memory = 2; + */ + public Builder clearUseUnifiedMemory() { + + useUnifiedMemory_ = false; + onChanged(); + return this; + } + + private int numDevToDevCopyStreams_ ; + /** + *
+       * If > 1, the number of device-to-device copy streams to create
+       * for each GPUDevice.  Default value is 0, which is automatically
+       * converted to 1.
+       * 
+ * + * int32 num_dev_to_dev_copy_streams = 3; + */ + public int getNumDevToDevCopyStreams() { + return numDevToDevCopyStreams_; + } + /** + *
+       * If > 1, the number of device-to-device copy streams to create
+       * for each GPUDevice.  Default value is 0, which is automatically
+       * converted to 1.
+       * 
+ * + * int32 num_dev_to_dev_copy_streams = 3; + */ + public Builder setNumDevToDevCopyStreams(int value) { + + numDevToDevCopyStreams_ = value; + onChanged(); + return this; + } + /** + *
+       * If > 1, the number of device-to-device copy streams to create
+       * for each GPUDevice.  Default value is 0, which is automatically
+       * converted to 1.
+       * 
+ * + * int32 num_dev_to_dev_copy_streams = 3; + */ + public Builder clearNumDevToDevCopyStreams() { + + numDevToDevCopyStreams_ = 0; + onChanged(); + return this; + } + + private java.lang.Object collectiveRingOrder_ = ""; + /** + *
+       * If non-empty, defines a good GPU ring order on a single worker based on
+       * device interconnect.  This assumes that all workers have the same GPU
+       * topology.  Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4".
+       * This ring order is used by the RingReducer implementation of
+       * CollectiveReduce, and serves as an override to automatic ring order
+       * generation in OrderTaskDeviceMap() during CollectiveParam resolution.
+       * 
+ * + * string collective_ring_order = 4; + */ + public java.lang.String getCollectiveRingOrder() { + java.lang.Object ref = collectiveRingOrder_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collectiveRingOrder_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * If non-empty, defines a good GPU ring order on a single worker based on
+       * device interconnect.  This assumes that all workers have the same GPU
+       * topology.  Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4".
+       * This ring order is used by the RingReducer implementation of
+       * CollectiveReduce, and serves as an override to automatic ring order
+       * generation in OrderTaskDeviceMap() during CollectiveParam resolution.
+       * 
+ * + * string collective_ring_order = 4; + */ + public com.google.protobuf.ByteString + getCollectiveRingOrderBytes() { + java.lang.Object ref = collectiveRingOrder_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collectiveRingOrder_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * If non-empty, defines a good GPU ring order on a single worker based on
+       * device interconnect.  This assumes that all workers have the same GPU
+       * topology.  Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4".
+       * This ring order is used by the RingReducer implementation of
+       * CollectiveReduce, and serves as an override to automatic ring order
+       * generation in OrderTaskDeviceMap() during CollectiveParam resolution.
+       * 
+ * + * string collective_ring_order = 4; + */ + public Builder setCollectiveRingOrder( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + collectiveRingOrder_ = value; + onChanged(); + return this; + } + /** + *
+       * If non-empty, defines a good GPU ring order on a single worker based on
+       * device interconnect.  This assumes that all workers have the same GPU
+       * topology.  Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4".
+       * This ring order is used by the RingReducer implementation of
+       * CollectiveReduce, and serves as an override to automatic ring order
+       * generation in OrderTaskDeviceMap() during CollectiveParam resolution.
+       * 
+ * + * string collective_ring_order = 4; + */ + public Builder clearCollectiveRingOrder() { + + collectiveRingOrder_ = getDefaultInstance().getCollectiveRingOrder(); + onChanged(); + return this; + } + /** + *
+       * If non-empty, defines a good GPU ring order on a single worker based on
+       * device interconnect.  This assumes that all workers have the same GPU
+       * topology.  Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4".
+       * This ring order is used by the RingReducer implementation of
+       * CollectiveReduce, and serves as an override to automatic ring order
+       * generation in OrderTaskDeviceMap() during CollectiveParam resolution.
+       * 
+ * + * string collective_ring_order = 4; + */ + public Builder setCollectiveRingOrderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + collectiveRingOrder_ = value; + onChanged(); + return this; + } + + private boolean timestampedAllocator_ ; + /** + *
+       * If true then extra work is done by GPUDevice and GPUBFCAllocator to
+       * keep track of when GPU memory is freed and when kernels actually
+       * complete so that we can know when a nominally free memory chunk
+       * is really not subject to pending use.
+       * 
+ * + * bool timestamped_allocator = 5; + */ + public boolean getTimestampedAllocator() { + return timestampedAllocator_; + } + /** + *
+       * If true then extra work is done by GPUDevice and GPUBFCAllocator to
+       * keep track of when GPU memory is freed and when kernels actually
+       * complete so that we can know when a nominally free memory chunk
+       * is really not subject to pending use.
+       * 
+ * + * bool timestamped_allocator = 5; + */ + public Builder setTimestampedAllocator(boolean value) { + + timestampedAllocator_ = value; + onChanged(); + return this; + } + /** + *
+       * If true then extra work is done by GPUDevice and GPUBFCAllocator to
+       * keep track of when GPU memory is freed and when kernels actually
+       * complete so that we can know when a nominally free memory chunk
+       * is really not subject to pending use.
+       * 
+ * + * bool timestamped_allocator = 5; + */ + public Builder clearTimestampedAllocator() { + + timestampedAllocator_ = false; + onChanged(); + return this; + } + + private int kernelTrackerMaxInterval_ ; + /** + *
+       * Parameters for GPUKernelTracker.  By default no kernel tracking is done.
+       * Note that timestamped_allocator is only effective if some tracking is
+       * specified.
+       * If kernel_tracker_max_interval = n > 0, then a tracking event
+       * is inserted after every n kernels without an event.
+       * 
+ * + * int32 kernel_tracker_max_interval = 7; + */ + public int getKernelTrackerMaxInterval() { + return kernelTrackerMaxInterval_; + } + /** + *
+       * Parameters for GPUKernelTracker.  By default no kernel tracking is done.
+       * Note that timestamped_allocator is only effective if some tracking is
+       * specified.
+       * If kernel_tracker_max_interval = n > 0, then a tracking event
+       * is inserted after every n kernels without an event.
+       * 
+ * + * int32 kernel_tracker_max_interval = 7; + */ + public Builder setKernelTrackerMaxInterval(int value) { + + kernelTrackerMaxInterval_ = value; + onChanged(); + return this; + } + /** + *
+       * Parameters for GPUKernelTracker.  By default no kernel tracking is done.
+       * Note that timestamped_allocator is only effective if some tracking is
+       * specified.
+       * If kernel_tracker_max_interval = n > 0, then a tracking event
+       * is inserted after every n kernels without an event.
+       * 
+ * + * int32 kernel_tracker_max_interval = 7; + */ + public Builder clearKernelTrackerMaxInterval() { + + kernelTrackerMaxInterval_ = 0; + onChanged(); + return this; + } + + private int kernelTrackerMaxBytes_ ; + /** + *
+       * If kernel_tracker_max_bytes = n > 0, then a tracking event is
+       * inserted after every series of kernels allocating a sum of
+       * memory >= n.  If one kernel allocates b * n bytes, then one
+       * event will be inserted after it, but it will count as b against
+       * the pending limit.
+       * 
+ * + * int32 kernel_tracker_max_bytes = 8; + */ + public int getKernelTrackerMaxBytes() { + return kernelTrackerMaxBytes_; + } + /** + *
+       * If kernel_tracker_max_bytes = n > 0, then a tracking event is
+       * inserted after every series of kernels allocating a sum of
+       * memory >= n.  If one kernel allocates b * n bytes, then one
+       * event will be inserted after it, but it will count as b against
+       * the pending limit.
+       * 
+ * + * int32 kernel_tracker_max_bytes = 8; + */ + public Builder setKernelTrackerMaxBytes(int value) { + + kernelTrackerMaxBytes_ = value; + onChanged(); + return this; + } + /** + *
+       * If kernel_tracker_max_bytes = n > 0, then a tracking event is
+       * inserted after every series of kernels allocating a sum of
+       * memory >= n.  If one kernel allocates b * n bytes, then one
+       * event will be inserted after it, but it will count as b against
+       * the pending limit.
+       * 
+ * + * int32 kernel_tracker_max_bytes = 8; + */ + public Builder clearKernelTrackerMaxBytes() { + + kernelTrackerMaxBytes_ = 0; + onChanged(); + return this; + } + + private int kernelTrackerMaxPending_ ; + /** + *
+       * If kernel_tracker_max_pending > 0 then no more than this many
+       * tracking events can be outstanding at a time.  An attempt to
+       * launch an additional kernel will stall until an event
+       * completes.
+       * 
+ * + * int32 kernel_tracker_max_pending = 9; + */ + public int getKernelTrackerMaxPending() { + return kernelTrackerMaxPending_; + } + /** + *
+       * If kernel_tracker_max_pending > 0 then no more than this many
+       * tracking events can be outstanding at a time.  An attempt to
+       * launch an additional kernel will stall until an event
+       * completes.
+       * 
+ * + * int32 kernel_tracker_max_pending = 9; + */ + public Builder setKernelTrackerMaxPending(int value) { + + kernelTrackerMaxPending_ = value; + onChanged(); + return this; + } + /** + *
+       * If kernel_tracker_max_pending > 0 then no more than this many
+       * tracking events can be outstanding at a time.  An attempt to
+       * launch an additional kernel will stall until an event
+       * completes.
+       * 
+ * + * int32 kernel_tracker_max_pending = 9; + */ + public Builder clearKernelTrackerMaxPending() { + + kernelTrackerMaxPending_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GPUOptions.Experimental) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GPUOptions.Experimental) + private static final org.tensorflow.proto.framework.GPUOptions.Experimental DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GPUOptions.Experimental(); + } + + public static org.tensorflow.proto.framework.GPUOptions.Experimental getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Experimental parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Experimental(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GPUOptions.Experimental getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int PER_PROCESS_GPU_MEMORY_FRACTION_FIELD_NUMBER = 1; + private double perProcessGpuMemoryFraction_; + /** + *
+   * Fraction of the available GPU memory to allocate for each process.
+   * 1 means to allocate all of the GPU memory, 0.5 means the process
+   * allocates up to ~50% of the available GPU memory.
+   * GPU memory is pre-allocated unless the allow_growth option is enabled.
+   * If greater than 1.0, uses CUDA unified memory to potentially oversubscribe
+   * the amount of memory available on the GPU device by using host memory as a
+   * swap space. Accessing memory not available on the device will be
+   * significantly slower as that would require memory transfer between the host
+   * and the device. Options to reduce the memory requirement should be
+   * considered before enabling this option as this may come with a negative
+   * performance impact. Oversubscription using the unified memory requires
+   * Pascal class or newer GPUs and it is currently only supported on the Linux
+   * operating system. See
+   * https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#um-requirements
+   * for the detailed requirements.
+   * 
+ * + * double per_process_gpu_memory_fraction = 1; + */ + public double getPerProcessGpuMemoryFraction() { + return perProcessGpuMemoryFraction_; + } + + public static final int ALLOW_GROWTH_FIELD_NUMBER = 4; + private boolean allowGrowth_; + /** + *
+   * If true, the allocator does not pre-allocate the entire specified
+   * GPU memory region, instead starting small and growing as needed.
+   * 
+ * + * bool allow_growth = 4; + */ + public boolean getAllowGrowth() { + return allowGrowth_; + } + + public static final int ALLOCATOR_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object allocatorType_; + /** + *
+   * 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.
+   * 
+ * + * string allocator_type = 2; + */ + 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; + } + } + /** + *
+   * 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.
+   * 
+ * + * string allocator_type = 2; + */ + 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_; + /** + *
+   * 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).
+   * 
+ * + * int64 deferred_deletion_bytes = 3; + */ + public long getDeferredDeletionBytes() { + return deferredDeletionBytes_; + } + + public static final int VISIBLE_DEVICE_LIST_FIELD_NUMBER = 5; + private volatile java.lang.Object visibleDeviceList_; + /** + *
+   * A comma-separated list of GPU ids that determines the 'visible'
+   * to 'virtual' mapping of GPU devices.  For example, if TensorFlow
+   * can see 8 GPU devices in the process, and one wanted to map
+   * visible GPU devices 5 and 3 as "/device:GPU:0", and "/device:GPU:1",
+   * then one would specify this field as "5,3".  This field is similar in
+   * spirit to the CUDA_VISIBLE_DEVICES environment variable, except
+   * it applies to the visible GPU devices in the process.
+   * NOTE:
+   * 1. The GPU driver provides the process with the visible GPUs
+   *    in an order which is not guaranteed to have any correlation to
+   *    the *physical* GPU id in the machine.  This field is used for
+   *    remapping "visible" to "virtual", which means this operates only
+   *    after the process starts.  Users are required to use vendor
+   *    specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the
+   *    physical to visible device mapping prior to invoking TensorFlow.
+   * 2. In the code, the ids in this list are also called "platform GPU id"s,
+   *    and the 'virtual' ids of GPU devices (i.e. the ids in the device
+   *    name "/device:GPU:<id>") are also called "TF GPU id"s. Please
+   *    refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h
+   *    for more information.
+   * 
+ * + * string visible_device_list = 5; + */ + public java.lang.String getVisibleDeviceList() { + java.lang.Object ref = visibleDeviceList_; + 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(); + visibleDeviceList_ = s; + return s; + } + } + /** + *
+   * A comma-separated list of GPU ids that determines the 'visible'
+   * to 'virtual' mapping of GPU devices.  For example, if TensorFlow
+   * can see 8 GPU devices in the process, and one wanted to map
+   * visible GPU devices 5 and 3 as "/device:GPU:0", and "/device:GPU:1",
+   * then one would specify this field as "5,3".  This field is similar in
+   * spirit to the CUDA_VISIBLE_DEVICES environment variable, except
+   * it applies to the visible GPU devices in the process.
+   * NOTE:
+   * 1. The GPU driver provides the process with the visible GPUs
+   *    in an order which is not guaranteed to have any correlation to
+   *    the *physical* GPU id in the machine.  This field is used for
+   *    remapping "visible" to "virtual", which means this operates only
+   *    after the process starts.  Users are required to use vendor
+   *    specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the
+   *    physical to visible device mapping prior to invoking TensorFlow.
+   * 2. In the code, the ids in this list are also called "platform GPU id"s,
+   *    and the 'virtual' ids of GPU devices (i.e. the ids in the device
+   *    name "/device:GPU:<id>") are also called "TF GPU id"s. Please
+   *    refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h
+   *    for more information.
+   * 
+ * + * string visible_device_list = 5; + */ + public com.google.protobuf.ByteString + getVisibleDeviceListBytes() { + java.lang.Object ref = visibleDeviceList_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + visibleDeviceList_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLLING_ACTIVE_DELAY_USECS_FIELD_NUMBER = 6; + private int pollingActiveDelayUsecs_; + /** + *
+   * In the event polling loop sleep this many microseconds between
+   * PollEvents calls, when the queue is not empty.  If value is not
+   * set or set to 0, gets set to a non-zero default.
+   * 
+ * + * int32 polling_active_delay_usecs = 6; + */ + public int getPollingActiveDelayUsecs() { + return pollingActiveDelayUsecs_; + } + + public static final int POLLING_INACTIVE_DELAY_MSECS_FIELD_NUMBER = 7; + private int pollingInactiveDelayMsecs_; + /** + *
+   * This field is deprecated and ignored.
+   * 
+ * + * int32 polling_inactive_delay_msecs = 7; + */ + public int getPollingInactiveDelayMsecs() { + return pollingInactiveDelayMsecs_; + } + + public static final int FORCE_GPU_COMPATIBLE_FIELD_NUMBER = 8; + private boolean forceGpuCompatible_; + /** + *
+   * Force all tensors to be gpu_compatible. On a GPU-enabled TensorFlow,
+   * enabling this option forces all CPU tensors to be allocated with Cuda
+   * pinned memory. Normally, TensorFlow will infer which tensors should be
+   * allocated as the pinned memory. But in case where the inference is
+   * incomplete, this option can significantly speed up the cross-device memory
+   * copy performance as long as it fits the memory.
+   * Note that this option is not something that should be
+   * enabled by default for unknown or very large models, since all Cuda pinned
+   * memory is unpageable, having too much pinned memory might negatively impact
+   * the overall host system performance.
+   * 
+ * + * bool force_gpu_compatible = 8; + */ + public boolean getForceGpuCompatible() { + return forceGpuCompatible_; + } + + public static final int EXPERIMENTAL_FIELD_NUMBER = 9; + private org.tensorflow.proto.framework.GPUOptions.Experimental experimental_; + /** + *
+   * Everything inside experimental is subject to change and is not subject
+   * to API stability guarantees in
+   * https://www.tensorflow.org/guide/version_compat.
+   * 
+ * + * .tensorflow.GPUOptions.Experimental experimental = 9; + */ + public boolean hasExperimental() { + return experimental_ != null; + } + /** + *
+   * Everything inside experimental is subject to change and is not subject
+   * to API stability guarantees in
+   * https://www.tensorflow.org/guide/version_compat.
+   * 
+ * + * .tensorflow.GPUOptions.Experimental experimental = 9; + */ + public org.tensorflow.proto.framework.GPUOptions.Experimental getExperimental() { + return experimental_ == null ? org.tensorflow.proto.framework.GPUOptions.Experimental.getDefaultInstance() : experimental_; + } + /** + *
+   * Everything inside experimental is subject to change and is not subject
+   * to API stability guarantees in
+   * https://www.tensorflow.org/guide/version_compat.
+   * 
+ * + * .tensorflow.GPUOptions.Experimental experimental = 9; + */ + public org.tensorflow.proto.framework.GPUOptions.ExperimentalOrBuilder getExperimentalOrBuilder() { + return getExperimental(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (perProcessGpuMemoryFraction_ != 0D) { + output.writeDouble(1, perProcessGpuMemoryFraction_); + } + if (!getAllocatorTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, allocatorType_); + } + if (deferredDeletionBytes_ != 0L) { + output.writeInt64(3, deferredDeletionBytes_); + } + if (allowGrowth_ != false) { + output.writeBool(4, allowGrowth_); + } + if (!getVisibleDeviceListBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, visibleDeviceList_); + } + if (pollingActiveDelayUsecs_ != 0) { + output.writeInt32(6, pollingActiveDelayUsecs_); + } + if (pollingInactiveDelayMsecs_ != 0) { + output.writeInt32(7, pollingInactiveDelayMsecs_); + } + if (forceGpuCompatible_ != false) { + output.writeBool(8, forceGpuCompatible_); + } + if (experimental_ != null) { + output.writeMessage(9, getExperimental()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + 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.GeneratedMessageV3.computeStringSize(2, allocatorType_); + } + if (deferredDeletionBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, deferredDeletionBytes_); + } + if (allowGrowth_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, allowGrowth_); + } + if (!getVisibleDeviceListBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, visibleDeviceList_); + } + if (pollingActiveDelayUsecs_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, pollingActiveDelayUsecs_); + } + if (pollingInactiveDelayMsecs_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, pollingInactiveDelayMsecs_); + } + if (forceGpuCompatible_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, forceGpuCompatible_); + } + if (experimental_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getExperimental()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GPUOptions)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GPUOptions other = (org.tensorflow.proto.framework.GPUOptions) obj; + + if (java.lang.Double.doubleToLongBits(getPerProcessGpuMemoryFraction()) + != java.lang.Double.doubleToLongBits( + other.getPerProcessGpuMemoryFraction())) return false; + if (getAllowGrowth() + != other.getAllowGrowth()) return false; + if (!getAllocatorType() + .equals(other.getAllocatorType())) return false; + if (getDeferredDeletionBytes() + != other.getDeferredDeletionBytes()) return false; + if (!getVisibleDeviceList() + .equals(other.getVisibleDeviceList())) return false; + if (getPollingActiveDelayUsecs() + != other.getPollingActiveDelayUsecs()) return false; + if (getPollingInactiveDelayMsecs() + != other.getPollingInactiveDelayMsecs()) return false; + if (getForceGpuCompatible() + != other.getForceGpuCompatible()) return false; + if (hasExperimental() != other.hasExperimental()) return false; + if (hasExperimental()) { + if (!getExperimental() + .equals(other.getExperimental())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PER_PROCESS_GPU_MEMORY_FRACTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getPerProcessGpuMemoryFraction())); + hash = (37 * hash) + ALLOW_GROWTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowGrowth()); + hash = (37 * hash) + ALLOCATOR_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAllocatorType().hashCode(); + hash = (37 * hash) + DEFERRED_DELETION_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDeferredDeletionBytes()); + hash = (37 * hash) + VISIBLE_DEVICE_LIST_FIELD_NUMBER; + hash = (53 * hash) + getVisibleDeviceList().hashCode(); + hash = (37 * hash) + POLLING_ACTIVE_DELAY_USECS_FIELD_NUMBER; + hash = (53 * hash) + getPollingActiveDelayUsecs(); + hash = (37 * hash) + POLLING_INACTIVE_DELAY_MSECS_FIELD_NUMBER; + hash = (53 * hash) + getPollingInactiveDelayMsecs(); + hash = (37 * hash) + FORCE_GPU_COMPATIBLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForceGpuCompatible()); + if (hasExperimental()) { + hash = (37 * hash) + EXPERIMENTAL_FIELD_NUMBER; + hash = (53 * hash) + getExperimental().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GPUOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GPUOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GPUOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.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.proto.framework.GPUOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GPUOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GPUOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GPUOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GPUOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GPUOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GPUOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GPUOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GPUOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.GPUOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GPUOptions) + org.tensorflow.proto.framework.GPUOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GPUOptions.class, org.tensorflow.proto.framework.GPUOptions.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GPUOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + perProcessGpuMemoryFraction_ = 0D; + + allowGrowth_ = false; + + allocatorType_ = ""; + + deferredDeletionBytes_ = 0L; + + visibleDeviceList_ = ""; + + pollingActiveDelayUsecs_ = 0; + + pollingInactiveDelayMsecs_ = 0; + + forceGpuCompatible_ = false; + + if (experimentalBuilder_ == null) { + experimental_ = null; + } else { + experimental_ = null; + experimentalBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GPUOptions getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GPUOptions.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GPUOptions build() { + org.tensorflow.proto.framework.GPUOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GPUOptions buildPartial() { + org.tensorflow.proto.framework.GPUOptions result = new org.tensorflow.proto.framework.GPUOptions(this); + result.perProcessGpuMemoryFraction_ = perProcessGpuMemoryFraction_; + result.allowGrowth_ = allowGrowth_; + result.allocatorType_ = allocatorType_; + result.deferredDeletionBytes_ = deferredDeletionBytes_; + result.visibleDeviceList_ = visibleDeviceList_; + result.pollingActiveDelayUsecs_ = pollingActiveDelayUsecs_; + result.pollingInactiveDelayMsecs_ = pollingInactiveDelayMsecs_; + result.forceGpuCompatible_ = forceGpuCompatible_; + if (experimentalBuilder_ == null) { + result.experimental_ = experimental_; + } else { + result.experimental_ = experimentalBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GPUOptions) { + return mergeFrom((org.tensorflow.proto.framework.GPUOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GPUOptions other) { + if (other == org.tensorflow.proto.framework.GPUOptions.getDefaultInstance()) return this; + if (other.getPerProcessGpuMemoryFraction() != 0D) { + setPerProcessGpuMemoryFraction(other.getPerProcessGpuMemoryFraction()); + } + if (other.getAllowGrowth() != false) { + setAllowGrowth(other.getAllowGrowth()); + } + if (!other.getAllocatorType().isEmpty()) { + allocatorType_ = other.allocatorType_; + onChanged(); + } + if (other.getDeferredDeletionBytes() != 0L) { + setDeferredDeletionBytes(other.getDeferredDeletionBytes()); + } + if (!other.getVisibleDeviceList().isEmpty()) { + visibleDeviceList_ = other.visibleDeviceList_; + onChanged(); + } + if (other.getPollingActiveDelayUsecs() != 0) { + setPollingActiveDelayUsecs(other.getPollingActiveDelayUsecs()); + } + if (other.getPollingInactiveDelayMsecs() != 0) { + setPollingInactiveDelayMsecs(other.getPollingInactiveDelayMsecs()); + } + if (other.getForceGpuCompatible() != false) { + setForceGpuCompatible(other.getForceGpuCompatible()); + } + if (other.hasExperimental()) { + mergeExperimental(other.getExperimental()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GPUOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GPUOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private double perProcessGpuMemoryFraction_ ; + /** + *
+     * Fraction of the available GPU memory to allocate for each process.
+     * 1 means to allocate all of the GPU memory, 0.5 means the process
+     * allocates up to ~50% of the available GPU memory.
+     * GPU memory is pre-allocated unless the allow_growth option is enabled.
+     * If greater than 1.0, uses CUDA unified memory to potentially oversubscribe
+     * the amount of memory available on the GPU device by using host memory as a
+     * swap space. Accessing memory not available on the device will be
+     * significantly slower as that would require memory transfer between the host
+     * and the device. Options to reduce the memory requirement should be
+     * considered before enabling this option as this may come with a negative
+     * performance impact. Oversubscription using the unified memory requires
+     * Pascal class or newer GPUs and it is currently only supported on the Linux
+     * operating system. See
+     * https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#um-requirements
+     * for the detailed requirements.
+     * 
+ * + * double per_process_gpu_memory_fraction = 1; + */ + public double getPerProcessGpuMemoryFraction() { + return perProcessGpuMemoryFraction_; + } + /** + *
+     * Fraction of the available GPU memory to allocate for each process.
+     * 1 means to allocate all of the GPU memory, 0.5 means the process
+     * allocates up to ~50% of the available GPU memory.
+     * GPU memory is pre-allocated unless the allow_growth option is enabled.
+     * If greater than 1.0, uses CUDA unified memory to potentially oversubscribe
+     * the amount of memory available on the GPU device by using host memory as a
+     * swap space. Accessing memory not available on the device will be
+     * significantly slower as that would require memory transfer between the host
+     * and the device. Options to reduce the memory requirement should be
+     * considered before enabling this option as this may come with a negative
+     * performance impact. Oversubscription using the unified memory requires
+     * Pascal class or newer GPUs and it is currently only supported on the Linux
+     * operating system. See
+     * https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#um-requirements
+     * for the detailed requirements.
+     * 
+ * + * double per_process_gpu_memory_fraction = 1; + */ + public Builder setPerProcessGpuMemoryFraction(double value) { + + perProcessGpuMemoryFraction_ = value; + onChanged(); + return this; + } + /** + *
+     * Fraction of the available GPU memory to allocate for each process.
+     * 1 means to allocate all of the GPU memory, 0.5 means the process
+     * allocates up to ~50% of the available GPU memory.
+     * GPU memory is pre-allocated unless the allow_growth option is enabled.
+     * If greater than 1.0, uses CUDA unified memory to potentially oversubscribe
+     * the amount of memory available on the GPU device by using host memory as a
+     * swap space. Accessing memory not available on the device will be
+     * significantly slower as that would require memory transfer between the host
+     * and the device. Options to reduce the memory requirement should be
+     * considered before enabling this option as this may come with a negative
+     * performance impact. Oversubscription using the unified memory requires
+     * Pascal class or newer GPUs and it is currently only supported on the Linux
+     * operating system. See
+     * https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#um-requirements
+     * for the detailed requirements.
+     * 
+ * + * double per_process_gpu_memory_fraction = 1; + */ + public Builder clearPerProcessGpuMemoryFraction() { + + perProcessGpuMemoryFraction_ = 0D; + onChanged(); + return this; + } + + private boolean allowGrowth_ ; + /** + *
+     * If true, the allocator does not pre-allocate the entire specified
+     * GPU memory region, instead starting small and growing as needed.
+     * 
+ * + * bool allow_growth = 4; + */ + public boolean getAllowGrowth() { + return allowGrowth_; + } + /** + *
+     * If true, the allocator does not pre-allocate the entire specified
+     * GPU memory region, instead starting small and growing as needed.
+     * 
+ * + * bool allow_growth = 4; + */ + public Builder setAllowGrowth(boolean value) { + + allowGrowth_ = value; + onChanged(); + return this; + } + /** + *
+     * If true, the allocator does not pre-allocate the entire specified
+     * GPU memory region, instead starting small and growing as needed.
+     * 
+ * + * bool allow_growth = 4; + */ + public Builder clearAllowGrowth() { + + allowGrowth_ = false; + onChanged(); + return this; + } + + private java.lang.Object allocatorType_ = ""; + /** + *
+     * 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.
+     * 
+ * + * string allocator_type = 2; + */ + 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; + } + } + /** + *
+     * 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.
+     * 
+ * + * string allocator_type = 2; + */ + 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; + } + } + /** + *
+     * 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.
+     * 
+ * + * string allocator_type = 2; + */ + public Builder setAllocatorType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + allocatorType_ = value; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string allocator_type = 2; + */ + public Builder clearAllocatorType() { + + allocatorType_ = getDefaultInstance().getAllocatorType(); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string allocator_type = 2; + */ + public Builder setAllocatorTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + allocatorType_ = value; + onChanged(); + return this; + } + + private long deferredDeletionBytes_ ; + /** + *
+     * 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).
+     * 
+ * + * int64 deferred_deletion_bytes = 3; + */ + public long getDeferredDeletionBytes() { + return deferredDeletionBytes_; + } + /** + *
+     * 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).
+     * 
+ * + * int64 deferred_deletion_bytes = 3; + */ + public Builder setDeferredDeletionBytes(long value) { + + deferredDeletionBytes_ = value; + onChanged(); + return this; + } + /** + *
+     * 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).
+     * 
+ * + * int64 deferred_deletion_bytes = 3; + */ + public Builder clearDeferredDeletionBytes() { + + deferredDeletionBytes_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object visibleDeviceList_ = ""; + /** + *
+     * A comma-separated list of GPU ids that determines the 'visible'
+     * to 'virtual' mapping of GPU devices.  For example, if TensorFlow
+     * can see 8 GPU devices in the process, and one wanted to map
+     * visible GPU devices 5 and 3 as "/device:GPU:0", and "/device:GPU:1",
+     * then one would specify this field as "5,3".  This field is similar in
+     * spirit to the CUDA_VISIBLE_DEVICES environment variable, except
+     * it applies to the visible GPU devices in the process.
+     * NOTE:
+     * 1. The GPU driver provides the process with the visible GPUs
+     *    in an order which is not guaranteed to have any correlation to
+     *    the *physical* GPU id in the machine.  This field is used for
+     *    remapping "visible" to "virtual", which means this operates only
+     *    after the process starts.  Users are required to use vendor
+     *    specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the
+     *    physical to visible device mapping prior to invoking TensorFlow.
+     * 2. In the code, the ids in this list are also called "platform GPU id"s,
+     *    and the 'virtual' ids of GPU devices (i.e. the ids in the device
+     *    name "/device:GPU:<id>") are also called "TF GPU id"s. Please
+     *    refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h
+     *    for more information.
+     * 
+ * + * string visible_device_list = 5; + */ + public java.lang.String getVisibleDeviceList() { + java.lang.Object ref = visibleDeviceList_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + visibleDeviceList_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A comma-separated list of GPU ids that determines the 'visible'
+     * to 'virtual' mapping of GPU devices.  For example, if TensorFlow
+     * can see 8 GPU devices in the process, and one wanted to map
+     * visible GPU devices 5 and 3 as "/device:GPU:0", and "/device:GPU:1",
+     * then one would specify this field as "5,3".  This field is similar in
+     * spirit to the CUDA_VISIBLE_DEVICES environment variable, except
+     * it applies to the visible GPU devices in the process.
+     * NOTE:
+     * 1. The GPU driver provides the process with the visible GPUs
+     *    in an order which is not guaranteed to have any correlation to
+     *    the *physical* GPU id in the machine.  This field is used for
+     *    remapping "visible" to "virtual", which means this operates only
+     *    after the process starts.  Users are required to use vendor
+     *    specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the
+     *    physical to visible device mapping prior to invoking TensorFlow.
+     * 2. In the code, the ids in this list are also called "platform GPU id"s,
+     *    and the 'virtual' ids of GPU devices (i.e. the ids in the device
+     *    name "/device:GPU:<id>") are also called "TF GPU id"s. Please
+     *    refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h
+     *    for more information.
+     * 
+ * + * string visible_device_list = 5; + */ + public com.google.protobuf.ByteString + getVisibleDeviceListBytes() { + java.lang.Object ref = visibleDeviceList_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + visibleDeviceList_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A comma-separated list of GPU ids that determines the 'visible'
+     * to 'virtual' mapping of GPU devices.  For example, if TensorFlow
+     * can see 8 GPU devices in the process, and one wanted to map
+     * visible GPU devices 5 and 3 as "/device:GPU:0", and "/device:GPU:1",
+     * then one would specify this field as "5,3".  This field is similar in
+     * spirit to the CUDA_VISIBLE_DEVICES environment variable, except
+     * it applies to the visible GPU devices in the process.
+     * NOTE:
+     * 1. The GPU driver provides the process with the visible GPUs
+     *    in an order which is not guaranteed to have any correlation to
+     *    the *physical* GPU id in the machine.  This field is used for
+     *    remapping "visible" to "virtual", which means this operates only
+     *    after the process starts.  Users are required to use vendor
+     *    specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the
+     *    physical to visible device mapping prior to invoking TensorFlow.
+     * 2. In the code, the ids in this list are also called "platform GPU id"s,
+     *    and the 'virtual' ids of GPU devices (i.e. the ids in the device
+     *    name "/device:GPU:<id>") are also called "TF GPU id"s. Please
+     *    refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h
+     *    for more information.
+     * 
+ * + * string visible_device_list = 5; + */ + public Builder setVisibleDeviceList( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + visibleDeviceList_ = value; + onChanged(); + return this; + } + /** + *
+     * A comma-separated list of GPU ids that determines the 'visible'
+     * to 'virtual' mapping of GPU devices.  For example, if TensorFlow
+     * can see 8 GPU devices in the process, and one wanted to map
+     * visible GPU devices 5 and 3 as "/device:GPU:0", and "/device:GPU:1",
+     * then one would specify this field as "5,3".  This field is similar in
+     * spirit to the CUDA_VISIBLE_DEVICES environment variable, except
+     * it applies to the visible GPU devices in the process.
+     * NOTE:
+     * 1. The GPU driver provides the process with the visible GPUs
+     *    in an order which is not guaranteed to have any correlation to
+     *    the *physical* GPU id in the machine.  This field is used for
+     *    remapping "visible" to "virtual", which means this operates only
+     *    after the process starts.  Users are required to use vendor
+     *    specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the
+     *    physical to visible device mapping prior to invoking TensorFlow.
+     * 2. In the code, the ids in this list are also called "platform GPU id"s,
+     *    and the 'virtual' ids of GPU devices (i.e. the ids in the device
+     *    name "/device:GPU:<id>") are also called "TF GPU id"s. Please
+     *    refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h
+     *    for more information.
+     * 
+ * + * string visible_device_list = 5; + */ + public Builder clearVisibleDeviceList() { + + visibleDeviceList_ = getDefaultInstance().getVisibleDeviceList(); + onChanged(); + return this; + } + /** + *
+     * A comma-separated list of GPU ids that determines the 'visible'
+     * to 'virtual' mapping of GPU devices.  For example, if TensorFlow
+     * can see 8 GPU devices in the process, and one wanted to map
+     * visible GPU devices 5 and 3 as "/device:GPU:0", and "/device:GPU:1",
+     * then one would specify this field as "5,3".  This field is similar in
+     * spirit to the CUDA_VISIBLE_DEVICES environment variable, except
+     * it applies to the visible GPU devices in the process.
+     * NOTE:
+     * 1. The GPU driver provides the process with the visible GPUs
+     *    in an order which is not guaranteed to have any correlation to
+     *    the *physical* GPU id in the machine.  This field is used for
+     *    remapping "visible" to "virtual", which means this operates only
+     *    after the process starts.  Users are required to use vendor
+     *    specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the
+     *    physical to visible device mapping prior to invoking TensorFlow.
+     * 2. In the code, the ids in this list are also called "platform GPU id"s,
+     *    and the 'virtual' ids of GPU devices (i.e. the ids in the device
+     *    name "/device:GPU:<id>") are also called "TF GPU id"s. Please
+     *    refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h
+     *    for more information.
+     * 
+ * + * string visible_device_list = 5; + */ + public Builder setVisibleDeviceListBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + visibleDeviceList_ = value; + onChanged(); + return this; + } + + private int pollingActiveDelayUsecs_ ; + /** + *
+     * In the event polling loop sleep this many microseconds between
+     * PollEvents calls, when the queue is not empty.  If value is not
+     * set or set to 0, gets set to a non-zero default.
+     * 
+ * + * int32 polling_active_delay_usecs = 6; + */ + public int getPollingActiveDelayUsecs() { + return pollingActiveDelayUsecs_; + } + /** + *
+     * In the event polling loop sleep this many microseconds between
+     * PollEvents calls, when the queue is not empty.  If value is not
+     * set or set to 0, gets set to a non-zero default.
+     * 
+ * + * int32 polling_active_delay_usecs = 6; + */ + public Builder setPollingActiveDelayUsecs(int value) { + + pollingActiveDelayUsecs_ = value; + onChanged(); + return this; + } + /** + *
+     * In the event polling loop sleep this many microseconds between
+     * PollEvents calls, when the queue is not empty.  If value is not
+     * set or set to 0, gets set to a non-zero default.
+     * 
+ * + * int32 polling_active_delay_usecs = 6; + */ + public Builder clearPollingActiveDelayUsecs() { + + pollingActiveDelayUsecs_ = 0; + onChanged(); + return this; + } + + private int pollingInactiveDelayMsecs_ ; + /** + *
+     * This field is deprecated and ignored.
+     * 
+ * + * int32 polling_inactive_delay_msecs = 7; + */ + public int getPollingInactiveDelayMsecs() { + return pollingInactiveDelayMsecs_; + } + /** + *
+     * This field is deprecated and ignored.
+     * 
+ * + * int32 polling_inactive_delay_msecs = 7; + */ + public Builder setPollingInactiveDelayMsecs(int value) { + + pollingInactiveDelayMsecs_ = value; + onChanged(); + return this; + } + /** + *
+     * This field is deprecated and ignored.
+     * 
+ * + * int32 polling_inactive_delay_msecs = 7; + */ + public Builder clearPollingInactiveDelayMsecs() { + + pollingInactiveDelayMsecs_ = 0; + onChanged(); + return this; + } + + private boolean forceGpuCompatible_ ; + /** + *
+     * Force all tensors to be gpu_compatible. On a GPU-enabled TensorFlow,
+     * enabling this option forces all CPU tensors to be allocated with Cuda
+     * pinned memory. Normally, TensorFlow will infer which tensors should be
+     * allocated as the pinned memory. But in case where the inference is
+     * incomplete, this option can significantly speed up the cross-device memory
+     * copy performance as long as it fits the memory.
+     * Note that this option is not something that should be
+     * enabled by default for unknown or very large models, since all Cuda pinned
+     * memory is unpageable, having too much pinned memory might negatively impact
+     * the overall host system performance.
+     * 
+ * + * bool force_gpu_compatible = 8; + */ + public boolean getForceGpuCompatible() { + return forceGpuCompatible_; + } + /** + *
+     * Force all tensors to be gpu_compatible. On a GPU-enabled TensorFlow,
+     * enabling this option forces all CPU tensors to be allocated with Cuda
+     * pinned memory. Normally, TensorFlow will infer which tensors should be
+     * allocated as the pinned memory. But in case where the inference is
+     * incomplete, this option can significantly speed up the cross-device memory
+     * copy performance as long as it fits the memory.
+     * Note that this option is not something that should be
+     * enabled by default for unknown or very large models, since all Cuda pinned
+     * memory is unpageable, having too much pinned memory might negatively impact
+     * the overall host system performance.
+     * 
+ * + * bool force_gpu_compatible = 8; + */ + public Builder setForceGpuCompatible(boolean value) { + + forceGpuCompatible_ = value; + onChanged(); + return this; + } + /** + *
+     * Force all tensors to be gpu_compatible. On a GPU-enabled TensorFlow,
+     * enabling this option forces all CPU tensors to be allocated with Cuda
+     * pinned memory. Normally, TensorFlow will infer which tensors should be
+     * allocated as the pinned memory. But in case where the inference is
+     * incomplete, this option can significantly speed up the cross-device memory
+     * copy performance as long as it fits the memory.
+     * Note that this option is not something that should be
+     * enabled by default for unknown or very large models, since all Cuda pinned
+     * memory is unpageable, having too much pinned memory might negatively impact
+     * the overall host system performance.
+     * 
+ * + * bool force_gpu_compatible = 8; + */ + public Builder clearForceGpuCompatible() { + + forceGpuCompatible_ = false; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.GPUOptions.Experimental experimental_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GPUOptions.Experimental, org.tensorflow.proto.framework.GPUOptions.Experimental.Builder, org.tensorflow.proto.framework.GPUOptions.ExperimentalOrBuilder> experimentalBuilder_; + /** + *
+     * Everything inside experimental is subject to change and is not subject
+     * to API stability guarantees in
+     * https://www.tensorflow.org/guide/version_compat.
+     * 
+ * + * .tensorflow.GPUOptions.Experimental experimental = 9; + */ + public boolean hasExperimental() { + return experimentalBuilder_ != null || experimental_ != null; + } + /** + *
+     * Everything inside experimental is subject to change and is not subject
+     * to API stability guarantees in
+     * https://www.tensorflow.org/guide/version_compat.
+     * 
+ * + * .tensorflow.GPUOptions.Experimental experimental = 9; + */ + public org.tensorflow.proto.framework.GPUOptions.Experimental getExperimental() { + if (experimentalBuilder_ == null) { + return experimental_ == null ? org.tensorflow.proto.framework.GPUOptions.Experimental.getDefaultInstance() : experimental_; + } else { + return experimentalBuilder_.getMessage(); + } + } + /** + *
+     * Everything inside experimental is subject to change and is not subject
+     * to API stability guarantees in
+     * https://www.tensorflow.org/guide/version_compat.
+     * 
+ * + * .tensorflow.GPUOptions.Experimental experimental = 9; + */ + public Builder setExperimental(org.tensorflow.proto.framework.GPUOptions.Experimental value) { + if (experimentalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + experimental_ = value; + onChanged(); + } else { + experimentalBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Everything inside experimental is subject to change and is not subject
+     * to API stability guarantees in
+     * https://www.tensorflow.org/guide/version_compat.
+     * 
+ * + * .tensorflow.GPUOptions.Experimental experimental = 9; + */ + public Builder setExperimental( + org.tensorflow.proto.framework.GPUOptions.Experimental.Builder builderForValue) { + if (experimentalBuilder_ == null) { + experimental_ = builderForValue.build(); + onChanged(); + } else { + experimentalBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Everything inside experimental is subject to change and is not subject
+     * to API stability guarantees in
+     * https://www.tensorflow.org/guide/version_compat.
+     * 
+ * + * .tensorflow.GPUOptions.Experimental experimental = 9; + */ + public Builder mergeExperimental(org.tensorflow.proto.framework.GPUOptions.Experimental value) { + if (experimentalBuilder_ == null) { + if (experimental_ != null) { + experimental_ = + org.tensorflow.proto.framework.GPUOptions.Experimental.newBuilder(experimental_).mergeFrom(value).buildPartial(); + } else { + experimental_ = value; + } + onChanged(); + } else { + experimentalBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Everything inside experimental is subject to change and is not subject
+     * to API stability guarantees in
+     * https://www.tensorflow.org/guide/version_compat.
+     * 
+ * + * .tensorflow.GPUOptions.Experimental experimental = 9; + */ + public Builder clearExperimental() { + if (experimentalBuilder_ == null) { + experimental_ = null; + onChanged(); + } else { + experimental_ = null; + experimentalBuilder_ = null; + } + + return this; + } + /** + *
+     * Everything inside experimental is subject to change and is not subject
+     * to API stability guarantees in
+     * https://www.tensorflow.org/guide/version_compat.
+     * 
+ * + * .tensorflow.GPUOptions.Experimental experimental = 9; + */ + public org.tensorflow.proto.framework.GPUOptions.Experimental.Builder getExperimentalBuilder() { + + onChanged(); + return getExperimentalFieldBuilder().getBuilder(); + } + /** + *
+     * Everything inside experimental is subject to change and is not subject
+     * to API stability guarantees in
+     * https://www.tensorflow.org/guide/version_compat.
+     * 
+ * + * .tensorflow.GPUOptions.Experimental experimental = 9; + */ + public org.tensorflow.proto.framework.GPUOptions.ExperimentalOrBuilder getExperimentalOrBuilder() { + if (experimentalBuilder_ != null) { + return experimentalBuilder_.getMessageOrBuilder(); + } else { + return experimental_ == null ? + org.tensorflow.proto.framework.GPUOptions.Experimental.getDefaultInstance() : experimental_; + } + } + /** + *
+     * Everything inside experimental is subject to change and is not subject
+     * to API stability guarantees in
+     * https://www.tensorflow.org/guide/version_compat.
+     * 
+ * + * .tensorflow.GPUOptions.Experimental experimental = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GPUOptions.Experimental, org.tensorflow.proto.framework.GPUOptions.Experimental.Builder, org.tensorflow.proto.framework.GPUOptions.ExperimentalOrBuilder> + getExperimentalFieldBuilder() { + if (experimentalBuilder_ == null) { + experimentalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GPUOptions.Experimental, org.tensorflow.proto.framework.GPUOptions.Experimental.Builder, org.tensorflow.proto.framework.GPUOptions.ExperimentalOrBuilder>( + getExperimental(), + getParentForChildren(), + isClean()); + experimental_ = null; + } + return experimentalBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GPUOptions) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GPUOptions) + private static final org.tensorflow.proto.framework.GPUOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GPUOptions(); + } + + public static org.tensorflow.proto.framework.GPUOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GPUOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GPUOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GPUOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GPUOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GPUOptionsOrBuilder.java new file mode 100644 index 00000000000..6f11472d49a --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GPUOptionsOrBuilder.java @@ -0,0 +1,206 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +public interface GPUOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GPUOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Fraction of the available GPU memory to allocate for each process.
+   * 1 means to allocate all of the GPU memory, 0.5 means the process
+   * allocates up to ~50% of the available GPU memory.
+   * GPU memory is pre-allocated unless the allow_growth option is enabled.
+   * If greater than 1.0, uses CUDA unified memory to potentially oversubscribe
+   * the amount of memory available on the GPU device by using host memory as a
+   * swap space. Accessing memory not available on the device will be
+   * significantly slower as that would require memory transfer between the host
+   * and the device. Options to reduce the memory requirement should be
+   * considered before enabling this option as this may come with a negative
+   * performance impact. Oversubscription using the unified memory requires
+   * Pascal class or newer GPUs and it is currently only supported on the Linux
+   * operating system. See
+   * https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#um-requirements
+   * for the detailed requirements.
+   * 
+ * + * double per_process_gpu_memory_fraction = 1; + */ + double getPerProcessGpuMemoryFraction(); + + /** + *
+   * If true, the allocator does not pre-allocate the entire specified
+   * GPU memory region, instead starting small and growing as needed.
+   * 
+ * + * bool allow_growth = 4; + */ + boolean getAllowGrowth(); + + /** + *
+   * 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.
+   * 
+ * + * string allocator_type = 2; + */ + java.lang.String getAllocatorType(); + /** + *
+   * 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.
+   * 
+ * + * string allocator_type = 2; + */ + com.google.protobuf.ByteString + getAllocatorTypeBytes(); + + /** + *
+   * 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).
+   * 
+ * + * int64 deferred_deletion_bytes = 3; + */ + long getDeferredDeletionBytes(); + + /** + *
+   * A comma-separated list of GPU ids that determines the 'visible'
+   * to 'virtual' mapping of GPU devices.  For example, if TensorFlow
+   * can see 8 GPU devices in the process, and one wanted to map
+   * visible GPU devices 5 and 3 as "/device:GPU:0", and "/device:GPU:1",
+   * then one would specify this field as "5,3".  This field is similar in
+   * spirit to the CUDA_VISIBLE_DEVICES environment variable, except
+   * it applies to the visible GPU devices in the process.
+   * NOTE:
+   * 1. The GPU driver provides the process with the visible GPUs
+   *    in an order which is not guaranteed to have any correlation to
+   *    the *physical* GPU id in the machine.  This field is used for
+   *    remapping "visible" to "virtual", which means this operates only
+   *    after the process starts.  Users are required to use vendor
+   *    specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the
+   *    physical to visible device mapping prior to invoking TensorFlow.
+   * 2. In the code, the ids in this list are also called "platform GPU id"s,
+   *    and the 'virtual' ids of GPU devices (i.e. the ids in the device
+   *    name "/device:GPU:<id>") are also called "TF GPU id"s. Please
+   *    refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h
+   *    for more information.
+   * 
+ * + * string visible_device_list = 5; + */ + java.lang.String getVisibleDeviceList(); + /** + *
+   * A comma-separated list of GPU ids that determines the 'visible'
+   * to 'virtual' mapping of GPU devices.  For example, if TensorFlow
+   * can see 8 GPU devices in the process, and one wanted to map
+   * visible GPU devices 5 and 3 as "/device:GPU:0", and "/device:GPU:1",
+   * then one would specify this field as "5,3".  This field is similar in
+   * spirit to the CUDA_VISIBLE_DEVICES environment variable, except
+   * it applies to the visible GPU devices in the process.
+   * NOTE:
+   * 1. The GPU driver provides the process with the visible GPUs
+   *    in an order which is not guaranteed to have any correlation to
+   *    the *physical* GPU id in the machine.  This field is used for
+   *    remapping "visible" to "virtual", which means this operates only
+   *    after the process starts.  Users are required to use vendor
+   *    specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the
+   *    physical to visible device mapping prior to invoking TensorFlow.
+   * 2. In the code, the ids in this list are also called "platform GPU id"s,
+   *    and the 'virtual' ids of GPU devices (i.e. the ids in the device
+   *    name "/device:GPU:<id>") are also called "TF GPU id"s. Please
+   *    refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h
+   *    for more information.
+   * 
+ * + * string visible_device_list = 5; + */ + com.google.protobuf.ByteString + getVisibleDeviceListBytes(); + + /** + *
+   * In the event polling loop sleep this many microseconds between
+   * PollEvents calls, when the queue is not empty.  If value is not
+   * set or set to 0, gets set to a non-zero default.
+   * 
+ * + * int32 polling_active_delay_usecs = 6; + */ + int getPollingActiveDelayUsecs(); + + /** + *
+   * This field is deprecated and ignored.
+   * 
+ * + * int32 polling_inactive_delay_msecs = 7; + */ + int getPollingInactiveDelayMsecs(); + + /** + *
+   * Force all tensors to be gpu_compatible. On a GPU-enabled TensorFlow,
+   * enabling this option forces all CPU tensors to be allocated with Cuda
+   * pinned memory. Normally, TensorFlow will infer which tensors should be
+   * allocated as the pinned memory. But in case where the inference is
+   * incomplete, this option can significantly speed up the cross-device memory
+   * copy performance as long as it fits the memory.
+   * Note that this option is not something that should be
+   * enabled by default for unknown or very large models, since all Cuda pinned
+   * memory is unpageable, having too much pinned memory might negatively impact
+   * the overall host system performance.
+   * 
+ * + * bool force_gpu_compatible = 8; + */ + boolean getForceGpuCompatible(); + + /** + *
+   * Everything inside experimental is subject to change and is not subject
+   * to API stability guarantees in
+   * https://www.tensorflow.org/guide/version_compat.
+   * 
+ * + * .tensorflow.GPUOptions.Experimental experimental = 9; + */ + boolean hasExperimental(); + /** + *
+   * Everything inside experimental is subject to change and is not subject
+   * to API stability guarantees in
+   * https://www.tensorflow.org/guide/version_compat.
+   * 
+ * + * .tensorflow.GPUOptions.Experimental experimental = 9; + */ + org.tensorflow.proto.framework.GPUOptions.Experimental getExperimental(); + /** + *
+   * Everything inside experimental is subject to change and is not subject
+   * to API stability guarantees in
+   * https://www.tensorflow.org/guide/version_compat.
+   * 
+ * + * .tensorflow.GPUOptions.Experimental experimental = 9; + */ + org.tensorflow.proto.framework.GPUOptions.ExperimentalOrBuilder getExperimentalOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GradientDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GradientDef.java new file mode 100644 index 00000000000..fe1126cb2ef --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GradientDef.java @@ -0,0 +1,765 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/function.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * GradientDef defines the gradient function of a function defined in
+ * a function library.
+ * A gradient function g (specified by gradient_func) for a function f
+ * (specified by function_name) must follow the following:
+ * The function 'f' must be a numerical function which takes N inputs
+ * and produces M outputs. Its gradient function 'g', which is a
+ * function taking N + M inputs and produces N outputs.
+ * I.e. if we have
+ *    (y1, y2, ..., y_M) = f(x1, x2, ..., x_N),
+ * then, g is
+ *    (dL/dx1, dL/dx2, ..., dL/dx_N) = g(x1, x2, ..., x_N,
+ *                                      dL/dy1, dL/dy2, ..., dL/dy_M),
+ * where L is a scalar-value function of (x1, x2, ..., xN) (e.g., the
+ * loss function). dL/dx_i is the partial derivative of L with respect
+ * to x_i.
+ * 
+ * + * Protobuf type {@code tensorflow.GradientDef} + */ +public final class GradientDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GradientDef) + GradientDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use GradientDef.newBuilder() to construct. + private GradientDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GradientDef() { + functionName_ = ""; + gradientFunc_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GradientDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GradientDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + functionName_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + gradientFunc_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_GradientDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_GradientDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GradientDef.class, org.tensorflow.proto.framework.GradientDef.Builder.class); + } + + public static final int FUNCTION_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object functionName_; + /** + *
+   * The function name.
+   * 
+ * + * string function_name = 1; + */ + public java.lang.String getFunctionName() { + java.lang.Object ref = functionName_; + 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(); + functionName_ = s; + return s; + } + } + /** + *
+   * The function name.
+   * 
+ * + * string function_name = 1; + */ + public com.google.protobuf.ByteString + getFunctionNameBytes() { + java.lang.Object ref = functionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + functionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GRADIENT_FUNC_FIELD_NUMBER = 2; + private volatile java.lang.Object gradientFunc_; + /** + *
+   * The gradient function's name.
+   * 
+ * + * string gradient_func = 2; + */ + public java.lang.String getGradientFunc() { + java.lang.Object ref = gradientFunc_; + 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(); + gradientFunc_ = s; + return s; + } + } + /** + *
+   * The gradient function's name.
+   * 
+ * + * string gradient_func = 2; + */ + public com.google.protobuf.ByteString + getGradientFuncBytes() { + java.lang.Object ref = gradientFunc_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gradientFunc_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getFunctionNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, functionName_); + } + if (!getGradientFuncBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gradientFunc_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFunctionNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, functionName_); + } + if (!getGradientFuncBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gradientFunc_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GradientDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GradientDef other = (org.tensorflow.proto.framework.GradientDef) obj; + + if (!getFunctionName() + .equals(other.getFunctionName())) return false; + if (!getGradientFunc() + .equals(other.getGradientFunc())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FUNCTION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFunctionName().hashCode(); + hash = (37 * hash) + GRADIENT_FUNC_FIELD_NUMBER; + hash = (53 * hash) + getGradientFunc().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GradientDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GradientDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GradientDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GradientDef 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.proto.framework.GradientDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GradientDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GradientDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GradientDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GradientDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GradientDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GradientDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GradientDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GradientDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * GradientDef defines the gradient function of a function defined in
+   * a function library.
+   * A gradient function g (specified by gradient_func) for a function f
+   * (specified by function_name) must follow the following:
+   * The function 'f' must be a numerical function which takes N inputs
+   * and produces M outputs. Its gradient function 'g', which is a
+   * function taking N + M inputs and produces N outputs.
+   * I.e. if we have
+   *    (y1, y2, ..., y_M) = f(x1, x2, ..., x_N),
+   * then, g is
+   *    (dL/dx1, dL/dx2, ..., dL/dx_N) = g(x1, x2, ..., x_N,
+   *                                      dL/dy1, dL/dy2, ..., dL/dy_M),
+   * where L is a scalar-value function of (x1, x2, ..., xN) (e.g., the
+   * loss function). dL/dx_i is the partial derivative of L with respect
+   * to x_i.
+   * 
+ * + * Protobuf type {@code tensorflow.GradientDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GradientDef) + org.tensorflow.proto.framework.GradientDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_GradientDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_GradientDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GradientDef.class, org.tensorflow.proto.framework.GradientDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GradientDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + functionName_ = ""; + + gradientFunc_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.FunctionProtos.internal_static_tensorflow_GradientDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GradientDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GradientDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GradientDef build() { + org.tensorflow.proto.framework.GradientDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GradientDef buildPartial() { + org.tensorflow.proto.framework.GradientDef result = new org.tensorflow.proto.framework.GradientDef(this); + result.functionName_ = functionName_; + result.gradientFunc_ = gradientFunc_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GradientDef) { + return mergeFrom((org.tensorflow.proto.framework.GradientDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GradientDef other) { + if (other == org.tensorflow.proto.framework.GradientDef.getDefaultInstance()) return this; + if (!other.getFunctionName().isEmpty()) { + functionName_ = other.functionName_; + onChanged(); + } + if (!other.getGradientFunc().isEmpty()) { + gradientFunc_ = other.gradientFunc_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GradientDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GradientDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object functionName_ = ""; + /** + *
+     * The function name.
+     * 
+ * + * string function_name = 1; + */ + public java.lang.String getFunctionName() { + java.lang.Object ref = functionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + functionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The function name.
+     * 
+ * + * string function_name = 1; + */ + public com.google.protobuf.ByteString + getFunctionNameBytes() { + java.lang.Object ref = functionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + functionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The function name.
+     * 
+ * + * string function_name = 1; + */ + public Builder setFunctionName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + functionName_ = value; + onChanged(); + return this; + } + /** + *
+     * The function name.
+     * 
+ * + * string function_name = 1; + */ + public Builder clearFunctionName() { + + functionName_ = getDefaultInstance().getFunctionName(); + onChanged(); + return this; + } + /** + *
+     * The function name.
+     * 
+ * + * string function_name = 1; + */ + public Builder setFunctionNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + functionName_ = value; + onChanged(); + return this; + } + + private java.lang.Object gradientFunc_ = ""; + /** + *
+     * The gradient function's name.
+     * 
+ * + * string gradient_func = 2; + */ + public java.lang.String getGradientFunc() { + java.lang.Object ref = gradientFunc_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gradientFunc_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The gradient function's name.
+     * 
+ * + * string gradient_func = 2; + */ + public com.google.protobuf.ByteString + getGradientFuncBytes() { + java.lang.Object ref = gradientFunc_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gradientFunc_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The gradient function's name.
+     * 
+ * + * string gradient_func = 2; + */ + public Builder setGradientFunc( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gradientFunc_ = value; + onChanged(); + return this; + } + /** + *
+     * The gradient function's name.
+     * 
+ * + * string gradient_func = 2; + */ + public Builder clearGradientFunc() { + + gradientFunc_ = getDefaultInstance().getGradientFunc(); + onChanged(); + return this; + } + /** + *
+     * The gradient function's name.
+     * 
+ * + * string gradient_func = 2; + */ + public Builder setGradientFuncBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gradientFunc_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GradientDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GradientDef) + private static final org.tensorflow.proto.framework.GradientDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GradientDef(); + } + + public static org.tensorflow.proto.framework.GradientDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GradientDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GradientDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GradientDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GradientDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GradientDefOrBuilder.java new file mode 100644 index 00000000000..9437941de35 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GradientDefOrBuilder.java @@ -0,0 +1,45 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/function.proto + +package org.tensorflow.proto.framework; + +public interface GradientDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GradientDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The function name.
+   * 
+ * + * string function_name = 1; + */ + java.lang.String getFunctionName(); + /** + *
+   * The function name.
+   * 
+ * + * string function_name = 1; + */ + com.google.protobuf.ByteString + getFunctionNameBytes(); + + /** + *
+   * The gradient function's name.
+   * 
+ * + * string gradient_func = 2; + */ + java.lang.String getGradientFunc(); + /** + *
+   * The gradient function's name.
+   * 
+ * + * string gradient_func = 2; + */ + com.google.protobuf.ByteString + getGradientFuncBytes(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphDebugInfo.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphDebugInfo.java new file mode 100644 index 00000000000..165c76f3ce7 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphDebugInfo.java @@ -0,0 +1,3004 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/graph_debug_info.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.GraphDebugInfo} + */ +public final class GraphDebugInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GraphDebugInfo) + GraphDebugInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GraphDebugInfo.newBuilder() to construct. + private GraphDebugInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GraphDebugInfo() { + files_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GraphDebugInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GraphDebugInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + files_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + files_.add(s); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + traces_ = com.google.protobuf.MapField.newMapField( + TracesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + traces__ = input.readMessage( + TracesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + traces_.getMutableMap().put( + traces__.getKey(), traces__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + files_ = files_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetTraces(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphDebugInfo.class, org.tensorflow.proto.framework.GraphDebugInfo.Builder.class); + } + + public interface FileLineColOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GraphDebugInfo.FileLineCol) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * File name index, which can be used to retrieve the file name string from
+     * `files`. The value should be between 0 and (len(files)-1)
+     * 
+ * + * int32 file_index = 1; + */ + int getFileIndex(); + + /** + *
+     * Line number in the file.
+     * 
+ * + * int32 line = 2; + */ + int getLine(); + + /** + *
+     * Col number in the file line.
+     * 
+ * + * int32 col = 3; + */ + int getCol(); + + /** + *
+     * Name of function contains the file line.
+     * 
+ * + * string func = 4; + */ + java.lang.String getFunc(); + /** + *
+     * Name of function contains the file line.
+     * 
+ * + * string func = 4; + */ + com.google.protobuf.ByteString + getFuncBytes(); + + /** + *
+     * Source code contained in this file line.
+     * 
+ * + * string code = 5; + */ + java.lang.String getCode(); + /** + *
+     * Source code contained in this file line.
+     * 
+ * + * string code = 5; + */ + com.google.protobuf.ByteString + getCodeBytes(); + } + /** + *
+   * This represents a file/line location in the source code.
+   * 
+ * + * Protobuf type {@code tensorflow.GraphDebugInfo.FileLineCol} + */ + public static final class FileLineCol extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GraphDebugInfo.FileLineCol) + FileLineColOrBuilder { + private static final long serialVersionUID = 0L; + // Use FileLineCol.newBuilder() to construct. + private FileLineCol(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FileLineCol() { + func_ = ""; + code_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FileLineCol(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FileLineCol( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + fileIndex_ = input.readInt32(); + break; + } + case 16: { + + line_ = input.readInt32(); + break; + } + case 24: { + + col_ = input.readInt32(); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + func_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + code_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_FileLineCol_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_FileLineCol_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.class, org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.Builder.class); + } + + public static final int FILE_INDEX_FIELD_NUMBER = 1; + private int fileIndex_; + /** + *
+     * File name index, which can be used to retrieve the file name string from
+     * `files`. The value should be between 0 and (len(files)-1)
+     * 
+ * + * int32 file_index = 1; + */ + public int getFileIndex() { + return fileIndex_; + } + + public static final int LINE_FIELD_NUMBER = 2; + private int line_; + /** + *
+     * Line number in the file.
+     * 
+ * + * int32 line = 2; + */ + public int getLine() { + return line_; + } + + public static final int COL_FIELD_NUMBER = 3; + private int col_; + /** + *
+     * Col number in the file line.
+     * 
+ * + * int32 col = 3; + */ + public int getCol() { + return col_; + } + + public static final int FUNC_FIELD_NUMBER = 4; + private volatile java.lang.Object func_; + /** + *
+     * Name of function contains the file line.
+     * 
+ * + * string func = 4; + */ + public java.lang.String getFunc() { + java.lang.Object ref = func_; + 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(); + func_ = s; + return s; + } + } + /** + *
+     * Name of function contains the file line.
+     * 
+ * + * string func = 4; + */ + public com.google.protobuf.ByteString + getFuncBytes() { + java.lang.Object ref = func_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + func_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CODE_FIELD_NUMBER = 5; + private volatile java.lang.Object code_; + /** + *
+     * Source code contained in this file line.
+     * 
+ * + * string code = 5; + */ + public java.lang.String getCode() { + java.lang.Object ref = code_; + 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(); + code_ = s; + return s; + } + } + /** + *
+     * Source code contained in this file line.
+     * 
+ * + * string code = 5; + */ + public com.google.protobuf.ByteString + getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (fileIndex_ != 0) { + output.writeInt32(1, fileIndex_); + } + if (line_ != 0) { + output.writeInt32(2, line_); + } + if (col_ != 0) { + output.writeInt32(3, col_); + } + if (!getFuncBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, func_); + } + if (!getCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, code_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (fileIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, fileIndex_); + } + if (line_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, line_); + } + if (col_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, col_); + } + if (!getFuncBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, func_); + } + if (!getCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, code_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol other = (org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol) obj; + + if (getFileIndex() + != other.getFileIndex()) return false; + if (getLine() + != other.getLine()) return false; + if (getCol() + != other.getCol()) return false; + if (!getFunc() + .equals(other.getFunc())) return false; + if (!getCode() + .equals(other.getCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FILE_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getFileIndex(); + hash = (37 * hash) + LINE_FIELD_NUMBER; + hash = (53 * hash) + getLine(); + hash = (37 * hash) + COL_FIELD_NUMBER; + hash = (53 * hash) + getCol(); + hash = (37 * hash) + FUNC_FIELD_NUMBER; + hash = (53 * hash) + getFunc().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol 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.proto.framework.GraphDebugInfo.FileLineCol parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * This represents a file/line location in the source code.
+     * 
+ * + * Protobuf type {@code tensorflow.GraphDebugInfo.FileLineCol} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GraphDebugInfo.FileLineCol) + org.tensorflow.proto.framework.GraphDebugInfo.FileLineColOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_FileLineCol_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_FileLineCol_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.class, org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + fileIndex_ = 0; + + line_ = 0; + + col_ = 0; + + func_ = ""; + + code_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_FileLineCol_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol build() { + org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol buildPartial() { + org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol result = new org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol(this); + result.fileIndex_ = fileIndex_; + result.line_ = line_; + result.col_ = col_; + result.func_ = func_; + result.code_ = code_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol) { + return mergeFrom((org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol other) { + if (other == org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.getDefaultInstance()) return this; + if (other.getFileIndex() != 0) { + setFileIndex(other.getFileIndex()); + } + if (other.getLine() != 0) { + setLine(other.getLine()); + } + if (other.getCol() != 0) { + setCol(other.getCol()); + } + if (!other.getFunc().isEmpty()) { + func_ = other.func_; + onChanged(); + } + if (!other.getCode().isEmpty()) { + code_ = other.code_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int fileIndex_ ; + /** + *
+       * File name index, which can be used to retrieve the file name string from
+       * `files`. The value should be between 0 and (len(files)-1)
+       * 
+ * + * int32 file_index = 1; + */ + public int getFileIndex() { + return fileIndex_; + } + /** + *
+       * File name index, which can be used to retrieve the file name string from
+       * `files`. The value should be between 0 and (len(files)-1)
+       * 
+ * + * int32 file_index = 1; + */ + public Builder setFileIndex(int value) { + + fileIndex_ = value; + onChanged(); + return this; + } + /** + *
+       * File name index, which can be used to retrieve the file name string from
+       * `files`. The value should be between 0 and (len(files)-1)
+       * 
+ * + * int32 file_index = 1; + */ + public Builder clearFileIndex() { + + fileIndex_ = 0; + onChanged(); + return this; + } + + private int line_ ; + /** + *
+       * Line number in the file.
+       * 
+ * + * int32 line = 2; + */ + public int getLine() { + return line_; + } + /** + *
+       * Line number in the file.
+       * 
+ * + * int32 line = 2; + */ + public Builder setLine(int value) { + + line_ = value; + onChanged(); + return this; + } + /** + *
+       * Line number in the file.
+       * 
+ * + * int32 line = 2; + */ + public Builder clearLine() { + + line_ = 0; + onChanged(); + return this; + } + + private int col_ ; + /** + *
+       * Col number in the file line.
+       * 
+ * + * int32 col = 3; + */ + public int getCol() { + return col_; + } + /** + *
+       * Col number in the file line.
+       * 
+ * + * int32 col = 3; + */ + public Builder setCol(int value) { + + col_ = value; + onChanged(); + return this; + } + /** + *
+       * Col number in the file line.
+       * 
+ * + * int32 col = 3; + */ + public Builder clearCol() { + + col_ = 0; + onChanged(); + return this; + } + + private java.lang.Object func_ = ""; + /** + *
+       * Name of function contains the file line.
+       * 
+ * + * string func = 4; + */ + public java.lang.String getFunc() { + java.lang.Object ref = func_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + func_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Name of function contains the file line.
+       * 
+ * + * string func = 4; + */ + public com.google.protobuf.ByteString + getFuncBytes() { + java.lang.Object ref = func_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + func_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Name of function contains the file line.
+       * 
+ * + * string func = 4; + */ + public Builder setFunc( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + func_ = value; + onChanged(); + return this; + } + /** + *
+       * Name of function contains the file line.
+       * 
+ * + * string func = 4; + */ + public Builder clearFunc() { + + func_ = getDefaultInstance().getFunc(); + onChanged(); + return this; + } + /** + *
+       * Name of function contains the file line.
+       * 
+ * + * string func = 4; + */ + public Builder setFuncBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + func_ = value; + onChanged(); + return this; + } + + private java.lang.Object code_ = ""; + /** + *
+       * Source code contained in this file line.
+       * 
+ * + * string code = 5; + */ + public java.lang.String getCode() { + java.lang.Object ref = code_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + code_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Source code contained in this file line.
+       * 
+ * + * string code = 5; + */ + public com.google.protobuf.ByteString + getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Source code contained in this file line.
+       * 
+ * + * string code = 5; + */ + public Builder setCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + code_ = value; + onChanged(); + return this; + } + /** + *
+       * Source code contained in this file line.
+       * 
+ * + * string code = 5; + */ + public Builder clearCode() { + + code_ = getDefaultInstance().getCode(); + onChanged(); + return this; + } + /** + *
+       * Source code contained in this file line.
+       * 
+ * + * string code = 5; + */ + public Builder setCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + code_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GraphDebugInfo.FileLineCol) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GraphDebugInfo.FileLineCol) + private static final org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol(); + } + + public static org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FileLineCol parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FileLineCol(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface StackTraceOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GraphDebugInfo.StackTrace) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Each line in the stack trace.
+     * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + java.util.List + getFileLineColsList(); + /** + *
+     * Each line in the stack trace.
+     * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol getFileLineCols(int index); + /** + *
+     * Each line in the stack trace.
+     * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + int getFileLineColsCount(); + /** + *
+     * Each line in the stack trace.
+     * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + java.util.List + getFileLineColsOrBuilderList(); + /** + *
+     * Each line in the stack trace.
+     * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + org.tensorflow.proto.framework.GraphDebugInfo.FileLineColOrBuilder getFileLineColsOrBuilder( + int index); + } + /** + *
+   * This represents a stack trace which is a ordered list of `FileLineCol`.
+   * 
+ * + * Protobuf type {@code tensorflow.GraphDebugInfo.StackTrace} + */ + public static final class StackTrace extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GraphDebugInfo.StackTrace) + StackTraceOrBuilder { + private static final long serialVersionUID = 0L; + // Use StackTrace.newBuilder() to construct. + private StackTrace(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StackTrace() { + fileLineCols_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StackTrace(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StackTrace( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fileLineCols_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fileLineCols_.add( + input.readMessage(org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fileLineCols_ = java.util.Collections.unmodifiableList(fileLineCols_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_StackTrace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_StackTrace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphDebugInfo.StackTrace.class, org.tensorflow.proto.framework.GraphDebugInfo.StackTrace.Builder.class); + } + + public static final int FILE_LINE_COLS_FIELD_NUMBER = 1; + private java.util.List fileLineCols_; + /** + *
+     * Each line in the stack trace.
+     * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public java.util.List getFileLineColsList() { + return fileLineCols_; + } + /** + *
+     * Each line in the stack trace.
+     * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public java.util.List + getFileLineColsOrBuilderList() { + return fileLineCols_; + } + /** + *
+     * Each line in the stack trace.
+     * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public int getFileLineColsCount() { + return fileLineCols_.size(); + } + /** + *
+     * Each line in the stack trace.
+     * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol getFileLineCols(int index) { + return fileLineCols_.get(index); + } + /** + *
+     * Each line in the stack trace.
+     * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public org.tensorflow.proto.framework.GraphDebugInfo.FileLineColOrBuilder getFileLineColsOrBuilder( + int index) { + return fileLineCols_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < fileLineCols_.size(); i++) { + output.writeMessage(1, fileLineCols_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < fileLineCols_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, fileLineCols_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GraphDebugInfo.StackTrace)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GraphDebugInfo.StackTrace other = (org.tensorflow.proto.framework.GraphDebugInfo.StackTrace) obj; + + if (!getFileLineColsList() + .equals(other.getFileLineColsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFileLineColsCount() > 0) { + hash = (37 * hash) + FILE_LINE_COLS_FIELD_NUMBER; + hash = (53 * hash) + getFileLineColsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GraphDebugInfo.StackTrace parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.StackTrace parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.StackTrace parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.StackTrace 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.proto.framework.GraphDebugInfo.StackTrace parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.StackTrace parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.StackTrace parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.StackTrace parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.StackTrace parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.StackTrace parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.StackTrace parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphDebugInfo.StackTrace parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GraphDebugInfo.StackTrace prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * This represents a stack trace which is a ordered list of `FileLineCol`.
+     * 
+ * + * Protobuf type {@code tensorflow.GraphDebugInfo.StackTrace} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GraphDebugInfo.StackTrace) + org.tensorflow.proto.framework.GraphDebugInfo.StackTraceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_StackTrace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_StackTrace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphDebugInfo.StackTrace.class, org.tensorflow.proto.framework.GraphDebugInfo.StackTrace.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GraphDebugInfo.StackTrace.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFileLineColsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fileLineColsBuilder_ == null) { + fileLineCols_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fileLineColsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_StackTrace_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphDebugInfo.StackTrace getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GraphDebugInfo.StackTrace.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphDebugInfo.StackTrace build() { + org.tensorflow.proto.framework.GraphDebugInfo.StackTrace result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphDebugInfo.StackTrace buildPartial() { + org.tensorflow.proto.framework.GraphDebugInfo.StackTrace result = new org.tensorflow.proto.framework.GraphDebugInfo.StackTrace(this); + int from_bitField0_ = bitField0_; + if (fileLineColsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fileLineCols_ = java.util.Collections.unmodifiableList(fileLineCols_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fileLineCols_ = fileLineCols_; + } else { + result.fileLineCols_ = fileLineColsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GraphDebugInfo.StackTrace) { + return mergeFrom((org.tensorflow.proto.framework.GraphDebugInfo.StackTrace)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GraphDebugInfo.StackTrace other) { + if (other == org.tensorflow.proto.framework.GraphDebugInfo.StackTrace.getDefaultInstance()) return this; + if (fileLineColsBuilder_ == null) { + if (!other.fileLineCols_.isEmpty()) { + if (fileLineCols_.isEmpty()) { + fileLineCols_ = other.fileLineCols_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFileLineColsIsMutable(); + fileLineCols_.addAll(other.fileLineCols_); + } + onChanged(); + } + } else { + if (!other.fileLineCols_.isEmpty()) { + if (fileLineColsBuilder_.isEmpty()) { + fileLineColsBuilder_.dispose(); + fileLineColsBuilder_ = null; + fileLineCols_ = other.fileLineCols_; + bitField0_ = (bitField0_ & ~0x00000001); + fileLineColsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFileLineColsFieldBuilder() : null; + } else { + fileLineColsBuilder_.addAllMessages(other.fileLineCols_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GraphDebugInfo.StackTrace parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GraphDebugInfo.StackTrace) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List fileLineCols_ = + java.util.Collections.emptyList(); + private void ensureFileLineColsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fileLineCols_ = new java.util.ArrayList(fileLineCols_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol, org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.Builder, org.tensorflow.proto.framework.GraphDebugInfo.FileLineColOrBuilder> fileLineColsBuilder_; + + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public java.util.List getFileLineColsList() { + if (fileLineColsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fileLineCols_); + } else { + return fileLineColsBuilder_.getMessageList(); + } + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public int getFileLineColsCount() { + if (fileLineColsBuilder_ == null) { + return fileLineCols_.size(); + } else { + return fileLineColsBuilder_.getCount(); + } + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol getFileLineCols(int index) { + if (fileLineColsBuilder_ == null) { + return fileLineCols_.get(index); + } else { + return fileLineColsBuilder_.getMessage(index); + } + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public Builder setFileLineCols( + int index, org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol value) { + if (fileLineColsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileLineColsIsMutable(); + fileLineCols_.set(index, value); + onChanged(); + } else { + fileLineColsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public Builder setFileLineCols( + int index, org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.Builder builderForValue) { + if (fileLineColsBuilder_ == null) { + ensureFileLineColsIsMutable(); + fileLineCols_.set(index, builderForValue.build()); + onChanged(); + } else { + fileLineColsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public Builder addFileLineCols(org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol value) { + if (fileLineColsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileLineColsIsMutable(); + fileLineCols_.add(value); + onChanged(); + } else { + fileLineColsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public Builder addFileLineCols( + int index, org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol value) { + if (fileLineColsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileLineColsIsMutable(); + fileLineCols_.add(index, value); + onChanged(); + } else { + fileLineColsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public Builder addFileLineCols( + org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.Builder builderForValue) { + if (fileLineColsBuilder_ == null) { + ensureFileLineColsIsMutable(); + fileLineCols_.add(builderForValue.build()); + onChanged(); + } else { + fileLineColsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public Builder addFileLineCols( + int index, org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.Builder builderForValue) { + if (fileLineColsBuilder_ == null) { + ensureFileLineColsIsMutable(); + fileLineCols_.add(index, builderForValue.build()); + onChanged(); + } else { + fileLineColsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public Builder addAllFileLineCols( + java.lang.Iterable values) { + if (fileLineColsBuilder_ == null) { + ensureFileLineColsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fileLineCols_); + onChanged(); + } else { + fileLineColsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public Builder clearFileLineCols() { + if (fileLineColsBuilder_ == null) { + fileLineCols_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fileLineColsBuilder_.clear(); + } + return this; + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public Builder removeFileLineCols(int index) { + if (fileLineColsBuilder_ == null) { + ensureFileLineColsIsMutable(); + fileLineCols_.remove(index); + onChanged(); + } else { + fileLineColsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.Builder getFileLineColsBuilder( + int index) { + return getFileLineColsFieldBuilder().getBuilder(index); + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public org.tensorflow.proto.framework.GraphDebugInfo.FileLineColOrBuilder getFileLineColsOrBuilder( + int index) { + if (fileLineColsBuilder_ == null) { + return fileLineCols_.get(index); } else { + return fileLineColsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public java.util.List + getFileLineColsOrBuilderList() { + if (fileLineColsBuilder_ != null) { + return fileLineColsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fileLineCols_); + } + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.Builder addFileLineColsBuilder() { + return getFileLineColsFieldBuilder().addBuilder( + org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.getDefaultInstance()); + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.Builder addFileLineColsBuilder( + int index) { + return getFileLineColsFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.getDefaultInstance()); + } + /** + *
+       * Each line in the stack trace.
+       * 
+ * + * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1; + */ + public java.util.List + getFileLineColsBuilderList() { + return getFileLineColsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol, org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.Builder, org.tensorflow.proto.framework.GraphDebugInfo.FileLineColOrBuilder> + getFileLineColsFieldBuilder() { + if (fileLineColsBuilder_ == null) { + fileLineColsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol, org.tensorflow.proto.framework.GraphDebugInfo.FileLineCol.Builder, org.tensorflow.proto.framework.GraphDebugInfo.FileLineColOrBuilder>( + fileLineCols_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + fileLineCols_ = null; + } + return fileLineColsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GraphDebugInfo.StackTrace) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GraphDebugInfo.StackTrace) + private static final org.tensorflow.proto.framework.GraphDebugInfo.StackTrace DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GraphDebugInfo.StackTrace(); + } + + public static org.tensorflow.proto.framework.GraphDebugInfo.StackTrace getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StackTrace parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StackTrace(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphDebugInfo.StackTrace getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int FILES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList files_; + /** + *
+   * This stores all the source code file names and can be indexed by the
+   * `file_index`.
+   * 
+ * + * repeated string files = 1; + */ + public com.google.protobuf.ProtocolStringList + getFilesList() { + return files_; + } + /** + *
+   * This stores all the source code file names and can be indexed by the
+   * `file_index`.
+   * 
+ * + * repeated string files = 1; + */ + public int getFilesCount() { + return files_.size(); + } + /** + *
+   * This stores all the source code file names and can be indexed by the
+   * `file_index`.
+   * 
+ * + * repeated string files = 1; + */ + public java.lang.String getFiles(int index) { + return files_.get(index); + } + /** + *
+   * This stores all the source code file names and can be indexed by the
+   * `file_index`.
+   * 
+ * + * repeated string files = 1; + */ + public com.google.protobuf.ByteString + getFilesBytes(int index) { + return files_.getByteString(index); + } + + public static final int TRACES_FIELD_NUMBER = 2; + private static final class TracesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, org.tensorflow.proto.framework.GraphDebugInfo.StackTrace> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_TracesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.framework.GraphDebugInfo.StackTrace.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.GraphDebugInfo.StackTrace> traces_; + private com.google.protobuf.MapField + internalGetTraces() { + if (traces_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TracesDefaultEntryHolder.defaultEntry); + } + return traces_; + } + + public int getTracesCount() { + return internalGetTraces().getMap().size(); + } + /** + *
+   * This maps a node name to a stack trace in the source code.
+   * The map key is a mangling of the containing function and op name with
+   * syntax:
+   *   op.name '@' func_name
+   * For ops in the top-level graph, the func_name is the empty string.
+   * Note that op names are restricted to a small number of characters which
+   * exclude '@', making it impossible to collide keys of this form. Function
+   * names accept a much wider set of characters.
+   * It would be preferable to avoid mangling and use a tuple key of (op.name,
+   * func_name), but this is not supported with protocol buffers.
+   * 
+ * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + + public boolean containsTraces( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetTraces().getMap().containsKey(key); + } + /** + * Use {@link #getTracesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getTraces() { + return getTracesMap(); + } + /** + *
+   * This maps a node name to a stack trace in the source code.
+   * The map key is a mangling of the containing function and op name with
+   * syntax:
+   *   op.name '@' func_name
+   * For ops in the top-level graph, the func_name is the empty string.
+   * Note that op names are restricted to a small number of characters which
+   * exclude '@', making it impossible to collide keys of this form. Function
+   * names accept a much wider set of characters.
+   * It would be preferable to avoid mangling and use a tuple key of (op.name,
+   * func_name), but this is not supported with protocol buffers.
+   * 
+ * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + + public java.util.Map getTracesMap() { + return internalGetTraces().getMap(); + } + /** + *
+   * This maps a node name to a stack trace in the source code.
+   * The map key is a mangling of the containing function and op name with
+   * syntax:
+   *   op.name '@' func_name
+   * For ops in the top-level graph, the func_name is the empty string.
+   * Note that op names are restricted to a small number of characters which
+   * exclude '@', making it impossible to collide keys of this form. Function
+   * names accept a much wider set of characters.
+   * It would be preferable to avoid mangling and use a tuple key of (op.name,
+   * func_name), but this is not supported with protocol buffers.
+   * 
+ * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + + public org.tensorflow.proto.framework.GraphDebugInfo.StackTrace getTracesOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.GraphDebugInfo.StackTrace defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetTraces().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * This maps a node name to a stack trace in the source code.
+   * The map key is a mangling of the containing function and op name with
+   * syntax:
+   *   op.name '@' func_name
+   * For ops in the top-level graph, the func_name is the empty string.
+   * Note that op names are restricted to a small number of characters which
+   * exclude '@', making it impossible to collide keys of this form. Function
+   * names accept a much wider set of characters.
+   * It would be preferable to avoid mangling and use a tuple key of (op.name,
+   * func_name), but this is not supported with protocol buffers.
+   * 
+ * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + + public org.tensorflow.proto.framework.GraphDebugInfo.StackTrace getTracesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetTraces().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < files_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, files_.getRaw(i)); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetTraces(), + TracesDefaultEntryHolder.defaultEntry, + 2); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < files_.size(); i++) { + dataSize += computeStringSizeNoTag(files_.getRaw(i)); + } + size += dataSize; + size += 1 * getFilesList().size(); + } + for (java.util.Map.Entry entry + : internalGetTraces().getMap().entrySet()) { + com.google.protobuf.MapEntry + traces__ = TracesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, traces__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GraphDebugInfo)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GraphDebugInfo other = (org.tensorflow.proto.framework.GraphDebugInfo) obj; + + if (!getFilesList() + .equals(other.getFilesList())) return false; + if (!internalGetTraces().equals( + other.internalGetTraces())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFilesCount() > 0) { + hash = (37 * hash) + FILES_FIELD_NUMBER; + hash = (53 * hash) + getFilesList().hashCode(); + } + if (!internalGetTraces().getMap().isEmpty()) { + hash = (37 * hash) + TRACES_FIELD_NUMBER; + hash = (53 * hash) + internalGetTraces().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GraphDebugInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphDebugInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphDebugInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphDebugInfo 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.proto.framework.GraphDebugInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphDebugInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphDebugInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphDebugInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphDebugInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphDebugInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphDebugInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphDebugInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GraphDebugInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.GraphDebugInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GraphDebugInfo) + org.tensorflow.proto.framework.GraphDebugInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetTraces(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableTraces(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphDebugInfo.class, org.tensorflow.proto.framework.GraphDebugInfo.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GraphDebugInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + files_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableTraces().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphDebugInfo getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GraphDebugInfo.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphDebugInfo build() { + org.tensorflow.proto.framework.GraphDebugInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphDebugInfo buildPartial() { + org.tensorflow.proto.framework.GraphDebugInfo result = new org.tensorflow.proto.framework.GraphDebugInfo(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + files_ = files_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.files_ = files_; + result.traces_ = internalGetTraces(); + result.traces_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GraphDebugInfo) { + return mergeFrom((org.tensorflow.proto.framework.GraphDebugInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GraphDebugInfo other) { + if (other == org.tensorflow.proto.framework.GraphDebugInfo.getDefaultInstance()) return this; + if (!other.files_.isEmpty()) { + if (files_.isEmpty()) { + files_ = other.files_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFilesIsMutable(); + files_.addAll(other.files_); + } + onChanged(); + } + internalGetMutableTraces().mergeFrom( + other.internalGetTraces()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GraphDebugInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GraphDebugInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList files_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureFilesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + files_ = new com.google.protobuf.LazyStringArrayList(files_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * This stores all the source code file names and can be indexed by the
+     * `file_index`.
+     * 
+ * + * repeated string files = 1; + */ + public com.google.protobuf.ProtocolStringList + getFilesList() { + return files_.getUnmodifiableView(); + } + /** + *
+     * This stores all the source code file names and can be indexed by the
+     * `file_index`.
+     * 
+ * + * repeated string files = 1; + */ + public int getFilesCount() { + return files_.size(); + } + /** + *
+     * This stores all the source code file names and can be indexed by the
+     * `file_index`.
+     * 
+ * + * repeated string files = 1; + */ + public java.lang.String getFiles(int index) { + return files_.get(index); + } + /** + *
+     * This stores all the source code file names and can be indexed by the
+     * `file_index`.
+     * 
+ * + * repeated string files = 1; + */ + public com.google.protobuf.ByteString + getFilesBytes(int index) { + return files_.getByteString(index); + } + /** + *
+     * This stores all the source code file names and can be indexed by the
+     * `file_index`.
+     * 
+ * + * repeated string files = 1; + */ + public Builder setFiles( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilesIsMutable(); + files_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * This stores all the source code file names and can be indexed by the
+     * `file_index`.
+     * 
+ * + * repeated string files = 1; + */ + public Builder addFiles( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilesIsMutable(); + files_.add(value); + onChanged(); + return this; + } + /** + *
+     * This stores all the source code file names and can be indexed by the
+     * `file_index`.
+     * 
+ * + * repeated string files = 1; + */ + public Builder addAllFiles( + java.lang.Iterable values) { + ensureFilesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, files_); + onChanged(); + return this; + } + /** + *
+     * This stores all the source code file names and can be indexed by the
+     * `file_index`.
+     * 
+ * + * repeated string files = 1; + */ + public Builder clearFiles() { + files_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * This stores all the source code file names and can be indexed by the
+     * `file_index`.
+     * 
+ * + * repeated string files = 1; + */ + public Builder addFilesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFilesIsMutable(); + files_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.GraphDebugInfo.StackTrace> traces_; + private com.google.protobuf.MapField + internalGetTraces() { + if (traces_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TracesDefaultEntryHolder.defaultEntry); + } + return traces_; + } + private com.google.protobuf.MapField + internalGetMutableTraces() { + onChanged();; + if (traces_ == null) { + traces_ = com.google.protobuf.MapField.newMapField( + TracesDefaultEntryHolder.defaultEntry); + } + if (!traces_.isMutable()) { + traces_ = traces_.copy(); + } + return traces_; + } + + public int getTracesCount() { + return internalGetTraces().getMap().size(); + } + /** + *
+     * This maps a node name to a stack trace in the source code.
+     * The map key is a mangling of the containing function and op name with
+     * syntax:
+     *   op.name '@' func_name
+     * For ops in the top-level graph, the func_name is the empty string.
+     * Note that op names are restricted to a small number of characters which
+     * exclude '@', making it impossible to collide keys of this form. Function
+     * names accept a much wider set of characters.
+     * It would be preferable to avoid mangling and use a tuple key of (op.name,
+     * func_name), but this is not supported with protocol buffers.
+     * 
+ * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + + public boolean containsTraces( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetTraces().getMap().containsKey(key); + } + /** + * Use {@link #getTracesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getTraces() { + return getTracesMap(); + } + /** + *
+     * This maps a node name to a stack trace in the source code.
+     * The map key is a mangling of the containing function and op name with
+     * syntax:
+     *   op.name '@' func_name
+     * For ops in the top-level graph, the func_name is the empty string.
+     * Note that op names are restricted to a small number of characters which
+     * exclude '@', making it impossible to collide keys of this form. Function
+     * names accept a much wider set of characters.
+     * It would be preferable to avoid mangling and use a tuple key of (op.name,
+     * func_name), but this is not supported with protocol buffers.
+     * 
+ * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + + public java.util.Map getTracesMap() { + return internalGetTraces().getMap(); + } + /** + *
+     * This maps a node name to a stack trace in the source code.
+     * The map key is a mangling of the containing function and op name with
+     * syntax:
+     *   op.name '@' func_name
+     * For ops in the top-level graph, the func_name is the empty string.
+     * Note that op names are restricted to a small number of characters which
+     * exclude '@', making it impossible to collide keys of this form. Function
+     * names accept a much wider set of characters.
+     * It would be preferable to avoid mangling and use a tuple key of (op.name,
+     * func_name), but this is not supported with protocol buffers.
+     * 
+ * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + + public org.tensorflow.proto.framework.GraphDebugInfo.StackTrace getTracesOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.GraphDebugInfo.StackTrace defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetTraces().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * This maps a node name to a stack trace in the source code.
+     * The map key is a mangling of the containing function and op name with
+     * syntax:
+     *   op.name '@' func_name
+     * For ops in the top-level graph, the func_name is the empty string.
+     * Note that op names are restricted to a small number of characters which
+     * exclude '@', making it impossible to collide keys of this form. Function
+     * names accept a much wider set of characters.
+     * It would be preferable to avoid mangling and use a tuple key of (op.name,
+     * func_name), but this is not supported with protocol buffers.
+     * 
+ * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + + public org.tensorflow.proto.framework.GraphDebugInfo.StackTrace getTracesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetTraces().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTraces() { + internalGetMutableTraces().getMutableMap() + .clear(); + return this; + } + /** + *
+     * This maps a node name to a stack trace in the source code.
+     * The map key is a mangling of the containing function and op name with
+     * syntax:
+     *   op.name '@' func_name
+     * For ops in the top-level graph, the func_name is the empty string.
+     * Note that op names are restricted to a small number of characters which
+     * exclude '@', making it impossible to collide keys of this form. Function
+     * names accept a much wider set of characters.
+     * It would be preferable to avoid mangling and use a tuple key of (op.name,
+     * func_name), but this is not supported with protocol buffers.
+     * 
+ * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + + public Builder removeTraces( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableTraces().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableTraces() { + return internalGetMutableTraces().getMutableMap(); + } + /** + *
+     * This maps a node name to a stack trace in the source code.
+     * The map key is a mangling of the containing function and op name with
+     * syntax:
+     *   op.name '@' func_name
+     * For ops in the top-level graph, the func_name is the empty string.
+     * Note that op names are restricted to a small number of characters which
+     * exclude '@', making it impossible to collide keys of this form. Function
+     * names accept a much wider set of characters.
+     * It would be preferable to avoid mangling and use a tuple key of (op.name,
+     * func_name), but this is not supported with protocol buffers.
+     * 
+ * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + public Builder putTraces( + java.lang.String key, + org.tensorflow.proto.framework.GraphDebugInfo.StackTrace value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableTraces().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * This maps a node name to a stack trace in the source code.
+     * The map key is a mangling of the containing function and op name with
+     * syntax:
+     *   op.name '@' func_name
+     * For ops in the top-level graph, the func_name is the empty string.
+     * Note that op names are restricted to a small number of characters which
+     * exclude '@', making it impossible to collide keys of this form. Function
+     * names accept a much wider set of characters.
+     * It would be preferable to avoid mangling and use a tuple key of (op.name,
+     * func_name), but this is not supported with protocol buffers.
+     * 
+ * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + + public Builder putAllTraces( + java.util.Map values) { + internalGetMutableTraces().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GraphDebugInfo) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GraphDebugInfo) + private static final org.tensorflow.proto.framework.GraphDebugInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GraphDebugInfo(); + } + + public static org.tensorflow.proto.framework.GraphDebugInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GraphDebugInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GraphDebugInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphDebugInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphDebugInfoOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphDebugInfoOrBuilder.java new file mode 100644 index 00000000000..86c48de7b70 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphDebugInfoOrBuilder.java @@ -0,0 +1,147 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/graph_debug_info.proto + +package org.tensorflow.proto.framework; + +public interface GraphDebugInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GraphDebugInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * This stores all the source code file names and can be indexed by the
+   * `file_index`.
+   * 
+ * + * repeated string files = 1; + */ + java.util.List + getFilesList(); + /** + *
+   * This stores all the source code file names and can be indexed by the
+   * `file_index`.
+   * 
+ * + * repeated string files = 1; + */ + int getFilesCount(); + /** + *
+   * This stores all the source code file names and can be indexed by the
+   * `file_index`.
+   * 
+ * + * repeated string files = 1; + */ + java.lang.String getFiles(int index); + /** + *
+   * This stores all the source code file names and can be indexed by the
+   * `file_index`.
+   * 
+ * + * repeated string files = 1; + */ + com.google.protobuf.ByteString + getFilesBytes(int index); + + /** + *
+   * This maps a node name to a stack trace in the source code.
+   * The map key is a mangling of the containing function and op name with
+   * syntax:
+   *   op.name '@' func_name
+   * For ops in the top-level graph, the func_name is the empty string.
+   * Note that op names are restricted to a small number of characters which
+   * exclude '@', making it impossible to collide keys of this form. Function
+   * names accept a much wider set of characters.
+   * It would be preferable to avoid mangling and use a tuple key of (op.name,
+   * func_name), but this is not supported with protocol buffers.
+   * 
+ * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + int getTracesCount(); + /** + *
+   * This maps a node name to a stack trace in the source code.
+   * The map key is a mangling of the containing function and op name with
+   * syntax:
+   *   op.name '@' func_name
+   * For ops in the top-level graph, the func_name is the empty string.
+   * Note that op names are restricted to a small number of characters which
+   * exclude '@', making it impossible to collide keys of this form. Function
+   * names accept a much wider set of characters.
+   * It would be preferable to avoid mangling and use a tuple key of (op.name,
+   * func_name), but this is not supported with protocol buffers.
+   * 
+ * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + boolean containsTraces( + java.lang.String key); + /** + * Use {@link #getTracesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getTraces(); + /** + *
+   * This maps a node name to a stack trace in the source code.
+   * The map key is a mangling of the containing function and op name with
+   * syntax:
+   *   op.name '@' func_name
+   * For ops in the top-level graph, the func_name is the empty string.
+   * Note that op names are restricted to a small number of characters which
+   * exclude '@', making it impossible to collide keys of this form. Function
+   * names accept a much wider set of characters.
+   * It would be preferable to avoid mangling and use a tuple key of (op.name,
+   * func_name), but this is not supported with protocol buffers.
+   * 
+ * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + java.util.Map + getTracesMap(); + /** + *
+   * This maps a node name to a stack trace in the source code.
+   * The map key is a mangling of the containing function and op name with
+   * syntax:
+   *   op.name '@' func_name
+   * For ops in the top-level graph, the func_name is the empty string.
+   * Note that op names are restricted to a small number of characters which
+   * exclude '@', making it impossible to collide keys of this form. Function
+   * names accept a much wider set of characters.
+   * It would be preferable to avoid mangling and use a tuple key of (op.name,
+   * func_name), but this is not supported with protocol buffers.
+   * 
+ * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + + org.tensorflow.proto.framework.GraphDebugInfo.StackTrace getTracesOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.GraphDebugInfo.StackTrace defaultValue); + /** + *
+   * This maps a node name to a stack trace in the source code.
+   * The map key is a mangling of the containing function and op name with
+   * syntax:
+   *   op.name '@' func_name
+   * For ops in the top-level graph, the func_name is the empty string.
+   * Note that op names are restricted to a small number of characters which
+   * exclude '@', making it impossible to collide keys of this form. Function
+   * names accept a much wider set of characters.
+   * It would be preferable to avoid mangling and use a tuple key of (op.name,
+   * func_name), but this is not supported with protocol buffers.
+   * 
+ * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + + org.tensorflow.proto.framework.GraphDebugInfo.StackTrace getTracesOrThrow( + java.lang.String key); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphDebugInfoProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphDebugInfoProtos.java new file mode 100644 index 00000000000..c206eb2d9cf --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphDebugInfoProtos.java @@ -0,0 +1,92 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/graph_debug_info.proto + +package org.tensorflow.proto.framework; + +public final class GraphDebugInfoProtos { + private GraphDebugInfoProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GraphDebugInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GraphDebugInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GraphDebugInfo_FileLineCol_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GraphDebugInfo_FileLineCol_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GraphDebugInfo_StackTrace_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GraphDebugInfo_StackTrace_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GraphDebugInfo_TracesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GraphDebugInfo_TracesEntry_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/protobuf/graph_debug_i" + + "nfo.proto\022\ntensorflow\"\325\002\n\016GraphDebugInfo" + + "\022\r\n\005files\030\001 \003(\t\0226\n\006traces\030\002 \003(\0132&.tensor" + + "flow.GraphDebugInfo.TracesEntry\032X\n\013FileL" + + "ineCol\022\022\n\nfile_index\030\001 \001(\005\022\014\n\004line\030\002 \001(\005" + + "\022\013\n\003col\030\003 \001(\005\022\014\n\004func\030\004 \001(\t\022\014\n\004code\030\005 \001(" + + "\t\032L\n\nStackTrace\022>\n\016file_line_cols\030\001 \003(\0132" + + "&.tensorflow.GraphDebugInfo.FileLineCol\032" + + "T\n\013TracesEntry\022\013\n\003key\030\001 \001(\t\0224\n\005value\030\002 \001" + + "(\0132%.tensorflow.GraphDebugInfo.StackTrac" + + "e:\0028\001B\205\001\n\036org.tensorflow.proto.framework" + + "B\024GraphDebugInfoProtosP\001ZHgithub.com/ten" + + "sorflow/tensorflow/tensorflow/go/core/co" + + "re_protos_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tensorflow_GraphDebugInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_GraphDebugInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GraphDebugInfo_descriptor, + new java.lang.String[] { "Files", "Traces", }); + internal_static_tensorflow_GraphDebugInfo_FileLineCol_descriptor = + internal_static_tensorflow_GraphDebugInfo_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_GraphDebugInfo_FileLineCol_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GraphDebugInfo_FileLineCol_descriptor, + new java.lang.String[] { "FileIndex", "Line", "Col", "Func", "Code", }); + internal_static_tensorflow_GraphDebugInfo_StackTrace_descriptor = + internal_static_tensorflow_GraphDebugInfo_descriptor.getNestedTypes().get(1); + internal_static_tensorflow_GraphDebugInfo_StackTrace_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GraphDebugInfo_StackTrace_descriptor, + new java.lang.String[] { "FileLineCols", }); + internal_static_tensorflow_GraphDebugInfo_TracesEntry_descriptor = + internal_static_tensorflow_GraphDebugInfo_descriptor.getNestedTypes().get(2); + internal_static_tensorflow_GraphDebugInfo_TracesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GraphDebugInfo_TracesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphDef.java new file mode 100644 index 00000000000..18e75b5e768 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphDef.java @@ -0,0 +1,1588 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Represents the graph of operations
+ * 
+ * + * Protobuf type {@code tensorflow.GraphDef} + */ +public final class GraphDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GraphDef) + GraphDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use GraphDef.newBuilder() to construct. + private GraphDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GraphDef() { + node_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GraphDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GraphDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + node_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + node_.add( + input.readMessage(org.tensorflow.proto.framework.NodeDef.parser(), extensionRegistry)); + break; + } + case 18: { + org.tensorflow.proto.framework.FunctionDefLibrary.Builder subBuilder = null; + if (library_ != null) { + subBuilder = library_.toBuilder(); + } + library_ = input.readMessage(org.tensorflow.proto.framework.FunctionDefLibrary.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(library_); + library_ = subBuilder.buildPartial(); + } + + break; + } + case 24: { + + version_ = input.readInt32(); + break; + } + case 34: { + org.tensorflow.proto.framework.VersionDef.Builder subBuilder = null; + if (versions_ != null) { + subBuilder = versions_.toBuilder(); + } + versions_ = input.readMessage(org.tensorflow.proto.framework.VersionDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(versions_); + versions_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + node_ = java.util.Collections.unmodifiableList(node_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphProtos.internal_static_tensorflow_GraphDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphProtos.internal_static_tensorflow_GraphDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphDef.class, org.tensorflow.proto.framework.GraphDef.Builder.class); + } + + public static final int NODE_FIELD_NUMBER = 1; + private java.util.List node_; + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public java.util.List getNodeList() { + return node_; + } + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public java.util.List + getNodeOrBuilderList() { + return node_; + } + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public int getNodeCount() { + return node_.size(); + } + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public org.tensorflow.proto.framework.NodeDef getNode(int index) { + return node_.get(index); + } + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public org.tensorflow.proto.framework.NodeDefOrBuilder getNodeOrBuilder( + int index) { + return node_.get(index); + } + + public static final int VERSIONS_FIELD_NUMBER = 4; + private org.tensorflow.proto.framework.VersionDef versions_; + /** + *
+   * 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.
+   * 
+ * + * .tensorflow.VersionDef versions = 4; + */ + public boolean hasVersions() { + return versions_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .tensorflow.VersionDef versions = 4; + */ + public org.tensorflow.proto.framework.VersionDef getVersions() { + return versions_ == null ? org.tensorflow.proto.framework.VersionDef.getDefaultInstance() : versions_; + } + /** + *
+   * 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.
+   * 
+ * + * .tensorflow.VersionDef versions = 4; + */ + public org.tensorflow.proto.framework.VersionDefOrBuilder getVersionsOrBuilder() { + return getVersions(); + } + + public static final int VERSION_FIELD_NUMBER = 3; + private int version_; + /** + *
+   * Deprecated single version field; use versions above instead.  Since all
+   * GraphDef changes before "versions" was introduced were forward
+   * compatible, this field is entirely ignored.
+   * 
+ * + * int32 version = 3 [deprecated = true]; + */ + @java.lang.Deprecated public int getVersion() { + return version_; + } + + public static final int LIBRARY_FIELD_NUMBER = 2; + private org.tensorflow.proto.framework.FunctionDefLibrary library_; + /** + *
+   * 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.
+   * 
+ * + * .tensorflow.FunctionDefLibrary library = 2; + */ + public boolean hasLibrary() { + return library_ != null; + } + /** + *
+   * 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.
+   * 
+ * + * .tensorflow.FunctionDefLibrary library = 2; + */ + public org.tensorflow.proto.framework.FunctionDefLibrary getLibrary() { + return library_ == null ? org.tensorflow.proto.framework.FunctionDefLibrary.getDefaultInstance() : library_; + } + /** + *
+   * 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.
+   * 
+ * + * .tensorflow.FunctionDefLibrary library = 2; + */ + public org.tensorflow.proto.framework.FunctionDefLibraryOrBuilder getLibraryOrBuilder() { + return getLibrary(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(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()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + 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()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GraphDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GraphDef other = (org.tensorflow.proto.framework.GraphDef) obj; + + if (!getNodeList() + .equals(other.getNodeList())) return false; + if (hasVersions() != other.hasVersions()) return false; + if (hasVersions()) { + if (!getVersions() + .equals(other.getVersions())) return false; + } + if (getVersion() + != other.getVersion()) return false; + if (hasLibrary() != other.hasLibrary()) return false; + if (hasLibrary()) { + if (!getLibrary() + .equals(other.getLibrary())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNodeCount() > 0) { + hash = (37 * hash) + NODE_FIELD_NUMBER; + hash = (53 * hash) + getNodeList().hashCode(); + } + if (hasVersions()) { + hash = (37 * hash) + VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getVersions().hashCode(); + } + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion(); + if (hasLibrary()) { + hash = (37 * hash) + LIBRARY_FIELD_NUMBER; + hash = (53 * hash) + getLibrary().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GraphDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.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.proto.framework.GraphDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GraphDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents the graph of operations
+   * 
+ * + * Protobuf type {@code tensorflow.GraphDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GraphDef) + org.tensorflow.proto.framework.GraphDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphProtos.internal_static_tensorflow_GraphDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphProtos.internal_static_tensorflow_GraphDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphDef.class, org.tensorflow.proto.framework.GraphDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GraphDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getNodeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (nodeBuilder_ == null) { + node_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + nodeBuilder_.clear(); + } + if (versionsBuilder_ == null) { + versions_ = null; + } else { + versions_ = null; + versionsBuilder_ = null; + } + version_ = 0; + + if (libraryBuilder_ == null) { + library_ = null; + } else { + library_ = null; + libraryBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.GraphProtos.internal_static_tensorflow_GraphDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GraphDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphDef build() { + org.tensorflow.proto.framework.GraphDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphDef buildPartial() { + org.tensorflow.proto.framework.GraphDef result = new org.tensorflow.proto.framework.GraphDef(this); + int from_bitField0_ = bitField0_; + if (nodeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + node_ = java.util.Collections.unmodifiableList(node_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.node_ = node_; + } else { + result.node_ = nodeBuilder_.build(); + } + if (versionsBuilder_ == null) { + result.versions_ = versions_; + } else { + result.versions_ = versionsBuilder_.build(); + } + result.version_ = version_; + if (libraryBuilder_ == null) { + result.library_ = library_; + } else { + result.library_ = libraryBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GraphDef) { + return mergeFrom((org.tensorflow.proto.framework.GraphDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GraphDef other) { + if (other == org.tensorflow.proto.framework.GraphDef.getDefaultInstance()) return this; + if (nodeBuilder_ == null) { + if (!other.node_.isEmpty()) { + if (node_.isEmpty()) { + node_ = other.node_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNodeIsMutable(); + node_.addAll(other.node_); + } + onChanged(); + } + } else { + if (!other.node_.isEmpty()) { + if (nodeBuilder_.isEmpty()) { + nodeBuilder_.dispose(); + nodeBuilder_ = null; + node_ = other.node_; + bitField0_ = (bitField0_ & ~0x00000001); + nodeBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNodeFieldBuilder() : null; + } else { + nodeBuilder_.addAllMessages(other.node_); + } + } + } + if (other.hasVersions()) { + mergeVersions(other.getVersions()); + } + if (other.getVersion() != 0) { + setVersion(other.getVersion()); + } + if (other.hasLibrary()) { + mergeLibrary(other.getLibrary()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GraphDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GraphDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List node_ = + java.util.Collections.emptyList(); + private void ensureNodeIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + node_ = new java.util.ArrayList(node_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.NodeDef, org.tensorflow.proto.framework.NodeDef.Builder, org.tensorflow.proto.framework.NodeDefOrBuilder> nodeBuilder_; + + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public java.util.List getNodeList() { + if (nodeBuilder_ == null) { + return java.util.Collections.unmodifiableList(node_); + } else { + return nodeBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public int getNodeCount() { + if (nodeBuilder_ == null) { + return node_.size(); + } else { + return nodeBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public org.tensorflow.proto.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.proto.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.proto.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.proto.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.proto.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.proto.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.proto.framework.NodeDef.Builder builderForValue) { + if (nodeBuilder_ == null) { + ensureNodeIsMutable(); + node_.add(index, builderForValue.build()); + onChanged(); + } else { + nodeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public Builder addAllNode( + java.lang.Iterable values) { + if (nodeBuilder_ == null) { + ensureNodeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, node_); + onChanged(); + } else { + nodeBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public Builder clearNode() { + if (nodeBuilder_ == null) { + node_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + nodeBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public Builder removeNode(int index) { + if (nodeBuilder_ == null) { + ensureNodeIsMutable(); + node_.remove(index); + onChanged(); + } else { + nodeBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public org.tensorflow.proto.framework.NodeDef.Builder getNodeBuilder( + int index) { + return getNodeFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public org.tensorflow.proto.framework.NodeDefOrBuilder getNodeOrBuilder( + int index) { + if (nodeBuilder_ == null) { + return node_.get(index); } else { + return nodeBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public java.util.List + getNodeOrBuilderList() { + if (nodeBuilder_ != null) { + return nodeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(node_); + } + } + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public org.tensorflow.proto.framework.NodeDef.Builder addNodeBuilder() { + return getNodeFieldBuilder().addBuilder( + org.tensorflow.proto.framework.NodeDef.getDefaultInstance()); + } + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public org.tensorflow.proto.framework.NodeDef.Builder addNodeBuilder( + int index) { + return getNodeFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.NodeDef.getDefaultInstance()); + } + /** + * repeated .tensorflow.NodeDef node = 1; + */ + public java.util.List + getNodeBuilderList() { + return getNodeFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.NodeDef, org.tensorflow.proto.framework.NodeDef.Builder, org.tensorflow.proto.framework.NodeDefOrBuilder> + getNodeFieldBuilder() { + if (nodeBuilder_ == null) { + nodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.NodeDef, org.tensorflow.proto.framework.NodeDef.Builder, org.tensorflow.proto.framework.NodeDefOrBuilder>( + node_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + node_ = null; + } + return nodeBuilder_; + } + + private org.tensorflow.proto.framework.VersionDef versions_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.VersionDef, org.tensorflow.proto.framework.VersionDef.Builder, org.tensorflow.proto.framework.VersionDefOrBuilder> versionsBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.VersionDef versions = 4; + */ + public boolean hasVersions() { + return versionsBuilder_ != null || versions_ != null; + } + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.VersionDef versions = 4; + */ + public org.tensorflow.proto.framework.VersionDef getVersions() { + if (versionsBuilder_ == null) { + return versions_ == null ? org.tensorflow.proto.framework.VersionDef.getDefaultInstance() : versions_; + } else { + return versionsBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.VersionDef versions = 4; + */ + public Builder setVersions(org.tensorflow.proto.framework.VersionDef value) { + if (versionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + versions_ = value; + onChanged(); + } else { + versionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.VersionDef versions = 4; + */ + public Builder setVersions( + org.tensorflow.proto.framework.VersionDef.Builder builderForValue) { + if (versionsBuilder_ == null) { + versions_ = builderForValue.build(); + onChanged(); + } else { + versionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.VersionDef versions = 4; + */ + public Builder mergeVersions(org.tensorflow.proto.framework.VersionDef value) { + if (versionsBuilder_ == null) { + if (versions_ != null) { + versions_ = + org.tensorflow.proto.framework.VersionDef.newBuilder(versions_).mergeFrom(value).buildPartial(); + } else { + versions_ = value; + } + onChanged(); + } else { + versionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.VersionDef versions = 4; + */ + public Builder clearVersions() { + if (versionsBuilder_ == null) { + versions_ = null; + onChanged(); + } else { + versions_ = null; + versionsBuilder_ = null; + } + + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.VersionDef versions = 4; + */ + public org.tensorflow.proto.framework.VersionDef.Builder getVersionsBuilder() { + + onChanged(); + return getVersionsFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.VersionDef versions = 4; + */ + public org.tensorflow.proto.framework.VersionDefOrBuilder getVersionsOrBuilder() { + if (versionsBuilder_ != null) { + return versionsBuilder_.getMessageOrBuilder(); + } else { + return versions_ == null ? + org.tensorflow.proto.framework.VersionDef.getDefaultInstance() : versions_; + } + } + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.VersionDef versions = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.VersionDef, org.tensorflow.proto.framework.VersionDef.Builder, org.tensorflow.proto.framework.VersionDefOrBuilder> + getVersionsFieldBuilder() { + if (versionsBuilder_ == null) { + versionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.VersionDef, org.tensorflow.proto.framework.VersionDef.Builder, org.tensorflow.proto.framework.VersionDefOrBuilder>( + getVersions(), + getParentForChildren(), + isClean()); + versions_ = null; + } + return versionsBuilder_; + } + + private int version_ ; + /** + *
+     * Deprecated single version field; use versions above instead.  Since all
+     * GraphDef changes before "versions" was introduced were forward
+     * compatible, this field is entirely ignored.
+     * 
+ * + * int32 version = 3 [deprecated = true]; + */ + @java.lang.Deprecated public int getVersion() { + return version_; + } + /** + *
+     * Deprecated single version field; use versions above instead.  Since all
+     * GraphDef changes before "versions" was introduced were forward
+     * compatible, this field is entirely ignored.
+     * 
+ * + * int32 version = 3 [deprecated = true]; + */ + @java.lang.Deprecated public Builder setVersion(int value) { + + version_ = value; + onChanged(); + return this; + } + /** + *
+     * Deprecated single version field; use versions above instead.  Since all
+     * GraphDef changes before "versions" was introduced were forward
+     * compatible, this field is entirely ignored.
+     * 
+ * + * int32 version = 3 [deprecated = true]; + */ + @java.lang.Deprecated public Builder clearVersion() { + + version_ = 0; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.FunctionDefLibrary library_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.FunctionDefLibrary, org.tensorflow.proto.framework.FunctionDefLibrary.Builder, org.tensorflow.proto.framework.FunctionDefLibraryOrBuilder> libraryBuilder_; + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.FunctionDefLibrary library = 2; + */ + public boolean hasLibrary() { + return libraryBuilder_ != null || library_ != null; + } + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.FunctionDefLibrary library = 2; + */ + public org.tensorflow.proto.framework.FunctionDefLibrary getLibrary() { + if (libraryBuilder_ == null) { + return library_ == null ? org.tensorflow.proto.framework.FunctionDefLibrary.getDefaultInstance() : library_; + } else { + return libraryBuilder_.getMessage(); + } + } + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.FunctionDefLibrary library = 2; + */ + public Builder setLibrary(org.tensorflow.proto.framework.FunctionDefLibrary value) { + if (libraryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + library_ = value; + onChanged(); + } else { + libraryBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.FunctionDefLibrary library = 2; + */ + public Builder setLibrary( + org.tensorflow.proto.framework.FunctionDefLibrary.Builder builderForValue) { + if (libraryBuilder_ == null) { + library_ = builderForValue.build(); + onChanged(); + } else { + libraryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.FunctionDefLibrary library = 2; + */ + public Builder mergeLibrary(org.tensorflow.proto.framework.FunctionDefLibrary value) { + if (libraryBuilder_ == null) { + if (library_ != null) { + library_ = + org.tensorflow.proto.framework.FunctionDefLibrary.newBuilder(library_).mergeFrom(value).buildPartial(); + } else { + library_ = value; + } + onChanged(); + } else { + libraryBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.FunctionDefLibrary library = 2; + */ + public Builder clearLibrary() { + if (libraryBuilder_ == null) { + library_ = null; + onChanged(); + } else { + library_ = null; + libraryBuilder_ = null; + } + + return this; + } + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.FunctionDefLibrary library = 2; + */ + public org.tensorflow.proto.framework.FunctionDefLibrary.Builder getLibraryBuilder() { + + onChanged(); + return getLibraryFieldBuilder().getBuilder(); + } + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.FunctionDefLibrary library = 2; + */ + public org.tensorflow.proto.framework.FunctionDefLibraryOrBuilder getLibraryOrBuilder() { + if (libraryBuilder_ != null) { + return libraryBuilder_.getMessageOrBuilder(); + } else { + return library_ == null ? + org.tensorflow.proto.framework.FunctionDefLibrary.getDefaultInstance() : library_; + } + } + /** + *
+     * 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.
+     * 
+ * + * .tensorflow.FunctionDefLibrary library = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.FunctionDefLibrary, org.tensorflow.proto.framework.FunctionDefLibrary.Builder, org.tensorflow.proto.framework.FunctionDefLibraryOrBuilder> + getLibraryFieldBuilder() { + if (libraryBuilder_ == null) { + libraryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.FunctionDefLibrary, org.tensorflow.proto.framework.FunctionDefLibrary.Builder, org.tensorflow.proto.framework.FunctionDefLibraryOrBuilder>( + getLibrary(), + getParentForChildren(), + isClean()); + library_ = null; + } + return libraryBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GraphDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GraphDef) + private static final org.tensorflow.proto.framework.GraphDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GraphDef(); + } + + public static org.tensorflow.proto.framework.GraphDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GraphDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GraphDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphDefOrBuilder.java new file mode 100644 index 00000000000..0e4ac4dca6e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphDefOrBuilder.java @@ -0,0 +1,163 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph.proto + +package org.tensorflow.proto.framework; + +public interface GraphDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GraphDef) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .tensorflow.NodeDef node = 1; + */ + java.util.List + getNodeList(); + /** + * repeated .tensorflow.NodeDef node = 1; + */ + org.tensorflow.proto.framework.NodeDef getNode(int index); + /** + * repeated .tensorflow.NodeDef node = 1; + */ + int getNodeCount(); + /** + * repeated .tensorflow.NodeDef node = 1; + */ + java.util.List + getNodeOrBuilderList(); + /** + * repeated .tensorflow.NodeDef node = 1; + */ + org.tensorflow.proto.framework.NodeDefOrBuilder getNodeOrBuilder( + int index); + + /** + *
+   * 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.
+   * 
+ * + * .tensorflow.VersionDef versions = 4; + */ + boolean hasVersions(); + /** + *
+   * 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.
+   * 
+ * + * .tensorflow.VersionDef versions = 4; + */ + org.tensorflow.proto.framework.VersionDef getVersions(); + /** + *
+   * 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.
+   * 
+ * + * .tensorflow.VersionDef versions = 4; + */ + org.tensorflow.proto.framework.VersionDefOrBuilder getVersionsOrBuilder(); + + /** + *
+   * Deprecated single version field; use versions above instead.  Since all
+   * GraphDef changes before "versions" was introduced were forward
+   * compatible, this field is entirely ignored.
+   * 
+ * + * int32 version = 3 [deprecated = true]; + */ + @java.lang.Deprecated int getVersion(); + + /** + *
+   * 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.
+   * 
+ * + * .tensorflow.FunctionDefLibrary library = 2; + */ + boolean hasLibrary(); + /** + *
+   * 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.
+   * 
+ * + * .tensorflow.FunctionDefLibrary library = 2; + */ + org.tensorflow.proto.framework.FunctionDefLibrary getLibrary(); + /** + *
+   * 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.
+   * 
+ * + * .tensorflow.FunctionDefLibrary library = 2; + */ + org.tensorflow.proto.framework.FunctionDefLibraryOrBuilder getLibraryOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphOptions.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphOptions.java new file mode 100644 index 00000000000..5916d82ca1c --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphOptions.java @@ -0,0 +1,1462 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.GraphOptions} + */ +public final class GraphOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GraphOptions) + GraphOptionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use GraphOptions.newBuilder() to construct. + private GraphOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GraphOptions() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GraphOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GraphOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: { + + enableRecvScheduling_ = input.readBool(); + break; + } + case 26: { + org.tensorflow.proto.framework.OptimizerOptions.Builder subBuilder = null; + if (optimizerOptions_ != null) { + subBuilder = optimizerOptions_.toBuilder(); + } + optimizerOptions_ = input.readMessage(org.tensorflow.proto.framework.OptimizerOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(optimizerOptions_); + optimizerOptions_ = subBuilder.buildPartial(); + } + + break; + } + case 32: { + + buildCostModel_ = input.readInt64(); + break; + } + case 40: { + + inferShapes_ = input.readBool(); + break; + } + case 48: { + + placePrunedGraph_ = input.readBool(); + break; + } + case 56: { + + enableBfloat16Sendrecv_ = input.readBool(); + break; + } + case 64: { + + timelineStep_ = input.readInt32(); + break; + } + case 72: { + + buildCostModelAfter_ = input.readInt64(); + break; + } + case 82: { + org.tensorflow.proto.framework.RewriterConfig.Builder subBuilder = null; + if (rewriteOptions_ != null) { + subBuilder = rewriteOptions_.toBuilder(); + } + rewriteOptions_ = input.readMessage(org.tensorflow.proto.framework.RewriterConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rewriteOptions_); + rewriteOptions_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GraphOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GraphOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphOptions.class, org.tensorflow.proto.framework.GraphOptions.Builder.class); + } + + public static final int ENABLE_RECV_SCHEDULING_FIELD_NUMBER = 2; + private boolean enableRecvScheduling_; + /** + *
+   * If true, use control flow to schedule the activation of Recv nodes.
+   * (Currently ignored.)
+   * 
+ * + * bool enable_recv_scheduling = 2; + */ + public boolean getEnableRecvScheduling() { + return enableRecvScheduling_; + } + + public static final int OPTIMIZER_OPTIONS_FIELD_NUMBER = 3; + private org.tensorflow.proto.framework.OptimizerOptions optimizerOptions_; + /** + *
+   * Options controlling how graph is optimized.
+   * 
+ * + * .tensorflow.OptimizerOptions optimizer_options = 3; + */ + public boolean hasOptimizerOptions() { + return optimizerOptions_ != null; + } + /** + *
+   * Options controlling how graph is optimized.
+   * 
+ * + * .tensorflow.OptimizerOptions optimizer_options = 3; + */ + public org.tensorflow.proto.framework.OptimizerOptions getOptimizerOptions() { + return optimizerOptions_ == null ? org.tensorflow.proto.framework.OptimizerOptions.getDefaultInstance() : optimizerOptions_; + } + /** + *
+   * Options controlling how graph is optimized.
+   * 
+ * + * .tensorflow.OptimizerOptions optimizer_options = 3; + */ + public org.tensorflow.proto.framework.OptimizerOptionsOrBuilder getOptimizerOptionsOrBuilder() { + return getOptimizerOptions(); + } + + public static final int BUILD_COST_MODEL_FIELD_NUMBER = 4; + private long buildCostModel_; + /** + *
+   * The number of steps to run before returning a cost model detailing
+   * the memory usage and performance of each node of the graph. 0 means
+   * no cost model.
+   * 
+ * + * int64 build_cost_model = 4; + */ + public long getBuildCostModel() { + return buildCostModel_; + } + + public static final int BUILD_COST_MODEL_AFTER_FIELD_NUMBER = 9; + private long buildCostModelAfter_; + /** + *
+   * The number of steps to skip before collecting statistics for the
+   * cost model.
+   * 
+ * + * int64 build_cost_model_after = 9; + */ + public long getBuildCostModelAfter() { + return buildCostModelAfter_; + } + + public static final int INFER_SHAPES_FIELD_NUMBER = 5; + private boolean inferShapes_; + /** + *
+   * Annotate each Node with Op output shape data, to the extent it can
+   * be statically inferred.
+   * 
+ * + * bool infer_shapes = 5; + */ + public boolean getInferShapes() { + return inferShapes_; + } + + public static final int PLACE_PRUNED_GRAPH_FIELD_NUMBER = 6; + private boolean placePrunedGraph_; + /** + *
+   * Only place the subgraphs that are run, rather than the entire graph.
+   * This is useful for interactive graph building, where one might
+   * produce graphs that cannot be placed during the debugging
+   * process.  In particular, it allows the client to continue work in
+   * a session after adding a node to a graph whose placement
+   * constraints are unsatisfiable.
+   * 
+ * + * bool place_pruned_graph = 6; + */ + public boolean getPlacePrunedGraph() { + return placePrunedGraph_; + } + + public static final int ENABLE_BFLOAT16_SENDRECV_FIELD_NUMBER = 7; + private boolean enableBfloat16Sendrecv_; + /** + *
+   * If true, transfer float values between processes as bfloat16.
+   * 
+ * + * bool enable_bfloat16_sendrecv = 7; + */ + public boolean getEnableBfloat16Sendrecv() { + return enableBfloat16Sendrecv_; + } + + public static final int TIMELINE_STEP_FIELD_NUMBER = 8; + private int timelineStep_; + /** + *
+   * If > 0, record a timeline every this many steps.
+   * EXPERIMENTAL: This currently has no effect in MasterSession.
+   * 
+ * + * int32 timeline_step = 8; + */ + public int getTimelineStep() { + return timelineStep_; + } + + public static final int REWRITE_OPTIONS_FIELD_NUMBER = 10; + private org.tensorflow.proto.framework.RewriterConfig rewriteOptions_; + /** + *
+   * Options that control the type and amount of graph rewriting.
+   * Not currently configurable via the public Python API (i.e. there is no API
+   * stability guarantee if you import RewriterConfig explicitly).
+   * 
+ * + * .tensorflow.RewriterConfig rewrite_options = 10; + */ + public boolean hasRewriteOptions() { + return rewriteOptions_ != null; + } + /** + *
+   * Options that control the type and amount of graph rewriting.
+   * Not currently configurable via the public Python API (i.e. there is no API
+   * stability guarantee if you import RewriterConfig explicitly).
+   * 
+ * + * .tensorflow.RewriterConfig rewrite_options = 10; + */ + public org.tensorflow.proto.framework.RewriterConfig getRewriteOptions() { + return rewriteOptions_ == null ? org.tensorflow.proto.framework.RewriterConfig.getDefaultInstance() : rewriteOptions_; + } + /** + *
+   * Options that control the type and amount of graph rewriting.
+   * Not currently configurable via the public Python API (i.e. there is no API
+   * stability guarantee if you import RewriterConfig explicitly).
+   * 
+ * + * .tensorflow.RewriterConfig rewrite_options = 10; + */ + public org.tensorflow.proto.framework.RewriterConfigOrBuilder getRewriteOptionsOrBuilder() { + return getRewriteOptions(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (enableRecvScheduling_ != false) { + output.writeBool(2, enableRecvScheduling_); + } + if (optimizerOptions_ != null) { + output.writeMessage(3, getOptimizerOptions()); + } + if (buildCostModel_ != 0L) { + output.writeInt64(4, buildCostModel_); + } + if (inferShapes_ != false) { + output.writeBool(5, inferShapes_); + } + if (placePrunedGraph_ != false) { + output.writeBool(6, placePrunedGraph_); + } + if (enableBfloat16Sendrecv_ != false) { + output.writeBool(7, enableBfloat16Sendrecv_); + } + if (timelineStep_ != 0) { + output.writeInt32(8, timelineStep_); + } + if (buildCostModelAfter_ != 0L) { + output.writeInt64(9, buildCostModelAfter_); + } + if (rewriteOptions_ != null) { + output.writeMessage(10, getRewriteOptions()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + 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()); + } + if (buildCostModel_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, buildCostModel_); + } + if (inferShapes_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, inferShapes_); + } + if (placePrunedGraph_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, placePrunedGraph_); + } + if (enableBfloat16Sendrecv_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, enableBfloat16Sendrecv_); + } + if (timelineStep_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(8, timelineStep_); + } + if (buildCostModelAfter_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(9, buildCostModelAfter_); + } + if (rewriteOptions_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getRewriteOptions()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GraphOptions)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GraphOptions other = (org.tensorflow.proto.framework.GraphOptions) obj; + + if (getEnableRecvScheduling() + != other.getEnableRecvScheduling()) return false; + if (hasOptimizerOptions() != other.hasOptimizerOptions()) return false; + if (hasOptimizerOptions()) { + if (!getOptimizerOptions() + .equals(other.getOptimizerOptions())) return false; + } + if (getBuildCostModel() + != other.getBuildCostModel()) return false; + if (getBuildCostModelAfter() + != other.getBuildCostModelAfter()) return false; + if (getInferShapes() + != other.getInferShapes()) return false; + if (getPlacePrunedGraph() + != other.getPlacePrunedGraph()) return false; + if (getEnableBfloat16Sendrecv() + != other.getEnableBfloat16Sendrecv()) return false; + if (getTimelineStep() + != other.getTimelineStep()) return false; + if (hasRewriteOptions() != other.hasRewriteOptions()) return false; + if (hasRewriteOptions()) { + if (!getRewriteOptions() + .equals(other.getRewriteOptions())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_RECV_SCHEDULING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnableRecvScheduling()); + if (hasOptimizerOptions()) { + hash = (37 * hash) + OPTIMIZER_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptimizerOptions().hashCode(); + } + hash = (37 * hash) + BUILD_COST_MODEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBuildCostModel()); + hash = (37 * hash) + BUILD_COST_MODEL_AFTER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBuildCostModelAfter()); + hash = (37 * hash) + INFER_SHAPES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getInferShapes()); + hash = (37 * hash) + PLACE_PRUNED_GRAPH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPlacePrunedGraph()); + hash = (37 * hash) + ENABLE_BFLOAT16_SENDRECV_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnableBfloat16Sendrecv()); + hash = (37 * hash) + TIMELINE_STEP_FIELD_NUMBER; + hash = (53 * hash) + getTimelineStep(); + if (hasRewriteOptions()) { + hash = (37 * hash) + REWRITE_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getRewriteOptions().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GraphOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.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.proto.framework.GraphOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GraphOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.GraphOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GraphOptions) + org.tensorflow.proto.framework.GraphOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GraphOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GraphOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphOptions.class, org.tensorflow.proto.framework.GraphOptions.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GraphOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + enableRecvScheduling_ = false; + + if (optimizerOptionsBuilder_ == null) { + optimizerOptions_ = null; + } else { + optimizerOptions_ = null; + optimizerOptionsBuilder_ = null; + } + buildCostModel_ = 0L; + + buildCostModelAfter_ = 0L; + + inferShapes_ = false; + + placePrunedGraph_ = false; + + enableBfloat16Sendrecv_ = false; + + timelineStep_ = 0; + + if (rewriteOptionsBuilder_ == null) { + rewriteOptions_ = null; + } else { + rewriteOptions_ = null; + rewriteOptionsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_GraphOptions_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphOptions getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GraphOptions.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphOptions build() { + org.tensorflow.proto.framework.GraphOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphOptions buildPartial() { + org.tensorflow.proto.framework.GraphOptions result = new org.tensorflow.proto.framework.GraphOptions(this); + result.enableRecvScheduling_ = enableRecvScheduling_; + if (optimizerOptionsBuilder_ == null) { + result.optimizerOptions_ = optimizerOptions_; + } else { + result.optimizerOptions_ = optimizerOptionsBuilder_.build(); + } + result.buildCostModel_ = buildCostModel_; + result.buildCostModelAfter_ = buildCostModelAfter_; + result.inferShapes_ = inferShapes_; + result.placePrunedGraph_ = placePrunedGraph_; + result.enableBfloat16Sendrecv_ = enableBfloat16Sendrecv_; + result.timelineStep_ = timelineStep_; + if (rewriteOptionsBuilder_ == null) { + result.rewriteOptions_ = rewriteOptions_; + } else { + result.rewriteOptions_ = rewriteOptionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GraphOptions) { + return mergeFrom((org.tensorflow.proto.framework.GraphOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GraphOptions other) { + if (other == org.tensorflow.proto.framework.GraphOptions.getDefaultInstance()) return this; + if (other.getEnableRecvScheduling() != false) { + setEnableRecvScheduling(other.getEnableRecvScheduling()); + } + if (other.hasOptimizerOptions()) { + mergeOptimizerOptions(other.getOptimizerOptions()); + } + if (other.getBuildCostModel() != 0L) { + setBuildCostModel(other.getBuildCostModel()); + } + if (other.getBuildCostModelAfter() != 0L) { + setBuildCostModelAfter(other.getBuildCostModelAfter()); + } + if (other.getInferShapes() != false) { + setInferShapes(other.getInferShapes()); + } + if (other.getPlacePrunedGraph() != false) { + setPlacePrunedGraph(other.getPlacePrunedGraph()); + } + if (other.getEnableBfloat16Sendrecv() != false) { + setEnableBfloat16Sendrecv(other.getEnableBfloat16Sendrecv()); + } + if (other.getTimelineStep() != 0) { + setTimelineStep(other.getTimelineStep()); + } + if (other.hasRewriteOptions()) { + mergeRewriteOptions(other.getRewriteOptions()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GraphOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GraphOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enableRecvScheduling_ ; + /** + *
+     * If true, use control flow to schedule the activation of Recv nodes.
+     * (Currently ignored.)
+     * 
+ * + * bool enable_recv_scheduling = 2; + */ + public boolean getEnableRecvScheduling() { + return enableRecvScheduling_; + } + /** + *
+     * If true, use control flow to schedule the activation of Recv nodes.
+     * (Currently ignored.)
+     * 
+ * + * bool enable_recv_scheduling = 2; + */ + public Builder setEnableRecvScheduling(boolean value) { + + enableRecvScheduling_ = value; + onChanged(); + return this; + } + /** + *
+     * If true, use control flow to schedule the activation of Recv nodes.
+     * (Currently ignored.)
+     * 
+ * + * bool enable_recv_scheduling = 2; + */ + public Builder clearEnableRecvScheduling() { + + enableRecvScheduling_ = false; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.OptimizerOptions optimizerOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.OptimizerOptions, org.tensorflow.proto.framework.OptimizerOptions.Builder, org.tensorflow.proto.framework.OptimizerOptionsOrBuilder> optimizerOptionsBuilder_; + /** + *
+     * Options controlling how graph is optimized.
+     * 
+ * + * .tensorflow.OptimizerOptions optimizer_options = 3; + */ + public boolean hasOptimizerOptions() { + return optimizerOptionsBuilder_ != null || optimizerOptions_ != null; + } + /** + *
+     * Options controlling how graph is optimized.
+     * 
+ * + * .tensorflow.OptimizerOptions optimizer_options = 3; + */ + public org.tensorflow.proto.framework.OptimizerOptions getOptimizerOptions() { + if (optimizerOptionsBuilder_ == null) { + return optimizerOptions_ == null ? org.tensorflow.proto.framework.OptimizerOptions.getDefaultInstance() : optimizerOptions_; + } else { + return optimizerOptionsBuilder_.getMessage(); + } + } + /** + *
+     * Options controlling how graph is optimized.
+     * 
+ * + * .tensorflow.OptimizerOptions optimizer_options = 3; + */ + public Builder setOptimizerOptions(org.tensorflow.proto.framework.OptimizerOptions value) { + if (optimizerOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + optimizerOptions_ = value; + onChanged(); + } else { + optimizerOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Options controlling how graph is optimized.
+     * 
+ * + * .tensorflow.OptimizerOptions optimizer_options = 3; + */ + public Builder setOptimizerOptions( + org.tensorflow.proto.framework.OptimizerOptions.Builder builderForValue) { + if (optimizerOptionsBuilder_ == null) { + optimizerOptions_ = builderForValue.build(); + onChanged(); + } else { + optimizerOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Options controlling how graph is optimized.
+     * 
+ * + * .tensorflow.OptimizerOptions optimizer_options = 3; + */ + public Builder mergeOptimizerOptions(org.tensorflow.proto.framework.OptimizerOptions value) { + if (optimizerOptionsBuilder_ == null) { + if (optimizerOptions_ != null) { + optimizerOptions_ = + org.tensorflow.proto.framework.OptimizerOptions.newBuilder(optimizerOptions_).mergeFrom(value).buildPartial(); + } else { + optimizerOptions_ = value; + } + onChanged(); + } else { + optimizerOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Options controlling how graph is optimized.
+     * 
+ * + * .tensorflow.OptimizerOptions optimizer_options = 3; + */ + public Builder clearOptimizerOptions() { + if (optimizerOptionsBuilder_ == null) { + optimizerOptions_ = null; + onChanged(); + } else { + optimizerOptions_ = null; + optimizerOptionsBuilder_ = null; + } + + return this; + } + /** + *
+     * Options controlling how graph is optimized.
+     * 
+ * + * .tensorflow.OptimizerOptions optimizer_options = 3; + */ + public org.tensorflow.proto.framework.OptimizerOptions.Builder getOptimizerOptionsBuilder() { + + onChanged(); + return getOptimizerOptionsFieldBuilder().getBuilder(); + } + /** + *
+     * Options controlling how graph is optimized.
+     * 
+ * + * .tensorflow.OptimizerOptions optimizer_options = 3; + */ + public org.tensorflow.proto.framework.OptimizerOptionsOrBuilder getOptimizerOptionsOrBuilder() { + if (optimizerOptionsBuilder_ != null) { + return optimizerOptionsBuilder_.getMessageOrBuilder(); + } else { + return optimizerOptions_ == null ? + org.tensorflow.proto.framework.OptimizerOptions.getDefaultInstance() : optimizerOptions_; + } + } + /** + *
+     * Options controlling how graph is optimized.
+     * 
+ * + * .tensorflow.OptimizerOptions optimizer_options = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.OptimizerOptions, org.tensorflow.proto.framework.OptimizerOptions.Builder, org.tensorflow.proto.framework.OptimizerOptionsOrBuilder> + getOptimizerOptionsFieldBuilder() { + if (optimizerOptionsBuilder_ == null) { + optimizerOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.OptimizerOptions, org.tensorflow.proto.framework.OptimizerOptions.Builder, org.tensorflow.proto.framework.OptimizerOptionsOrBuilder>( + getOptimizerOptions(), + getParentForChildren(), + isClean()); + optimizerOptions_ = null; + } + return optimizerOptionsBuilder_; + } + + private long buildCostModel_ ; + /** + *
+     * The number of steps to run before returning a cost model detailing
+     * the memory usage and performance of each node of the graph. 0 means
+     * no cost model.
+     * 
+ * + * int64 build_cost_model = 4; + */ + public long getBuildCostModel() { + return buildCostModel_; + } + /** + *
+     * The number of steps to run before returning a cost model detailing
+     * the memory usage and performance of each node of the graph. 0 means
+     * no cost model.
+     * 
+ * + * int64 build_cost_model = 4; + */ + public Builder setBuildCostModel(long value) { + + buildCostModel_ = value; + onChanged(); + return this; + } + /** + *
+     * The number of steps to run before returning a cost model detailing
+     * the memory usage and performance of each node of the graph. 0 means
+     * no cost model.
+     * 
+ * + * int64 build_cost_model = 4; + */ + public Builder clearBuildCostModel() { + + buildCostModel_ = 0L; + onChanged(); + return this; + } + + private long buildCostModelAfter_ ; + /** + *
+     * The number of steps to skip before collecting statistics for the
+     * cost model.
+     * 
+ * + * int64 build_cost_model_after = 9; + */ + public long getBuildCostModelAfter() { + return buildCostModelAfter_; + } + /** + *
+     * The number of steps to skip before collecting statistics for the
+     * cost model.
+     * 
+ * + * int64 build_cost_model_after = 9; + */ + public Builder setBuildCostModelAfter(long value) { + + buildCostModelAfter_ = value; + onChanged(); + return this; + } + /** + *
+     * The number of steps to skip before collecting statistics for the
+     * cost model.
+     * 
+ * + * int64 build_cost_model_after = 9; + */ + public Builder clearBuildCostModelAfter() { + + buildCostModelAfter_ = 0L; + onChanged(); + return this; + } + + private boolean inferShapes_ ; + /** + *
+     * Annotate each Node with Op output shape data, to the extent it can
+     * be statically inferred.
+     * 
+ * + * bool infer_shapes = 5; + */ + public boolean getInferShapes() { + return inferShapes_; + } + /** + *
+     * Annotate each Node with Op output shape data, to the extent it can
+     * be statically inferred.
+     * 
+ * + * bool infer_shapes = 5; + */ + public Builder setInferShapes(boolean value) { + + inferShapes_ = value; + onChanged(); + return this; + } + /** + *
+     * Annotate each Node with Op output shape data, to the extent it can
+     * be statically inferred.
+     * 
+ * + * bool infer_shapes = 5; + */ + public Builder clearInferShapes() { + + inferShapes_ = false; + onChanged(); + return this; + } + + private boolean placePrunedGraph_ ; + /** + *
+     * Only place the subgraphs that are run, rather than the entire graph.
+     * This is useful for interactive graph building, where one might
+     * produce graphs that cannot be placed during the debugging
+     * process.  In particular, it allows the client to continue work in
+     * a session after adding a node to a graph whose placement
+     * constraints are unsatisfiable.
+     * 
+ * + * bool place_pruned_graph = 6; + */ + public boolean getPlacePrunedGraph() { + return placePrunedGraph_; + } + /** + *
+     * Only place the subgraphs that are run, rather than the entire graph.
+     * This is useful for interactive graph building, where one might
+     * produce graphs that cannot be placed during the debugging
+     * process.  In particular, it allows the client to continue work in
+     * a session after adding a node to a graph whose placement
+     * constraints are unsatisfiable.
+     * 
+ * + * bool place_pruned_graph = 6; + */ + public Builder setPlacePrunedGraph(boolean value) { + + placePrunedGraph_ = value; + onChanged(); + return this; + } + /** + *
+     * Only place the subgraphs that are run, rather than the entire graph.
+     * This is useful for interactive graph building, where one might
+     * produce graphs that cannot be placed during the debugging
+     * process.  In particular, it allows the client to continue work in
+     * a session after adding a node to a graph whose placement
+     * constraints are unsatisfiable.
+     * 
+ * + * bool place_pruned_graph = 6; + */ + public Builder clearPlacePrunedGraph() { + + placePrunedGraph_ = false; + onChanged(); + return this; + } + + private boolean enableBfloat16Sendrecv_ ; + /** + *
+     * If true, transfer float values between processes as bfloat16.
+     * 
+ * + * bool enable_bfloat16_sendrecv = 7; + */ + public boolean getEnableBfloat16Sendrecv() { + return enableBfloat16Sendrecv_; + } + /** + *
+     * If true, transfer float values between processes as bfloat16.
+     * 
+ * + * bool enable_bfloat16_sendrecv = 7; + */ + public Builder setEnableBfloat16Sendrecv(boolean value) { + + enableBfloat16Sendrecv_ = value; + onChanged(); + return this; + } + /** + *
+     * If true, transfer float values between processes as bfloat16.
+     * 
+ * + * bool enable_bfloat16_sendrecv = 7; + */ + public Builder clearEnableBfloat16Sendrecv() { + + enableBfloat16Sendrecv_ = false; + onChanged(); + return this; + } + + private int timelineStep_ ; + /** + *
+     * If > 0, record a timeline every this many steps.
+     * EXPERIMENTAL: This currently has no effect in MasterSession.
+     * 
+ * + * int32 timeline_step = 8; + */ + public int getTimelineStep() { + return timelineStep_; + } + /** + *
+     * If > 0, record a timeline every this many steps.
+     * EXPERIMENTAL: This currently has no effect in MasterSession.
+     * 
+ * + * int32 timeline_step = 8; + */ + public Builder setTimelineStep(int value) { + + timelineStep_ = value; + onChanged(); + return this; + } + /** + *
+     * If > 0, record a timeline every this many steps.
+     * EXPERIMENTAL: This currently has no effect in MasterSession.
+     * 
+ * + * int32 timeline_step = 8; + */ + public Builder clearTimelineStep() { + + timelineStep_ = 0; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.RewriterConfig rewriteOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.RewriterConfig, org.tensorflow.proto.framework.RewriterConfig.Builder, org.tensorflow.proto.framework.RewriterConfigOrBuilder> rewriteOptionsBuilder_; + /** + *
+     * Options that control the type and amount of graph rewriting.
+     * Not currently configurable via the public Python API (i.e. there is no API
+     * stability guarantee if you import RewriterConfig explicitly).
+     * 
+ * + * .tensorflow.RewriterConfig rewrite_options = 10; + */ + public boolean hasRewriteOptions() { + return rewriteOptionsBuilder_ != null || rewriteOptions_ != null; + } + /** + *
+     * Options that control the type and amount of graph rewriting.
+     * Not currently configurable via the public Python API (i.e. there is no API
+     * stability guarantee if you import RewriterConfig explicitly).
+     * 
+ * + * .tensorflow.RewriterConfig rewrite_options = 10; + */ + public org.tensorflow.proto.framework.RewriterConfig getRewriteOptions() { + if (rewriteOptionsBuilder_ == null) { + return rewriteOptions_ == null ? org.tensorflow.proto.framework.RewriterConfig.getDefaultInstance() : rewriteOptions_; + } else { + return rewriteOptionsBuilder_.getMessage(); + } + } + /** + *
+     * Options that control the type and amount of graph rewriting.
+     * Not currently configurable via the public Python API (i.e. there is no API
+     * stability guarantee if you import RewriterConfig explicitly).
+     * 
+ * + * .tensorflow.RewriterConfig rewrite_options = 10; + */ + public Builder setRewriteOptions(org.tensorflow.proto.framework.RewriterConfig value) { + if (rewriteOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rewriteOptions_ = value; + onChanged(); + } else { + rewriteOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Options that control the type and amount of graph rewriting.
+     * Not currently configurable via the public Python API (i.e. there is no API
+     * stability guarantee if you import RewriterConfig explicitly).
+     * 
+ * + * .tensorflow.RewriterConfig rewrite_options = 10; + */ + public Builder setRewriteOptions( + org.tensorflow.proto.framework.RewriterConfig.Builder builderForValue) { + if (rewriteOptionsBuilder_ == null) { + rewriteOptions_ = builderForValue.build(); + onChanged(); + } else { + rewriteOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Options that control the type and amount of graph rewriting.
+     * Not currently configurable via the public Python API (i.e. there is no API
+     * stability guarantee if you import RewriterConfig explicitly).
+     * 
+ * + * .tensorflow.RewriterConfig rewrite_options = 10; + */ + public Builder mergeRewriteOptions(org.tensorflow.proto.framework.RewriterConfig value) { + if (rewriteOptionsBuilder_ == null) { + if (rewriteOptions_ != null) { + rewriteOptions_ = + org.tensorflow.proto.framework.RewriterConfig.newBuilder(rewriteOptions_).mergeFrom(value).buildPartial(); + } else { + rewriteOptions_ = value; + } + onChanged(); + } else { + rewriteOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Options that control the type and amount of graph rewriting.
+     * Not currently configurable via the public Python API (i.e. there is no API
+     * stability guarantee if you import RewriterConfig explicitly).
+     * 
+ * + * .tensorflow.RewriterConfig rewrite_options = 10; + */ + public Builder clearRewriteOptions() { + if (rewriteOptionsBuilder_ == null) { + rewriteOptions_ = null; + onChanged(); + } else { + rewriteOptions_ = null; + rewriteOptionsBuilder_ = null; + } + + return this; + } + /** + *
+     * Options that control the type and amount of graph rewriting.
+     * Not currently configurable via the public Python API (i.e. there is no API
+     * stability guarantee if you import RewriterConfig explicitly).
+     * 
+ * + * .tensorflow.RewriterConfig rewrite_options = 10; + */ + public org.tensorflow.proto.framework.RewriterConfig.Builder getRewriteOptionsBuilder() { + + onChanged(); + return getRewriteOptionsFieldBuilder().getBuilder(); + } + /** + *
+     * Options that control the type and amount of graph rewriting.
+     * Not currently configurable via the public Python API (i.e. there is no API
+     * stability guarantee if you import RewriterConfig explicitly).
+     * 
+ * + * .tensorflow.RewriterConfig rewrite_options = 10; + */ + public org.tensorflow.proto.framework.RewriterConfigOrBuilder getRewriteOptionsOrBuilder() { + if (rewriteOptionsBuilder_ != null) { + return rewriteOptionsBuilder_.getMessageOrBuilder(); + } else { + return rewriteOptions_ == null ? + org.tensorflow.proto.framework.RewriterConfig.getDefaultInstance() : rewriteOptions_; + } + } + /** + *
+     * Options that control the type and amount of graph rewriting.
+     * Not currently configurable via the public Python API (i.e. there is no API
+     * stability guarantee if you import RewriterConfig explicitly).
+     * 
+ * + * .tensorflow.RewriterConfig rewrite_options = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.RewriterConfig, org.tensorflow.proto.framework.RewriterConfig.Builder, org.tensorflow.proto.framework.RewriterConfigOrBuilder> + getRewriteOptionsFieldBuilder() { + if (rewriteOptionsBuilder_ == null) { + rewriteOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.RewriterConfig, org.tensorflow.proto.framework.RewriterConfig.Builder, org.tensorflow.proto.framework.RewriterConfigOrBuilder>( + getRewriteOptions(), + getParentForChildren(), + isClean()); + rewriteOptions_ = null; + } + return rewriteOptionsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GraphOptions) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GraphOptions) + private static final org.tensorflow.proto.framework.GraphOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GraphOptions(); + } + + public static org.tensorflow.proto.framework.GraphOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GraphOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GraphOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphOptionsOrBuilder.java new file mode 100644 index 00000000000..bc373a1f956 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphOptionsOrBuilder.java @@ -0,0 +1,139 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +public interface GraphOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GraphOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If true, use control flow to schedule the activation of Recv nodes.
+   * (Currently ignored.)
+   * 
+ * + * bool enable_recv_scheduling = 2; + */ + boolean getEnableRecvScheduling(); + + /** + *
+   * Options controlling how graph is optimized.
+   * 
+ * + * .tensorflow.OptimizerOptions optimizer_options = 3; + */ + boolean hasOptimizerOptions(); + /** + *
+   * Options controlling how graph is optimized.
+   * 
+ * + * .tensorflow.OptimizerOptions optimizer_options = 3; + */ + org.tensorflow.proto.framework.OptimizerOptions getOptimizerOptions(); + /** + *
+   * Options controlling how graph is optimized.
+   * 
+ * + * .tensorflow.OptimizerOptions optimizer_options = 3; + */ + org.tensorflow.proto.framework.OptimizerOptionsOrBuilder getOptimizerOptionsOrBuilder(); + + /** + *
+   * The number of steps to run before returning a cost model detailing
+   * the memory usage and performance of each node of the graph. 0 means
+   * no cost model.
+   * 
+ * + * int64 build_cost_model = 4; + */ + long getBuildCostModel(); + + /** + *
+   * The number of steps to skip before collecting statistics for the
+   * cost model.
+   * 
+ * + * int64 build_cost_model_after = 9; + */ + long getBuildCostModelAfter(); + + /** + *
+   * Annotate each Node with Op output shape data, to the extent it can
+   * be statically inferred.
+   * 
+ * + * bool infer_shapes = 5; + */ + boolean getInferShapes(); + + /** + *
+   * Only place the subgraphs that are run, rather than the entire graph.
+   * This is useful for interactive graph building, where one might
+   * produce graphs that cannot be placed during the debugging
+   * process.  In particular, it allows the client to continue work in
+   * a session after adding a node to a graph whose placement
+   * constraints are unsatisfiable.
+   * 
+ * + * bool place_pruned_graph = 6; + */ + boolean getPlacePrunedGraph(); + + /** + *
+   * If true, transfer float values between processes as bfloat16.
+   * 
+ * + * bool enable_bfloat16_sendrecv = 7; + */ + boolean getEnableBfloat16Sendrecv(); + + /** + *
+   * If > 0, record a timeline every this many steps.
+   * EXPERIMENTAL: This currently has no effect in MasterSession.
+   * 
+ * + * int32 timeline_step = 8; + */ + int getTimelineStep(); + + /** + *
+   * Options that control the type and amount of graph rewriting.
+   * Not currently configurable via the public Python API (i.e. there is no API
+   * stability guarantee if you import RewriterConfig explicitly).
+   * 
+ * + * .tensorflow.RewriterConfig rewrite_options = 10; + */ + boolean hasRewriteOptions(); + /** + *
+   * Options that control the type and amount of graph rewriting.
+   * Not currently configurable via the public Python API (i.e. there is no API
+   * stability guarantee if you import RewriterConfig explicitly).
+   * 
+ * + * .tensorflow.RewriterConfig rewrite_options = 10; + */ + org.tensorflow.proto.framework.RewriterConfig getRewriteOptions(); + /** + *
+   * Options that control the type and amount of graph rewriting.
+   * Not currently configurable via the public Python API (i.e. there is no API
+   * stability guarantee if you import RewriterConfig explicitly).
+   * 
+ * + * .tensorflow.RewriterConfig rewrite_options = 10; + */ + org.tensorflow.proto.framework.RewriterConfigOrBuilder getRewriteOptionsOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphProtos.java new file mode 100644 index 00000000000..43eba4ee9bd --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphProtos.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph.proto + +package org.tensorflow.proto.framework; + +public final class GraphProtos { + private GraphProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GraphDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GraphDef_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/f" + + "unction.proto\032(tensorflow/core/framework" + + "/node_def.proto\032(tensorflow/core/framewo" + + "rk/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.F" + + "unctionDefLibraryB\200\001\n\036org.tensorflow.pro" + + "to.frameworkB\013GraphProtosP\001ZLgithub.com/" + + "tensorflow/tensorflow/tensorflow/go/core" + + "/framework/graph_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.FunctionProtos.getDescriptor(), + org.tensorflow.proto.framework.NodeProto.getDescriptor(), + org.tensorflow.proto.framework.VersionsProtos.getDescriptor(), + }); + internal_static_tensorflow_GraphDef_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_GraphDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GraphDef_descriptor, + new java.lang.String[] { "Node", "Versions", "Version", "Library", }); + org.tensorflow.proto.framework.FunctionProtos.getDescriptor(); + org.tensorflow.proto.framework.NodeProto.getDescriptor(); + org.tensorflow.proto.framework.VersionsProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferConstNodeInfo.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferConstNodeInfo.java new file mode 100644 index 00000000000..a1564a2090a --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferConstNodeInfo.java @@ -0,0 +1,912 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.GraphTransferConstNodeInfo} + */ +public final class GraphTransferConstNodeInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferConstNodeInfo) + GraphTransferConstNodeInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GraphTransferConstNodeInfo.newBuilder() to construct. + private GraphTransferConstNodeInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GraphTransferConstNodeInfo() { + name_ = ""; + shape_ = emptyLongList(); + data_ = com.google.protobuf.ByteString.EMPTY; + dtype_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GraphTransferConstNodeInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GraphTransferConstNodeInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + nodeId_ = input.readInt32(); + break; + } + case 24: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + shape_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + shape_.addLong(input.readInt64()); + break; + } + case 26: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + shape_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + shape_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 34: { + + data_ = input.readBytes(); + break; + } + case 40: { + int rawValue = input.readEnum(); + + dtype_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + shape_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferConstNodeInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferConstNodeInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphTransferConstNodeInfo.class, org.tensorflow.proto.framework.GraphTransferConstNodeInfo.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * 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; + } + } + /** + * 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 NODE_ID_FIELD_NUMBER = 2; + private int nodeId_; + /** + * int32 node_id = 2; + */ + public int getNodeId() { + return nodeId_; + } + + public static final int SHAPE_FIELD_NUMBER = 3; + private com.google.protobuf.Internal.LongList shape_; + /** + * repeated int64 shape = 3; + */ + public java.util.List + getShapeList() { + return shape_; + } + /** + * repeated int64 shape = 3; + */ + public int getShapeCount() { + return shape_.size(); + } + /** + * repeated int64 shape = 3; + */ + public long getShape(int index) { + return shape_.getLong(index); + } + private int shapeMemoizedSerializedSize = -1; + + public static final int DATA_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString data_; + /** + * bytes data = 4; + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + + public static final int DTYPE_FIELD_NUMBER = 5; + private int dtype_; + /** + * .tensorflow.DataType dtype = 5; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 5; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (nodeId_ != 0) { + output.writeInt32(2, nodeId_); + } + if (getShapeList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(shapeMemoizedSerializedSize); + } + for (int i = 0; i < shape_.size(); i++) { + output.writeInt64NoTag(shape_.getLong(i)); + } + if (!data_.isEmpty()) { + output.writeBytes(4, data_); + } + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + output.writeEnum(5, dtype_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (nodeId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, nodeId_); + } + { + int dataSize = 0; + for (int i = 0; i < shape_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(shape_.getLong(i)); + } + size += dataSize; + if (!getShapeList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + shapeMemoizedSerializedSize = dataSize; + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, data_); + } + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, dtype_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GraphTransferConstNodeInfo)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GraphTransferConstNodeInfo other = (org.tensorflow.proto.framework.GraphTransferConstNodeInfo) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getNodeId() + != other.getNodeId()) return false; + if (!getShapeList() + .equals(other.getShapeList())) return false; + if (!getData() + .equals(other.getData())) return false; + if (dtype_ != other.dtype_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + NODE_ID_FIELD_NUMBER; + hash = (53 * hash) + getNodeId(); + if (getShapeCount() > 0) { + hash = (37 * hash) + SHAPE_FIELD_NUMBER; + hash = (53 * hash) + getShapeList().hashCode(); + } + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (37 * hash) + DTYPE_FIELD_NUMBER; + hash = (53 * hash) + dtype_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GraphTransferConstNodeInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferConstNodeInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferConstNodeInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferConstNodeInfo 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.proto.framework.GraphTransferConstNodeInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferConstNodeInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferConstNodeInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferConstNodeInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferConstNodeInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferConstNodeInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferConstNodeInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferConstNodeInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GraphTransferConstNodeInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.GraphTransferConstNodeInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GraphTransferConstNodeInfo) + org.tensorflow.proto.framework.GraphTransferConstNodeInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferConstNodeInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferConstNodeInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphTransferConstNodeInfo.class, org.tensorflow.proto.framework.GraphTransferConstNodeInfo.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GraphTransferConstNodeInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + nodeId_ = 0; + + shape_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + data_ = com.google.protobuf.ByteString.EMPTY; + + dtype_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferConstNodeInfo_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferConstNodeInfo getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GraphTransferConstNodeInfo.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferConstNodeInfo build() { + org.tensorflow.proto.framework.GraphTransferConstNodeInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferConstNodeInfo buildPartial() { + org.tensorflow.proto.framework.GraphTransferConstNodeInfo result = new org.tensorflow.proto.framework.GraphTransferConstNodeInfo(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.nodeId_ = nodeId_; + if (((bitField0_ & 0x00000001) != 0)) { + shape_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.shape_ = shape_; + result.data_ = data_; + result.dtype_ = dtype_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GraphTransferConstNodeInfo) { + return mergeFrom((org.tensorflow.proto.framework.GraphTransferConstNodeInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GraphTransferConstNodeInfo other) { + if (other == org.tensorflow.proto.framework.GraphTransferConstNodeInfo.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getNodeId() != 0) { + setNodeId(other.getNodeId()); + } + if (!other.shape_.isEmpty()) { + if (shape_.isEmpty()) { + shape_ = other.shape_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureShapeIsMutable(); + shape_.addAll(other.shape_); + } + onChanged(); + } + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + if (other.dtype_ != 0) { + setDtypeValue(other.getDtypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GraphTransferConstNodeInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GraphTransferConstNodeInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * 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; + } + } + /** + * 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; + } + } + /** + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * 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 int nodeId_ ; + /** + * int32 node_id = 2; + */ + public int getNodeId() { + return nodeId_; + } + /** + * int32 node_id = 2; + */ + public Builder setNodeId(int value) { + + nodeId_ = value; + onChanged(); + return this; + } + /** + * int32 node_id = 2; + */ + public Builder clearNodeId() { + + nodeId_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList shape_ = emptyLongList(); + private void ensureShapeIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + shape_ = mutableCopy(shape_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated int64 shape = 3; + */ + public java.util.List + getShapeList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(shape_) : shape_; + } + /** + * repeated int64 shape = 3; + */ + public int getShapeCount() { + return shape_.size(); + } + /** + * repeated int64 shape = 3; + */ + public long getShape(int index) { + return shape_.getLong(index); + } + /** + * repeated int64 shape = 3; + */ + public Builder setShape( + int index, long value) { + ensureShapeIsMutable(); + shape_.setLong(index, value); + onChanged(); + return this; + } + /** + * repeated int64 shape = 3; + */ + public Builder addShape(long value) { + ensureShapeIsMutable(); + shape_.addLong(value); + onChanged(); + return this; + } + /** + * repeated int64 shape = 3; + */ + public Builder addAllShape( + java.lang.Iterable values) { + ensureShapeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, shape_); + onChanged(); + return this; + } + /** + * repeated int64 shape = 3; + */ + public Builder clearShape() { + shape_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes data = 4; + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + * bytes data = 4; + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + * bytes data = 4; + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + private int dtype_ = 0; + /** + * .tensorflow.DataType dtype = 5; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 5; + */ + public Builder setDtypeValue(int value) { + dtype_ = value; + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 5; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + /** + * .tensorflow.DataType dtype = 5; + */ + public Builder setDtype(org.tensorflow.proto.framework.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + + dtype_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 5; + */ + public Builder clearDtype() { + + dtype_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GraphTransferConstNodeInfo) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GraphTransferConstNodeInfo) + private static final org.tensorflow.proto.framework.GraphTransferConstNodeInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GraphTransferConstNodeInfo(); + } + + public static org.tensorflow.proto.framework.GraphTransferConstNodeInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GraphTransferConstNodeInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GraphTransferConstNodeInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferConstNodeInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferConstNodeInfoOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferConstNodeInfoOrBuilder.java new file mode 100644 index 00000000000..ec0b9e60f90 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferConstNodeInfoOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +public interface GraphTransferConstNodeInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GraphTransferConstNodeInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + */ + java.lang.String getName(); + /** + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * int32 node_id = 2; + */ + int getNodeId(); + + /** + * repeated int64 shape = 3; + */ + java.util.List getShapeList(); + /** + * repeated int64 shape = 3; + */ + int getShapeCount(); + /** + * repeated int64 shape = 3; + */ + long getShape(int index); + + /** + * bytes data = 4; + */ + com.google.protobuf.ByteString getData(); + + /** + * .tensorflow.DataType dtype = 5; + */ + int getDtypeValue(); + /** + * .tensorflow.DataType dtype = 5; + */ + org.tensorflow.proto.framework.DataType getDtype(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferGraphInputNodeInfo.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferGraphInputNodeInfo.java new file mode 100644 index 00000000000..b4d12c201b5 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferGraphInputNodeInfo.java @@ -0,0 +1,794 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.GraphTransferGraphInputNodeInfo} + */ +public final class GraphTransferGraphInputNodeInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferGraphInputNodeInfo) + GraphTransferGraphInputNodeInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GraphTransferGraphInputNodeInfo.newBuilder() to construct. + private GraphTransferGraphInputNodeInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GraphTransferGraphInputNodeInfo() { + name_ = ""; + shape_ = emptyLongList(); + dtype_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GraphTransferGraphInputNodeInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GraphTransferGraphInputNodeInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + shape_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + shape_.addLong(input.readInt64()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + shape_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + shape_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 24: { + int rawValue = input.readEnum(); + + dtype_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + shape_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferGraphInputNodeInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferGraphInputNodeInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.class, org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * 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; + } + } + /** + * 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 SHAPE_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.LongList shape_; + /** + * repeated int64 shape = 2; + */ + public java.util.List + getShapeList() { + return shape_; + } + /** + * repeated int64 shape = 2; + */ + public int getShapeCount() { + return shape_.size(); + } + /** + * repeated int64 shape = 2; + */ + public long getShape(int index) { + return shape_.getLong(index); + } + private int shapeMemoizedSerializedSize = -1; + + public static final int DTYPE_FIELD_NUMBER = 3; + private int dtype_; + /** + * .tensorflow.DataType dtype = 3; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 3; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (getShapeList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(shapeMemoizedSerializedSize); + } + for (int i = 0; i < shape_.size(); i++) { + output.writeInt64NoTag(shape_.getLong(i)); + } + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + output.writeEnum(3, dtype_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < shape_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(shape_.getLong(i)); + } + size += dataSize; + if (!getShapeList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + shapeMemoizedSerializedSize = dataSize; + } + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, dtype_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo other = (org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getShapeList() + .equals(other.getShapeList())) return false; + if (dtype_ != other.dtype_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getShapeCount() > 0) { + hash = (37 * hash) + SHAPE_FIELD_NUMBER; + hash = (53 * hash) + getShapeList().hashCode(); + } + hash = (37 * hash) + DTYPE_FIELD_NUMBER; + hash = (53 * hash) + dtype_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo 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.proto.framework.GraphTransferGraphInputNodeInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.GraphTransferGraphInputNodeInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GraphTransferGraphInputNodeInfo) + org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferGraphInputNodeInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferGraphInputNodeInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.class, org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + shape_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + dtype_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferGraphInputNodeInfo_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo build() { + org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo buildPartial() { + org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo result = new org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (((bitField0_ & 0x00000001) != 0)) { + shape_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.shape_ = shape_; + result.dtype_ = dtype_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo) { + return mergeFrom((org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo other) { + if (other == org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.shape_.isEmpty()) { + if (shape_.isEmpty()) { + shape_ = other.shape_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureShapeIsMutable(); + shape_.addAll(other.shape_); + } + onChanged(); + } + if (other.dtype_ != 0) { + setDtypeValue(other.getDtypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * 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; + } + } + /** + * 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; + } + } + /** + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * 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.Internal.LongList shape_ = emptyLongList(); + private void ensureShapeIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + shape_ = mutableCopy(shape_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated int64 shape = 2; + */ + public java.util.List + getShapeList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(shape_) : shape_; + } + /** + * repeated int64 shape = 2; + */ + public int getShapeCount() { + return shape_.size(); + } + /** + * repeated int64 shape = 2; + */ + public long getShape(int index) { + return shape_.getLong(index); + } + /** + * repeated int64 shape = 2; + */ + public Builder setShape( + int index, long value) { + ensureShapeIsMutable(); + shape_.setLong(index, value); + onChanged(); + return this; + } + /** + * repeated int64 shape = 2; + */ + public Builder addShape(long value) { + ensureShapeIsMutable(); + shape_.addLong(value); + onChanged(); + return this; + } + /** + * repeated int64 shape = 2; + */ + public Builder addAllShape( + java.lang.Iterable values) { + ensureShapeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, shape_); + onChanged(); + return this; + } + /** + * repeated int64 shape = 2; + */ + public Builder clearShape() { + shape_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private int dtype_ = 0; + /** + * .tensorflow.DataType dtype = 3; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 3; + */ + public Builder setDtypeValue(int value) { + dtype_ = value; + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 3; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + /** + * .tensorflow.DataType dtype = 3; + */ + public Builder setDtype(org.tensorflow.proto.framework.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + + dtype_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 3; + */ + public Builder clearDtype() { + + dtype_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GraphTransferGraphInputNodeInfo) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GraphTransferGraphInputNodeInfo) + private static final org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo(); + } + + public static org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GraphTransferGraphInputNodeInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GraphTransferGraphInputNodeInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferGraphInputNodeInfoOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferGraphInputNodeInfoOrBuilder.java new file mode 100644 index 00000000000..c121353b111 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferGraphInputNodeInfoOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +public interface GraphTransferGraphInputNodeInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GraphTransferGraphInputNodeInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + */ + java.lang.String getName(); + /** + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * repeated int64 shape = 2; + */ + java.util.List getShapeList(); + /** + * repeated int64 shape = 2; + */ + int getShapeCount(); + /** + * repeated int64 shape = 2; + */ + long getShape(int index); + + /** + * .tensorflow.DataType dtype = 3; + */ + int getDtypeValue(); + /** + * .tensorflow.DataType dtype = 3; + */ + org.tensorflow.proto.framework.DataType getDtype(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferGraphOutputNodeInfo.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferGraphOutputNodeInfo.java new file mode 100644 index 00000000000..78bf270776e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferGraphOutputNodeInfo.java @@ -0,0 +1,794 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.GraphTransferGraphOutputNodeInfo} + */ +public final class GraphTransferGraphOutputNodeInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferGraphOutputNodeInfo) + GraphTransferGraphOutputNodeInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GraphTransferGraphOutputNodeInfo.newBuilder() to construct. + private GraphTransferGraphOutputNodeInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GraphTransferGraphOutputNodeInfo() { + name_ = ""; + shape_ = emptyLongList(); + dtype_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GraphTransferGraphOutputNodeInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GraphTransferGraphOutputNodeInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + shape_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + shape_.addLong(input.readInt64()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + shape_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + shape_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 24: { + int rawValue = input.readEnum(); + + dtype_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + shape_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.class, org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * 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; + } + } + /** + * 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 SHAPE_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.LongList shape_; + /** + * repeated int64 shape = 2; + */ + public java.util.List + getShapeList() { + return shape_; + } + /** + * repeated int64 shape = 2; + */ + public int getShapeCount() { + return shape_.size(); + } + /** + * repeated int64 shape = 2; + */ + public long getShape(int index) { + return shape_.getLong(index); + } + private int shapeMemoizedSerializedSize = -1; + + public static final int DTYPE_FIELD_NUMBER = 3; + private int dtype_; + /** + * .tensorflow.DataType dtype = 3; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 3; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (getShapeList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(shapeMemoizedSerializedSize); + } + for (int i = 0; i < shape_.size(); i++) { + output.writeInt64NoTag(shape_.getLong(i)); + } + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + output.writeEnum(3, dtype_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < shape_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(shape_.getLong(i)); + } + size += dataSize; + if (!getShapeList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + shapeMemoizedSerializedSize = dataSize; + } + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, dtype_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo other = (org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getShapeList() + .equals(other.getShapeList())) return false; + if (dtype_ != other.dtype_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getShapeCount() > 0) { + hash = (37 * hash) + SHAPE_FIELD_NUMBER; + hash = (53 * hash) + getShapeList().hashCode(); + } + hash = (37 * hash) + DTYPE_FIELD_NUMBER; + hash = (53 * hash) + dtype_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo 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.proto.framework.GraphTransferGraphOutputNodeInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.GraphTransferGraphOutputNodeInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GraphTransferGraphOutputNodeInfo) + org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.class, org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + shape_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + dtype_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo build() { + org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo buildPartial() { + org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo result = new org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (((bitField0_ & 0x00000001) != 0)) { + shape_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.shape_ = shape_; + result.dtype_ = dtype_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo) { + return mergeFrom((org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo other) { + if (other == org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.shape_.isEmpty()) { + if (shape_.isEmpty()) { + shape_ = other.shape_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureShapeIsMutable(); + shape_.addAll(other.shape_); + } + onChanged(); + } + if (other.dtype_ != 0) { + setDtypeValue(other.getDtypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * 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; + } + } + /** + * 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; + } + } + /** + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * 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.Internal.LongList shape_ = emptyLongList(); + private void ensureShapeIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + shape_ = mutableCopy(shape_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated int64 shape = 2; + */ + public java.util.List + getShapeList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(shape_) : shape_; + } + /** + * repeated int64 shape = 2; + */ + public int getShapeCount() { + return shape_.size(); + } + /** + * repeated int64 shape = 2; + */ + public long getShape(int index) { + return shape_.getLong(index); + } + /** + * repeated int64 shape = 2; + */ + public Builder setShape( + int index, long value) { + ensureShapeIsMutable(); + shape_.setLong(index, value); + onChanged(); + return this; + } + /** + * repeated int64 shape = 2; + */ + public Builder addShape(long value) { + ensureShapeIsMutable(); + shape_.addLong(value); + onChanged(); + return this; + } + /** + * repeated int64 shape = 2; + */ + public Builder addAllShape( + java.lang.Iterable values) { + ensureShapeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, shape_); + onChanged(); + return this; + } + /** + * repeated int64 shape = 2; + */ + public Builder clearShape() { + shape_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private int dtype_ = 0; + /** + * .tensorflow.DataType dtype = 3; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 3; + */ + public Builder setDtypeValue(int value) { + dtype_ = value; + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 3; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + /** + * .tensorflow.DataType dtype = 3; + */ + public Builder setDtype(org.tensorflow.proto.framework.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + + dtype_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 3; + */ + public Builder clearDtype() { + + dtype_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GraphTransferGraphOutputNodeInfo) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GraphTransferGraphOutputNodeInfo) + private static final org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo(); + } + + public static org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GraphTransferGraphOutputNodeInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GraphTransferGraphOutputNodeInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferGraphOutputNodeInfoOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferGraphOutputNodeInfoOrBuilder.java new file mode 100644 index 00000000000..3fcf3f3ae7e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferGraphOutputNodeInfoOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +public interface GraphTransferGraphOutputNodeInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GraphTransferGraphOutputNodeInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + */ + java.lang.String getName(); + /** + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * repeated int64 shape = 2; + */ + java.util.List getShapeList(); + /** + * repeated int64 shape = 2; + */ + int getShapeCount(); + /** + * repeated int64 shape = 2; + */ + long getShape(int index); + + /** + * .tensorflow.DataType dtype = 3; + */ + int getDtypeValue(); + /** + * .tensorflow.DataType dtype = 3; + */ + org.tensorflow.proto.framework.DataType getDtype(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferInfo.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferInfo.java new file mode 100644 index 00000000000..f9d53390a8b --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferInfo.java @@ -0,0 +1,2795 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Protocol buffer representing a handle to a tensorflow resource. Handles are
+ * not valid across executions, but can be serialized back and forth from within
+ * a single run.
+ * 
+ * + * Protobuf type {@code tensorflow.GraphTransferInfo} + */ +public final class GraphTransferInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferInfo) + GraphTransferInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GraphTransferInfo.newBuilder() to construct. + private GraphTransferInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GraphTransferInfo() { + nodeInfo_ = java.util.Collections.emptyList(); + constNodeInfo_ = java.util.Collections.emptyList(); + nodeInputInfo_ = java.util.Collections.emptyList(); + nodeOutputInfo_ = java.util.Collections.emptyList(); + graphInputNodeInfo_ = java.util.Collections.emptyList(); + graphOutputNodeInfo_ = java.util.Collections.emptyList(); + destination_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GraphTransferInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GraphTransferInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + nodeInfo_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + nodeInfo_.add( + input.readMessage(org.tensorflow.proto.framework.GraphTransferNodeInfo.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + constNodeInfo_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + constNodeInfo_.add( + input.readMessage(org.tensorflow.proto.framework.GraphTransferConstNodeInfo.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + nodeInputInfo_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + nodeInputInfo_.add( + input.readMessage(org.tensorflow.proto.framework.GraphTransferNodeInputInfo.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + nodeOutputInfo_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + nodeOutputInfo_.add( + input.readMessage(org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + graphInputNodeInfo_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + graphInputNodeInfo_.add( + input.readMessage(org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.parser(), extensionRegistry)); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + graphOutputNodeInfo_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + graphOutputNodeInfo_.add( + input.readMessage(org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.parser(), extensionRegistry)); + break; + } + case 56: { + int rawValue = input.readEnum(); + + destination_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + nodeInfo_ = java.util.Collections.unmodifiableList(nodeInfo_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + constNodeInfo_ = java.util.Collections.unmodifiableList(constNodeInfo_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + nodeInputInfo_ = java.util.Collections.unmodifiableList(nodeInputInfo_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + nodeOutputInfo_ = java.util.Collections.unmodifiableList(nodeOutputInfo_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + graphInputNodeInfo_ = java.util.Collections.unmodifiableList(graphInputNodeInfo_); + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { + graphOutputNodeInfo_ = java.util.Collections.unmodifiableList(graphOutputNodeInfo_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphTransferInfo.class, org.tensorflow.proto.framework.GraphTransferInfo.Builder.class); + } + + /** + * Protobuf enum {@code tensorflow.GraphTransferInfo.Destination} + */ + public enum Destination + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NOP = 0; + */ + NOP(0), + /** + * HEXAGON = 1; + */ + HEXAGON(1), + UNRECOGNIZED(-1), + ; + + /** + * NOP = 0; + */ + public static final int NOP_VALUE = 0; + /** + * HEXAGON = 1; + */ + public static final int HEXAGON_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Destination valueOf(int value) { + return forNumber(value); + } + + public static Destination forNumber(int value) { + switch (value) { + case 0: return NOP; + case 1: return HEXAGON; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Destination> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Destination findValueByNumber(int number) { + return Destination.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfo.getDescriptor().getEnumTypes().get(0); + } + + private static final Destination[] VALUES = values(); + + public static Destination valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Destination(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:tensorflow.GraphTransferInfo.Destination) + } + + public static final int NODE_INFO_FIELD_NUMBER = 1; + private java.util.List nodeInfo_; + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public java.util.List getNodeInfoList() { + return nodeInfo_; + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public java.util.List + getNodeInfoOrBuilderList() { + return nodeInfo_; + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public int getNodeInfoCount() { + return nodeInfo_.size(); + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInfo getNodeInfo(int index) { + return nodeInfo_.get(index); + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInfoOrBuilder getNodeInfoOrBuilder( + int index) { + return nodeInfo_.get(index); + } + + public static final int CONST_NODE_INFO_FIELD_NUMBER = 2; + private java.util.List constNodeInfo_; + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public java.util.List getConstNodeInfoList() { + return constNodeInfo_; + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public java.util.List + getConstNodeInfoOrBuilderList() { + return constNodeInfo_; + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public int getConstNodeInfoCount() { + return constNodeInfo_.size(); + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public org.tensorflow.proto.framework.GraphTransferConstNodeInfo getConstNodeInfo(int index) { + return constNodeInfo_.get(index); + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public org.tensorflow.proto.framework.GraphTransferConstNodeInfoOrBuilder getConstNodeInfoOrBuilder( + int index) { + return constNodeInfo_.get(index); + } + + public static final int NODE_INPUT_INFO_FIELD_NUMBER = 3; + private java.util.List nodeInputInfo_; + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public java.util.List getNodeInputInfoList() { + return nodeInputInfo_; + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public java.util.List + getNodeInputInfoOrBuilderList() { + return nodeInputInfo_; + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public int getNodeInputInfoCount() { + return nodeInputInfo_.size(); + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInputInfo getNodeInputInfo(int index) { + return nodeInputInfo_.get(index); + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInputInfoOrBuilder getNodeInputInfoOrBuilder( + int index) { + return nodeInputInfo_.get(index); + } + + public static final int NODE_OUTPUT_INFO_FIELD_NUMBER = 4; + private java.util.List nodeOutputInfo_; + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public java.util.List getNodeOutputInfoList() { + return nodeOutputInfo_; + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public java.util.List + getNodeOutputInfoOrBuilderList() { + return nodeOutputInfo_; + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public int getNodeOutputInfoCount() { + return nodeOutputInfo_.size(); + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public org.tensorflow.proto.framework.GraphTransferNodeOutputInfo getNodeOutputInfo(int index) { + return nodeOutputInfo_.get(index); + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public org.tensorflow.proto.framework.GraphTransferNodeOutputInfoOrBuilder getNodeOutputInfoOrBuilder( + int index) { + return nodeOutputInfo_.get(index); + } + + public static final int GRAPH_INPUT_NODE_INFO_FIELD_NUMBER = 5; + private java.util.List graphInputNodeInfo_; + /** + *
+   * Input Node parameters of transferred graph
+   * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public java.util.List getGraphInputNodeInfoList() { + return graphInputNodeInfo_; + } + /** + *
+   * Input Node parameters of transferred graph
+   * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public java.util.List + getGraphInputNodeInfoOrBuilderList() { + return graphInputNodeInfo_; + } + /** + *
+   * Input Node parameters of transferred graph
+   * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public int getGraphInputNodeInfoCount() { + return graphInputNodeInfo_.size(); + } + /** + *
+   * Input Node parameters of transferred graph
+   * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo getGraphInputNodeInfo(int index) { + return graphInputNodeInfo_.get(index); + } + /** + *
+   * Input Node parameters of transferred graph
+   * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfoOrBuilder getGraphInputNodeInfoOrBuilder( + int index) { + return graphInputNodeInfo_.get(index); + } + + public static final int GRAPH_OUTPUT_NODE_INFO_FIELD_NUMBER = 6; + private java.util.List graphOutputNodeInfo_; + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public java.util.List getGraphOutputNodeInfoList() { + return graphOutputNodeInfo_; + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public java.util.List + getGraphOutputNodeInfoOrBuilderList() { + return graphOutputNodeInfo_; + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public int getGraphOutputNodeInfoCount() { + return graphOutputNodeInfo_.size(); + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo getGraphOutputNodeInfo(int index) { + return graphOutputNodeInfo_.get(index); + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfoOrBuilder getGraphOutputNodeInfoOrBuilder( + int index) { + return graphOutputNodeInfo_.get(index); + } + + public static final int DESTINATION_FIELD_NUMBER = 7; + private int destination_; + /** + *
+   * Destination of graph transfer
+   * 
+ * + * .tensorflow.GraphTransferInfo.Destination destination = 7; + */ + public int getDestinationValue() { + return destination_; + } + /** + *
+   * Destination of graph transfer
+   * 
+ * + * .tensorflow.GraphTransferInfo.Destination destination = 7; + */ + public org.tensorflow.proto.framework.GraphTransferInfo.Destination getDestination() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.GraphTransferInfo.Destination result = org.tensorflow.proto.framework.GraphTransferInfo.Destination.valueOf(destination_); + return result == null ? org.tensorflow.proto.framework.GraphTransferInfo.Destination.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < nodeInfo_.size(); i++) { + output.writeMessage(1, nodeInfo_.get(i)); + } + for (int i = 0; i < constNodeInfo_.size(); i++) { + output.writeMessage(2, constNodeInfo_.get(i)); + } + for (int i = 0; i < nodeInputInfo_.size(); i++) { + output.writeMessage(3, nodeInputInfo_.get(i)); + } + for (int i = 0; i < nodeOutputInfo_.size(); i++) { + output.writeMessage(4, nodeOutputInfo_.get(i)); + } + for (int i = 0; i < graphInputNodeInfo_.size(); i++) { + output.writeMessage(5, graphInputNodeInfo_.get(i)); + } + for (int i = 0; i < graphOutputNodeInfo_.size(); i++) { + output.writeMessage(6, graphOutputNodeInfo_.get(i)); + } + if (destination_ != org.tensorflow.proto.framework.GraphTransferInfo.Destination.NOP.getNumber()) { + output.writeEnum(7, destination_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < nodeInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, nodeInfo_.get(i)); + } + for (int i = 0; i < constNodeInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, constNodeInfo_.get(i)); + } + for (int i = 0; i < nodeInputInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, nodeInputInfo_.get(i)); + } + for (int i = 0; i < nodeOutputInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, nodeOutputInfo_.get(i)); + } + for (int i = 0; i < graphInputNodeInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, graphInputNodeInfo_.get(i)); + } + for (int i = 0; i < graphOutputNodeInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, graphOutputNodeInfo_.get(i)); + } + if (destination_ != org.tensorflow.proto.framework.GraphTransferInfo.Destination.NOP.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, destination_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GraphTransferInfo)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GraphTransferInfo other = (org.tensorflow.proto.framework.GraphTransferInfo) obj; + + if (!getNodeInfoList() + .equals(other.getNodeInfoList())) return false; + if (!getConstNodeInfoList() + .equals(other.getConstNodeInfoList())) return false; + if (!getNodeInputInfoList() + .equals(other.getNodeInputInfoList())) return false; + if (!getNodeOutputInfoList() + .equals(other.getNodeOutputInfoList())) return false; + if (!getGraphInputNodeInfoList() + .equals(other.getGraphInputNodeInfoList())) return false; + if (!getGraphOutputNodeInfoList() + .equals(other.getGraphOutputNodeInfoList())) return false; + if (destination_ != other.destination_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNodeInfoCount() > 0) { + hash = (37 * hash) + NODE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getNodeInfoList().hashCode(); + } + if (getConstNodeInfoCount() > 0) { + hash = (37 * hash) + CONST_NODE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getConstNodeInfoList().hashCode(); + } + if (getNodeInputInfoCount() > 0) { + hash = (37 * hash) + NODE_INPUT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getNodeInputInfoList().hashCode(); + } + if (getNodeOutputInfoCount() > 0) { + hash = (37 * hash) + NODE_OUTPUT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getNodeOutputInfoList().hashCode(); + } + if (getGraphInputNodeInfoCount() > 0) { + hash = (37 * hash) + GRAPH_INPUT_NODE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getGraphInputNodeInfoList().hashCode(); + } + if (getGraphOutputNodeInfoCount() > 0) { + hash = (37 * hash) + GRAPH_OUTPUT_NODE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getGraphOutputNodeInfoList().hashCode(); + } + hash = (37 * hash) + DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + destination_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GraphTransferInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferInfo 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.proto.framework.GraphTransferInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GraphTransferInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Protocol buffer representing a handle to a tensorflow resource. Handles are
+   * not valid across executions, but can be serialized back and forth from within
+   * a single run.
+   * 
+ * + * Protobuf type {@code tensorflow.GraphTransferInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GraphTransferInfo) + org.tensorflow.proto.framework.GraphTransferInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphTransferInfo.class, org.tensorflow.proto.framework.GraphTransferInfo.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GraphTransferInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getNodeInfoFieldBuilder(); + getConstNodeInfoFieldBuilder(); + getNodeInputInfoFieldBuilder(); + getNodeOutputInfoFieldBuilder(); + getGraphInputNodeInfoFieldBuilder(); + getGraphOutputNodeInfoFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (nodeInfoBuilder_ == null) { + nodeInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + nodeInfoBuilder_.clear(); + } + if (constNodeInfoBuilder_ == null) { + constNodeInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + constNodeInfoBuilder_.clear(); + } + if (nodeInputInfoBuilder_ == null) { + nodeInputInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + nodeInputInfoBuilder_.clear(); + } + if (nodeOutputInfoBuilder_ == null) { + nodeOutputInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + nodeOutputInfoBuilder_.clear(); + } + if (graphInputNodeInfoBuilder_ == null) { + graphInputNodeInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + graphInputNodeInfoBuilder_.clear(); + } + if (graphOutputNodeInfoBuilder_ == null) { + graphOutputNodeInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + graphOutputNodeInfoBuilder_.clear(); + } + destination_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferInfo_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferInfo getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GraphTransferInfo.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferInfo build() { + org.tensorflow.proto.framework.GraphTransferInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferInfo buildPartial() { + org.tensorflow.proto.framework.GraphTransferInfo result = new org.tensorflow.proto.framework.GraphTransferInfo(this); + int from_bitField0_ = bitField0_; + if (nodeInfoBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + nodeInfo_ = java.util.Collections.unmodifiableList(nodeInfo_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.nodeInfo_ = nodeInfo_; + } else { + result.nodeInfo_ = nodeInfoBuilder_.build(); + } + if (constNodeInfoBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + constNodeInfo_ = java.util.Collections.unmodifiableList(constNodeInfo_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.constNodeInfo_ = constNodeInfo_; + } else { + result.constNodeInfo_ = constNodeInfoBuilder_.build(); + } + if (nodeInputInfoBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + nodeInputInfo_ = java.util.Collections.unmodifiableList(nodeInputInfo_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.nodeInputInfo_ = nodeInputInfo_; + } else { + result.nodeInputInfo_ = nodeInputInfoBuilder_.build(); + } + if (nodeOutputInfoBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + nodeOutputInfo_ = java.util.Collections.unmodifiableList(nodeOutputInfo_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.nodeOutputInfo_ = nodeOutputInfo_; + } else { + result.nodeOutputInfo_ = nodeOutputInfoBuilder_.build(); + } + if (graphInputNodeInfoBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + graphInputNodeInfo_ = java.util.Collections.unmodifiableList(graphInputNodeInfo_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.graphInputNodeInfo_ = graphInputNodeInfo_; + } else { + result.graphInputNodeInfo_ = graphInputNodeInfoBuilder_.build(); + } + if (graphOutputNodeInfoBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + graphOutputNodeInfo_ = java.util.Collections.unmodifiableList(graphOutputNodeInfo_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.graphOutputNodeInfo_ = graphOutputNodeInfo_; + } else { + result.graphOutputNodeInfo_ = graphOutputNodeInfoBuilder_.build(); + } + result.destination_ = destination_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GraphTransferInfo) { + return mergeFrom((org.tensorflow.proto.framework.GraphTransferInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GraphTransferInfo other) { + if (other == org.tensorflow.proto.framework.GraphTransferInfo.getDefaultInstance()) return this; + if (nodeInfoBuilder_ == null) { + if (!other.nodeInfo_.isEmpty()) { + if (nodeInfo_.isEmpty()) { + nodeInfo_ = other.nodeInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNodeInfoIsMutable(); + nodeInfo_.addAll(other.nodeInfo_); + } + onChanged(); + } + } else { + if (!other.nodeInfo_.isEmpty()) { + if (nodeInfoBuilder_.isEmpty()) { + nodeInfoBuilder_.dispose(); + nodeInfoBuilder_ = null; + nodeInfo_ = other.nodeInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + nodeInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNodeInfoFieldBuilder() : null; + } else { + nodeInfoBuilder_.addAllMessages(other.nodeInfo_); + } + } + } + if (constNodeInfoBuilder_ == null) { + if (!other.constNodeInfo_.isEmpty()) { + if (constNodeInfo_.isEmpty()) { + constNodeInfo_ = other.constNodeInfo_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureConstNodeInfoIsMutable(); + constNodeInfo_.addAll(other.constNodeInfo_); + } + onChanged(); + } + } else { + if (!other.constNodeInfo_.isEmpty()) { + if (constNodeInfoBuilder_.isEmpty()) { + constNodeInfoBuilder_.dispose(); + constNodeInfoBuilder_ = null; + constNodeInfo_ = other.constNodeInfo_; + bitField0_ = (bitField0_ & ~0x00000002); + constNodeInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getConstNodeInfoFieldBuilder() : null; + } else { + constNodeInfoBuilder_.addAllMessages(other.constNodeInfo_); + } + } + } + if (nodeInputInfoBuilder_ == null) { + if (!other.nodeInputInfo_.isEmpty()) { + if (nodeInputInfo_.isEmpty()) { + nodeInputInfo_ = other.nodeInputInfo_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureNodeInputInfoIsMutable(); + nodeInputInfo_.addAll(other.nodeInputInfo_); + } + onChanged(); + } + } else { + if (!other.nodeInputInfo_.isEmpty()) { + if (nodeInputInfoBuilder_.isEmpty()) { + nodeInputInfoBuilder_.dispose(); + nodeInputInfoBuilder_ = null; + nodeInputInfo_ = other.nodeInputInfo_; + bitField0_ = (bitField0_ & ~0x00000004); + nodeInputInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNodeInputInfoFieldBuilder() : null; + } else { + nodeInputInfoBuilder_.addAllMessages(other.nodeInputInfo_); + } + } + } + if (nodeOutputInfoBuilder_ == null) { + if (!other.nodeOutputInfo_.isEmpty()) { + if (nodeOutputInfo_.isEmpty()) { + nodeOutputInfo_ = other.nodeOutputInfo_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureNodeOutputInfoIsMutable(); + nodeOutputInfo_.addAll(other.nodeOutputInfo_); + } + onChanged(); + } + } else { + if (!other.nodeOutputInfo_.isEmpty()) { + if (nodeOutputInfoBuilder_.isEmpty()) { + nodeOutputInfoBuilder_.dispose(); + nodeOutputInfoBuilder_ = null; + nodeOutputInfo_ = other.nodeOutputInfo_; + bitField0_ = (bitField0_ & ~0x00000008); + nodeOutputInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNodeOutputInfoFieldBuilder() : null; + } else { + nodeOutputInfoBuilder_.addAllMessages(other.nodeOutputInfo_); + } + } + } + if (graphInputNodeInfoBuilder_ == null) { + if (!other.graphInputNodeInfo_.isEmpty()) { + if (graphInputNodeInfo_.isEmpty()) { + graphInputNodeInfo_ = other.graphInputNodeInfo_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureGraphInputNodeInfoIsMutable(); + graphInputNodeInfo_.addAll(other.graphInputNodeInfo_); + } + onChanged(); + } + } else { + if (!other.graphInputNodeInfo_.isEmpty()) { + if (graphInputNodeInfoBuilder_.isEmpty()) { + graphInputNodeInfoBuilder_.dispose(); + graphInputNodeInfoBuilder_ = null; + graphInputNodeInfo_ = other.graphInputNodeInfo_; + bitField0_ = (bitField0_ & ~0x00000010); + graphInputNodeInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGraphInputNodeInfoFieldBuilder() : null; + } else { + graphInputNodeInfoBuilder_.addAllMessages(other.graphInputNodeInfo_); + } + } + } + if (graphOutputNodeInfoBuilder_ == null) { + if (!other.graphOutputNodeInfo_.isEmpty()) { + if (graphOutputNodeInfo_.isEmpty()) { + graphOutputNodeInfo_ = other.graphOutputNodeInfo_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureGraphOutputNodeInfoIsMutable(); + graphOutputNodeInfo_.addAll(other.graphOutputNodeInfo_); + } + onChanged(); + } + } else { + if (!other.graphOutputNodeInfo_.isEmpty()) { + if (graphOutputNodeInfoBuilder_.isEmpty()) { + graphOutputNodeInfoBuilder_.dispose(); + graphOutputNodeInfoBuilder_ = null; + graphOutputNodeInfo_ = other.graphOutputNodeInfo_; + bitField0_ = (bitField0_ & ~0x00000020); + graphOutputNodeInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGraphOutputNodeInfoFieldBuilder() : null; + } else { + graphOutputNodeInfoBuilder_.addAllMessages(other.graphOutputNodeInfo_); + } + } + } + if (other.destination_ != 0) { + setDestinationValue(other.getDestinationValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GraphTransferInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GraphTransferInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List nodeInfo_ = + java.util.Collections.emptyList(); + private void ensureNodeInfoIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + nodeInfo_ = new java.util.ArrayList(nodeInfo_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferNodeInfo, org.tensorflow.proto.framework.GraphTransferNodeInfo.Builder, org.tensorflow.proto.framework.GraphTransferNodeInfoOrBuilder> nodeInfoBuilder_; + + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public java.util.List getNodeInfoList() { + if (nodeInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodeInfo_); + } else { + return nodeInfoBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public int getNodeInfoCount() { + if (nodeInfoBuilder_ == null) { + return nodeInfo_.size(); + } else { + return nodeInfoBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInfo getNodeInfo(int index) { + if (nodeInfoBuilder_ == null) { + return nodeInfo_.get(index); + } else { + return nodeInfoBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public Builder setNodeInfo( + int index, org.tensorflow.proto.framework.GraphTransferNodeInfo value) { + if (nodeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeInfoIsMutable(); + nodeInfo_.set(index, value); + onChanged(); + } else { + nodeInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public Builder setNodeInfo( + int index, org.tensorflow.proto.framework.GraphTransferNodeInfo.Builder builderForValue) { + if (nodeInfoBuilder_ == null) { + ensureNodeInfoIsMutable(); + nodeInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + nodeInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public Builder addNodeInfo(org.tensorflow.proto.framework.GraphTransferNodeInfo value) { + if (nodeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeInfoIsMutable(); + nodeInfo_.add(value); + onChanged(); + } else { + nodeInfoBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public Builder addNodeInfo( + int index, org.tensorflow.proto.framework.GraphTransferNodeInfo value) { + if (nodeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeInfoIsMutable(); + nodeInfo_.add(index, value); + onChanged(); + } else { + nodeInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public Builder addNodeInfo( + org.tensorflow.proto.framework.GraphTransferNodeInfo.Builder builderForValue) { + if (nodeInfoBuilder_ == null) { + ensureNodeInfoIsMutable(); + nodeInfo_.add(builderForValue.build()); + onChanged(); + } else { + nodeInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public Builder addNodeInfo( + int index, org.tensorflow.proto.framework.GraphTransferNodeInfo.Builder builderForValue) { + if (nodeInfoBuilder_ == null) { + ensureNodeInfoIsMutable(); + nodeInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + nodeInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public Builder addAllNodeInfo( + java.lang.Iterable values) { + if (nodeInfoBuilder_ == null) { + ensureNodeInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nodeInfo_); + onChanged(); + } else { + nodeInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public Builder clearNodeInfo() { + if (nodeInfoBuilder_ == null) { + nodeInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + nodeInfoBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public Builder removeNodeInfo(int index) { + if (nodeInfoBuilder_ == null) { + ensureNodeInfoIsMutable(); + nodeInfo_.remove(index); + onChanged(); + } else { + nodeInfoBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInfo.Builder getNodeInfoBuilder( + int index) { + return getNodeInfoFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInfoOrBuilder getNodeInfoOrBuilder( + int index) { + if (nodeInfoBuilder_ == null) { + return nodeInfo_.get(index); } else { + return nodeInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public java.util.List + getNodeInfoOrBuilderList() { + if (nodeInfoBuilder_ != null) { + return nodeInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodeInfo_); + } + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInfo.Builder addNodeInfoBuilder() { + return getNodeInfoFieldBuilder().addBuilder( + org.tensorflow.proto.framework.GraphTransferNodeInfo.getDefaultInstance()); + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInfo.Builder addNodeInfoBuilder( + int index) { + return getNodeInfoFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.GraphTransferNodeInfo.getDefaultInstance()); + } + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + public java.util.List + getNodeInfoBuilderList() { + return getNodeInfoFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferNodeInfo, org.tensorflow.proto.framework.GraphTransferNodeInfo.Builder, org.tensorflow.proto.framework.GraphTransferNodeInfoOrBuilder> + getNodeInfoFieldBuilder() { + if (nodeInfoBuilder_ == null) { + nodeInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferNodeInfo, org.tensorflow.proto.framework.GraphTransferNodeInfo.Builder, org.tensorflow.proto.framework.GraphTransferNodeInfoOrBuilder>( + nodeInfo_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + nodeInfo_ = null; + } + return nodeInfoBuilder_; + } + + private java.util.List constNodeInfo_ = + java.util.Collections.emptyList(); + private void ensureConstNodeInfoIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + constNodeInfo_ = new java.util.ArrayList(constNodeInfo_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferConstNodeInfo, org.tensorflow.proto.framework.GraphTransferConstNodeInfo.Builder, org.tensorflow.proto.framework.GraphTransferConstNodeInfoOrBuilder> constNodeInfoBuilder_; + + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public java.util.List getConstNodeInfoList() { + if (constNodeInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(constNodeInfo_); + } else { + return constNodeInfoBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public int getConstNodeInfoCount() { + if (constNodeInfoBuilder_ == null) { + return constNodeInfo_.size(); + } else { + return constNodeInfoBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public org.tensorflow.proto.framework.GraphTransferConstNodeInfo getConstNodeInfo(int index) { + if (constNodeInfoBuilder_ == null) { + return constNodeInfo_.get(index); + } else { + return constNodeInfoBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public Builder setConstNodeInfo( + int index, org.tensorflow.proto.framework.GraphTransferConstNodeInfo value) { + if (constNodeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConstNodeInfoIsMutable(); + constNodeInfo_.set(index, value); + onChanged(); + } else { + constNodeInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public Builder setConstNodeInfo( + int index, org.tensorflow.proto.framework.GraphTransferConstNodeInfo.Builder builderForValue) { + if (constNodeInfoBuilder_ == null) { + ensureConstNodeInfoIsMutable(); + constNodeInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + constNodeInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public Builder addConstNodeInfo(org.tensorflow.proto.framework.GraphTransferConstNodeInfo value) { + if (constNodeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConstNodeInfoIsMutable(); + constNodeInfo_.add(value); + onChanged(); + } else { + constNodeInfoBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public Builder addConstNodeInfo( + int index, org.tensorflow.proto.framework.GraphTransferConstNodeInfo value) { + if (constNodeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConstNodeInfoIsMutable(); + constNodeInfo_.add(index, value); + onChanged(); + } else { + constNodeInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public Builder addConstNodeInfo( + org.tensorflow.proto.framework.GraphTransferConstNodeInfo.Builder builderForValue) { + if (constNodeInfoBuilder_ == null) { + ensureConstNodeInfoIsMutable(); + constNodeInfo_.add(builderForValue.build()); + onChanged(); + } else { + constNodeInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public Builder addConstNodeInfo( + int index, org.tensorflow.proto.framework.GraphTransferConstNodeInfo.Builder builderForValue) { + if (constNodeInfoBuilder_ == null) { + ensureConstNodeInfoIsMutable(); + constNodeInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + constNodeInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public Builder addAllConstNodeInfo( + java.lang.Iterable values) { + if (constNodeInfoBuilder_ == null) { + ensureConstNodeInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, constNodeInfo_); + onChanged(); + } else { + constNodeInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public Builder clearConstNodeInfo() { + if (constNodeInfoBuilder_ == null) { + constNodeInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + constNodeInfoBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public Builder removeConstNodeInfo(int index) { + if (constNodeInfoBuilder_ == null) { + ensureConstNodeInfoIsMutable(); + constNodeInfo_.remove(index); + onChanged(); + } else { + constNodeInfoBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public org.tensorflow.proto.framework.GraphTransferConstNodeInfo.Builder getConstNodeInfoBuilder( + int index) { + return getConstNodeInfoFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public org.tensorflow.proto.framework.GraphTransferConstNodeInfoOrBuilder getConstNodeInfoOrBuilder( + int index) { + if (constNodeInfoBuilder_ == null) { + return constNodeInfo_.get(index); } else { + return constNodeInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public java.util.List + getConstNodeInfoOrBuilderList() { + if (constNodeInfoBuilder_ != null) { + return constNodeInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(constNodeInfo_); + } + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public org.tensorflow.proto.framework.GraphTransferConstNodeInfo.Builder addConstNodeInfoBuilder() { + return getConstNodeInfoFieldBuilder().addBuilder( + org.tensorflow.proto.framework.GraphTransferConstNodeInfo.getDefaultInstance()); + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public org.tensorflow.proto.framework.GraphTransferConstNodeInfo.Builder addConstNodeInfoBuilder( + int index) { + return getConstNodeInfoFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.GraphTransferConstNodeInfo.getDefaultInstance()); + } + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + public java.util.List + getConstNodeInfoBuilderList() { + return getConstNodeInfoFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferConstNodeInfo, org.tensorflow.proto.framework.GraphTransferConstNodeInfo.Builder, org.tensorflow.proto.framework.GraphTransferConstNodeInfoOrBuilder> + getConstNodeInfoFieldBuilder() { + if (constNodeInfoBuilder_ == null) { + constNodeInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferConstNodeInfo, org.tensorflow.proto.framework.GraphTransferConstNodeInfo.Builder, org.tensorflow.proto.framework.GraphTransferConstNodeInfoOrBuilder>( + constNodeInfo_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + constNodeInfo_ = null; + } + return constNodeInfoBuilder_; + } + + private java.util.List nodeInputInfo_ = + java.util.Collections.emptyList(); + private void ensureNodeInputInfoIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + nodeInputInfo_ = new java.util.ArrayList(nodeInputInfo_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferNodeInputInfo, org.tensorflow.proto.framework.GraphTransferNodeInputInfo.Builder, org.tensorflow.proto.framework.GraphTransferNodeInputInfoOrBuilder> nodeInputInfoBuilder_; + + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public java.util.List getNodeInputInfoList() { + if (nodeInputInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodeInputInfo_); + } else { + return nodeInputInfoBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public int getNodeInputInfoCount() { + if (nodeInputInfoBuilder_ == null) { + return nodeInputInfo_.size(); + } else { + return nodeInputInfoBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInputInfo getNodeInputInfo(int index) { + if (nodeInputInfoBuilder_ == null) { + return nodeInputInfo_.get(index); + } else { + return nodeInputInfoBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public Builder setNodeInputInfo( + int index, org.tensorflow.proto.framework.GraphTransferNodeInputInfo value) { + if (nodeInputInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeInputInfoIsMutable(); + nodeInputInfo_.set(index, value); + onChanged(); + } else { + nodeInputInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public Builder setNodeInputInfo( + int index, org.tensorflow.proto.framework.GraphTransferNodeInputInfo.Builder builderForValue) { + if (nodeInputInfoBuilder_ == null) { + ensureNodeInputInfoIsMutable(); + nodeInputInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + nodeInputInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public Builder addNodeInputInfo(org.tensorflow.proto.framework.GraphTransferNodeInputInfo value) { + if (nodeInputInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeInputInfoIsMutable(); + nodeInputInfo_.add(value); + onChanged(); + } else { + nodeInputInfoBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public Builder addNodeInputInfo( + int index, org.tensorflow.proto.framework.GraphTransferNodeInputInfo value) { + if (nodeInputInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeInputInfoIsMutable(); + nodeInputInfo_.add(index, value); + onChanged(); + } else { + nodeInputInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public Builder addNodeInputInfo( + org.tensorflow.proto.framework.GraphTransferNodeInputInfo.Builder builderForValue) { + if (nodeInputInfoBuilder_ == null) { + ensureNodeInputInfoIsMutable(); + nodeInputInfo_.add(builderForValue.build()); + onChanged(); + } else { + nodeInputInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public Builder addNodeInputInfo( + int index, org.tensorflow.proto.framework.GraphTransferNodeInputInfo.Builder builderForValue) { + if (nodeInputInfoBuilder_ == null) { + ensureNodeInputInfoIsMutable(); + nodeInputInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + nodeInputInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public Builder addAllNodeInputInfo( + java.lang.Iterable values) { + if (nodeInputInfoBuilder_ == null) { + ensureNodeInputInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nodeInputInfo_); + onChanged(); + } else { + nodeInputInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public Builder clearNodeInputInfo() { + if (nodeInputInfoBuilder_ == null) { + nodeInputInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + nodeInputInfoBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public Builder removeNodeInputInfo(int index) { + if (nodeInputInfoBuilder_ == null) { + ensureNodeInputInfoIsMutable(); + nodeInputInfo_.remove(index); + onChanged(); + } else { + nodeInputInfoBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInputInfo.Builder getNodeInputInfoBuilder( + int index) { + return getNodeInputInfoFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInputInfoOrBuilder getNodeInputInfoOrBuilder( + int index) { + if (nodeInputInfoBuilder_ == null) { + return nodeInputInfo_.get(index); } else { + return nodeInputInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public java.util.List + getNodeInputInfoOrBuilderList() { + if (nodeInputInfoBuilder_ != null) { + return nodeInputInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodeInputInfo_); + } + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInputInfo.Builder addNodeInputInfoBuilder() { + return getNodeInputInfoFieldBuilder().addBuilder( + org.tensorflow.proto.framework.GraphTransferNodeInputInfo.getDefaultInstance()); + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInputInfo.Builder addNodeInputInfoBuilder( + int index) { + return getNodeInputInfoFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.GraphTransferNodeInputInfo.getDefaultInstance()); + } + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + public java.util.List + getNodeInputInfoBuilderList() { + return getNodeInputInfoFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferNodeInputInfo, org.tensorflow.proto.framework.GraphTransferNodeInputInfo.Builder, org.tensorflow.proto.framework.GraphTransferNodeInputInfoOrBuilder> + getNodeInputInfoFieldBuilder() { + if (nodeInputInfoBuilder_ == null) { + nodeInputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferNodeInputInfo, org.tensorflow.proto.framework.GraphTransferNodeInputInfo.Builder, org.tensorflow.proto.framework.GraphTransferNodeInputInfoOrBuilder>( + nodeInputInfo_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + nodeInputInfo_ = null; + } + return nodeInputInfoBuilder_; + } + + private java.util.List nodeOutputInfo_ = + java.util.Collections.emptyList(); + private void ensureNodeOutputInfoIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + nodeOutputInfo_ = new java.util.ArrayList(nodeOutputInfo_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferNodeOutputInfo, org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.Builder, org.tensorflow.proto.framework.GraphTransferNodeOutputInfoOrBuilder> nodeOutputInfoBuilder_; + + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public java.util.List getNodeOutputInfoList() { + if (nodeOutputInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodeOutputInfo_); + } else { + return nodeOutputInfoBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public int getNodeOutputInfoCount() { + if (nodeOutputInfoBuilder_ == null) { + return nodeOutputInfo_.size(); + } else { + return nodeOutputInfoBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public org.tensorflow.proto.framework.GraphTransferNodeOutputInfo getNodeOutputInfo(int index) { + if (nodeOutputInfoBuilder_ == null) { + return nodeOutputInfo_.get(index); + } else { + return nodeOutputInfoBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public Builder setNodeOutputInfo( + int index, org.tensorflow.proto.framework.GraphTransferNodeOutputInfo value) { + if (nodeOutputInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeOutputInfoIsMutable(); + nodeOutputInfo_.set(index, value); + onChanged(); + } else { + nodeOutputInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public Builder setNodeOutputInfo( + int index, org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.Builder builderForValue) { + if (nodeOutputInfoBuilder_ == null) { + ensureNodeOutputInfoIsMutable(); + nodeOutputInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + nodeOutputInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public Builder addNodeOutputInfo(org.tensorflow.proto.framework.GraphTransferNodeOutputInfo value) { + if (nodeOutputInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeOutputInfoIsMutable(); + nodeOutputInfo_.add(value); + onChanged(); + } else { + nodeOutputInfoBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public Builder addNodeOutputInfo( + int index, org.tensorflow.proto.framework.GraphTransferNodeOutputInfo value) { + if (nodeOutputInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeOutputInfoIsMutable(); + nodeOutputInfo_.add(index, value); + onChanged(); + } else { + nodeOutputInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public Builder addNodeOutputInfo( + org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.Builder builderForValue) { + if (nodeOutputInfoBuilder_ == null) { + ensureNodeOutputInfoIsMutable(); + nodeOutputInfo_.add(builderForValue.build()); + onChanged(); + } else { + nodeOutputInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public Builder addNodeOutputInfo( + int index, org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.Builder builderForValue) { + if (nodeOutputInfoBuilder_ == null) { + ensureNodeOutputInfoIsMutable(); + nodeOutputInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + nodeOutputInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public Builder addAllNodeOutputInfo( + java.lang.Iterable values) { + if (nodeOutputInfoBuilder_ == null) { + ensureNodeOutputInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nodeOutputInfo_); + onChanged(); + } else { + nodeOutputInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public Builder clearNodeOutputInfo() { + if (nodeOutputInfoBuilder_ == null) { + nodeOutputInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + nodeOutputInfoBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public Builder removeNodeOutputInfo(int index) { + if (nodeOutputInfoBuilder_ == null) { + ensureNodeOutputInfoIsMutable(); + nodeOutputInfo_.remove(index); + onChanged(); + } else { + nodeOutputInfoBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.Builder getNodeOutputInfoBuilder( + int index) { + return getNodeOutputInfoFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public org.tensorflow.proto.framework.GraphTransferNodeOutputInfoOrBuilder getNodeOutputInfoOrBuilder( + int index) { + if (nodeOutputInfoBuilder_ == null) { + return nodeOutputInfo_.get(index); } else { + return nodeOutputInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public java.util.List + getNodeOutputInfoOrBuilderList() { + if (nodeOutputInfoBuilder_ != null) { + return nodeOutputInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodeOutputInfo_); + } + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.Builder addNodeOutputInfoBuilder() { + return getNodeOutputInfoFieldBuilder().addBuilder( + org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.getDefaultInstance()); + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.Builder addNodeOutputInfoBuilder( + int index) { + return getNodeOutputInfoFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.getDefaultInstance()); + } + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + public java.util.List + getNodeOutputInfoBuilderList() { + return getNodeOutputInfoFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferNodeOutputInfo, org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.Builder, org.tensorflow.proto.framework.GraphTransferNodeOutputInfoOrBuilder> + getNodeOutputInfoFieldBuilder() { + if (nodeOutputInfoBuilder_ == null) { + nodeOutputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferNodeOutputInfo, org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.Builder, org.tensorflow.proto.framework.GraphTransferNodeOutputInfoOrBuilder>( + nodeOutputInfo_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + nodeOutputInfo_ = null; + } + return nodeOutputInfoBuilder_; + } + + private java.util.List graphInputNodeInfo_ = + java.util.Collections.emptyList(); + private void ensureGraphInputNodeInfoIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + graphInputNodeInfo_ = new java.util.ArrayList(graphInputNodeInfo_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo, org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.Builder, org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfoOrBuilder> graphInputNodeInfoBuilder_; + + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public java.util.List getGraphInputNodeInfoList() { + if (graphInputNodeInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(graphInputNodeInfo_); + } else { + return graphInputNodeInfoBuilder_.getMessageList(); + } + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public int getGraphInputNodeInfoCount() { + if (graphInputNodeInfoBuilder_ == null) { + return graphInputNodeInfo_.size(); + } else { + return graphInputNodeInfoBuilder_.getCount(); + } + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo getGraphInputNodeInfo(int index) { + if (graphInputNodeInfoBuilder_ == null) { + return graphInputNodeInfo_.get(index); + } else { + return graphInputNodeInfoBuilder_.getMessage(index); + } + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public Builder setGraphInputNodeInfo( + int index, org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo value) { + if (graphInputNodeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGraphInputNodeInfoIsMutable(); + graphInputNodeInfo_.set(index, value); + onChanged(); + } else { + graphInputNodeInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public Builder setGraphInputNodeInfo( + int index, org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.Builder builderForValue) { + if (graphInputNodeInfoBuilder_ == null) { + ensureGraphInputNodeInfoIsMutable(); + graphInputNodeInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + graphInputNodeInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public Builder addGraphInputNodeInfo(org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo value) { + if (graphInputNodeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGraphInputNodeInfoIsMutable(); + graphInputNodeInfo_.add(value); + onChanged(); + } else { + graphInputNodeInfoBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public Builder addGraphInputNodeInfo( + int index, org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo value) { + if (graphInputNodeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGraphInputNodeInfoIsMutable(); + graphInputNodeInfo_.add(index, value); + onChanged(); + } else { + graphInputNodeInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public Builder addGraphInputNodeInfo( + org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.Builder builderForValue) { + if (graphInputNodeInfoBuilder_ == null) { + ensureGraphInputNodeInfoIsMutable(); + graphInputNodeInfo_.add(builderForValue.build()); + onChanged(); + } else { + graphInputNodeInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public Builder addGraphInputNodeInfo( + int index, org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.Builder builderForValue) { + if (graphInputNodeInfoBuilder_ == null) { + ensureGraphInputNodeInfoIsMutable(); + graphInputNodeInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + graphInputNodeInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public Builder addAllGraphInputNodeInfo( + java.lang.Iterable values) { + if (graphInputNodeInfoBuilder_ == null) { + ensureGraphInputNodeInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, graphInputNodeInfo_); + onChanged(); + } else { + graphInputNodeInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public Builder clearGraphInputNodeInfo() { + if (graphInputNodeInfoBuilder_ == null) { + graphInputNodeInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + graphInputNodeInfoBuilder_.clear(); + } + return this; + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public Builder removeGraphInputNodeInfo(int index) { + if (graphInputNodeInfoBuilder_ == null) { + ensureGraphInputNodeInfoIsMutable(); + graphInputNodeInfo_.remove(index); + onChanged(); + } else { + graphInputNodeInfoBuilder_.remove(index); + } + return this; + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.Builder getGraphInputNodeInfoBuilder( + int index) { + return getGraphInputNodeInfoFieldBuilder().getBuilder(index); + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfoOrBuilder getGraphInputNodeInfoOrBuilder( + int index) { + if (graphInputNodeInfoBuilder_ == null) { + return graphInputNodeInfo_.get(index); } else { + return graphInputNodeInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public java.util.List + getGraphInputNodeInfoOrBuilderList() { + if (graphInputNodeInfoBuilder_ != null) { + return graphInputNodeInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(graphInputNodeInfo_); + } + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.Builder addGraphInputNodeInfoBuilder() { + return getGraphInputNodeInfoFieldBuilder().addBuilder( + org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.getDefaultInstance()); + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.Builder addGraphInputNodeInfoBuilder( + int index) { + return getGraphInputNodeInfoFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.getDefaultInstance()); + } + /** + *
+     * Input Node parameters of transferred graph
+     * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + public java.util.List + getGraphInputNodeInfoBuilderList() { + return getGraphInputNodeInfoFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo, org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.Builder, org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfoOrBuilder> + getGraphInputNodeInfoFieldBuilder() { + if (graphInputNodeInfoBuilder_ == null) { + graphInputNodeInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo, org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo.Builder, org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfoOrBuilder>( + graphInputNodeInfo_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + graphInputNodeInfo_ = null; + } + return graphInputNodeInfoBuilder_; + } + + private java.util.List graphOutputNodeInfo_ = + java.util.Collections.emptyList(); + private void ensureGraphOutputNodeInfoIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + graphOutputNodeInfo_ = new java.util.ArrayList(graphOutputNodeInfo_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo, org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.Builder, org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfoOrBuilder> graphOutputNodeInfoBuilder_; + + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public java.util.List getGraphOutputNodeInfoList() { + if (graphOutputNodeInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(graphOutputNodeInfo_); + } else { + return graphOutputNodeInfoBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public int getGraphOutputNodeInfoCount() { + if (graphOutputNodeInfoBuilder_ == null) { + return graphOutputNodeInfo_.size(); + } else { + return graphOutputNodeInfoBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo getGraphOutputNodeInfo(int index) { + if (graphOutputNodeInfoBuilder_ == null) { + return graphOutputNodeInfo_.get(index); + } else { + return graphOutputNodeInfoBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public Builder setGraphOutputNodeInfo( + int index, org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo value) { + if (graphOutputNodeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGraphOutputNodeInfoIsMutable(); + graphOutputNodeInfo_.set(index, value); + onChanged(); + } else { + graphOutputNodeInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public Builder setGraphOutputNodeInfo( + int index, org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.Builder builderForValue) { + if (graphOutputNodeInfoBuilder_ == null) { + ensureGraphOutputNodeInfoIsMutable(); + graphOutputNodeInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + graphOutputNodeInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public Builder addGraphOutputNodeInfo(org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo value) { + if (graphOutputNodeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGraphOutputNodeInfoIsMutable(); + graphOutputNodeInfo_.add(value); + onChanged(); + } else { + graphOutputNodeInfoBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public Builder addGraphOutputNodeInfo( + int index, org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo value) { + if (graphOutputNodeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGraphOutputNodeInfoIsMutable(); + graphOutputNodeInfo_.add(index, value); + onChanged(); + } else { + graphOutputNodeInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public Builder addGraphOutputNodeInfo( + org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.Builder builderForValue) { + if (graphOutputNodeInfoBuilder_ == null) { + ensureGraphOutputNodeInfoIsMutable(); + graphOutputNodeInfo_.add(builderForValue.build()); + onChanged(); + } else { + graphOutputNodeInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public Builder addGraphOutputNodeInfo( + int index, org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.Builder builderForValue) { + if (graphOutputNodeInfoBuilder_ == null) { + ensureGraphOutputNodeInfoIsMutable(); + graphOutputNodeInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + graphOutputNodeInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public Builder addAllGraphOutputNodeInfo( + java.lang.Iterable values) { + if (graphOutputNodeInfoBuilder_ == null) { + ensureGraphOutputNodeInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, graphOutputNodeInfo_); + onChanged(); + } else { + graphOutputNodeInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public Builder clearGraphOutputNodeInfo() { + if (graphOutputNodeInfoBuilder_ == null) { + graphOutputNodeInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + graphOutputNodeInfoBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public Builder removeGraphOutputNodeInfo(int index) { + if (graphOutputNodeInfoBuilder_ == null) { + ensureGraphOutputNodeInfoIsMutable(); + graphOutputNodeInfo_.remove(index); + onChanged(); + } else { + graphOutputNodeInfoBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.Builder getGraphOutputNodeInfoBuilder( + int index) { + return getGraphOutputNodeInfoFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfoOrBuilder getGraphOutputNodeInfoOrBuilder( + int index) { + if (graphOutputNodeInfoBuilder_ == null) { + return graphOutputNodeInfo_.get(index); } else { + return graphOutputNodeInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public java.util.List + getGraphOutputNodeInfoOrBuilderList() { + if (graphOutputNodeInfoBuilder_ != null) { + return graphOutputNodeInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(graphOutputNodeInfo_); + } + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.Builder addGraphOutputNodeInfoBuilder() { + return getGraphOutputNodeInfoFieldBuilder().addBuilder( + org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.getDefaultInstance()); + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.Builder addGraphOutputNodeInfoBuilder( + int index) { + return getGraphOutputNodeInfoFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.getDefaultInstance()); + } + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + public java.util.List + getGraphOutputNodeInfoBuilderList() { + return getGraphOutputNodeInfoFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo, org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.Builder, org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfoOrBuilder> + getGraphOutputNodeInfoFieldBuilder() { + if (graphOutputNodeInfoBuilder_ == null) { + graphOutputNodeInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo, org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo.Builder, org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfoOrBuilder>( + graphOutputNodeInfo_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + graphOutputNodeInfo_ = null; + } + return graphOutputNodeInfoBuilder_; + } + + private int destination_ = 0; + /** + *
+     * Destination of graph transfer
+     * 
+ * + * .tensorflow.GraphTransferInfo.Destination destination = 7; + */ + public int getDestinationValue() { + return destination_; + } + /** + *
+     * Destination of graph transfer
+     * 
+ * + * .tensorflow.GraphTransferInfo.Destination destination = 7; + */ + public Builder setDestinationValue(int value) { + destination_ = value; + onChanged(); + return this; + } + /** + *
+     * Destination of graph transfer
+     * 
+ * + * .tensorflow.GraphTransferInfo.Destination destination = 7; + */ + public org.tensorflow.proto.framework.GraphTransferInfo.Destination getDestination() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.GraphTransferInfo.Destination result = org.tensorflow.proto.framework.GraphTransferInfo.Destination.valueOf(destination_); + return result == null ? org.tensorflow.proto.framework.GraphTransferInfo.Destination.UNRECOGNIZED : result; + } + /** + *
+     * Destination of graph transfer
+     * 
+ * + * .tensorflow.GraphTransferInfo.Destination destination = 7; + */ + public Builder setDestination(org.tensorflow.proto.framework.GraphTransferInfo.Destination value) { + if (value == null) { + throw new NullPointerException(); + } + + destination_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Destination of graph transfer
+     * 
+ * + * .tensorflow.GraphTransferInfo.Destination destination = 7; + */ + public Builder clearDestination() { + + destination_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GraphTransferInfo) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GraphTransferInfo) + private static final org.tensorflow.proto.framework.GraphTransferInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GraphTransferInfo(); + } + + public static org.tensorflow.proto.framework.GraphTransferInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GraphTransferInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GraphTransferInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferInfoOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferInfoOrBuilder.java new file mode 100644 index 00000000000..d999e1d9d48 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferInfoOrBuilder.java @@ -0,0 +1,190 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +public interface GraphTransferInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GraphTransferInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + java.util.List + getNodeInfoList(); + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + org.tensorflow.proto.framework.GraphTransferNodeInfo getNodeInfo(int index); + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + int getNodeInfoCount(); + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + java.util.List + getNodeInfoOrBuilderList(); + /** + * repeated .tensorflow.GraphTransferNodeInfo node_info = 1; + */ + org.tensorflow.proto.framework.GraphTransferNodeInfoOrBuilder getNodeInfoOrBuilder( + int index); + + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + java.util.List + getConstNodeInfoList(); + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + org.tensorflow.proto.framework.GraphTransferConstNodeInfo getConstNodeInfo(int index); + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + int getConstNodeInfoCount(); + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + java.util.List + getConstNodeInfoOrBuilderList(); + /** + * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2; + */ + org.tensorflow.proto.framework.GraphTransferConstNodeInfoOrBuilder getConstNodeInfoOrBuilder( + int index); + + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + java.util.List + getNodeInputInfoList(); + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + org.tensorflow.proto.framework.GraphTransferNodeInputInfo getNodeInputInfo(int index); + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + int getNodeInputInfoCount(); + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + java.util.List + getNodeInputInfoOrBuilderList(); + /** + * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3; + */ + org.tensorflow.proto.framework.GraphTransferNodeInputInfoOrBuilder getNodeInputInfoOrBuilder( + int index); + + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + java.util.List + getNodeOutputInfoList(); + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + org.tensorflow.proto.framework.GraphTransferNodeOutputInfo getNodeOutputInfo(int index); + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + int getNodeOutputInfoCount(); + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + java.util.List + getNodeOutputInfoOrBuilderList(); + /** + * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4; + */ + org.tensorflow.proto.framework.GraphTransferNodeOutputInfoOrBuilder getNodeOutputInfoOrBuilder( + int index); + + /** + *
+   * Input Node parameters of transferred graph
+   * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + java.util.List + getGraphInputNodeInfoList(); + /** + *
+   * Input Node parameters of transferred graph
+   * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfo getGraphInputNodeInfo(int index); + /** + *
+   * Input Node parameters of transferred graph
+   * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + int getGraphInputNodeInfoCount(); + /** + *
+   * Input Node parameters of transferred graph
+   * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + java.util.List + getGraphInputNodeInfoOrBuilderList(); + /** + *
+   * Input Node parameters of transferred graph
+   * 
+ * + * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5; + */ + org.tensorflow.proto.framework.GraphTransferGraphInputNodeInfoOrBuilder getGraphInputNodeInfoOrBuilder( + int index); + + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + java.util.List + getGraphOutputNodeInfoList(); + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfo getGraphOutputNodeInfo(int index); + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + int getGraphOutputNodeInfoCount(); + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + java.util.List + getGraphOutputNodeInfoOrBuilderList(); + /** + * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6; + */ + org.tensorflow.proto.framework.GraphTransferGraphOutputNodeInfoOrBuilder getGraphOutputNodeInfoOrBuilder( + int index); + + /** + *
+   * Destination of graph transfer
+   * 
+ * + * .tensorflow.GraphTransferInfo.Destination destination = 7; + */ + int getDestinationValue(); + /** + *
+   * Destination of graph transfer
+   * 
+ * + * .tensorflow.GraphTransferInfo.Destination destination = 7; + */ + org.tensorflow.proto.framework.GraphTransferInfo.Destination getDestination(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferInfoProto.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferInfoProto.java new file mode 100644 index 00000000000..750526c8897 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferInfoProto.java @@ -0,0 +1,163 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +public final class GraphTransferInfoProto { + private GraphTransferInfoProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GraphTransferNodeInput_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GraphTransferNodeInput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GraphTransferNodeInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GraphTransferNodeInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GraphTransferConstNodeInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GraphTransferConstNodeInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GraphTransferNodeInputInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GraphTransferNodeInputInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GraphTransferNodeOutputInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GraphTransferNodeOutputInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GraphTransferGraphInputNodeInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GraphTransferGraphInputNodeInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_GraphTransferInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_GraphTransferInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n3tensorflow/core/framework/graph_transf" + + "er_info.proto\022\ntensorflow\032%tensorflow/co" + + "re/framework/types.proto\">\n\026GraphTransfe" + + "rNodeInput\022\017\n\007node_id\030\001 \001(\005\022\023\n\013output_po" + + "rt\030\002 \001(\005\"\233\001\n\025GraphTransferNodeInfo\022\014\n\004na" + + "me\030\001 \001(\t\022\017\n\007node_id\030\002 \001(\005\022\021\n\ttype_name\030\003" + + " \001(\t\022\021\n\tsoc_op_id\030\004 \001(\005\022\022\n\npadding_id\030\005 " + + "\001(\005\022\023\n\013input_count\030\006 \001(\005\022\024\n\014output_count" + + "\030\007 \001(\005\"}\n\032GraphTransferConstNodeInfo\022\014\n\004" + + "name\030\001 \001(\t\022\017\n\007node_id\030\002 \001(\005\022\r\n\005shape\030\003 \003" + + "(\003\022\014\n\004data\030\004 \001(\014\022#\n\005dtype\030\005 \001(\0162\024.tensor" + + "flow.DataType\"e\n\032GraphTransferNodeInputI" + + "nfo\022\017\n\007node_id\030\001 \001(\005\0226\n\nnode_input\030\002 \003(\013" + + "2\".tensorflow.GraphTransferNodeInput\"E\n\033" + + "GraphTransferNodeOutputInfo\022\017\n\007node_id\030\001" + + " \001(\005\022\025\n\rmax_byte_size\030\002 \003(\005\"c\n\037GraphTran" + + "sferGraphInputNodeInfo\022\014\n\004name\030\001 \001(\t\022\r\n\005" + + "shape\030\002 \003(\003\022#\n\005dtype\030\003 \001(\0162\024.tensorflow." + + "DataType\"d\n GraphTransferGraphOutputNode" + + "Info\022\014\n\004name\030\001 \001(\t\022\r\n\005shape\030\002 \003(\003\022#\n\005dty" + + "pe\030\003 \001(\0162\024.tensorflow.DataType\"\215\004\n\021Graph" + + "TransferInfo\0224\n\tnode_info\030\001 \003(\0132!.tensor" + + "flow.GraphTransferNodeInfo\022?\n\017const_node" + + "_info\030\002 \003(\0132&.tensorflow.GraphTransferCo" + + "nstNodeInfo\022?\n\017node_input_info\030\003 \003(\0132&.t" + + "ensorflow.GraphTransferNodeInputInfo\022A\n\020" + + "node_output_info\030\004 \003(\0132\'.tensorflow.Grap" + + "hTransferNodeOutputInfo\022J\n\025graph_input_n" + + "ode_info\030\005 \003(\0132+.tensorflow.GraphTransfe" + + "rGraphInputNodeInfo\022L\n\026graph_output_node" + + "_info\030\006 \003(\0132,.tensorflow.GraphTransferGr" + + "aphOutputNodeInfo\022>\n\013destination\030\007 \001(\0162)" + + ".tensorflow.GraphTransferInfo.Destinatio" + + "n\"#\n\013Destination\022\007\n\003NOP\020\000\022\013\n\007HEXAGON\020\001B\231" + + "\001\n\036org.tensorflow.proto.frameworkB\026Graph" + + "TransferInfoProtoP\001ZZgithub.com/tensorfl" + + "ow/tensorflow/tensorflow/go/core/framewo" + + "rk/graph_transfer_info_go_proto\370\001\001b\006prot" + + "o3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.TypesProtos.getDescriptor(), + }); + internal_static_tensorflow_GraphTransferNodeInput_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_GraphTransferNodeInput_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GraphTransferNodeInput_descriptor, + new java.lang.String[] { "NodeId", "OutputPort", }); + internal_static_tensorflow_GraphTransferNodeInfo_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_GraphTransferNodeInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GraphTransferNodeInfo_descriptor, + new java.lang.String[] { "Name", "NodeId", "TypeName", "SocOpId", "PaddingId", "InputCount", "OutputCount", }); + internal_static_tensorflow_GraphTransferConstNodeInfo_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_tensorflow_GraphTransferConstNodeInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GraphTransferConstNodeInfo_descriptor, + new java.lang.String[] { "Name", "NodeId", "Shape", "Data", "Dtype", }); + internal_static_tensorflow_GraphTransferNodeInputInfo_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_tensorflow_GraphTransferNodeInputInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GraphTransferNodeInputInfo_descriptor, + new java.lang.String[] { "NodeId", "NodeInput", }); + internal_static_tensorflow_GraphTransferNodeOutputInfo_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_tensorflow_GraphTransferNodeOutputInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GraphTransferNodeOutputInfo_descriptor, + new java.lang.String[] { "NodeId", "MaxByteSize", }); + internal_static_tensorflow_GraphTransferGraphInputNodeInfo_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_tensorflow_GraphTransferGraphInputNodeInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GraphTransferGraphInputNodeInfo_descriptor, + new java.lang.String[] { "Name", "Shape", "Dtype", }); + internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_descriptor, + new java.lang.String[] { "Name", "Shape", "Dtype", }); + internal_static_tensorflow_GraphTransferInfo_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_tensorflow_GraphTransferInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_GraphTransferInfo_descriptor, + new java.lang.String[] { "NodeInfo", "ConstNodeInfo", "NodeInputInfo", "NodeOutputInfo", "GraphInputNodeInfo", "GraphOutputNodeInfo", "Destination", }); + org.tensorflow.proto.framework.TypesProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInfo.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInfo.java new file mode 100644 index 00000000000..d144359008c --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInfo.java @@ -0,0 +1,958 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.GraphTransferNodeInfo} + */ +public final class GraphTransferNodeInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferNodeInfo) + GraphTransferNodeInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GraphTransferNodeInfo.newBuilder() to construct. + private GraphTransferNodeInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GraphTransferNodeInfo() { + name_ = ""; + typeName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GraphTransferNodeInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GraphTransferNodeInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + nodeId_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + typeName_ = s; + break; + } + case 32: { + + socOpId_ = input.readInt32(); + break; + } + case 40: { + + paddingId_ = input.readInt32(); + break; + } + case 48: { + + inputCount_ = input.readInt32(); + break; + } + case 56: { + + outputCount_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphTransferNodeInfo.class, org.tensorflow.proto.framework.GraphTransferNodeInfo.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * 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; + } + } + /** + * 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 NODE_ID_FIELD_NUMBER = 2; + private int nodeId_; + /** + * int32 node_id = 2; + */ + public int getNodeId() { + return nodeId_; + } + + public static final int TYPE_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object typeName_; + /** + * string type_name = 3; + */ + public java.lang.String getTypeName() { + java.lang.Object ref = typeName_; + 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(); + typeName_ = s; + return s; + } + } + /** + * string type_name = 3; + */ + public com.google.protobuf.ByteString + getTypeNameBytes() { + java.lang.Object ref = typeName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + typeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOC_OP_ID_FIELD_NUMBER = 4; + private int socOpId_; + /** + * int32 soc_op_id = 4; + */ + public int getSocOpId() { + return socOpId_; + } + + public static final int PADDING_ID_FIELD_NUMBER = 5; + private int paddingId_; + /** + * int32 padding_id = 5; + */ + public int getPaddingId() { + return paddingId_; + } + + public static final int INPUT_COUNT_FIELD_NUMBER = 6; + private int inputCount_; + /** + * int32 input_count = 6; + */ + public int getInputCount() { + return inputCount_; + } + + public static final int OUTPUT_COUNT_FIELD_NUMBER = 7; + private int outputCount_; + /** + * int32 output_count = 7; + */ + public int getOutputCount() { + return outputCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (nodeId_ != 0) { + output.writeInt32(2, nodeId_); + } + if (!getTypeNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, typeName_); + } + if (socOpId_ != 0) { + output.writeInt32(4, socOpId_); + } + if (paddingId_ != 0) { + output.writeInt32(5, paddingId_); + } + if (inputCount_ != 0) { + output.writeInt32(6, inputCount_); + } + if (outputCount_ != 0) { + output.writeInt32(7, outputCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (nodeId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, nodeId_); + } + if (!getTypeNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, typeName_); + } + if (socOpId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, socOpId_); + } + if (paddingId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, paddingId_); + } + if (inputCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, inputCount_); + } + if (outputCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, outputCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GraphTransferNodeInfo)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GraphTransferNodeInfo other = (org.tensorflow.proto.framework.GraphTransferNodeInfo) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getNodeId() + != other.getNodeId()) return false; + if (!getTypeName() + .equals(other.getTypeName())) return false; + if (getSocOpId() + != other.getSocOpId()) return false; + if (getPaddingId() + != other.getPaddingId()) return false; + if (getInputCount() + != other.getInputCount()) return false; + if (getOutputCount() + != other.getOutputCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + NODE_ID_FIELD_NUMBER; + hash = (53 * hash) + getNodeId(); + hash = (37 * hash) + TYPE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTypeName().hashCode(); + hash = (37 * hash) + SOC_OP_ID_FIELD_NUMBER; + hash = (53 * hash) + getSocOpId(); + hash = (37 * hash) + PADDING_ID_FIELD_NUMBER; + hash = (53 * hash) + getPaddingId(); + hash = (37 * hash) + INPUT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getInputCount(); + hash = (37 * hash) + OUTPUT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getOutputCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GraphTransferNodeInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInfo 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.proto.framework.GraphTransferNodeInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GraphTransferNodeInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.GraphTransferNodeInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GraphTransferNodeInfo) + org.tensorflow.proto.framework.GraphTransferNodeInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphTransferNodeInfo.class, org.tensorflow.proto.framework.GraphTransferNodeInfo.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GraphTransferNodeInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + nodeId_ = 0; + + typeName_ = ""; + + socOpId_ = 0; + + paddingId_ = 0; + + inputCount_ = 0; + + outputCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInfo_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferNodeInfo getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GraphTransferNodeInfo.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferNodeInfo build() { + org.tensorflow.proto.framework.GraphTransferNodeInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferNodeInfo buildPartial() { + org.tensorflow.proto.framework.GraphTransferNodeInfo result = new org.tensorflow.proto.framework.GraphTransferNodeInfo(this); + result.name_ = name_; + result.nodeId_ = nodeId_; + result.typeName_ = typeName_; + result.socOpId_ = socOpId_; + result.paddingId_ = paddingId_; + result.inputCount_ = inputCount_; + result.outputCount_ = outputCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GraphTransferNodeInfo) { + return mergeFrom((org.tensorflow.proto.framework.GraphTransferNodeInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GraphTransferNodeInfo other) { + if (other == org.tensorflow.proto.framework.GraphTransferNodeInfo.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getNodeId() != 0) { + setNodeId(other.getNodeId()); + } + if (!other.getTypeName().isEmpty()) { + typeName_ = other.typeName_; + onChanged(); + } + if (other.getSocOpId() != 0) { + setSocOpId(other.getSocOpId()); + } + if (other.getPaddingId() != 0) { + setPaddingId(other.getPaddingId()); + } + if (other.getInputCount() != 0) { + setInputCount(other.getInputCount()); + } + if (other.getOutputCount() != 0) { + setOutputCount(other.getOutputCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GraphTransferNodeInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GraphTransferNodeInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * 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; + } + } + /** + * 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; + } + } + /** + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * 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 int nodeId_ ; + /** + * int32 node_id = 2; + */ + public int getNodeId() { + return nodeId_; + } + /** + * int32 node_id = 2; + */ + public Builder setNodeId(int value) { + + nodeId_ = value; + onChanged(); + return this; + } + /** + * int32 node_id = 2; + */ + public Builder clearNodeId() { + + nodeId_ = 0; + onChanged(); + return this; + } + + private java.lang.Object typeName_ = ""; + /** + * string type_name = 3; + */ + public java.lang.String getTypeName() { + java.lang.Object ref = typeName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + typeName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string type_name = 3; + */ + public com.google.protobuf.ByteString + getTypeNameBytes() { + java.lang.Object ref = typeName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + typeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string type_name = 3; + */ + public Builder setTypeName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + typeName_ = value; + onChanged(); + return this; + } + /** + * string type_name = 3; + */ + public Builder clearTypeName() { + + typeName_ = getDefaultInstance().getTypeName(); + onChanged(); + return this; + } + /** + * string type_name = 3; + */ + public Builder setTypeNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + typeName_ = value; + onChanged(); + return this; + } + + private int socOpId_ ; + /** + * int32 soc_op_id = 4; + */ + public int getSocOpId() { + return socOpId_; + } + /** + * int32 soc_op_id = 4; + */ + public Builder setSocOpId(int value) { + + socOpId_ = value; + onChanged(); + return this; + } + /** + * int32 soc_op_id = 4; + */ + public Builder clearSocOpId() { + + socOpId_ = 0; + onChanged(); + return this; + } + + private int paddingId_ ; + /** + * int32 padding_id = 5; + */ + public int getPaddingId() { + return paddingId_; + } + /** + * int32 padding_id = 5; + */ + public Builder setPaddingId(int value) { + + paddingId_ = value; + onChanged(); + return this; + } + /** + * int32 padding_id = 5; + */ + public Builder clearPaddingId() { + + paddingId_ = 0; + onChanged(); + return this; + } + + private int inputCount_ ; + /** + * int32 input_count = 6; + */ + public int getInputCount() { + return inputCount_; + } + /** + * int32 input_count = 6; + */ + public Builder setInputCount(int value) { + + inputCount_ = value; + onChanged(); + return this; + } + /** + * int32 input_count = 6; + */ + public Builder clearInputCount() { + + inputCount_ = 0; + onChanged(); + return this; + } + + private int outputCount_ ; + /** + * int32 output_count = 7; + */ + public int getOutputCount() { + return outputCount_; + } + /** + * int32 output_count = 7; + */ + public Builder setOutputCount(int value) { + + outputCount_ = value; + onChanged(); + return this; + } + /** + * int32 output_count = 7; + */ + public Builder clearOutputCount() { + + outputCount_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GraphTransferNodeInfo) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GraphTransferNodeInfo) + private static final org.tensorflow.proto.framework.GraphTransferNodeInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GraphTransferNodeInfo(); + } + + public static org.tensorflow.proto.framework.GraphTransferNodeInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GraphTransferNodeInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GraphTransferNodeInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferNodeInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInfoOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInfoOrBuilder.java new file mode 100644 index 00000000000..98656c6ee2c --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInfoOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +public interface GraphTransferNodeInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GraphTransferNodeInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + */ + java.lang.String getName(); + /** + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * int32 node_id = 2; + */ + int getNodeId(); + + /** + * string type_name = 3; + */ + java.lang.String getTypeName(); + /** + * string type_name = 3; + */ + com.google.protobuf.ByteString + getTypeNameBytes(); + + /** + * int32 soc_op_id = 4; + */ + int getSocOpId(); + + /** + * int32 padding_id = 5; + */ + int getPaddingId(); + + /** + * int32 input_count = 6; + */ + int getInputCount(); + + /** + * int32 output_count = 7; + */ + int getOutputCount(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInput.java new file mode 100644 index 00000000000..77ad6b87dc8 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInput.java @@ -0,0 +1,533 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.GraphTransferNodeInput} + */ +public final class GraphTransferNodeInput extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferNodeInput) + GraphTransferNodeInputOrBuilder { +private static final long serialVersionUID = 0L; + // Use GraphTransferNodeInput.newBuilder() to construct. + private GraphTransferNodeInput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GraphTransferNodeInput() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GraphTransferNodeInput(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GraphTransferNodeInput( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + nodeId_ = input.readInt32(); + break; + } + case 16: { + + outputPort_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphTransferNodeInput.class, org.tensorflow.proto.framework.GraphTransferNodeInput.Builder.class); + } + + public static final int NODE_ID_FIELD_NUMBER = 1; + private int nodeId_; + /** + * int32 node_id = 1; + */ + public int getNodeId() { + return nodeId_; + } + + public static final int OUTPUT_PORT_FIELD_NUMBER = 2; + private int outputPort_; + /** + * int32 output_port = 2; + */ + public int getOutputPort() { + return outputPort_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (nodeId_ != 0) { + output.writeInt32(1, nodeId_); + } + if (outputPort_ != 0) { + output.writeInt32(2, outputPort_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (nodeId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, nodeId_); + } + if (outputPort_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, outputPort_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GraphTransferNodeInput)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GraphTransferNodeInput other = (org.tensorflow.proto.framework.GraphTransferNodeInput) obj; + + if (getNodeId() + != other.getNodeId()) return false; + if (getOutputPort() + != other.getOutputPort()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NODE_ID_FIELD_NUMBER; + hash = (53 * hash) + getNodeId(); + hash = (37 * hash) + OUTPUT_PORT_FIELD_NUMBER; + hash = (53 * hash) + getOutputPort(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GraphTransferNodeInput parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInput parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInput 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.proto.framework.GraphTransferNodeInput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInput parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInput parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInput parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInput parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInput parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInput parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInput parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GraphTransferNodeInput prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.GraphTransferNodeInput} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GraphTransferNodeInput) + org.tensorflow.proto.framework.GraphTransferNodeInputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphTransferNodeInput.class, org.tensorflow.proto.framework.GraphTransferNodeInput.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GraphTransferNodeInput.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + nodeId_ = 0; + + outputPort_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInput_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferNodeInput getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GraphTransferNodeInput.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferNodeInput build() { + org.tensorflow.proto.framework.GraphTransferNodeInput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferNodeInput buildPartial() { + org.tensorflow.proto.framework.GraphTransferNodeInput result = new org.tensorflow.proto.framework.GraphTransferNodeInput(this); + result.nodeId_ = nodeId_; + result.outputPort_ = outputPort_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GraphTransferNodeInput) { + return mergeFrom((org.tensorflow.proto.framework.GraphTransferNodeInput)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GraphTransferNodeInput other) { + if (other == org.tensorflow.proto.framework.GraphTransferNodeInput.getDefaultInstance()) return this; + if (other.getNodeId() != 0) { + setNodeId(other.getNodeId()); + } + if (other.getOutputPort() != 0) { + setOutputPort(other.getOutputPort()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GraphTransferNodeInput parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GraphTransferNodeInput) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int nodeId_ ; + /** + * int32 node_id = 1; + */ + public int getNodeId() { + return nodeId_; + } + /** + * int32 node_id = 1; + */ + public Builder setNodeId(int value) { + + nodeId_ = value; + onChanged(); + return this; + } + /** + * int32 node_id = 1; + */ + public Builder clearNodeId() { + + nodeId_ = 0; + onChanged(); + return this; + } + + private int outputPort_ ; + /** + * int32 output_port = 2; + */ + public int getOutputPort() { + return outputPort_; + } + /** + * int32 output_port = 2; + */ + public Builder setOutputPort(int value) { + + outputPort_ = value; + onChanged(); + return this; + } + /** + * int32 output_port = 2; + */ + public Builder clearOutputPort() { + + outputPort_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GraphTransferNodeInput) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GraphTransferNodeInput) + private static final org.tensorflow.proto.framework.GraphTransferNodeInput DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GraphTransferNodeInput(); + } + + public static org.tensorflow.proto.framework.GraphTransferNodeInput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GraphTransferNodeInput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GraphTransferNodeInput(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferNodeInput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInputInfo.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInputInfo.java new file mode 100644 index 00000000000..71d0552eacd --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInputInfo.java @@ -0,0 +1,822 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.GraphTransferNodeInputInfo} + */ +public final class GraphTransferNodeInputInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferNodeInputInfo) + GraphTransferNodeInputInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GraphTransferNodeInputInfo.newBuilder() to construct. + private GraphTransferNodeInputInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GraphTransferNodeInputInfo() { + nodeInput_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GraphTransferNodeInputInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GraphTransferNodeInputInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + nodeId_ = input.readInt32(); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + nodeInput_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + nodeInput_.add( + input.readMessage(org.tensorflow.proto.framework.GraphTransferNodeInput.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + nodeInput_ = java.util.Collections.unmodifiableList(nodeInput_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInputInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInputInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphTransferNodeInputInfo.class, org.tensorflow.proto.framework.GraphTransferNodeInputInfo.Builder.class); + } + + public static final int NODE_ID_FIELD_NUMBER = 1; + private int nodeId_; + /** + * int32 node_id = 1; + */ + public int getNodeId() { + return nodeId_; + } + + public static final int NODE_INPUT_FIELD_NUMBER = 2; + private java.util.List nodeInput_; + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public java.util.List getNodeInputList() { + return nodeInput_; + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public java.util.List + getNodeInputOrBuilderList() { + return nodeInput_; + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public int getNodeInputCount() { + return nodeInput_.size(); + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInput getNodeInput(int index) { + return nodeInput_.get(index); + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInputOrBuilder getNodeInputOrBuilder( + int index) { + return nodeInput_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (nodeId_ != 0) { + output.writeInt32(1, nodeId_); + } + for (int i = 0; i < nodeInput_.size(); i++) { + output.writeMessage(2, nodeInput_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (nodeId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, nodeId_); + } + for (int i = 0; i < nodeInput_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, nodeInput_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GraphTransferNodeInputInfo)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GraphTransferNodeInputInfo other = (org.tensorflow.proto.framework.GraphTransferNodeInputInfo) obj; + + if (getNodeId() + != other.getNodeId()) return false; + if (!getNodeInputList() + .equals(other.getNodeInputList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NODE_ID_FIELD_NUMBER; + hash = (53 * hash) + getNodeId(); + if (getNodeInputCount() > 0) { + hash = (37 * hash) + NODE_INPUT_FIELD_NUMBER; + hash = (53 * hash) + getNodeInputList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GraphTransferNodeInputInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInputInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInputInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInputInfo 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.proto.framework.GraphTransferNodeInputInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInputInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInputInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInputInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInputInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInputInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInputInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferNodeInputInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GraphTransferNodeInputInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.GraphTransferNodeInputInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GraphTransferNodeInputInfo) + org.tensorflow.proto.framework.GraphTransferNodeInputInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInputInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInputInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphTransferNodeInputInfo.class, org.tensorflow.proto.framework.GraphTransferNodeInputInfo.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GraphTransferNodeInputInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getNodeInputFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + nodeId_ = 0; + + if (nodeInputBuilder_ == null) { + nodeInput_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + nodeInputBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInputInfo_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferNodeInputInfo getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GraphTransferNodeInputInfo.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferNodeInputInfo build() { + org.tensorflow.proto.framework.GraphTransferNodeInputInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferNodeInputInfo buildPartial() { + org.tensorflow.proto.framework.GraphTransferNodeInputInfo result = new org.tensorflow.proto.framework.GraphTransferNodeInputInfo(this); + int from_bitField0_ = bitField0_; + result.nodeId_ = nodeId_; + if (nodeInputBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + nodeInput_ = java.util.Collections.unmodifiableList(nodeInput_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.nodeInput_ = nodeInput_; + } else { + result.nodeInput_ = nodeInputBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GraphTransferNodeInputInfo) { + return mergeFrom((org.tensorflow.proto.framework.GraphTransferNodeInputInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GraphTransferNodeInputInfo other) { + if (other == org.tensorflow.proto.framework.GraphTransferNodeInputInfo.getDefaultInstance()) return this; + if (other.getNodeId() != 0) { + setNodeId(other.getNodeId()); + } + if (nodeInputBuilder_ == null) { + if (!other.nodeInput_.isEmpty()) { + if (nodeInput_.isEmpty()) { + nodeInput_ = other.nodeInput_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNodeInputIsMutable(); + nodeInput_.addAll(other.nodeInput_); + } + onChanged(); + } + } else { + if (!other.nodeInput_.isEmpty()) { + if (nodeInputBuilder_.isEmpty()) { + nodeInputBuilder_.dispose(); + nodeInputBuilder_ = null; + nodeInput_ = other.nodeInput_; + bitField0_ = (bitField0_ & ~0x00000001); + nodeInputBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNodeInputFieldBuilder() : null; + } else { + nodeInputBuilder_.addAllMessages(other.nodeInput_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GraphTransferNodeInputInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GraphTransferNodeInputInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int nodeId_ ; + /** + * int32 node_id = 1; + */ + public int getNodeId() { + return nodeId_; + } + /** + * int32 node_id = 1; + */ + public Builder setNodeId(int value) { + + nodeId_ = value; + onChanged(); + return this; + } + /** + * int32 node_id = 1; + */ + public Builder clearNodeId() { + + nodeId_ = 0; + onChanged(); + return this; + } + + private java.util.List nodeInput_ = + java.util.Collections.emptyList(); + private void ensureNodeInputIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + nodeInput_ = new java.util.ArrayList(nodeInput_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferNodeInput, org.tensorflow.proto.framework.GraphTransferNodeInput.Builder, org.tensorflow.proto.framework.GraphTransferNodeInputOrBuilder> nodeInputBuilder_; + + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public java.util.List getNodeInputList() { + if (nodeInputBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodeInput_); + } else { + return nodeInputBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public int getNodeInputCount() { + if (nodeInputBuilder_ == null) { + return nodeInput_.size(); + } else { + return nodeInputBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInput getNodeInput(int index) { + if (nodeInputBuilder_ == null) { + return nodeInput_.get(index); + } else { + return nodeInputBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public Builder setNodeInput( + int index, org.tensorflow.proto.framework.GraphTransferNodeInput value) { + if (nodeInputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeInputIsMutable(); + nodeInput_.set(index, value); + onChanged(); + } else { + nodeInputBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public Builder setNodeInput( + int index, org.tensorflow.proto.framework.GraphTransferNodeInput.Builder builderForValue) { + if (nodeInputBuilder_ == null) { + ensureNodeInputIsMutable(); + nodeInput_.set(index, builderForValue.build()); + onChanged(); + } else { + nodeInputBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public Builder addNodeInput(org.tensorflow.proto.framework.GraphTransferNodeInput value) { + if (nodeInputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeInputIsMutable(); + nodeInput_.add(value); + onChanged(); + } else { + nodeInputBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public Builder addNodeInput( + int index, org.tensorflow.proto.framework.GraphTransferNodeInput value) { + if (nodeInputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeInputIsMutable(); + nodeInput_.add(index, value); + onChanged(); + } else { + nodeInputBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public Builder addNodeInput( + org.tensorflow.proto.framework.GraphTransferNodeInput.Builder builderForValue) { + if (nodeInputBuilder_ == null) { + ensureNodeInputIsMutable(); + nodeInput_.add(builderForValue.build()); + onChanged(); + } else { + nodeInputBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public Builder addNodeInput( + int index, org.tensorflow.proto.framework.GraphTransferNodeInput.Builder builderForValue) { + if (nodeInputBuilder_ == null) { + ensureNodeInputIsMutable(); + nodeInput_.add(index, builderForValue.build()); + onChanged(); + } else { + nodeInputBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public Builder addAllNodeInput( + java.lang.Iterable values) { + if (nodeInputBuilder_ == null) { + ensureNodeInputIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nodeInput_); + onChanged(); + } else { + nodeInputBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public Builder clearNodeInput() { + if (nodeInputBuilder_ == null) { + nodeInput_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + nodeInputBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public Builder removeNodeInput(int index) { + if (nodeInputBuilder_ == null) { + ensureNodeInputIsMutable(); + nodeInput_.remove(index); + onChanged(); + } else { + nodeInputBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInput.Builder getNodeInputBuilder( + int index) { + return getNodeInputFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInputOrBuilder getNodeInputOrBuilder( + int index) { + if (nodeInputBuilder_ == null) { + return nodeInput_.get(index); } else { + return nodeInputBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public java.util.List + getNodeInputOrBuilderList() { + if (nodeInputBuilder_ != null) { + return nodeInputBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodeInput_); + } + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInput.Builder addNodeInputBuilder() { + return getNodeInputFieldBuilder().addBuilder( + org.tensorflow.proto.framework.GraphTransferNodeInput.getDefaultInstance()); + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public org.tensorflow.proto.framework.GraphTransferNodeInput.Builder addNodeInputBuilder( + int index) { + return getNodeInputFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.GraphTransferNodeInput.getDefaultInstance()); + } + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + public java.util.List + getNodeInputBuilderList() { + return getNodeInputFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferNodeInput, org.tensorflow.proto.framework.GraphTransferNodeInput.Builder, org.tensorflow.proto.framework.GraphTransferNodeInputOrBuilder> + getNodeInputFieldBuilder() { + if (nodeInputBuilder_ == null) { + nodeInputBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphTransferNodeInput, org.tensorflow.proto.framework.GraphTransferNodeInput.Builder, org.tensorflow.proto.framework.GraphTransferNodeInputOrBuilder>( + nodeInput_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + nodeInput_ = null; + } + return nodeInputBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GraphTransferNodeInputInfo) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GraphTransferNodeInputInfo) + private static final org.tensorflow.proto.framework.GraphTransferNodeInputInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GraphTransferNodeInputInfo(); + } + + public static org.tensorflow.proto.framework.GraphTransferNodeInputInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GraphTransferNodeInputInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GraphTransferNodeInputInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferNodeInputInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInputInfoOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInputInfoOrBuilder.java new file mode 100644 index 00000000000..552a182d67b --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInputInfoOrBuilder.java @@ -0,0 +1,38 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +public interface GraphTransferNodeInputInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GraphTransferNodeInputInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 node_id = 1; + */ + int getNodeId(); + + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + java.util.List + getNodeInputList(); + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + org.tensorflow.proto.framework.GraphTransferNodeInput getNodeInput(int index); + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + int getNodeInputCount(); + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + java.util.List + getNodeInputOrBuilderList(); + /** + * repeated .tensorflow.GraphTransferNodeInput node_input = 2; + */ + org.tensorflow.proto.framework.GraphTransferNodeInputOrBuilder getNodeInputOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInputOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInputOrBuilder.java new file mode 100644 index 00000000000..971ffed8443 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeInputOrBuilder.java @@ -0,0 +1,19 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +public interface GraphTransferNodeInputOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GraphTransferNodeInput) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 node_id = 1; + */ + int getNodeId(); + + /** + * int32 output_port = 2; + */ + int getOutputPort(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeOutputInfo.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeOutputInfo.java new file mode 100644 index 00000000000..c39062bebdb --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeOutputInfo.java @@ -0,0 +1,639 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.GraphTransferNodeOutputInfo} + */ +public final class GraphTransferNodeOutputInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferNodeOutputInfo) + GraphTransferNodeOutputInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GraphTransferNodeOutputInfo.newBuilder() to construct. + private GraphTransferNodeOutputInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GraphTransferNodeOutputInfo() { + maxByteSize_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GraphTransferNodeOutputInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GraphTransferNodeOutputInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + nodeId_ = input.readInt32(); + break; + } + case 16: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + maxByteSize_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + maxByteSize_.addInt(input.readInt32()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + maxByteSize_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + maxByteSize_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + maxByteSize_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeOutputInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeOutputInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.class, org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.Builder.class); + } + + public static final int NODE_ID_FIELD_NUMBER = 1; + private int nodeId_; + /** + * int32 node_id = 1; + */ + public int getNodeId() { + return nodeId_; + } + + public static final int MAX_BYTE_SIZE_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.IntList maxByteSize_; + /** + * repeated int32 max_byte_size = 2; + */ + public java.util.List + getMaxByteSizeList() { + return maxByteSize_; + } + /** + * repeated int32 max_byte_size = 2; + */ + public int getMaxByteSizeCount() { + return maxByteSize_.size(); + } + /** + * repeated int32 max_byte_size = 2; + */ + public int getMaxByteSize(int index) { + return maxByteSize_.getInt(index); + } + private int maxByteSizeMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (nodeId_ != 0) { + output.writeInt32(1, nodeId_); + } + if (getMaxByteSizeList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(maxByteSizeMemoizedSerializedSize); + } + for (int i = 0; i < maxByteSize_.size(); i++) { + output.writeInt32NoTag(maxByteSize_.getInt(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (nodeId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, nodeId_); + } + { + int dataSize = 0; + for (int i = 0; i < maxByteSize_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(maxByteSize_.getInt(i)); + } + size += dataSize; + if (!getMaxByteSizeList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + maxByteSizeMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.GraphTransferNodeOutputInfo)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.GraphTransferNodeOutputInfo other = (org.tensorflow.proto.framework.GraphTransferNodeOutputInfo) obj; + + if (getNodeId() + != other.getNodeId()) return false; + if (!getMaxByteSizeList() + .equals(other.getMaxByteSizeList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NODE_ID_FIELD_NUMBER; + hash = (53 * hash) + getNodeId(); + if (getMaxByteSizeCount() > 0) { + hash = (37 * hash) + MAX_BYTE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getMaxByteSizeList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.GraphTransferNodeOutputInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferNodeOutputInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferNodeOutputInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferNodeOutputInfo 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.proto.framework.GraphTransferNodeOutputInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.GraphTransferNodeOutputInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferNodeOutputInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferNodeOutputInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferNodeOutputInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferNodeOutputInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.GraphTransferNodeOutputInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.GraphTransferNodeOutputInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.GraphTransferNodeOutputInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.GraphTransferNodeOutputInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.GraphTransferNodeOutputInfo) + org.tensorflow.proto.framework.GraphTransferNodeOutputInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeOutputInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeOutputInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.class, org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + nodeId_ = 0; + + maxByteSize_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeOutputInfo_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferNodeOutputInfo getDefaultInstanceForType() { + return org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferNodeOutputInfo build() { + org.tensorflow.proto.framework.GraphTransferNodeOutputInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferNodeOutputInfo buildPartial() { + org.tensorflow.proto.framework.GraphTransferNodeOutputInfo result = new org.tensorflow.proto.framework.GraphTransferNodeOutputInfo(this); + int from_bitField0_ = bitField0_; + result.nodeId_ = nodeId_; + if (((bitField0_ & 0x00000001) != 0)) { + maxByteSize_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.maxByteSize_ = maxByteSize_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.GraphTransferNodeOutputInfo) { + return mergeFrom((org.tensorflow.proto.framework.GraphTransferNodeOutputInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.GraphTransferNodeOutputInfo other) { + if (other == org.tensorflow.proto.framework.GraphTransferNodeOutputInfo.getDefaultInstance()) return this; + if (other.getNodeId() != 0) { + setNodeId(other.getNodeId()); + } + if (!other.maxByteSize_.isEmpty()) { + if (maxByteSize_.isEmpty()) { + maxByteSize_ = other.maxByteSize_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMaxByteSizeIsMutable(); + maxByteSize_.addAll(other.maxByteSize_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.GraphTransferNodeOutputInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.GraphTransferNodeOutputInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int nodeId_ ; + /** + * int32 node_id = 1; + */ + public int getNodeId() { + return nodeId_; + } + /** + * int32 node_id = 1; + */ + public Builder setNodeId(int value) { + + nodeId_ = value; + onChanged(); + return this; + } + /** + * int32 node_id = 1; + */ + public Builder clearNodeId() { + + nodeId_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList maxByteSize_ = emptyIntList(); + private void ensureMaxByteSizeIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + maxByteSize_ = mutableCopy(maxByteSize_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated int32 max_byte_size = 2; + */ + public java.util.List + getMaxByteSizeList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(maxByteSize_) : maxByteSize_; + } + /** + * repeated int32 max_byte_size = 2; + */ + public int getMaxByteSizeCount() { + return maxByteSize_.size(); + } + /** + * repeated int32 max_byte_size = 2; + */ + public int getMaxByteSize(int index) { + return maxByteSize_.getInt(index); + } + /** + * repeated int32 max_byte_size = 2; + */ + public Builder setMaxByteSize( + int index, int value) { + ensureMaxByteSizeIsMutable(); + maxByteSize_.setInt(index, value); + onChanged(); + return this; + } + /** + * repeated int32 max_byte_size = 2; + */ + public Builder addMaxByteSize(int value) { + ensureMaxByteSizeIsMutable(); + maxByteSize_.addInt(value); + onChanged(); + return this; + } + /** + * repeated int32 max_byte_size = 2; + */ + public Builder addAllMaxByteSize( + java.lang.Iterable values) { + ensureMaxByteSizeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, maxByteSize_); + onChanged(); + return this; + } + /** + * repeated int32 max_byte_size = 2; + */ + public Builder clearMaxByteSize() { + maxByteSize_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.GraphTransferNodeOutputInfo) + } + + // @@protoc_insertion_point(class_scope:tensorflow.GraphTransferNodeOutputInfo) + private static final org.tensorflow.proto.framework.GraphTransferNodeOutputInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.GraphTransferNodeOutputInfo(); + } + + public static org.tensorflow.proto.framework.GraphTransferNodeOutputInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GraphTransferNodeOutputInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GraphTransferNodeOutputInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.GraphTransferNodeOutputInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeOutputInfoOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeOutputInfoOrBuilder.java new file mode 100644 index 00000000000..7721bc2dc6a --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/GraphTransferNodeOutputInfoOrBuilder.java @@ -0,0 +1,27 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/graph_transfer_info.proto + +package org.tensorflow.proto.framework; + +public interface GraphTransferNodeOutputInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.GraphTransferNodeOutputInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 node_id = 1; + */ + int getNodeId(); + + /** + * repeated int32 max_byte_size = 2; + */ + java.util.List getMaxByteSizeList(); + /** + * repeated int32 max_byte_size = 2; + */ + int getMaxByteSizeCount(); + /** + * repeated int32 max_byte_size = 2; + */ + int getMaxByteSize(int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/HistogramProto.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/HistogramProto.java new file mode 100644 index 00000000000..e5e19354670 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/HistogramProto.java @@ -0,0 +1,1120 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/summary.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Serialization format for histogram module in
+ * core/lib/histogram/histogram.h
+ * 
+ * + * Protobuf type {@code tensorflow.HistogramProto} + */ +public final class HistogramProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.HistogramProto) + HistogramProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use HistogramProto.newBuilder() to construct. + private HistogramProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HistogramProto() { + bucketLimit_ = emptyDoubleList(); + bucket_ = emptyDoubleList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HistogramProto(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HistogramProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + 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_ & 0x00000001) != 0)) { + bucketLimit_ = newDoubleList(); + mutable_bitField0_ |= 0x00000001; + } + bucketLimit_.addDouble(input.readDouble()); + break; + } + case 50: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + bucketLimit_ = newDoubleList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + bucketLimit_.addDouble(input.readDouble()); + } + input.popLimit(limit); + break; + } + case 57: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + bucket_ = newDoubleList(); + mutable_bitField0_ |= 0x00000002; + } + bucket_.addDouble(input.readDouble()); + break; + } + case 58: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { + bucket_ = newDoubleList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + bucket_.addDouble(input.readDouble()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + bucketLimit_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + bucket_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_HistogramProto_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_HistogramProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.HistogramProto.class, org.tensorflow.proto.framework.HistogramProto.Builder.class); + } + + public static final int MIN_FIELD_NUMBER = 1; + private double min_; + /** + * double min = 1; + */ + public double getMin() { + return min_; + } + + public static final int MAX_FIELD_NUMBER = 2; + private double max_; + /** + * double max = 2; + */ + public double getMax() { + return max_; + } + + public static final int NUM_FIELD_NUMBER = 3; + private double num_; + /** + * double num = 3; + */ + public double getNum() { + return num_; + } + + public static final int SUM_FIELD_NUMBER = 4; + private double sum_; + /** + * double sum = 4; + */ + public double getSum() { + return sum_; + } + + public static final int SUM_SQUARES_FIELD_NUMBER = 5; + private double sumSquares_; + /** + * double sum_squares = 5; + */ + public double getSumSquares() { + return sumSquares_; + } + + public static final int BUCKET_LIMIT_FIELD_NUMBER = 6; + private com.google.protobuf.Internal.DoubleList bucketLimit_; + /** + *
+   * 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)
+   * 
+ * + * repeated double bucket_limit = 6 [packed = true]; + */ + public java.util.List + getBucketLimitList() { + return bucketLimit_; + } + /** + *
+   * 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)
+   * 
+ * + * repeated double bucket_limit = 6 [packed = true]; + */ + public int getBucketLimitCount() { + return bucketLimit_.size(); + } + /** + *
+   * 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)
+   * 
+ * + * repeated double bucket_limit = 6 [packed = true]; + */ + public double getBucketLimit(int index) { + return bucketLimit_.getDouble(index); + } + private int bucketLimitMemoizedSerializedSize = -1; + + public static final int BUCKET_FIELD_NUMBER = 7; + private com.google.protobuf.Internal.DoubleList bucket_; + /** + * repeated double bucket = 7 [packed = true]; + */ + public java.util.List + getBucketList() { + return bucket_; + } + /** + * repeated double bucket = 7 [packed = true]; + */ + public int getBucketCount() { + return bucket_.size(); + } + /** + * repeated double bucket = 7 [packed = true]; + */ + public double getBucket(int index) { + return bucket_.getDouble(index); + } + private int bucketMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(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.writeUInt32NoTag(50); + output.writeUInt32NoTag(bucketLimitMemoizedSerializedSize); + } + for (int i = 0; i < bucketLimit_.size(); i++) { + output.writeDoubleNoTag(bucketLimit_.getDouble(i)); + } + if (getBucketList().size() > 0) { + output.writeUInt32NoTag(58); + output.writeUInt32NoTag(bucketMemoizedSerializedSize); + } + for (int i = 0; i < bucket_.size(); i++) { + output.writeDoubleNoTag(bucket_.getDouble(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + 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; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.HistogramProto)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.HistogramProto other = (org.tensorflow.proto.framework.HistogramProto) obj; + + if (java.lang.Double.doubleToLongBits(getMin()) + != java.lang.Double.doubleToLongBits( + other.getMin())) return false; + if (java.lang.Double.doubleToLongBits(getMax()) + != java.lang.Double.doubleToLongBits( + other.getMax())) return false; + if (java.lang.Double.doubleToLongBits(getNum()) + != java.lang.Double.doubleToLongBits( + other.getNum())) return false; + if (java.lang.Double.doubleToLongBits(getSum()) + != java.lang.Double.doubleToLongBits( + other.getSum())) return false; + if (java.lang.Double.doubleToLongBits(getSumSquares()) + != java.lang.Double.doubleToLongBits( + other.getSumSquares())) return false; + if (!getBucketLimitList() + .equals(other.getBucketLimitList())) return false; + if (!getBucketList() + .equals(other.getBucketList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MIN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMin())); + hash = (37 * hash) + MAX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMax())); + hash = (37 * hash) + NUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getNum())); + hash = (37 * hash) + SUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getSum())); + hash = (37 * hash) + SUM_SQUARES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getSumSquares())); + if (getBucketLimitCount() > 0) { + hash = (37 * hash) + BUCKET_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getBucketLimitList().hashCode(); + } + if (getBucketCount() > 0) { + hash = (37 * hash) + BUCKET_FIELD_NUMBER; + hash = (53 * hash) + getBucketList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.HistogramProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.HistogramProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.HistogramProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.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.proto.framework.HistogramProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.HistogramProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.HistogramProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.HistogramProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.HistogramProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.HistogramProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.HistogramProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.HistogramProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.HistogramProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Serialization format for histogram module in
+   * core/lib/histogram/histogram.h
+   * 
+ * + * Protobuf type {@code tensorflow.HistogramProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.HistogramProto) + org.tensorflow.proto.framework.HistogramProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_HistogramProto_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_HistogramProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.HistogramProto.class, org.tensorflow.proto.framework.HistogramProto.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.HistogramProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + min_ = 0D; + + max_ = 0D; + + num_ = 0D; + + sum_ = 0D; + + sumSquares_ = 0D; + + bucketLimit_ = emptyDoubleList(); + bitField0_ = (bitField0_ & ~0x00000001); + bucket_ = emptyDoubleList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_HistogramProto_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.HistogramProto getDefaultInstanceForType() { + return org.tensorflow.proto.framework.HistogramProto.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.HistogramProto build() { + org.tensorflow.proto.framework.HistogramProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.HistogramProto buildPartial() { + org.tensorflow.proto.framework.HistogramProto result = new org.tensorflow.proto.framework.HistogramProto(this); + int from_bitField0_ = bitField0_; + result.min_ = min_; + result.max_ = max_; + result.num_ = num_; + result.sum_ = sum_; + result.sumSquares_ = sumSquares_; + if (((bitField0_ & 0x00000001) != 0)) { + bucketLimit_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bucketLimit_ = bucketLimit_; + if (((bitField0_ & 0x00000002) != 0)) { + bucket_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.bucket_ = bucket_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.HistogramProto) { + return mergeFrom((org.tensorflow.proto.framework.HistogramProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.HistogramProto other) { + if (other == org.tensorflow.proto.framework.HistogramProto.getDefaultInstance()) return this; + if (other.getMin() != 0D) { + setMin(other.getMin()); + } + if (other.getMax() != 0D) { + setMax(other.getMax()); + } + if (other.getNum() != 0D) { + setNum(other.getNum()); + } + if (other.getSum() != 0D) { + setSum(other.getSum()); + } + if (other.getSumSquares() != 0D) { + setSumSquares(other.getSumSquares()); + } + if (!other.bucketLimit_.isEmpty()) { + if (bucketLimit_.isEmpty()) { + bucketLimit_ = other.bucketLimit_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBucketLimitIsMutable(); + bucketLimit_.addAll(other.bucketLimit_); + } + onChanged(); + } + if (!other.bucket_.isEmpty()) { + if (bucket_.isEmpty()) { + bucket_ = other.bucket_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureBucketIsMutable(); + bucket_.addAll(other.bucket_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.HistogramProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.HistogramProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private double min_ ; + /** + * double min = 1; + */ + public double getMin() { + return min_; + } + /** + * double min = 1; + */ + public Builder setMin(double value) { + + min_ = value; + onChanged(); + return this; + } + /** + * double min = 1; + */ + public Builder clearMin() { + + min_ = 0D; + onChanged(); + return this; + } + + private double max_ ; + /** + * double max = 2; + */ + public double getMax() { + return max_; + } + /** + * double max = 2; + */ + public Builder setMax(double value) { + + max_ = value; + onChanged(); + return this; + } + /** + * double max = 2; + */ + public Builder clearMax() { + + max_ = 0D; + onChanged(); + return this; + } + + private double num_ ; + /** + * double num = 3; + */ + public double getNum() { + return num_; + } + /** + * double num = 3; + */ + public Builder setNum(double value) { + + num_ = value; + onChanged(); + return this; + } + /** + * double num = 3; + */ + public Builder clearNum() { + + num_ = 0D; + onChanged(); + return this; + } + + private double sum_ ; + /** + * double sum = 4; + */ + public double getSum() { + return sum_; + } + /** + * double sum = 4; + */ + public Builder setSum(double value) { + + sum_ = value; + onChanged(); + return this; + } + /** + * double sum = 4; + */ + public Builder clearSum() { + + sum_ = 0D; + onChanged(); + return this; + } + + private double sumSquares_ ; + /** + * double sum_squares = 5; + */ + public double getSumSquares() { + return sumSquares_; + } + /** + * double sum_squares = 5; + */ + public Builder setSumSquares(double value) { + + sumSquares_ = value; + onChanged(); + return this; + } + /** + * double sum_squares = 5; + */ + public Builder clearSumSquares() { + + sumSquares_ = 0D; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.DoubleList bucketLimit_ = emptyDoubleList(); + private void ensureBucketLimitIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bucketLimit_ = mutableCopy(bucketLimit_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * 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)
+     * 
+ * + * repeated double bucket_limit = 6 [packed = true]; + */ + public java.util.List + getBucketLimitList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(bucketLimit_) : bucketLimit_; + } + /** + *
+     * 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)
+     * 
+ * + * repeated double bucket_limit = 6 [packed = true]; + */ + public int getBucketLimitCount() { + return bucketLimit_.size(); + } + /** + *
+     * 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)
+     * 
+ * + * repeated double bucket_limit = 6 [packed = true]; + */ + public double getBucketLimit(int index) { + return bucketLimit_.getDouble(index); + } + /** + *
+     * 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)
+     * 
+ * + * repeated double bucket_limit = 6 [packed = true]; + */ + public Builder setBucketLimit( + int index, double value) { + ensureBucketLimitIsMutable(); + bucketLimit_.setDouble(index, value); + onChanged(); + return this; + } + /** + *
+     * 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)
+     * 
+ * + * repeated double bucket_limit = 6 [packed = true]; + */ + public Builder addBucketLimit(double value) { + ensureBucketLimitIsMutable(); + bucketLimit_.addDouble(value); + onChanged(); + return this; + } + /** + *
+     * 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)
+     * 
+ * + * repeated double bucket_limit = 6 [packed = true]; + */ + public Builder addAllBucketLimit( + java.lang.Iterable values) { + ensureBucketLimitIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bucketLimit_); + onChanged(); + return this; + } + /** + *
+     * 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)
+     * 
+ * + * repeated double bucket_limit = 6 [packed = true]; + */ + public Builder clearBucketLimit() { + bucketLimit_ = emptyDoubleList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.DoubleList bucket_ = emptyDoubleList(); + private void ensureBucketIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + bucket_ = mutableCopy(bucket_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated double bucket = 7 [packed = true]; + */ + public java.util.List + getBucketList() { + return ((bitField0_ & 0x00000002) != 0) ? + java.util.Collections.unmodifiableList(bucket_) : bucket_; + } + /** + * repeated double bucket = 7 [packed = true]; + */ + public int getBucketCount() { + return bucket_.size(); + } + /** + * repeated double bucket = 7 [packed = true]; + */ + public double getBucket(int index) { + return bucket_.getDouble(index); + } + /** + * repeated double bucket = 7 [packed = true]; + */ + public Builder setBucket( + int index, double value) { + ensureBucketIsMutable(); + bucket_.setDouble(index, value); + onChanged(); + return this; + } + /** + * repeated double bucket = 7 [packed = true]; + */ + public Builder addBucket(double value) { + ensureBucketIsMutable(); + bucket_.addDouble(value); + onChanged(); + return this; + } + /** + * repeated double bucket = 7 [packed = true]; + */ + public Builder addAllBucket( + java.lang.Iterable values) { + ensureBucketIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bucket_); + onChanged(); + return this; + } + /** + * repeated double bucket = 7 [packed = true]; + */ + public Builder clearBucket() { + bucket_ = emptyDoubleList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.HistogramProto) + } + + // @@protoc_insertion_point(class_scope:tensorflow.HistogramProto) + private static final org.tensorflow.proto.framework.HistogramProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.HistogramProto(); + } + + public static org.tensorflow.proto.framework.HistogramProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HistogramProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HistogramProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.HistogramProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/HistogramProtoOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/HistogramProtoOrBuilder.java new file mode 100644 index 00000000000..d76afe24d19 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/HistogramProtoOrBuilder.java @@ -0,0 +1,84 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/summary.proto + +package org.tensorflow.proto.framework; + +public interface HistogramProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.HistogramProto) + com.google.protobuf.MessageOrBuilder { + + /** + * double min = 1; + */ + double getMin(); + + /** + * double max = 2; + */ + double getMax(); + + /** + * double num = 3; + */ + double getNum(); + + /** + * double sum = 4; + */ + double getSum(); + + /** + * double sum_squares = 5; + */ + double getSumSquares(); + + /** + *
+   * 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)
+   * 
+ * + * repeated double bucket_limit = 6 [packed = true]; + */ + java.util.List getBucketLimitList(); + /** + *
+   * 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)
+   * 
+ * + * repeated double bucket_limit = 6 [packed = true]; + */ + int getBucketLimitCount(); + /** + *
+   * 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)
+   * 
+ * + * repeated double bucket_limit = 6 [packed = true]; + */ + double getBucketLimit(int index); + + /** + * repeated double bucket = 7 [packed = true]; + */ + java.util.List getBucketList(); + /** + * repeated double bucket = 7 [packed = true]; + */ + int getBucketCount(); + /** + * repeated double bucket = 7 [packed = true]; + */ + double getBucket(int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/InterconnectLink.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/InterconnectLink.java new file mode 100644 index 00000000000..89fbd7a8dec --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/InterconnectLink.java @@ -0,0 +1,660 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/device_attributes.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.InterconnectLink} + */ +public final class InterconnectLink extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.InterconnectLink) + InterconnectLinkOrBuilder { +private static final long serialVersionUID = 0L; + // Use InterconnectLink.newBuilder() to construct. + private InterconnectLink(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InterconnectLink() { + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InterconnectLink(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InterconnectLink( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + deviceId_ = input.readInt32(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 24: { + + strength_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_InterconnectLink_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_InterconnectLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.InterconnectLink.class, org.tensorflow.proto.framework.InterconnectLink.Builder.class); + } + + public static final int DEVICE_ID_FIELD_NUMBER = 1; + private int deviceId_; + /** + * int32 device_id = 1; + */ + public int getDeviceId() { + return deviceId_; + } + + public static final int TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object type_; + /** + * string type = 2; + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * string type = 2; + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STRENGTH_FIELD_NUMBER = 3; + private int strength_; + /** + * int32 strength = 3; + */ + public int getStrength() { + return strength_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (deviceId_ != 0) { + output.writeInt32(1, deviceId_); + } + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + if (strength_ != 0) { + output.writeInt32(3, strength_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (deviceId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, deviceId_); + } + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + } + if (strength_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, strength_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.InterconnectLink)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.InterconnectLink other = (org.tensorflow.proto.framework.InterconnectLink) obj; + + if (getDeviceId() + != other.getDeviceId()) return false; + if (!getType() + .equals(other.getType())) return false; + if (getStrength() + != other.getStrength()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + STRENGTH_FIELD_NUMBER; + hash = (53 * hash) + getStrength(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.InterconnectLink parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.InterconnectLink parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.InterconnectLink parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.InterconnectLink 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.proto.framework.InterconnectLink parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.InterconnectLink parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.InterconnectLink parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.InterconnectLink parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.InterconnectLink parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.InterconnectLink parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.InterconnectLink parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.InterconnectLink parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.InterconnectLink prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.InterconnectLink} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.InterconnectLink) + org.tensorflow.proto.framework.InterconnectLinkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_InterconnectLink_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_InterconnectLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.InterconnectLink.class, org.tensorflow.proto.framework.InterconnectLink.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.InterconnectLink.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + deviceId_ = 0; + + type_ = ""; + + strength_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_InterconnectLink_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.InterconnectLink getDefaultInstanceForType() { + return org.tensorflow.proto.framework.InterconnectLink.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.InterconnectLink build() { + org.tensorflow.proto.framework.InterconnectLink result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.InterconnectLink buildPartial() { + org.tensorflow.proto.framework.InterconnectLink result = new org.tensorflow.proto.framework.InterconnectLink(this); + result.deviceId_ = deviceId_; + result.type_ = type_; + result.strength_ = strength_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.InterconnectLink) { + return mergeFrom((org.tensorflow.proto.framework.InterconnectLink)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.InterconnectLink other) { + if (other == org.tensorflow.proto.framework.InterconnectLink.getDefaultInstance()) return this; + if (other.getDeviceId() != 0) { + setDeviceId(other.getDeviceId()); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (other.getStrength() != 0) { + setStrength(other.getStrength()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.InterconnectLink parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.InterconnectLink) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int deviceId_ ; + /** + * int32 device_id = 1; + */ + public int getDeviceId() { + return deviceId_; + } + /** + * int32 device_id = 1; + */ + public Builder setDeviceId(int value) { + + deviceId_ = value; + onChanged(); + return this; + } + /** + * int32 device_id = 1; + */ + public Builder clearDeviceId() { + + deviceId_ = 0; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * string type = 2; + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string type = 2; + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string type = 2; + */ + public Builder setType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * string type = 2; + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * string type = 2; + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private int strength_ ; + /** + * int32 strength = 3; + */ + public int getStrength() { + return strength_; + } + /** + * int32 strength = 3; + */ + public Builder setStrength(int value) { + + strength_ = value; + onChanged(); + return this; + } + /** + * int32 strength = 3; + */ + public Builder clearStrength() { + + strength_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.InterconnectLink) + } + + // @@protoc_insertion_point(class_scope:tensorflow.InterconnectLink) + private static final org.tensorflow.proto.framework.InterconnectLink DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.InterconnectLink(); + } + + public static org.tensorflow.proto.framework.InterconnectLink getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InterconnectLink parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InterconnectLink(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.InterconnectLink getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/InterconnectLinkOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/InterconnectLinkOrBuilder.java new file mode 100644 index 00000000000..61316cfa8cc --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/InterconnectLinkOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/device_attributes.proto + +package org.tensorflow.proto.framework; + +public interface InterconnectLinkOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.InterconnectLink) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 device_id = 1; + */ + int getDeviceId(); + + /** + * string type = 2; + */ + java.lang.String getType(); + /** + * string type = 2; + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + * int32 strength = 3; + */ + int getStrength(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/KernelDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/KernelDef.java new file mode 100644 index 00000000000..76637537c9e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/KernelDef.java @@ -0,0 +1,2420 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/kernel_def.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.KernelDef} + */ +public final class KernelDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.KernelDef) + KernelDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use KernelDef.newBuilder() to construct. + private KernelDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KernelDef() { + op_ = ""; + deviceType_ = ""; + constraint_ = java.util.Collections.emptyList(); + hostMemoryArg_ = com.google.protobuf.LazyStringArrayList.EMPTY; + label_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KernelDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KernelDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + op_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + deviceType_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + constraint_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + constraint_.add( + input.readMessage(org.tensorflow.proto.framework.KernelDef.AttrConstraint.parser(), extensionRegistry)); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + hostMemoryArg_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + hostMemoryArg_.add(s); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + label_ = s; + break; + } + case 48: { + + priority_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + constraint_ = java.util.Collections.unmodifiableList(constraint_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + hostMemoryArg_ = hostMemoryArg_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.KernelDef.class, org.tensorflow.proto.framework.KernelDef.Builder.class); + } + + public interface AttrConstraintOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.KernelDef.AttrConstraint) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Name of an attr from the Op.
+     * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+     * Name of an attr from the Op.
+     * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * A list of values that this kernel supports for this attr.
+     * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
+     * 
+ * + * .tensorflow.AttrValue allowed_values = 2; + */ + boolean hasAllowedValues(); + /** + *
+     * A list of values that this kernel supports for this attr.
+     * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
+     * 
+ * + * .tensorflow.AttrValue allowed_values = 2; + */ + org.tensorflow.proto.framework.AttrValue getAllowedValues(); + /** + *
+     * A list of values that this kernel supports for this attr.
+     * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
+     * 
+ * + * .tensorflow.AttrValue allowed_values = 2; + */ + org.tensorflow.proto.framework.AttrValueOrBuilder getAllowedValuesOrBuilder(); + } + /** + * Protobuf type {@code tensorflow.KernelDef.AttrConstraint} + */ + public static final class AttrConstraint extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.KernelDef.AttrConstraint) + AttrConstraintOrBuilder { + private static final long serialVersionUID = 0L; + // Use AttrConstraint.newBuilder() to construct. + private AttrConstraint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttrConstraint() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttrConstraint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AttrConstraint( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + org.tensorflow.proto.framework.AttrValue.Builder subBuilder = null; + if (allowedValues_ != null) { + subBuilder = allowedValues_.toBuilder(); + } + allowedValues_ = input.readMessage(org.tensorflow.proto.framework.AttrValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(allowedValues_); + allowedValues_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_AttrConstraint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_AttrConstraint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.KernelDef.AttrConstraint.class, org.tensorflow.proto.framework.KernelDef.AttrConstraint.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * Name of an attr from the Op.
+     * 
+ * + * 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; + } + } + /** + *
+     * Name of an attr from the Op.
+     * 
+ * + * 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 ALLOWED_VALUES_FIELD_NUMBER = 2; + private org.tensorflow.proto.framework.AttrValue allowedValues_; + /** + *
+     * A list of values that this kernel supports for this attr.
+     * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
+     * 
+ * + * .tensorflow.AttrValue allowed_values = 2; + */ + public boolean hasAllowedValues() { + return allowedValues_ != null; + } + /** + *
+     * A list of values that this kernel supports for this attr.
+     * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
+     * 
+ * + * .tensorflow.AttrValue allowed_values = 2; + */ + public org.tensorflow.proto.framework.AttrValue getAllowedValues() { + return allowedValues_ == null ? org.tensorflow.proto.framework.AttrValue.getDefaultInstance() : allowedValues_; + } + /** + *
+     * A list of values that this kernel supports for this attr.
+     * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
+     * 
+ * + * .tensorflow.AttrValue allowed_values = 2; + */ + public org.tensorflow.proto.framework.AttrValueOrBuilder getAllowedValuesOrBuilder() { + return getAllowedValues(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (allowedValues_ != null) { + output.writeMessage(2, getAllowedValues()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (allowedValues_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getAllowedValues()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.KernelDef.AttrConstraint)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.KernelDef.AttrConstraint other = (org.tensorflow.proto.framework.KernelDef.AttrConstraint) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasAllowedValues() != other.hasAllowedValues()) return false; + if (hasAllowedValues()) { + if (!getAllowedValues() + .equals(other.getAllowedValues())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasAllowedValues()) { + hash = (37 * hash) + ALLOWED_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedValues().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.KernelDef.AttrConstraint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.KernelDef.AttrConstraint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.KernelDef.AttrConstraint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.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.proto.framework.KernelDef.AttrConstraint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.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.proto.framework.KernelDef.AttrConstraint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.KernelDef.AttrConstraint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.KernelDef.AttrConstraint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.KernelDef.AttrConstraint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.KernelDef.AttrConstraint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.KernelDef.AttrConstraint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.KernelDef.AttrConstraint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.KernelDef.AttrConstraint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.KernelDef.AttrConstraint) + org.tensorflow.proto.framework.KernelDef.AttrConstraintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_AttrConstraint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_AttrConstraint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.KernelDef.AttrConstraint.class, org.tensorflow.proto.framework.KernelDef.AttrConstraint.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.KernelDef.AttrConstraint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (allowedValuesBuilder_ == null) { + allowedValues_ = null; + } else { + allowedValues_ = null; + allowedValuesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_AttrConstraint_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.KernelDef.AttrConstraint getDefaultInstanceForType() { + return org.tensorflow.proto.framework.KernelDef.AttrConstraint.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.KernelDef.AttrConstraint build() { + org.tensorflow.proto.framework.KernelDef.AttrConstraint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.KernelDef.AttrConstraint buildPartial() { + org.tensorflow.proto.framework.KernelDef.AttrConstraint result = new org.tensorflow.proto.framework.KernelDef.AttrConstraint(this); + result.name_ = name_; + if (allowedValuesBuilder_ == null) { + result.allowedValues_ = allowedValues_; + } else { + result.allowedValues_ = allowedValuesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.KernelDef.AttrConstraint) { + return mergeFrom((org.tensorflow.proto.framework.KernelDef.AttrConstraint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.KernelDef.AttrConstraint other) { + if (other == org.tensorflow.proto.framework.KernelDef.AttrConstraint.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasAllowedValues()) { + mergeAllowedValues(other.getAllowedValues()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.KernelDef.AttrConstraint parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.KernelDef.AttrConstraint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Name of an attr from the Op.
+       * 
+ * + * 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; + } + } + /** + *
+       * Name of an attr from the Op.
+       * 
+ * + * 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; + } + } + /** + *
+       * Name of an attr from the Op.
+       * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * Name of an attr from the Op.
+       * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Name of an attr from the Op.
+       * 
+ * + * 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 org.tensorflow.proto.framework.AttrValue allowedValues_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AttrValue, org.tensorflow.proto.framework.AttrValue.Builder, org.tensorflow.proto.framework.AttrValueOrBuilder> allowedValuesBuilder_; + /** + *
+       * A list of values that this kernel supports for this attr.
+       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 2; + */ + public boolean hasAllowedValues() { + return allowedValuesBuilder_ != null || allowedValues_ != null; + } + /** + *
+       * A list of values that this kernel supports for this attr.
+       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 2; + */ + public org.tensorflow.proto.framework.AttrValue getAllowedValues() { + if (allowedValuesBuilder_ == null) { + return allowedValues_ == null ? org.tensorflow.proto.framework.AttrValue.getDefaultInstance() : allowedValues_; + } else { + return allowedValuesBuilder_.getMessage(); + } + } + /** + *
+       * A list of values that this kernel supports for this attr.
+       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 2; + */ + public Builder setAllowedValues(org.tensorflow.proto.framework.AttrValue value) { + if (allowedValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + allowedValues_ = value; + onChanged(); + } else { + allowedValuesBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * A list of values that this kernel supports for this attr.
+       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 2; + */ + public Builder setAllowedValues( + org.tensorflow.proto.framework.AttrValue.Builder builderForValue) { + if (allowedValuesBuilder_ == null) { + allowedValues_ = builderForValue.build(); + onChanged(); + } else { + allowedValuesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * A list of values that this kernel supports for this attr.
+       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 2; + */ + public Builder mergeAllowedValues(org.tensorflow.proto.framework.AttrValue value) { + if (allowedValuesBuilder_ == null) { + if (allowedValues_ != null) { + allowedValues_ = + org.tensorflow.proto.framework.AttrValue.newBuilder(allowedValues_).mergeFrom(value).buildPartial(); + } else { + allowedValues_ = value; + } + onChanged(); + } else { + allowedValuesBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * A list of values that this kernel supports for this attr.
+       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 2; + */ + public Builder clearAllowedValues() { + if (allowedValuesBuilder_ == null) { + allowedValues_ = null; + onChanged(); + } else { + allowedValues_ = null; + allowedValuesBuilder_ = null; + } + + return this; + } + /** + *
+       * A list of values that this kernel supports for this attr.
+       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 2; + */ + public org.tensorflow.proto.framework.AttrValue.Builder getAllowedValuesBuilder() { + + onChanged(); + return getAllowedValuesFieldBuilder().getBuilder(); + } + /** + *
+       * A list of values that this kernel supports for this attr.
+       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 2; + */ + public org.tensorflow.proto.framework.AttrValueOrBuilder getAllowedValuesOrBuilder() { + if (allowedValuesBuilder_ != null) { + return allowedValuesBuilder_.getMessageOrBuilder(); + } else { + return allowedValues_ == null ? + org.tensorflow.proto.framework.AttrValue.getDefaultInstance() : allowedValues_; + } + } + /** + *
+       * A list of values that this kernel supports for this attr.
+       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AttrValue, org.tensorflow.proto.framework.AttrValue.Builder, org.tensorflow.proto.framework.AttrValueOrBuilder> + getAllowedValuesFieldBuilder() { + if (allowedValuesBuilder_ == null) { + allowedValuesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AttrValue, org.tensorflow.proto.framework.AttrValue.Builder, org.tensorflow.proto.framework.AttrValueOrBuilder>( + getAllowedValues(), + getParentForChildren(), + isClean()); + allowedValues_ = null; + } + return allowedValuesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.KernelDef.AttrConstraint) + } + + // @@protoc_insertion_point(class_scope:tensorflow.KernelDef.AttrConstraint) + private static final org.tensorflow.proto.framework.KernelDef.AttrConstraint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.KernelDef.AttrConstraint(); + } + + public static org.tensorflow.proto.framework.KernelDef.AttrConstraint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttrConstraint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AttrConstraint(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.KernelDef.AttrConstraint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int OP_FIELD_NUMBER = 1; + private volatile java.lang.Object op_; + /** + *
+   * Must match the name of an Op.
+   * 
+ * + * string op = 1; + */ + 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; + } + } + /** + *
+   * Must match the name of an Op.
+   * 
+ * + * string op = 1; + */ + 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_; + /** + *
+   * Type of device this kernel runs on.
+   * 
+ * + * string device_type = 2; + */ + 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; + } + } + /** + *
+   * Type of device this kernel runs on.
+   * 
+ * + * string device_type = 2; + */ + public com.google.protobuf.ByteString + getDeviceTypeBytes() { + java.lang.Object ref = deviceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONSTRAINT_FIELD_NUMBER = 3; + private java.util.List constraint_; + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + public java.util.List getConstraintList() { + return constraint_; + } + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + public java.util.List + getConstraintOrBuilderList() { + return constraint_; + } + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + public int getConstraintCount() { + return constraint_.size(); + } + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + public org.tensorflow.proto.framework.KernelDef.AttrConstraint getConstraint(int index) { + return constraint_.get(index); + } + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + public org.tensorflow.proto.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_; + /** + *
+   * Names of the Op's input_/output_args that reside in host memory
+   * instead of device memory.
+   * 
+ * + * repeated string host_memory_arg = 4; + */ + public com.google.protobuf.ProtocolStringList + getHostMemoryArgList() { + return hostMemoryArg_; + } + /** + *
+   * Names of the Op's input_/output_args that reside in host memory
+   * instead of device memory.
+   * 
+ * + * repeated string host_memory_arg = 4; + */ + public int getHostMemoryArgCount() { + return hostMemoryArg_.size(); + } + /** + *
+   * Names of the Op's input_/output_args that reside in host memory
+   * instead of device memory.
+   * 
+ * + * repeated string host_memory_arg = 4; + */ + public java.lang.String getHostMemoryArg(int index) { + return hostMemoryArg_.get(index); + } + /** + *
+   * Names of the Op's input_/output_args that reside in host memory
+   * instead of device memory.
+   * 
+ * + * repeated string host_memory_arg = 4; + */ + 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_; + /** + *
+   * 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.
+   * 
+ * + * string label = 5; + */ + 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; + } + } + /** + *
+   * 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.
+   * 
+ * + * string label = 5; + */ + 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; + } + } + + public static final int PRIORITY_FIELD_NUMBER = 6; + private int priority_; + /** + *
+   * Prioritization of kernel amongst different devices. By default we assume
+   * priority is 0. The higher the priority the better. By default (i.e. if
+   * this is not set), we prefer GPU kernels over CPU.
+   * 
+ * + * int32 priority = 6; + */ + public int getPriority() { + return priority_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getOpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, op_); + } + if (!getDeviceTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.writeString(output, 4, hostMemoryArg_.getRaw(i)); + } + if (!getLabelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, label_); + } + if (priority_ != 0) { + output.writeInt32(6, priority_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getOpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, op_); + } + if (!getDeviceTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.computeStringSize(5, label_); + } + if (priority_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, priority_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.KernelDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.KernelDef other = (org.tensorflow.proto.framework.KernelDef) obj; + + if (!getOp() + .equals(other.getOp())) return false; + if (!getDeviceType() + .equals(other.getDeviceType())) return false; + if (!getConstraintList() + .equals(other.getConstraintList())) return false; + if (!getHostMemoryArgList() + .equals(other.getHostMemoryArgList())) return false; + if (!getLabel() + .equals(other.getLabel())) return false; + if (getPriority() + != other.getPriority()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OP_FIELD_NUMBER; + hash = (53 * hash) + getOp().hashCode(); + hash = (37 * hash) + DEVICE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getDeviceType().hashCode(); + if (getConstraintCount() > 0) { + hash = (37 * hash) + CONSTRAINT_FIELD_NUMBER; + hash = (53 * hash) + getConstraintList().hashCode(); + } + if (getHostMemoryArgCount() > 0) { + hash = (37 * hash) + HOST_MEMORY_ARG_FIELD_NUMBER; + hash = (53 * hash) + getHostMemoryArgList().hashCode(); + } + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.KernelDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.KernelDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.KernelDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.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.proto.framework.KernelDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.KernelDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.KernelDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.KernelDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.KernelDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.KernelDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.KernelDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.KernelDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.KernelDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.KernelDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.KernelDef) + org.tensorflow.proto.framework.KernelDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.KernelDef.class, org.tensorflow.proto.framework.KernelDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.KernelDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getConstraintFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + op_ = ""; + + deviceType_ = ""; + + if (constraintBuilder_ == null) { + constraint_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + constraintBuilder_.clear(); + } + hostMemoryArg_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + label_ = ""; + + priority_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.KernelDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.KernelDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.KernelDef build() { + org.tensorflow.proto.framework.KernelDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.KernelDef buildPartial() { + org.tensorflow.proto.framework.KernelDef result = new org.tensorflow.proto.framework.KernelDef(this); + int from_bitField0_ = bitField0_; + result.op_ = op_; + result.deviceType_ = deviceType_; + if (constraintBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + constraint_ = java.util.Collections.unmodifiableList(constraint_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.constraint_ = constraint_; + } else { + result.constraint_ = constraintBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + hostMemoryArg_ = hostMemoryArg_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.hostMemoryArg_ = hostMemoryArg_; + result.label_ = label_; + result.priority_ = priority_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.KernelDef) { + return mergeFrom((org.tensorflow.proto.framework.KernelDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.KernelDef other) { + if (other == org.tensorflow.proto.framework.KernelDef.getDefaultInstance()) return this; + if (!other.getOp().isEmpty()) { + op_ = other.op_; + onChanged(); + } + if (!other.getDeviceType().isEmpty()) { + deviceType_ = other.deviceType_; + onChanged(); + } + if (constraintBuilder_ == null) { + if (!other.constraint_.isEmpty()) { + if (constraint_.isEmpty()) { + constraint_ = other.constraint_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConstraintIsMutable(); + constraint_.addAll(other.constraint_); + } + onChanged(); + } + } else { + if (!other.constraint_.isEmpty()) { + if (constraintBuilder_.isEmpty()) { + constraintBuilder_.dispose(); + constraintBuilder_ = null; + constraint_ = other.constraint_; + bitField0_ = (bitField0_ & ~0x00000001); + constraintBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getConstraintFieldBuilder() : null; + } else { + constraintBuilder_.addAllMessages(other.constraint_); + } + } + } + if (!other.hostMemoryArg_.isEmpty()) { + if (hostMemoryArg_.isEmpty()) { + hostMemoryArg_ = other.hostMemoryArg_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureHostMemoryArgIsMutable(); + hostMemoryArg_.addAll(other.hostMemoryArg_); + } + onChanged(); + } + if (!other.getLabel().isEmpty()) { + label_ = other.label_; + onChanged(); + } + if (other.getPriority() != 0) { + setPriority(other.getPriority()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.KernelDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.KernelDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object op_ = ""; + /** + *
+     * Must match the name of an Op.
+     * 
+ * + * string op = 1; + */ + 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; + } + } + /** + *
+     * Must match the name of an Op.
+     * 
+ * + * string op = 1; + */ + 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; + } + } + /** + *
+     * Must match the name of an Op.
+     * 
+ * + * string op = 1; + */ + public Builder setOp( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + op_ = value; + onChanged(); + return this; + } + /** + *
+     * Must match the name of an Op.
+     * 
+ * + * string op = 1; + */ + public Builder clearOp() { + + op_ = getDefaultInstance().getOp(); + onChanged(); + return this; + } + /** + *
+     * Must match the name of an Op.
+     * 
+ * + * string op = 1; + */ + 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_ = ""; + /** + *
+     * Type of device this kernel runs on.
+     * 
+ * + * string device_type = 2; + */ + 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; + } + } + /** + *
+     * Type of device this kernel runs on.
+     * 
+ * + * string device_type = 2; + */ + 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; + } + } + /** + *
+     * Type of device this kernel runs on.
+     * 
+ * + * string device_type = 2; + */ + public Builder setDeviceType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deviceType_ = value; + onChanged(); + return this; + } + /** + *
+     * Type of device this kernel runs on.
+     * 
+ * + * string device_type = 2; + */ + public Builder clearDeviceType() { + + deviceType_ = getDefaultInstance().getDeviceType(); + onChanged(); + return this; + } + /** + *
+     * Type of device this kernel runs on.
+     * 
+ * + * string device_type = 2; + */ + public Builder setDeviceTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deviceType_ = value; + onChanged(); + return this; + } + + private java.util.List constraint_ = + java.util.Collections.emptyList(); + private void ensureConstraintIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + constraint_ = new java.util.ArrayList(constraint_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.KernelDef.AttrConstraint, org.tensorflow.proto.framework.KernelDef.AttrConstraint.Builder, org.tensorflow.proto.framework.KernelDef.AttrConstraintOrBuilder> constraintBuilder_; + + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + public java.util.List getConstraintList() { + if (constraintBuilder_ == null) { + return java.util.Collections.unmodifiableList(constraint_); + } else { + return constraintBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + public int getConstraintCount() { + if (constraintBuilder_ == null) { + return constraint_.size(); + } else { + return constraintBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + public org.tensorflow.proto.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.proto.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.proto.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.proto.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.proto.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.proto.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.proto.framework.KernelDef.AttrConstraint.Builder builderForValue) { + if (constraintBuilder_ == null) { + ensureConstraintIsMutable(); + constraint_.add(index, builderForValue.build()); + onChanged(); + } else { + constraintBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + public Builder addAllConstraint( + java.lang.Iterable values) { + if (constraintBuilder_ == null) { + ensureConstraintIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, constraint_); + onChanged(); + } else { + constraintBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + public Builder clearConstraint() { + if (constraintBuilder_ == null) { + constraint_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + 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.proto.framework.KernelDef.AttrConstraint.Builder getConstraintBuilder( + int index) { + return getConstraintFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + public org.tensorflow.proto.framework.KernelDef.AttrConstraintOrBuilder getConstraintOrBuilder( + int index) { + if (constraintBuilder_ == null) { + return constraint_.get(index); } else { + return constraintBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + public java.util.List + getConstraintOrBuilderList() { + if (constraintBuilder_ != null) { + return constraintBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(constraint_); + } + } + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + public org.tensorflow.proto.framework.KernelDef.AttrConstraint.Builder addConstraintBuilder() { + return getConstraintFieldBuilder().addBuilder( + org.tensorflow.proto.framework.KernelDef.AttrConstraint.getDefaultInstance()); + } + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + public org.tensorflow.proto.framework.KernelDef.AttrConstraint.Builder addConstraintBuilder( + int index) { + return getConstraintFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.KernelDef.AttrConstraint.getDefaultInstance()); + } + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + public java.util.List + getConstraintBuilderList() { + return getConstraintFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.KernelDef.AttrConstraint, org.tensorflow.proto.framework.KernelDef.AttrConstraint.Builder, org.tensorflow.proto.framework.KernelDef.AttrConstraintOrBuilder> + getConstraintFieldBuilder() { + if (constraintBuilder_ == null) { + constraintBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.KernelDef.AttrConstraint, org.tensorflow.proto.framework.KernelDef.AttrConstraint.Builder, org.tensorflow.proto.framework.KernelDef.AttrConstraintOrBuilder>( + constraint_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + constraint_ = null; + } + return constraintBuilder_; + } + + private com.google.protobuf.LazyStringList hostMemoryArg_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureHostMemoryArgIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + hostMemoryArg_ = new com.google.protobuf.LazyStringArrayList(hostMemoryArg_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * Names of the Op's input_/output_args that reside in host memory
+     * instead of device memory.
+     * 
+ * + * repeated string host_memory_arg = 4; + */ + public com.google.protobuf.ProtocolStringList + getHostMemoryArgList() { + return hostMemoryArg_.getUnmodifiableView(); + } + /** + *
+     * Names of the Op's input_/output_args that reside in host memory
+     * instead of device memory.
+     * 
+ * + * repeated string host_memory_arg = 4; + */ + public int getHostMemoryArgCount() { + return hostMemoryArg_.size(); + } + /** + *
+     * Names of the Op's input_/output_args that reside in host memory
+     * instead of device memory.
+     * 
+ * + * repeated string host_memory_arg = 4; + */ + public java.lang.String getHostMemoryArg(int index) { + return hostMemoryArg_.get(index); + } + /** + *
+     * Names of the Op's input_/output_args that reside in host memory
+     * instead of device memory.
+     * 
+ * + * repeated string host_memory_arg = 4; + */ + public com.google.protobuf.ByteString + getHostMemoryArgBytes(int index) { + return hostMemoryArg_.getByteString(index); + } + /** + *
+     * Names of the Op's input_/output_args that reside in host memory
+     * instead of device memory.
+     * 
+ * + * repeated string host_memory_arg = 4; + */ + public Builder setHostMemoryArg( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHostMemoryArgIsMutable(); + hostMemoryArg_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Names of the Op's input_/output_args that reside in host memory
+     * instead of device memory.
+     * 
+ * + * repeated string host_memory_arg = 4; + */ + public Builder addHostMemoryArg( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHostMemoryArgIsMutable(); + hostMemoryArg_.add(value); + onChanged(); + return this; + } + /** + *
+     * Names of the Op's input_/output_args that reside in host memory
+     * instead of device memory.
+     * 
+ * + * repeated string host_memory_arg = 4; + */ + public Builder addAllHostMemoryArg( + java.lang.Iterable values) { + ensureHostMemoryArgIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, hostMemoryArg_); + onChanged(); + return this; + } + /** + *
+     * Names of the Op's input_/output_args that reside in host memory
+     * instead of device memory.
+     * 
+ * + * repeated string host_memory_arg = 4; + */ + public Builder clearHostMemoryArg() { + hostMemoryArg_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Names of the Op's input_/output_args that reside in host memory
+     * instead of device memory.
+     * 
+ * + * repeated string host_memory_arg = 4; + */ + 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_ = ""; + /** + *
+     * 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.
+     * 
+ * + * string label = 5; + */ + 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; + } + } + /** + *
+     * 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.
+     * 
+ * + * string label = 5; + */ + 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; + } + } + /** + *
+     * 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.
+     * 
+ * + * string label = 5; + */ + public Builder setLabel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + label_ = value; + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string label = 5; + */ + public Builder clearLabel() { + + label_ = getDefaultInstance().getLabel(); + onChanged(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * string label = 5; + */ + public Builder setLabelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + label_ = value; + onChanged(); + return this; + } + + private int priority_ ; + /** + *
+     * Prioritization of kernel amongst different devices. By default we assume
+     * priority is 0. The higher the priority the better. By default (i.e. if
+     * this is not set), we prefer GPU kernels over CPU.
+     * 
+ * + * int32 priority = 6; + */ + public int getPriority() { + return priority_; + } + /** + *
+     * Prioritization of kernel amongst different devices. By default we assume
+     * priority is 0. The higher the priority the better. By default (i.e. if
+     * this is not set), we prefer GPU kernels over CPU.
+     * 
+ * + * int32 priority = 6; + */ + public Builder setPriority(int value) { + + priority_ = value; + onChanged(); + return this; + } + /** + *
+     * Prioritization of kernel amongst different devices. By default we assume
+     * priority is 0. The higher the priority the better. By default (i.e. if
+     * this is not set), we prefer GPU kernels over CPU.
+     * 
+ * + * int32 priority = 6; + */ + public Builder clearPriority() { + + priority_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.KernelDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.KernelDef) + private static final org.tensorflow.proto.framework.KernelDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.KernelDef(); + } + + public static org.tensorflow.proto.framework.KernelDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KernelDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KernelDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.KernelDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/KernelDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/KernelDefOrBuilder.java new file mode 100644 index 00000000000..2d62f81acc3 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/KernelDefOrBuilder.java @@ -0,0 +1,141 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/kernel_def.proto + +package org.tensorflow.proto.framework; + +public interface KernelDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.KernelDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Must match the name of an Op.
+   * 
+ * + * string op = 1; + */ + java.lang.String getOp(); + /** + *
+   * Must match the name of an Op.
+   * 
+ * + * string op = 1; + */ + com.google.protobuf.ByteString + getOpBytes(); + + /** + *
+   * Type of device this kernel runs on.
+   * 
+ * + * string device_type = 2; + */ + java.lang.String getDeviceType(); + /** + *
+   * Type of device this kernel runs on.
+   * 
+ * + * string device_type = 2; + */ + com.google.protobuf.ByteString + getDeviceTypeBytes(); + + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + java.util.List + getConstraintList(); + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + org.tensorflow.proto.framework.KernelDef.AttrConstraint getConstraint(int index); + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + int getConstraintCount(); + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + java.util.List + getConstraintOrBuilderList(); + /** + * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; + */ + org.tensorflow.proto.framework.KernelDef.AttrConstraintOrBuilder getConstraintOrBuilder( + int index); + + /** + *
+   * Names of the Op's input_/output_args that reside in host memory
+   * instead of device memory.
+   * 
+ * + * repeated string host_memory_arg = 4; + */ + java.util.List + getHostMemoryArgList(); + /** + *
+   * Names of the Op's input_/output_args that reside in host memory
+   * instead of device memory.
+   * 
+ * + * repeated string host_memory_arg = 4; + */ + int getHostMemoryArgCount(); + /** + *
+   * Names of the Op's input_/output_args that reside in host memory
+   * instead of device memory.
+   * 
+ * + * repeated string host_memory_arg = 4; + */ + java.lang.String getHostMemoryArg(int index); + /** + *
+   * Names of the Op's input_/output_args that reside in host memory
+   * instead of device memory.
+   * 
+ * + * repeated string host_memory_arg = 4; + */ + com.google.protobuf.ByteString + getHostMemoryArgBytes(int index); + + /** + *
+   * 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.
+   * 
+ * + * string label = 5; + */ + java.lang.String getLabel(); + /** + *
+   * 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.
+   * 
+ * + * string label = 5; + */ + com.google.protobuf.ByteString + getLabelBytes(); + + /** + *
+   * Prioritization of kernel amongst different devices. By default we assume
+   * priority is 0. The higher the priority the better. By default (i.e. if
+   * this is not set), we prefer GPU kernels over CPU.
+   * 
+ * + * int32 priority = 6; + */ + int getPriority(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/KernelDefProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/KernelDefProtos.java new file mode 100644 index 00000000000..50b235b600f --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/KernelDefProtos.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/kernel_def.proto + +package org.tensorflow.proto.framework; + +public final class KernelDefProtos { + private KernelDefProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_KernelDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_KernelDef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_KernelDef_AttrConstraint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_KernelDef_AttrConstraint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_KernelList_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_KernelList_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\"\357\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\022\020\n\010priority\030\006 \001(\005\032M\n\016AttrConstrain" + + "t\022\014\n\004name\030\001 \001(\t\022-\n\016allowed_values\030\002 \001(\0132" + + "\025.tensorflow.AttrValue\"3\n\nKernelList\022%\n\006" + + "kernel\030\001 \003(\0132\025.tensorflow.KernelDefB\211\001\n\036" + + "org.tensorflow.proto.frameworkB\017KernelDe" + + "fProtosP\001ZQgithub.com/tensorflow/tensorf" + + "low/tensorflow/go/core/framework/kernel_" + + "def_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.AttrValueProtos.getDescriptor(), + }); + internal_static_tensorflow_KernelDef_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_KernelDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_KernelDef_descriptor, + new java.lang.String[] { "Op", "DeviceType", "Constraint", "HostMemoryArg", "Label", "Priority", }); + internal_static_tensorflow_KernelDef_AttrConstraint_descriptor = + internal_static_tensorflow_KernelDef_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_KernelDef_AttrConstraint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_KernelDef_AttrConstraint_descriptor, + new java.lang.String[] { "Name", "AllowedValues", }); + internal_static_tensorflow_KernelList_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_KernelList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_KernelList_descriptor, + new java.lang.String[] { "Kernel", }); + org.tensorflow.proto.framework.AttrValueProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/KernelList.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/KernelList.java new file mode 100644 index 00000000000..06c6e5a22f2 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/KernelList.java @@ -0,0 +1,773 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/kernel_def.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * A collection of KernelDefs
+ * 
+ * + * Protobuf type {@code tensorflow.KernelList} + */ +public final class KernelList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.KernelList) + KernelListOrBuilder { +private static final long serialVersionUID = 0L; + // Use KernelList.newBuilder() to construct. + private KernelList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KernelList() { + kernel_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KernelList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KernelList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + kernel_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + kernel_.add( + input.readMessage(org.tensorflow.proto.framework.KernelDef.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + kernel_ = java.util.Collections.unmodifiableList(kernel_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.KernelDefProtos.internal_static_tensorflow_KernelList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.KernelDefProtos.internal_static_tensorflow_KernelList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.KernelList.class, org.tensorflow.proto.framework.KernelList.Builder.class); + } + + public static final int KERNEL_FIELD_NUMBER = 1; + private java.util.List kernel_; + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public java.util.List getKernelList() { + return kernel_; + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public java.util.List + getKernelOrBuilderList() { + return kernel_; + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public int getKernelCount() { + return kernel_.size(); + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public org.tensorflow.proto.framework.KernelDef getKernel(int index) { + return kernel_.get(index); + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public org.tensorflow.proto.framework.KernelDefOrBuilder getKernelOrBuilder( + int index) { + return kernel_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < kernel_.size(); i++) { + output.writeMessage(1, kernel_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < kernel_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, kernel_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.KernelList)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.KernelList other = (org.tensorflow.proto.framework.KernelList) obj; + + if (!getKernelList() + .equals(other.getKernelList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getKernelCount() > 0) { + hash = (37 * hash) + KERNEL_FIELD_NUMBER; + hash = (53 * hash) + getKernelList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.KernelList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.KernelList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.KernelList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.KernelList 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.proto.framework.KernelList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.KernelList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.KernelList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.KernelList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.KernelList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.KernelList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.KernelList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.KernelList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.KernelList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A collection of KernelDefs
+   * 
+ * + * Protobuf type {@code tensorflow.KernelList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.KernelList) + org.tensorflow.proto.framework.KernelListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.KernelDefProtos.internal_static_tensorflow_KernelList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.KernelDefProtos.internal_static_tensorflow_KernelList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.KernelList.class, org.tensorflow.proto.framework.KernelList.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.KernelList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getKernelFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (kernelBuilder_ == null) { + kernel_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + kernelBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.KernelDefProtos.internal_static_tensorflow_KernelList_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.KernelList getDefaultInstanceForType() { + return org.tensorflow.proto.framework.KernelList.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.KernelList build() { + org.tensorflow.proto.framework.KernelList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.KernelList buildPartial() { + org.tensorflow.proto.framework.KernelList result = new org.tensorflow.proto.framework.KernelList(this); + int from_bitField0_ = bitField0_; + if (kernelBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + kernel_ = java.util.Collections.unmodifiableList(kernel_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.kernel_ = kernel_; + } else { + result.kernel_ = kernelBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.KernelList) { + return mergeFrom((org.tensorflow.proto.framework.KernelList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.KernelList other) { + if (other == org.tensorflow.proto.framework.KernelList.getDefaultInstance()) return this; + if (kernelBuilder_ == null) { + if (!other.kernel_.isEmpty()) { + if (kernel_.isEmpty()) { + kernel_ = other.kernel_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureKernelIsMutable(); + kernel_.addAll(other.kernel_); + } + onChanged(); + } + } else { + if (!other.kernel_.isEmpty()) { + if (kernelBuilder_.isEmpty()) { + kernelBuilder_.dispose(); + kernelBuilder_ = null; + kernel_ = other.kernel_; + bitField0_ = (bitField0_ & ~0x00000001); + kernelBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getKernelFieldBuilder() : null; + } else { + kernelBuilder_.addAllMessages(other.kernel_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.KernelList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.KernelList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List kernel_ = + java.util.Collections.emptyList(); + private void ensureKernelIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + kernel_ = new java.util.ArrayList(kernel_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.KernelDef, org.tensorflow.proto.framework.KernelDef.Builder, org.tensorflow.proto.framework.KernelDefOrBuilder> kernelBuilder_; + + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public java.util.List getKernelList() { + if (kernelBuilder_ == null) { + return java.util.Collections.unmodifiableList(kernel_); + } else { + return kernelBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public int getKernelCount() { + if (kernelBuilder_ == null) { + return kernel_.size(); + } else { + return kernelBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public org.tensorflow.proto.framework.KernelDef getKernel(int index) { + if (kernelBuilder_ == null) { + return kernel_.get(index); + } else { + return kernelBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public Builder setKernel( + int index, org.tensorflow.proto.framework.KernelDef value) { + if (kernelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKernelIsMutable(); + kernel_.set(index, value); + onChanged(); + } else { + kernelBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public Builder setKernel( + int index, org.tensorflow.proto.framework.KernelDef.Builder builderForValue) { + if (kernelBuilder_ == null) { + ensureKernelIsMutable(); + kernel_.set(index, builderForValue.build()); + onChanged(); + } else { + kernelBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public Builder addKernel(org.tensorflow.proto.framework.KernelDef value) { + if (kernelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKernelIsMutable(); + kernel_.add(value); + onChanged(); + } else { + kernelBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public Builder addKernel( + int index, org.tensorflow.proto.framework.KernelDef value) { + if (kernelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKernelIsMutable(); + kernel_.add(index, value); + onChanged(); + } else { + kernelBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public Builder addKernel( + org.tensorflow.proto.framework.KernelDef.Builder builderForValue) { + if (kernelBuilder_ == null) { + ensureKernelIsMutable(); + kernel_.add(builderForValue.build()); + onChanged(); + } else { + kernelBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public Builder addKernel( + int index, org.tensorflow.proto.framework.KernelDef.Builder builderForValue) { + if (kernelBuilder_ == null) { + ensureKernelIsMutable(); + kernel_.add(index, builderForValue.build()); + onChanged(); + } else { + kernelBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public Builder addAllKernel( + java.lang.Iterable values) { + if (kernelBuilder_ == null) { + ensureKernelIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, kernel_); + onChanged(); + } else { + kernelBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public Builder clearKernel() { + if (kernelBuilder_ == null) { + kernel_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + kernelBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public Builder removeKernel(int index) { + if (kernelBuilder_ == null) { + ensureKernelIsMutable(); + kernel_.remove(index); + onChanged(); + } else { + kernelBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public org.tensorflow.proto.framework.KernelDef.Builder getKernelBuilder( + int index) { + return getKernelFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public org.tensorflow.proto.framework.KernelDefOrBuilder getKernelOrBuilder( + int index) { + if (kernelBuilder_ == null) { + return kernel_.get(index); } else { + return kernelBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public java.util.List + getKernelOrBuilderList() { + if (kernelBuilder_ != null) { + return kernelBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(kernel_); + } + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public org.tensorflow.proto.framework.KernelDef.Builder addKernelBuilder() { + return getKernelFieldBuilder().addBuilder( + org.tensorflow.proto.framework.KernelDef.getDefaultInstance()); + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public org.tensorflow.proto.framework.KernelDef.Builder addKernelBuilder( + int index) { + return getKernelFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.KernelDef.getDefaultInstance()); + } + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + public java.util.List + getKernelBuilderList() { + return getKernelFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.KernelDef, org.tensorflow.proto.framework.KernelDef.Builder, org.tensorflow.proto.framework.KernelDefOrBuilder> + getKernelFieldBuilder() { + if (kernelBuilder_ == null) { + kernelBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.KernelDef, org.tensorflow.proto.framework.KernelDef.Builder, org.tensorflow.proto.framework.KernelDefOrBuilder>( + kernel_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + kernel_ = null; + } + return kernelBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.KernelList) + } + + // @@protoc_insertion_point(class_scope:tensorflow.KernelList) + private static final org.tensorflow.proto.framework.KernelList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.KernelList(); + } + + public static org.tensorflow.proto.framework.KernelList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KernelList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KernelList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.KernelList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/KernelListOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/KernelListOrBuilder.java new file mode 100644 index 00000000000..31c95b5de9d --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/KernelListOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/kernel_def.proto + +package org.tensorflow.proto.framework; + +public interface KernelListOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.KernelList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + java.util.List + getKernelList(); + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + org.tensorflow.proto.framework.KernelDef getKernel(int index); + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + int getKernelCount(); + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + java.util.List + getKernelOrBuilderList(); + /** + * repeated .tensorflow.KernelDef kernel = 1; + */ + org.tensorflow.proto.framework.KernelDefOrBuilder getKernelOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ListValue.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ListValue.java new file mode 100644 index 00000000000..56101ea237c --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ListValue.java @@ -0,0 +1,773 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/struct.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Represents a Python list.
+ * 
+ * + * Protobuf type {@code tensorflow.ListValue} + */ +public final class ListValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ListValue) + ListValueOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListValue.newBuilder() to construct. + private ListValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListValue() { + values_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + values_.add( + input.readMessage(org.tensorflow.proto.framework.StructuredValue.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_ListValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_ListValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ListValue.class, org.tensorflow.proto.framework.ListValue.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + private java.util.List values_; + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public java.util.List getValuesList() { + return values_; + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public java.util.List + getValuesOrBuilderList() { + return values_; + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public int getValuesCount() { + return values_.size(); + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public org.tensorflow.proto.framework.StructuredValue getValues(int index) { + return values_.get(index); + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public org.tensorflow.proto.framework.StructuredValueOrBuilder getValuesOrBuilder( + int index) { + return values_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < values_.size(); i++) { + output.writeMessage(1, values_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, values_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.ListValue)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.ListValue other = (org.tensorflow.proto.framework.ListValue) obj; + + if (!getValuesList() + .equals(other.getValuesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.ListValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ListValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ListValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.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.proto.framework.ListValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ListValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ListValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ListValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ListValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ListValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ListValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ListValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.ListValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a Python list.
+   * 
+ * + * Protobuf type {@code tensorflow.ListValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ListValue) + org.tensorflow.proto.framework.ListValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_ListValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_ListValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ListValue.class, org.tensorflow.proto.framework.ListValue.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.ListValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + valuesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_ListValue_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ListValue getDefaultInstanceForType() { + return org.tensorflow.proto.framework.ListValue.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.ListValue build() { + org.tensorflow.proto.framework.ListValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ListValue buildPartial() { + org.tensorflow.proto.framework.ListValue result = new org.tensorflow.proto.framework.ListValue(this); + int from_bitField0_ = bitField0_; + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.ListValue) { + return mergeFrom((org.tensorflow.proto.framework.ListValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.ListValue other) { + if (other == org.tensorflow.proto.framework.ListValue.getDefaultInstance()) return this; + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + valuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getValuesFieldBuilder() : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.ListValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.ListValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List values_ = + java.util.Collections.emptyList(); + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder> valuesBuilder_; + + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public org.tensorflow.proto.framework.StructuredValue getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public Builder setValues( + int index, org.tensorflow.proto.framework.StructuredValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public Builder setValues( + int index, org.tensorflow.proto.framework.StructuredValue.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public Builder addValues(org.tensorflow.proto.framework.StructuredValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public Builder addValues( + int index, org.tensorflow.proto.framework.StructuredValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public Builder addValues( + org.tensorflow.proto.framework.StructuredValue.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public Builder addValues( + int index, org.tensorflow.proto.framework.StructuredValue.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public Builder addAllValues( + java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public org.tensorflow.proto.framework.StructuredValue.Builder getValuesBuilder( + int index) { + return getValuesFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public org.tensorflow.proto.framework.StructuredValueOrBuilder getValuesOrBuilder( + int index) { + if (valuesBuilder_ == null) { + return values_.get(index); } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public org.tensorflow.proto.framework.StructuredValue.Builder addValuesBuilder() { + return getValuesFieldBuilder().addBuilder( + org.tensorflow.proto.framework.StructuredValue.getDefaultInstance()); + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public org.tensorflow.proto.framework.StructuredValue.Builder addValuesBuilder( + int index) { + return getValuesFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.StructuredValue.getDefaultInstance()); + } + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + public java.util.List + getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder>( + values_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + values_ = null; + } + return valuesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ListValue) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ListValue) + private static final org.tensorflow.proto.framework.ListValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.ListValue(); + } + + public static org.tensorflow.proto.framework.ListValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ListValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ListValueOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ListValueOrBuilder.java new file mode 100644 index 00000000000..e4b2d7076d9 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ListValueOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/struct.proto + +package org.tensorflow.proto.framework; + +public interface ListValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ListValue) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + java.util.List + getValuesList(); + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + org.tensorflow.proto.framework.StructuredValue getValues(int index); + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + int getValuesCount(); + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + java.util.List + getValuesOrBuilderList(); + /** + * repeated .tensorflow.StructuredValue values = 1; + */ + org.tensorflow.proto.framework.StructuredValueOrBuilder getValuesOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/LocalLinks.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/LocalLinks.java new file mode 100644 index 00000000000..2219a69600d --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/LocalLinks.java @@ -0,0 +1,765 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/device_attributes.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.LocalLinks} + */ +public final class LocalLinks extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.LocalLinks) + LocalLinksOrBuilder { +private static final long serialVersionUID = 0L; + // Use LocalLinks.newBuilder() to construct. + private LocalLinks(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LocalLinks() { + link_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LocalLinks(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LocalLinks( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + link_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + link_.add( + input.readMessage(org.tensorflow.proto.framework.InterconnectLink.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + link_ = java.util.Collections.unmodifiableList(link_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_LocalLinks_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_LocalLinks_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.LocalLinks.class, org.tensorflow.proto.framework.LocalLinks.Builder.class); + } + + public static final int LINK_FIELD_NUMBER = 1; + private java.util.List link_; + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public java.util.List getLinkList() { + return link_; + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public java.util.List + getLinkOrBuilderList() { + return link_; + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public int getLinkCount() { + return link_.size(); + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public org.tensorflow.proto.framework.InterconnectLink getLink(int index) { + return link_.get(index); + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public org.tensorflow.proto.framework.InterconnectLinkOrBuilder getLinkOrBuilder( + int index) { + return link_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < link_.size(); i++) { + output.writeMessage(1, link_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < link_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, link_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.LocalLinks)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.LocalLinks other = (org.tensorflow.proto.framework.LocalLinks) obj; + + if (!getLinkList() + .equals(other.getLinkList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLinkCount() > 0) { + hash = (37 * hash) + LINK_FIELD_NUMBER; + hash = (53 * hash) + getLinkList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.LocalLinks parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.LocalLinks parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.LocalLinks parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.LocalLinks 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.proto.framework.LocalLinks parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.LocalLinks parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.LocalLinks parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.LocalLinks parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.LocalLinks parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.LocalLinks parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.LocalLinks parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.LocalLinks parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.LocalLinks prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.LocalLinks} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.LocalLinks) + org.tensorflow.proto.framework.LocalLinksOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_LocalLinks_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_LocalLinks_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.LocalLinks.class, org.tensorflow.proto.framework.LocalLinks.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.LocalLinks.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getLinkFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (linkBuilder_ == null) { + link_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + linkBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.DeviceAttributesProtos.internal_static_tensorflow_LocalLinks_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.LocalLinks getDefaultInstanceForType() { + return org.tensorflow.proto.framework.LocalLinks.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.LocalLinks build() { + org.tensorflow.proto.framework.LocalLinks result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.LocalLinks buildPartial() { + org.tensorflow.proto.framework.LocalLinks result = new org.tensorflow.proto.framework.LocalLinks(this); + int from_bitField0_ = bitField0_; + if (linkBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + link_ = java.util.Collections.unmodifiableList(link_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.link_ = link_; + } else { + result.link_ = linkBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.LocalLinks) { + return mergeFrom((org.tensorflow.proto.framework.LocalLinks)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.LocalLinks other) { + if (other == org.tensorflow.proto.framework.LocalLinks.getDefaultInstance()) return this; + if (linkBuilder_ == null) { + if (!other.link_.isEmpty()) { + if (link_.isEmpty()) { + link_ = other.link_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLinkIsMutable(); + link_.addAll(other.link_); + } + onChanged(); + } + } else { + if (!other.link_.isEmpty()) { + if (linkBuilder_.isEmpty()) { + linkBuilder_.dispose(); + linkBuilder_ = null; + link_ = other.link_; + bitField0_ = (bitField0_ & ~0x00000001); + linkBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLinkFieldBuilder() : null; + } else { + linkBuilder_.addAllMessages(other.link_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.LocalLinks parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.LocalLinks) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List link_ = + java.util.Collections.emptyList(); + private void ensureLinkIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + link_ = new java.util.ArrayList(link_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.InterconnectLink, org.tensorflow.proto.framework.InterconnectLink.Builder, org.tensorflow.proto.framework.InterconnectLinkOrBuilder> linkBuilder_; + + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public java.util.List getLinkList() { + if (linkBuilder_ == null) { + return java.util.Collections.unmodifiableList(link_); + } else { + return linkBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public int getLinkCount() { + if (linkBuilder_ == null) { + return link_.size(); + } else { + return linkBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public org.tensorflow.proto.framework.InterconnectLink getLink(int index) { + if (linkBuilder_ == null) { + return link_.get(index); + } else { + return linkBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public Builder setLink( + int index, org.tensorflow.proto.framework.InterconnectLink value) { + if (linkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIsMutable(); + link_.set(index, value); + onChanged(); + } else { + linkBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public Builder setLink( + int index, org.tensorflow.proto.framework.InterconnectLink.Builder builderForValue) { + if (linkBuilder_ == null) { + ensureLinkIsMutable(); + link_.set(index, builderForValue.build()); + onChanged(); + } else { + linkBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public Builder addLink(org.tensorflow.proto.framework.InterconnectLink value) { + if (linkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIsMutable(); + link_.add(value); + onChanged(); + } else { + linkBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public Builder addLink( + int index, org.tensorflow.proto.framework.InterconnectLink value) { + if (linkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIsMutable(); + link_.add(index, value); + onChanged(); + } else { + linkBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public Builder addLink( + org.tensorflow.proto.framework.InterconnectLink.Builder builderForValue) { + if (linkBuilder_ == null) { + ensureLinkIsMutable(); + link_.add(builderForValue.build()); + onChanged(); + } else { + linkBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public Builder addLink( + int index, org.tensorflow.proto.framework.InterconnectLink.Builder builderForValue) { + if (linkBuilder_ == null) { + ensureLinkIsMutable(); + link_.add(index, builderForValue.build()); + onChanged(); + } else { + linkBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public Builder addAllLink( + java.lang.Iterable values) { + if (linkBuilder_ == null) { + ensureLinkIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, link_); + onChanged(); + } else { + linkBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public Builder clearLink() { + if (linkBuilder_ == null) { + link_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + linkBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public Builder removeLink(int index) { + if (linkBuilder_ == null) { + ensureLinkIsMutable(); + link_.remove(index); + onChanged(); + } else { + linkBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public org.tensorflow.proto.framework.InterconnectLink.Builder getLinkBuilder( + int index) { + return getLinkFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public org.tensorflow.proto.framework.InterconnectLinkOrBuilder getLinkOrBuilder( + int index) { + if (linkBuilder_ == null) { + return link_.get(index); } else { + return linkBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public java.util.List + getLinkOrBuilderList() { + if (linkBuilder_ != null) { + return linkBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(link_); + } + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public org.tensorflow.proto.framework.InterconnectLink.Builder addLinkBuilder() { + return getLinkFieldBuilder().addBuilder( + org.tensorflow.proto.framework.InterconnectLink.getDefaultInstance()); + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public org.tensorflow.proto.framework.InterconnectLink.Builder addLinkBuilder( + int index) { + return getLinkFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.InterconnectLink.getDefaultInstance()); + } + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + public java.util.List + getLinkBuilderList() { + return getLinkFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.InterconnectLink, org.tensorflow.proto.framework.InterconnectLink.Builder, org.tensorflow.proto.framework.InterconnectLinkOrBuilder> + getLinkFieldBuilder() { + if (linkBuilder_ == null) { + linkBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.InterconnectLink, org.tensorflow.proto.framework.InterconnectLink.Builder, org.tensorflow.proto.framework.InterconnectLinkOrBuilder>( + link_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + link_ = null; + } + return linkBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.LocalLinks) + } + + // @@protoc_insertion_point(class_scope:tensorflow.LocalLinks) + private static final org.tensorflow.proto.framework.LocalLinks DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.LocalLinks(); + } + + public static org.tensorflow.proto.framework.LocalLinks getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocalLinks parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LocalLinks(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.LocalLinks getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/LocalLinksOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/LocalLinksOrBuilder.java new file mode 100644 index 00000000000..e1cd5854d3b --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/LocalLinksOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/device_attributes.proto + +package org.tensorflow.proto.framework; + +public interface LocalLinksOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.LocalLinks) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + java.util.List + getLinkList(); + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + org.tensorflow.proto.framework.InterconnectLink getLink(int index); + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + int getLinkCount(); + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + java.util.List + getLinkOrBuilderList(); + /** + * repeated .tensorflow.InterconnectLink link = 1; + */ + org.tensorflow.proto.framework.InterconnectLinkOrBuilder getLinkOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/LogMemoryProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/LogMemoryProtos.java new file mode 100644 index 00000000000..4cef19ad6fe --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/LogMemoryProtos.java @@ -0,0 +1,125 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/log_memory.proto + +package org.tensorflow.proto.framework; + +public final class LogMemoryProtos { + private LogMemoryProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_MemoryLogStep_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_MemoryLogStep_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_MemoryLogTensorAllocation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_MemoryLogTensorAllocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_MemoryLogTensorDeallocation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_MemoryLogTensorDeallocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_MemoryLogTensorOutput_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_MemoryLogTensorOutput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_MemoryLogRawAllocation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_MemoryLogRawAllocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_MemoryLogRawDeallocation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_MemoryLogRawDeallocation_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/log_memory.p" + + "roto\022\ntensorflow\0322tensorflow/core/framew" + + "ork/tensor_description.proto\"0\n\rMemoryLo" + + "gStep\022\017\n\007step_id\030\001 \001(\003\022\016\n\006handle\030\002 \001(\t\"p" + + "\n\031MemoryLogTensorAllocation\022\017\n\007step_id\030\001" + + " \001(\003\022\023\n\013kernel_name\030\002 \001(\t\022-\n\006tensor\030\003 \001(" + + "\0132\035.tensorflow.TensorDescription\"L\n\033Memo" + + "ryLogTensorDeallocation\022\025\n\rallocation_id" + + "\030\001 \001(\003\022\026\n\016allocator_name\030\002 \001(\t\"{\n\025Memory" + + "LogTensorOutput\022\017\n\007step_id\030\001 \001(\003\022\023\n\013kern" + + "el_name\030\002 \001(\t\022\r\n\005index\030\003 \001(\005\022-\n\006tensor\030\004" + + " \001(\0132\035.tensorflow.TensorDescription\"\213\001\n\026" + + "MemoryLogRawAllocation\022\017\n\007step_id\030\001 \001(\003\022" + + "\021\n\toperation\030\002 \001(\t\022\021\n\tnum_bytes\030\003 \001(\003\022\013\n" + + "\003ptr\030\004 \001(\004\022\025\n\rallocation_id\030\005 \001(\003\022\026\n\016all" + + "ocator_name\030\006 \001(\t\"\177\n\030MemoryLogRawDealloc" + + "ation\022\017\n\007step_id\030\001 \001(\003\022\021\n\toperation\030\002 \001(" + + "\t\022\025\n\rallocation_id\030\003 \001(\003\022\026\n\016allocator_na" + + "me\030\004 \001(\t\022\020\n\010deferred\030\005 \001(\010B\211\001\n\036org.tenso" + + "rflow.proto.frameworkB\017LogMemoryProtosP\001" + + "ZQgithub.com/tensorflow/tensorflow/tenso" + + "rflow/go/core/framework/log_memory_go_pr" + + "oto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.TensorDescriptionProtos.getDescriptor(), + }); + internal_static_tensorflow_MemoryLogStep_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_MemoryLogStep_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_MemoryLogStep_descriptor, + new java.lang.String[] { "StepId", "Handle", }); + internal_static_tensorflow_MemoryLogTensorAllocation_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_MemoryLogTensorAllocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_MemoryLogTensorAllocation_descriptor, + new java.lang.String[] { "StepId", "KernelName", "Tensor", }); + internal_static_tensorflow_MemoryLogTensorDeallocation_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_tensorflow_MemoryLogTensorDeallocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_MemoryLogTensorDeallocation_descriptor, + new java.lang.String[] { "AllocationId", "AllocatorName", }); + internal_static_tensorflow_MemoryLogTensorOutput_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_tensorflow_MemoryLogTensorOutput_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_MemoryLogTensorOutput_descriptor, + new java.lang.String[] { "StepId", "KernelName", "Index", "Tensor", }); + internal_static_tensorflow_MemoryLogRawAllocation_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_tensorflow_MemoryLogRawAllocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_MemoryLogRawAllocation_descriptor, + new java.lang.String[] { "StepId", "Operation", "NumBytes", "Ptr", "AllocationId", "AllocatorName", }); + internal_static_tensorflow_MemoryLogRawDeallocation_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_tensorflow_MemoryLogRawDeallocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_MemoryLogRawDeallocation_descriptor, + new java.lang.String[] { "StepId", "Operation", "AllocationId", "AllocatorName", "Deferred", }); + org.tensorflow.proto.framework.TensorDescriptionProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogRawAllocation.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogRawAllocation.java new file mode 100644 index 00000000000..db40403eba4 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogRawAllocation.java @@ -0,0 +1,1029 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/log_memory.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.MemoryLogRawAllocation} + */ +public final class MemoryLogRawAllocation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogRawAllocation) + MemoryLogRawAllocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use MemoryLogRawAllocation.newBuilder() to construct. + private MemoryLogRawAllocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MemoryLogRawAllocation() { + operation_ = ""; + allocatorName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MemoryLogRawAllocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MemoryLogRawAllocation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + stepId_ = input.readInt64(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + operation_ = s; + break; + } + case 24: { + + numBytes_ = input.readInt64(); + break; + } + case 32: { + + ptr_ = input.readUInt64(); + break; + } + case 40: { + + allocationId_ = input.readInt64(); + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + allocatorName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogRawAllocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogRawAllocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MemoryLogRawAllocation.class, org.tensorflow.proto.framework.MemoryLogRawAllocation.Builder.class); + } + + public static final int STEP_ID_FIELD_NUMBER = 1; + private long stepId_; + /** + *
+   * Process-unique step id.
+   * 
+ * + * int64 step_id = 1; + */ + public long getStepId() { + return stepId_; + } + + public static final int OPERATION_FIELD_NUMBER = 2; + private volatile java.lang.Object operation_; + /** + *
+   * Name of the operation making the allocation.
+   * 
+ * + * string operation = 2; + */ + public java.lang.String getOperation() { + java.lang.Object ref = operation_; + 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(); + operation_ = s; + return s; + } + } + /** + *
+   * Name of the operation making the allocation.
+   * 
+ * + * string operation = 2; + */ + public com.google.protobuf.ByteString + getOperationBytes() { + java.lang.Object ref = operation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + operation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NUM_BYTES_FIELD_NUMBER = 3; + private long numBytes_; + /** + *
+   * Number of bytes in the allocation.
+   * 
+ * + * int64 num_bytes = 3; + */ + public long getNumBytes() { + return numBytes_; + } + + public static final int PTR_FIELD_NUMBER = 4; + private long ptr_; + /** + *
+   * Address of the allocation.
+   * 
+ * + * uint64 ptr = 4; + */ + public long getPtr() { + return ptr_; + } + + public static final int ALLOCATION_ID_FIELD_NUMBER = 5; + private long allocationId_; + /** + *
+   * Id of the tensor buffer being allocated, used to match to a
+   * corresponding deallocation.
+   * 
+ * + * int64 allocation_id = 5; + */ + public long getAllocationId() { + return allocationId_; + } + + public static final int ALLOCATOR_NAME_FIELD_NUMBER = 6; + private volatile java.lang.Object allocatorName_; + /** + *
+   * Name of the allocator used.
+   * 
+ * + * string allocator_name = 6; + */ + 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; + } + } + /** + *
+   * Name of the allocator used.
+   * 
+ * + * string allocator_name = 6; + */ + 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; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (stepId_ != 0L) { + output.writeInt64(1, stepId_); + } + if (!getOperationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, operation_); + } + if (numBytes_ != 0L) { + output.writeInt64(3, numBytes_); + } + if (ptr_ != 0L) { + output.writeUInt64(4, ptr_); + } + if (allocationId_ != 0L) { + output.writeInt64(5, allocationId_); + } + if (!getAllocatorNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, allocatorName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (stepId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, stepId_); + } + if (!getOperationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, operation_); + } + if (numBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, numBytes_); + } + if (ptr_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, ptr_); + } + if (allocationId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, allocationId_); + } + if (!getAllocatorNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, allocatorName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.MemoryLogRawAllocation)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.MemoryLogRawAllocation other = (org.tensorflow.proto.framework.MemoryLogRawAllocation) obj; + + if (getStepId() + != other.getStepId()) return false; + if (!getOperation() + .equals(other.getOperation())) return false; + if (getNumBytes() + != other.getNumBytes()) return false; + if (getPtr() + != other.getPtr()) return false; + if (getAllocationId() + != other.getAllocationId()) return false; + if (!getAllocatorName() + .equals(other.getAllocatorName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STEP_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStepId()); + hash = (37 * hash) + OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getOperation().hashCode(); + hash = (37 * hash) + NUM_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNumBytes()); + hash = (37 * hash) + PTR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPtr()); + hash = (37 * hash) + ALLOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAllocationId()); + hash = (37 * hash) + ALLOCATOR_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAllocatorName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.MemoryLogRawAllocation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogRawAllocation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogRawAllocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogRawAllocation 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.proto.framework.MemoryLogRawAllocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogRawAllocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogRawAllocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogRawAllocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogRawAllocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogRawAllocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogRawAllocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogRawAllocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.MemoryLogRawAllocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.MemoryLogRawAllocation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.MemoryLogRawAllocation) + org.tensorflow.proto.framework.MemoryLogRawAllocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogRawAllocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogRawAllocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MemoryLogRawAllocation.class, org.tensorflow.proto.framework.MemoryLogRawAllocation.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.MemoryLogRawAllocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + stepId_ = 0L; + + operation_ = ""; + + numBytes_ = 0L; + + ptr_ = 0L; + + allocationId_ = 0L; + + allocatorName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogRawAllocation_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogRawAllocation getDefaultInstanceForType() { + return org.tensorflow.proto.framework.MemoryLogRawAllocation.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogRawAllocation build() { + org.tensorflow.proto.framework.MemoryLogRawAllocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogRawAllocation buildPartial() { + org.tensorflow.proto.framework.MemoryLogRawAllocation result = new org.tensorflow.proto.framework.MemoryLogRawAllocation(this); + result.stepId_ = stepId_; + result.operation_ = operation_; + result.numBytes_ = numBytes_; + result.ptr_ = ptr_; + result.allocationId_ = allocationId_; + result.allocatorName_ = allocatorName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.MemoryLogRawAllocation) { + return mergeFrom((org.tensorflow.proto.framework.MemoryLogRawAllocation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.MemoryLogRawAllocation other) { + if (other == org.tensorflow.proto.framework.MemoryLogRawAllocation.getDefaultInstance()) return this; + if (other.getStepId() != 0L) { + setStepId(other.getStepId()); + } + if (!other.getOperation().isEmpty()) { + operation_ = other.operation_; + onChanged(); + } + if (other.getNumBytes() != 0L) { + setNumBytes(other.getNumBytes()); + } + if (other.getPtr() != 0L) { + setPtr(other.getPtr()); + } + if (other.getAllocationId() != 0L) { + setAllocationId(other.getAllocationId()); + } + if (!other.getAllocatorName().isEmpty()) { + allocatorName_ = other.allocatorName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.MemoryLogRawAllocation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.MemoryLogRawAllocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long stepId_ ; + /** + *
+     * Process-unique step id.
+     * 
+ * + * int64 step_id = 1; + */ + public long getStepId() { + return stepId_; + } + /** + *
+     * Process-unique step id.
+     * 
+ * + * int64 step_id = 1; + */ + public Builder setStepId(long value) { + + stepId_ = value; + onChanged(); + return this; + } + /** + *
+     * Process-unique step id.
+     * 
+ * + * int64 step_id = 1; + */ + public Builder clearStepId() { + + stepId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object operation_ = ""; + /** + *
+     * Name of the operation making the allocation.
+     * 
+ * + * string operation = 2; + */ + public java.lang.String getOperation() { + java.lang.Object ref = operation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the operation making the allocation.
+     * 
+ * + * string operation = 2; + */ + public com.google.protobuf.ByteString + getOperationBytes() { + java.lang.Object ref = operation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + operation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the operation making the allocation.
+     * 
+ * + * string operation = 2; + */ + public Builder setOperation( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + operation_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the operation making the allocation.
+     * 
+ * + * string operation = 2; + */ + public Builder clearOperation() { + + operation_ = getDefaultInstance().getOperation(); + onChanged(); + return this; + } + /** + *
+     * Name of the operation making the allocation.
+     * 
+ * + * string operation = 2; + */ + public Builder setOperationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + operation_ = value; + onChanged(); + return this; + } + + private long numBytes_ ; + /** + *
+     * Number of bytes in the allocation.
+     * 
+ * + * int64 num_bytes = 3; + */ + public long getNumBytes() { + return numBytes_; + } + /** + *
+     * Number of bytes in the allocation.
+     * 
+ * + * int64 num_bytes = 3; + */ + public Builder setNumBytes(long value) { + + numBytes_ = value; + onChanged(); + return this; + } + /** + *
+     * Number of bytes in the allocation.
+     * 
+ * + * int64 num_bytes = 3; + */ + public Builder clearNumBytes() { + + numBytes_ = 0L; + onChanged(); + return this; + } + + private long ptr_ ; + /** + *
+     * Address of the allocation.
+     * 
+ * + * uint64 ptr = 4; + */ + public long getPtr() { + return ptr_; + } + /** + *
+     * Address of the allocation.
+     * 
+ * + * uint64 ptr = 4; + */ + public Builder setPtr(long value) { + + ptr_ = value; + onChanged(); + return this; + } + /** + *
+     * Address of the allocation.
+     * 
+ * + * uint64 ptr = 4; + */ + public Builder clearPtr() { + + ptr_ = 0L; + onChanged(); + return this; + } + + private long allocationId_ ; + /** + *
+     * Id of the tensor buffer being allocated, used to match to a
+     * corresponding deallocation.
+     * 
+ * + * int64 allocation_id = 5; + */ + public long getAllocationId() { + return allocationId_; + } + /** + *
+     * Id of the tensor buffer being allocated, used to match to a
+     * corresponding deallocation.
+     * 
+ * + * int64 allocation_id = 5; + */ + public Builder setAllocationId(long value) { + + allocationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Id of the tensor buffer being allocated, used to match to a
+     * corresponding deallocation.
+     * 
+ * + * int64 allocation_id = 5; + */ + public Builder clearAllocationId() { + + allocationId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object allocatorName_ = ""; + /** + *
+     * Name of the allocator used.
+     * 
+ * + * string allocator_name = 6; + */ + 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; + } + } + /** + *
+     * Name of the allocator used.
+     * 
+ * + * string allocator_name = 6; + */ + 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; + } + } + /** + *
+     * Name of the allocator used.
+     * 
+ * + * string allocator_name = 6; + */ + public Builder setAllocatorName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + allocatorName_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the allocator used.
+     * 
+ * + * string allocator_name = 6; + */ + public Builder clearAllocatorName() { + + allocatorName_ = getDefaultInstance().getAllocatorName(); + onChanged(); + return this; + } + /** + *
+     * Name of the allocator used.
+     * 
+ * + * string allocator_name = 6; + */ + public Builder setAllocatorNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + allocatorName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.MemoryLogRawAllocation) + } + + // @@protoc_insertion_point(class_scope:tensorflow.MemoryLogRawAllocation) + private static final org.tensorflow.proto.framework.MemoryLogRawAllocation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.MemoryLogRawAllocation(); + } + + public static org.tensorflow.proto.framework.MemoryLogRawAllocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MemoryLogRawAllocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MemoryLogRawAllocation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogRawAllocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogRawAllocationOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogRawAllocationOrBuilder.java new file mode 100644 index 00000000000..d8cabb6c9d4 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogRawAllocationOrBuilder.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/log_memory.proto + +package org.tensorflow.proto.framework; + +public interface MemoryLogRawAllocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.MemoryLogRawAllocation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Process-unique step id.
+   * 
+ * + * int64 step_id = 1; + */ + long getStepId(); + + /** + *
+   * Name of the operation making the allocation.
+   * 
+ * + * string operation = 2; + */ + java.lang.String getOperation(); + /** + *
+   * Name of the operation making the allocation.
+   * 
+ * + * string operation = 2; + */ + com.google.protobuf.ByteString + getOperationBytes(); + + /** + *
+   * Number of bytes in the allocation.
+   * 
+ * + * int64 num_bytes = 3; + */ + long getNumBytes(); + + /** + *
+   * Address of the allocation.
+   * 
+ * + * uint64 ptr = 4; + */ + long getPtr(); + + /** + *
+   * Id of the tensor buffer being allocated, used to match to a
+   * corresponding deallocation.
+   * 
+ * + * int64 allocation_id = 5; + */ + long getAllocationId(); + + /** + *
+   * Name of the allocator used.
+   * 
+ * + * string allocator_name = 6; + */ + java.lang.String getAllocatorName(); + /** + *
+   * Name of the allocator used.
+   * 
+ * + * string allocator_name = 6; + */ + com.google.protobuf.ByteString + getAllocatorNameBytes(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogRawDeallocation.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogRawDeallocation.java new file mode 100644 index 00000000000..ae8c55fcf31 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogRawDeallocation.java @@ -0,0 +1,959 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/log_memory.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.MemoryLogRawDeallocation} + */ +public final class MemoryLogRawDeallocation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogRawDeallocation) + MemoryLogRawDeallocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use MemoryLogRawDeallocation.newBuilder() to construct. + private MemoryLogRawDeallocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MemoryLogRawDeallocation() { + operation_ = ""; + allocatorName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MemoryLogRawDeallocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MemoryLogRawDeallocation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + stepId_ = input.readInt64(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + operation_ = s; + break; + } + case 24: { + + allocationId_ = input.readInt64(); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + allocatorName_ = s; + break; + } + case 40: { + + deferred_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogRawDeallocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogRawDeallocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MemoryLogRawDeallocation.class, org.tensorflow.proto.framework.MemoryLogRawDeallocation.Builder.class); + } + + public static final int STEP_ID_FIELD_NUMBER = 1; + private long stepId_; + /** + *
+   * Process-unique step id.
+   * 
+ * + * int64 step_id = 1; + */ + public long getStepId() { + return stepId_; + } + + public static final int OPERATION_FIELD_NUMBER = 2; + private volatile java.lang.Object operation_; + /** + *
+   * Name of the operation making the deallocation.
+   * 
+ * + * string operation = 2; + */ + public java.lang.String getOperation() { + java.lang.Object ref = operation_; + 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(); + operation_ = s; + return s; + } + } + /** + *
+   * Name of the operation making the deallocation.
+   * 
+ * + * string operation = 2; + */ + public com.google.protobuf.ByteString + getOperationBytes() { + java.lang.Object ref = operation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + operation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOCATION_ID_FIELD_NUMBER = 3; + private long allocationId_; + /** + *
+   * Id of the tensor buffer being deallocated, used to match to a
+   * corresponding allocation.
+   * 
+ * + * int64 allocation_id = 3; + */ + public long getAllocationId() { + return allocationId_; + } + + public static final int ALLOCATOR_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object allocatorName_; + /** + *
+   * Name of the allocator used.
+   * 
+ * + * string allocator_name = 4; + */ + 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; + } + } + /** + *
+   * Name of the allocator used.
+   * 
+ * + * string allocator_name = 4; + */ + 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 DEFERRED_FIELD_NUMBER = 5; + private boolean deferred_; + /** + *
+   * True if the deallocation is queued and will be performed later,
+   * e.g. for GPU lazy freeing of buffers.
+   * 
+ * + * bool deferred = 5; + */ + public boolean getDeferred() { + return deferred_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (stepId_ != 0L) { + output.writeInt64(1, stepId_); + } + if (!getOperationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, operation_); + } + if (allocationId_ != 0L) { + output.writeInt64(3, allocationId_); + } + if (!getAllocatorNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, allocatorName_); + } + if (deferred_ != false) { + output.writeBool(5, deferred_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (stepId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, stepId_); + } + if (!getOperationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, operation_); + } + if (allocationId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, allocationId_); + } + if (!getAllocatorNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, allocatorName_); + } + if (deferred_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, deferred_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.MemoryLogRawDeallocation)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.MemoryLogRawDeallocation other = (org.tensorflow.proto.framework.MemoryLogRawDeallocation) obj; + + if (getStepId() + != other.getStepId()) return false; + if (!getOperation() + .equals(other.getOperation())) return false; + if (getAllocationId() + != other.getAllocationId()) return false; + if (!getAllocatorName() + .equals(other.getAllocatorName())) return false; + if (getDeferred() + != other.getDeferred()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STEP_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStepId()); + hash = (37 * hash) + OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getOperation().hashCode(); + hash = (37 * hash) + ALLOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAllocationId()); + hash = (37 * hash) + ALLOCATOR_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAllocatorName().hashCode(); + hash = (37 * hash) + DEFERRED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDeferred()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.MemoryLogRawDeallocation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogRawDeallocation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogRawDeallocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogRawDeallocation 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.proto.framework.MemoryLogRawDeallocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogRawDeallocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogRawDeallocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogRawDeallocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogRawDeallocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogRawDeallocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogRawDeallocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogRawDeallocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.MemoryLogRawDeallocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.MemoryLogRawDeallocation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.MemoryLogRawDeallocation) + org.tensorflow.proto.framework.MemoryLogRawDeallocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogRawDeallocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogRawDeallocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MemoryLogRawDeallocation.class, org.tensorflow.proto.framework.MemoryLogRawDeallocation.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.MemoryLogRawDeallocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + stepId_ = 0L; + + operation_ = ""; + + allocationId_ = 0L; + + allocatorName_ = ""; + + deferred_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogRawDeallocation_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogRawDeallocation getDefaultInstanceForType() { + return org.tensorflow.proto.framework.MemoryLogRawDeallocation.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogRawDeallocation build() { + org.tensorflow.proto.framework.MemoryLogRawDeallocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogRawDeallocation buildPartial() { + org.tensorflow.proto.framework.MemoryLogRawDeallocation result = new org.tensorflow.proto.framework.MemoryLogRawDeallocation(this); + result.stepId_ = stepId_; + result.operation_ = operation_; + result.allocationId_ = allocationId_; + result.allocatorName_ = allocatorName_; + result.deferred_ = deferred_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.MemoryLogRawDeallocation) { + return mergeFrom((org.tensorflow.proto.framework.MemoryLogRawDeallocation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.MemoryLogRawDeallocation other) { + if (other == org.tensorflow.proto.framework.MemoryLogRawDeallocation.getDefaultInstance()) return this; + if (other.getStepId() != 0L) { + setStepId(other.getStepId()); + } + if (!other.getOperation().isEmpty()) { + operation_ = other.operation_; + onChanged(); + } + if (other.getAllocationId() != 0L) { + setAllocationId(other.getAllocationId()); + } + if (!other.getAllocatorName().isEmpty()) { + allocatorName_ = other.allocatorName_; + onChanged(); + } + if (other.getDeferred() != false) { + setDeferred(other.getDeferred()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.MemoryLogRawDeallocation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.MemoryLogRawDeallocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long stepId_ ; + /** + *
+     * Process-unique step id.
+     * 
+ * + * int64 step_id = 1; + */ + public long getStepId() { + return stepId_; + } + /** + *
+     * Process-unique step id.
+     * 
+ * + * int64 step_id = 1; + */ + public Builder setStepId(long value) { + + stepId_ = value; + onChanged(); + return this; + } + /** + *
+     * Process-unique step id.
+     * 
+ * + * int64 step_id = 1; + */ + public Builder clearStepId() { + + stepId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object operation_ = ""; + /** + *
+     * Name of the operation making the deallocation.
+     * 
+ * + * string operation = 2; + */ + public java.lang.String getOperation() { + java.lang.Object ref = operation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the operation making the deallocation.
+     * 
+ * + * string operation = 2; + */ + public com.google.protobuf.ByteString + getOperationBytes() { + java.lang.Object ref = operation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + operation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the operation making the deallocation.
+     * 
+ * + * string operation = 2; + */ + public Builder setOperation( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + operation_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the operation making the deallocation.
+     * 
+ * + * string operation = 2; + */ + public Builder clearOperation() { + + operation_ = getDefaultInstance().getOperation(); + onChanged(); + return this; + } + /** + *
+     * Name of the operation making the deallocation.
+     * 
+ * + * string operation = 2; + */ + public Builder setOperationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + operation_ = value; + onChanged(); + return this; + } + + private long allocationId_ ; + /** + *
+     * Id of the tensor buffer being deallocated, used to match to a
+     * corresponding allocation.
+     * 
+ * + * int64 allocation_id = 3; + */ + public long getAllocationId() { + return allocationId_; + } + /** + *
+     * Id of the tensor buffer being deallocated, used to match to a
+     * corresponding allocation.
+     * 
+ * + * int64 allocation_id = 3; + */ + public Builder setAllocationId(long value) { + + allocationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Id of the tensor buffer being deallocated, used to match to a
+     * corresponding allocation.
+     * 
+ * + * int64 allocation_id = 3; + */ + public Builder clearAllocationId() { + + allocationId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object allocatorName_ = ""; + /** + *
+     * Name of the allocator used.
+     * 
+ * + * string allocator_name = 4; + */ + 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; + } + } + /** + *
+     * Name of the allocator used.
+     * 
+ * + * string allocator_name = 4; + */ + 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; + } + } + /** + *
+     * Name of the allocator used.
+     * 
+ * + * string allocator_name = 4; + */ + public Builder setAllocatorName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + allocatorName_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the allocator used.
+     * 
+ * + * string allocator_name = 4; + */ + public Builder clearAllocatorName() { + + allocatorName_ = getDefaultInstance().getAllocatorName(); + onChanged(); + return this; + } + /** + *
+     * Name of the allocator used.
+     * 
+ * + * string allocator_name = 4; + */ + public Builder setAllocatorNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + allocatorName_ = value; + onChanged(); + return this; + } + + private boolean deferred_ ; + /** + *
+     * True if the deallocation is queued and will be performed later,
+     * e.g. for GPU lazy freeing of buffers.
+     * 
+ * + * bool deferred = 5; + */ + public boolean getDeferred() { + return deferred_; + } + /** + *
+     * True if the deallocation is queued and will be performed later,
+     * e.g. for GPU lazy freeing of buffers.
+     * 
+ * + * bool deferred = 5; + */ + public Builder setDeferred(boolean value) { + + deferred_ = value; + onChanged(); + return this; + } + /** + *
+     * True if the deallocation is queued and will be performed later,
+     * e.g. for GPU lazy freeing of buffers.
+     * 
+ * + * bool deferred = 5; + */ + public Builder clearDeferred() { + + deferred_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.MemoryLogRawDeallocation) + } + + // @@protoc_insertion_point(class_scope:tensorflow.MemoryLogRawDeallocation) + private static final org.tensorflow.proto.framework.MemoryLogRawDeallocation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.MemoryLogRawDeallocation(); + } + + public static org.tensorflow.proto.framework.MemoryLogRawDeallocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MemoryLogRawDeallocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MemoryLogRawDeallocation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogRawDeallocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogRawDeallocationOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogRawDeallocationOrBuilder.java new file mode 100644 index 00000000000..e8f66fff55c --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogRawDeallocationOrBuilder.java @@ -0,0 +1,74 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/log_memory.proto + +package org.tensorflow.proto.framework; + +public interface MemoryLogRawDeallocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.MemoryLogRawDeallocation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Process-unique step id.
+   * 
+ * + * int64 step_id = 1; + */ + long getStepId(); + + /** + *
+   * Name of the operation making the deallocation.
+   * 
+ * + * string operation = 2; + */ + java.lang.String getOperation(); + /** + *
+   * Name of the operation making the deallocation.
+   * 
+ * + * string operation = 2; + */ + com.google.protobuf.ByteString + getOperationBytes(); + + /** + *
+   * Id of the tensor buffer being deallocated, used to match to a
+   * corresponding allocation.
+   * 
+ * + * int64 allocation_id = 3; + */ + long getAllocationId(); + + /** + *
+   * Name of the allocator used.
+   * 
+ * + * string allocator_name = 4; + */ + java.lang.String getAllocatorName(); + /** + *
+   * Name of the allocator used.
+   * 
+ * + * string allocator_name = 4; + */ + com.google.protobuf.ByteString + getAllocatorNameBytes(); + + /** + *
+   * True if the deallocation is queued and will be performed later,
+   * e.g. for GPU lazy freeing of buffers.
+   * 
+ * + * bool deferred = 5; + */ + boolean getDeferred(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogStep.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogStep.java new file mode 100644 index 00000000000..73d400a36e0 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogStep.java @@ -0,0 +1,648 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/log_memory.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.MemoryLogStep} + */ +public final class MemoryLogStep extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogStep) + MemoryLogStepOrBuilder { +private static final long serialVersionUID = 0L; + // Use MemoryLogStep.newBuilder() to construct. + private MemoryLogStep(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MemoryLogStep() { + handle_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MemoryLogStep(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MemoryLogStep( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + stepId_ = input.readInt64(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + handle_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogStep_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogStep_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MemoryLogStep.class, org.tensorflow.proto.framework.MemoryLogStep.Builder.class); + } + + public static final int STEP_ID_FIELD_NUMBER = 1; + private long stepId_; + /** + *
+   * Process-unique step id.
+   * 
+ * + * int64 step_id = 1; + */ + public long getStepId() { + return stepId_; + } + + public static final int HANDLE_FIELD_NUMBER = 2; + private volatile java.lang.Object handle_; + /** + *
+   * Handle describing the feeds and fetches of the step.
+   * 
+ * + * string handle = 2; + */ + public java.lang.String getHandle() { + java.lang.Object ref = handle_; + 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(); + handle_ = s; + return s; + } + } + /** + *
+   * Handle describing the feeds and fetches of the step.
+   * 
+ * + * string handle = 2; + */ + public com.google.protobuf.ByteString + getHandleBytes() { + java.lang.Object ref = handle_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (stepId_ != 0L) { + output.writeInt64(1, stepId_); + } + if (!getHandleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, handle_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (stepId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, stepId_); + } + if (!getHandleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, handle_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.MemoryLogStep)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.MemoryLogStep other = (org.tensorflow.proto.framework.MemoryLogStep) obj; + + if (getStepId() + != other.getStepId()) return false; + if (!getHandle() + .equals(other.getHandle())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STEP_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStepId()); + hash = (37 * hash) + HANDLE_FIELD_NUMBER; + hash = (53 * hash) + getHandle().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.MemoryLogStep parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogStep parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogStep parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogStep 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.proto.framework.MemoryLogStep parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogStep parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogStep parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogStep parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogStep parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogStep parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogStep parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogStep parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.MemoryLogStep prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.MemoryLogStep} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.MemoryLogStep) + org.tensorflow.proto.framework.MemoryLogStepOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogStep_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogStep_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MemoryLogStep.class, org.tensorflow.proto.framework.MemoryLogStep.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.MemoryLogStep.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + stepId_ = 0L; + + handle_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogStep_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogStep getDefaultInstanceForType() { + return org.tensorflow.proto.framework.MemoryLogStep.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogStep build() { + org.tensorflow.proto.framework.MemoryLogStep result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogStep buildPartial() { + org.tensorflow.proto.framework.MemoryLogStep result = new org.tensorflow.proto.framework.MemoryLogStep(this); + result.stepId_ = stepId_; + result.handle_ = handle_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.MemoryLogStep) { + return mergeFrom((org.tensorflow.proto.framework.MemoryLogStep)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.MemoryLogStep other) { + if (other == org.tensorflow.proto.framework.MemoryLogStep.getDefaultInstance()) return this; + if (other.getStepId() != 0L) { + setStepId(other.getStepId()); + } + if (!other.getHandle().isEmpty()) { + handle_ = other.handle_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.MemoryLogStep parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.MemoryLogStep) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long stepId_ ; + /** + *
+     * Process-unique step id.
+     * 
+ * + * int64 step_id = 1; + */ + public long getStepId() { + return stepId_; + } + /** + *
+     * Process-unique step id.
+     * 
+ * + * int64 step_id = 1; + */ + public Builder setStepId(long value) { + + stepId_ = value; + onChanged(); + return this; + } + /** + *
+     * Process-unique step id.
+     * 
+ * + * int64 step_id = 1; + */ + public Builder clearStepId() { + + stepId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object handle_ = ""; + /** + *
+     * Handle describing the feeds and fetches of the step.
+     * 
+ * + * string handle = 2; + */ + public java.lang.String getHandle() { + java.lang.Object ref = handle_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handle_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Handle describing the feeds and fetches of the step.
+     * 
+ * + * string handle = 2; + */ + public com.google.protobuf.ByteString + getHandleBytes() { + java.lang.Object ref = handle_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Handle describing the feeds and fetches of the step.
+     * 
+ * + * string handle = 2; + */ + public Builder setHandle( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + handle_ = value; + onChanged(); + return this; + } + /** + *
+     * Handle describing the feeds and fetches of the step.
+     * 
+ * + * string handle = 2; + */ + public Builder clearHandle() { + + handle_ = getDefaultInstance().getHandle(); + onChanged(); + return this; + } + /** + *
+     * Handle describing the feeds and fetches of the step.
+     * 
+ * + * string handle = 2; + */ + public Builder setHandleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + handle_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.MemoryLogStep) + } + + // @@protoc_insertion_point(class_scope:tensorflow.MemoryLogStep) + private static final org.tensorflow.proto.framework.MemoryLogStep DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.MemoryLogStep(); + } + + public static org.tensorflow.proto.framework.MemoryLogStep getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MemoryLogStep parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MemoryLogStep(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogStep getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogStepOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogStepOrBuilder.java new file mode 100644 index 00000000000..3e8a13645c1 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogStepOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/log_memory.proto + +package org.tensorflow.proto.framework; + +public interface MemoryLogStepOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.MemoryLogStep) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Process-unique step id.
+   * 
+ * + * int64 step_id = 1; + */ + long getStepId(); + + /** + *
+   * Handle describing the feeds and fetches of the step.
+   * 
+ * + * string handle = 2; + */ + java.lang.String getHandle(); + /** + *
+   * Handle describing the feeds and fetches of the step.
+   * 
+ * + * string handle = 2; + */ + com.google.protobuf.ByteString + getHandleBytes(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorAllocation.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorAllocation.java new file mode 100644 index 00000000000..bf59aacf6ed --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorAllocation.java @@ -0,0 +1,884 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/log_memory.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.MemoryLogTensorAllocation} + */ +public final class MemoryLogTensorAllocation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogTensorAllocation) + MemoryLogTensorAllocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use MemoryLogTensorAllocation.newBuilder() to construct. + private MemoryLogTensorAllocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MemoryLogTensorAllocation() { + kernelName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MemoryLogTensorAllocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MemoryLogTensorAllocation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + stepId_ = input.readInt64(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + kernelName_ = s; + break; + } + case 26: { + org.tensorflow.proto.framework.TensorDescription.Builder subBuilder = null; + if (tensor_ != null) { + subBuilder = tensor_.toBuilder(); + } + tensor_ = input.readMessage(org.tensorflow.proto.framework.TensorDescription.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tensor_); + tensor_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorAllocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorAllocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MemoryLogTensorAllocation.class, org.tensorflow.proto.framework.MemoryLogTensorAllocation.Builder.class); + } + + public static final int STEP_ID_FIELD_NUMBER = 1; + private long stepId_; + /** + *
+   * Process-unique step id.
+   * 
+ * + * int64 step_id = 1; + */ + public long getStepId() { + return stepId_; + } + + public static final int KERNEL_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object kernelName_; + /** + *
+   * Name of the kernel making the allocation as set in GraphDef,
+   * e.g., "affine2/weights/Assign".
+   * 
+ * + * string kernel_name = 2; + */ + public java.lang.String getKernelName() { + java.lang.Object ref = kernelName_; + 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(); + kernelName_ = s; + return s; + } + } + /** + *
+   * Name of the kernel making the allocation as set in GraphDef,
+   * e.g., "affine2/weights/Assign".
+   * 
+ * + * string kernel_name = 2; + */ + public com.google.protobuf.ByteString + getKernelNameBytes() { + java.lang.Object ref = kernelName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kernelName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TENSOR_FIELD_NUMBER = 3; + private org.tensorflow.proto.framework.TensorDescription tensor_; + /** + *
+   * Allocated tensor details.
+   * 
+ * + * .tensorflow.TensorDescription tensor = 3; + */ + public boolean hasTensor() { + return tensor_ != null; + } + /** + *
+   * Allocated tensor details.
+   * 
+ * + * .tensorflow.TensorDescription tensor = 3; + */ + public org.tensorflow.proto.framework.TensorDescription getTensor() { + return tensor_ == null ? org.tensorflow.proto.framework.TensorDescription.getDefaultInstance() : tensor_; + } + /** + *
+   * Allocated tensor details.
+   * 
+ * + * .tensorflow.TensorDescription tensor = 3; + */ + public org.tensorflow.proto.framework.TensorDescriptionOrBuilder getTensorOrBuilder() { + return getTensor(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (stepId_ != 0L) { + output.writeInt64(1, stepId_); + } + if (!getKernelNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kernelName_); + } + if (tensor_ != null) { + output.writeMessage(3, getTensor()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (stepId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, stepId_); + } + if (!getKernelNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kernelName_); + } + if (tensor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getTensor()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.MemoryLogTensorAllocation)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.MemoryLogTensorAllocation other = (org.tensorflow.proto.framework.MemoryLogTensorAllocation) obj; + + if (getStepId() + != other.getStepId()) return false; + if (!getKernelName() + .equals(other.getKernelName())) return false; + if (hasTensor() != other.hasTensor()) return false; + if (hasTensor()) { + if (!getTensor() + .equals(other.getTensor())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STEP_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStepId()); + hash = (37 * hash) + KERNEL_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKernelName().hashCode(); + if (hasTensor()) { + hash = (37 * hash) + TENSOR_FIELD_NUMBER; + hash = (53 * hash) + getTensor().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.MemoryLogTensorAllocation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogTensorAllocation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogTensorAllocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogTensorAllocation 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.proto.framework.MemoryLogTensorAllocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogTensorAllocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogTensorAllocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogTensorAllocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogTensorAllocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogTensorAllocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogTensorAllocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogTensorAllocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.MemoryLogTensorAllocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.MemoryLogTensorAllocation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.MemoryLogTensorAllocation) + org.tensorflow.proto.framework.MemoryLogTensorAllocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorAllocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorAllocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MemoryLogTensorAllocation.class, org.tensorflow.proto.framework.MemoryLogTensorAllocation.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.MemoryLogTensorAllocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + stepId_ = 0L; + + kernelName_ = ""; + + if (tensorBuilder_ == null) { + tensor_ = null; + } else { + tensor_ = null; + tensorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorAllocation_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogTensorAllocation getDefaultInstanceForType() { + return org.tensorflow.proto.framework.MemoryLogTensorAllocation.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogTensorAllocation build() { + org.tensorflow.proto.framework.MemoryLogTensorAllocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogTensorAllocation buildPartial() { + org.tensorflow.proto.framework.MemoryLogTensorAllocation result = new org.tensorflow.proto.framework.MemoryLogTensorAllocation(this); + result.stepId_ = stepId_; + result.kernelName_ = kernelName_; + if (tensorBuilder_ == null) { + result.tensor_ = tensor_; + } else { + result.tensor_ = tensorBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.MemoryLogTensorAllocation) { + return mergeFrom((org.tensorflow.proto.framework.MemoryLogTensorAllocation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.MemoryLogTensorAllocation other) { + if (other == org.tensorflow.proto.framework.MemoryLogTensorAllocation.getDefaultInstance()) return this; + if (other.getStepId() != 0L) { + setStepId(other.getStepId()); + } + if (!other.getKernelName().isEmpty()) { + kernelName_ = other.kernelName_; + onChanged(); + } + if (other.hasTensor()) { + mergeTensor(other.getTensor()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.MemoryLogTensorAllocation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.MemoryLogTensorAllocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long stepId_ ; + /** + *
+     * Process-unique step id.
+     * 
+ * + * int64 step_id = 1; + */ + public long getStepId() { + return stepId_; + } + /** + *
+     * Process-unique step id.
+     * 
+ * + * int64 step_id = 1; + */ + public Builder setStepId(long value) { + + stepId_ = value; + onChanged(); + return this; + } + /** + *
+     * Process-unique step id.
+     * 
+ * + * int64 step_id = 1; + */ + public Builder clearStepId() { + + stepId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object kernelName_ = ""; + /** + *
+     * Name of the kernel making the allocation as set in GraphDef,
+     * e.g., "affine2/weights/Assign".
+     * 
+ * + * string kernel_name = 2; + */ + public java.lang.String getKernelName() { + java.lang.Object ref = kernelName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kernelName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the kernel making the allocation as set in GraphDef,
+     * e.g., "affine2/weights/Assign".
+     * 
+ * + * string kernel_name = 2; + */ + public com.google.protobuf.ByteString + getKernelNameBytes() { + java.lang.Object ref = kernelName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kernelName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the kernel making the allocation as set in GraphDef,
+     * e.g., "affine2/weights/Assign".
+     * 
+ * + * string kernel_name = 2; + */ + public Builder setKernelName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kernelName_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the kernel making the allocation as set in GraphDef,
+     * e.g., "affine2/weights/Assign".
+     * 
+ * + * string kernel_name = 2; + */ + public Builder clearKernelName() { + + kernelName_ = getDefaultInstance().getKernelName(); + onChanged(); + return this; + } + /** + *
+     * Name of the kernel making the allocation as set in GraphDef,
+     * e.g., "affine2/weights/Assign".
+     * 
+ * + * string kernel_name = 2; + */ + public Builder setKernelNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kernelName_ = value; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.TensorDescription tensor_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorDescription, org.tensorflow.proto.framework.TensorDescription.Builder, org.tensorflow.proto.framework.TensorDescriptionOrBuilder> tensorBuilder_; + /** + *
+     * Allocated tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 3; + */ + public boolean hasTensor() { + return tensorBuilder_ != null || tensor_ != null; + } + /** + *
+     * Allocated tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 3; + */ + public org.tensorflow.proto.framework.TensorDescription getTensor() { + if (tensorBuilder_ == null) { + return tensor_ == null ? org.tensorflow.proto.framework.TensorDescription.getDefaultInstance() : tensor_; + } else { + return tensorBuilder_.getMessage(); + } + } + /** + *
+     * Allocated tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 3; + */ + public Builder setTensor(org.tensorflow.proto.framework.TensorDescription value) { + if (tensorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tensor_ = value; + onChanged(); + } else { + tensorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Allocated tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 3; + */ + public Builder setTensor( + org.tensorflow.proto.framework.TensorDescription.Builder builderForValue) { + if (tensorBuilder_ == null) { + tensor_ = builderForValue.build(); + onChanged(); + } else { + tensorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Allocated tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 3; + */ + public Builder mergeTensor(org.tensorflow.proto.framework.TensorDescription value) { + if (tensorBuilder_ == null) { + if (tensor_ != null) { + tensor_ = + org.tensorflow.proto.framework.TensorDescription.newBuilder(tensor_).mergeFrom(value).buildPartial(); + } else { + tensor_ = value; + } + onChanged(); + } else { + tensorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Allocated tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 3; + */ + public Builder clearTensor() { + if (tensorBuilder_ == null) { + tensor_ = null; + onChanged(); + } else { + tensor_ = null; + tensorBuilder_ = null; + } + + return this; + } + /** + *
+     * Allocated tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 3; + */ + public org.tensorflow.proto.framework.TensorDescription.Builder getTensorBuilder() { + + onChanged(); + return getTensorFieldBuilder().getBuilder(); + } + /** + *
+     * Allocated tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 3; + */ + public org.tensorflow.proto.framework.TensorDescriptionOrBuilder getTensorOrBuilder() { + if (tensorBuilder_ != null) { + return tensorBuilder_.getMessageOrBuilder(); + } else { + return tensor_ == null ? + org.tensorflow.proto.framework.TensorDescription.getDefaultInstance() : tensor_; + } + } + /** + *
+     * Allocated tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorDescription, org.tensorflow.proto.framework.TensorDescription.Builder, org.tensorflow.proto.framework.TensorDescriptionOrBuilder> + getTensorFieldBuilder() { + if (tensorBuilder_ == null) { + tensorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorDescription, org.tensorflow.proto.framework.TensorDescription.Builder, org.tensorflow.proto.framework.TensorDescriptionOrBuilder>( + getTensor(), + getParentForChildren(), + isClean()); + tensor_ = null; + } + return tensorBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.MemoryLogTensorAllocation) + } + + // @@protoc_insertion_point(class_scope:tensorflow.MemoryLogTensorAllocation) + private static final org.tensorflow.proto.framework.MemoryLogTensorAllocation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.MemoryLogTensorAllocation(); + } + + public static org.tensorflow.proto.framework.MemoryLogTensorAllocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MemoryLogTensorAllocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MemoryLogTensorAllocation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogTensorAllocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorAllocationOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorAllocationOrBuilder.java new file mode 100644 index 00000000000..1b3a3732149 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorAllocationOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/log_memory.proto + +package org.tensorflow.proto.framework; + +public interface MemoryLogTensorAllocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.MemoryLogTensorAllocation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Process-unique step id.
+   * 
+ * + * int64 step_id = 1; + */ + long getStepId(); + + /** + *
+   * Name of the kernel making the allocation as set in GraphDef,
+   * e.g., "affine2/weights/Assign".
+   * 
+ * + * string kernel_name = 2; + */ + java.lang.String getKernelName(); + /** + *
+   * Name of the kernel making the allocation as set in GraphDef,
+   * e.g., "affine2/weights/Assign".
+   * 
+ * + * string kernel_name = 2; + */ + com.google.protobuf.ByteString + getKernelNameBytes(); + + /** + *
+   * Allocated tensor details.
+   * 
+ * + * .tensorflow.TensorDescription tensor = 3; + */ + boolean hasTensor(); + /** + *
+   * Allocated tensor details.
+   * 
+ * + * .tensorflow.TensorDescription tensor = 3; + */ + org.tensorflow.proto.framework.TensorDescription getTensor(); + /** + *
+   * Allocated tensor details.
+   * 
+ * + * .tensorflow.TensorDescription tensor = 3; + */ + org.tensorflow.proto.framework.TensorDescriptionOrBuilder getTensorOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorDeallocation.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorDeallocation.java new file mode 100644 index 00000000000..f0061b53c50 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorDeallocation.java @@ -0,0 +1,652 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/log_memory.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.MemoryLogTensorDeallocation} + */ +public final class MemoryLogTensorDeallocation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogTensorDeallocation) + MemoryLogTensorDeallocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use MemoryLogTensorDeallocation.newBuilder() to construct. + private MemoryLogTensorDeallocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MemoryLogTensorDeallocation() { + allocatorName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MemoryLogTensorDeallocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MemoryLogTensorDeallocation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + allocationId_ = input.readInt64(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + allocatorName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorDeallocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorDeallocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MemoryLogTensorDeallocation.class, org.tensorflow.proto.framework.MemoryLogTensorDeallocation.Builder.class); + } + + public static final int ALLOCATION_ID_FIELD_NUMBER = 1; + private long allocationId_; + /** + *
+   * Id of the tensor buffer being deallocated, used to match to a
+   * corresponding allocation.
+   * 
+ * + * int64 allocation_id = 1; + */ + public long getAllocationId() { + return allocationId_; + } + + public static final int ALLOCATOR_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object allocatorName_; + /** + *
+   * Name of the allocator used.
+   * 
+ * + * string allocator_name = 2; + */ + 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; + } + } + /** + *
+   * Name of the allocator used.
+   * 
+ * + * string allocator_name = 2; + */ + 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; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (allocationId_ != 0L) { + output.writeInt64(1, allocationId_); + } + if (!getAllocatorNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, allocatorName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (allocationId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, allocationId_); + } + if (!getAllocatorNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, allocatorName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.MemoryLogTensorDeallocation)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.MemoryLogTensorDeallocation other = (org.tensorflow.proto.framework.MemoryLogTensorDeallocation) obj; + + if (getAllocationId() + != other.getAllocationId()) return false; + if (!getAllocatorName() + .equals(other.getAllocatorName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ALLOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAllocationId()); + hash = (37 * hash) + ALLOCATOR_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAllocatorName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.MemoryLogTensorDeallocation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogTensorDeallocation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogTensorDeallocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogTensorDeallocation 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.proto.framework.MemoryLogTensorDeallocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogTensorDeallocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogTensorDeallocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogTensorDeallocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogTensorDeallocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogTensorDeallocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogTensorDeallocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogTensorDeallocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.MemoryLogTensorDeallocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.MemoryLogTensorDeallocation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.MemoryLogTensorDeallocation) + org.tensorflow.proto.framework.MemoryLogTensorDeallocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorDeallocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorDeallocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MemoryLogTensorDeallocation.class, org.tensorflow.proto.framework.MemoryLogTensorDeallocation.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.MemoryLogTensorDeallocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + allocationId_ = 0L; + + allocatorName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorDeallocation_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogTensorDeallocation getDefaultInstanceForType() { + return org.tensorflow.proto.framework.MemoryLogTensorDeallocation.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogTensorDeallocation build() { + org.tensorflow.proto.framework.MemoryLogTensorDeallocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogTensorDeallocation buildPartial() { + org.tensorflow.proto.framework.MemoryLogTensorDeallocation result = new org.tensorflow.proto.framework.MemoryLogTensorDeallocation(this); + result.allocationId_ = allocationId_; + result.allocatorName_ = allocatorName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.MemoryLogTensorDeallocation) { + return mergeFrom((org.tensorflow.proto.framework.MemoryLogTensorDeallocation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.MemoryLogTensorDeallocation other) { + if (other == org.tensorflow.proto.framework.MemoryLogTensorDeallocation.getDefaultInstance()) return this; + if (other.getAllocationId() != 0L) { + setAllocationId(other.getAllocationId()); + } + if (!other.getAllocatorName().isEmpty()) { + allocatorName_ = other.allocatorName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.MemoryLogTensorDeallocation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.MemoryLogTensorDeallocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long allocationId_ ; + /** + *
+     * Id of the tensor buffer being deallocated, used to match to a
+     * corresponding allocation.
+     * 
+ * + * int64 allocation_id = 1; + */ + public long getAllocationId() { + return allocationId_; + } + /** + *
+     * Id of the tensor buffer being deallocated, used to match to a
+     * corresponding allocation.
+     * 
+ * + * int64 allocation_id = 1; + */ + public Builder setAllocationId(long value) { + + allocationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Id of the tensor buffer being deallocated, used to match to a
+     * corresponding allocation.
+     * 
+ * + * int64 allocation_id = 1; + */ + public Builder clearAllocationId() { + + allocationId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object allocatorName_ = ""; + /** + *
+     * Name of the allocator used.
+     * 
+ * + * string allocator_name = 2; + */ + 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; + } + } + /** + *
+     * Name of the allocator used.
+     * 
+ * + * string allocator_name = 2; + */ + 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; + } + } + /** + *
+     * Name of the allocator used.
+     * 
+ * + * string allocator_name = 2; + */ + public Builder setAllocatorName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + allocatorName_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the allocator used.
+     * 
+ * + * string allocator_name = 2; + */ + public Builder clearAllocatorName() { + + allocatorName_ = getDefaultInstance().getAllocatorName(); + onChanged(); + return this; + } + /** + *
+     * Name of the allocator used.
+     * 
+ * + * string allocator_name = 2; + */ + public Builder setAllocatorNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + allocatorName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.MemoryLogTensorDeallocation) + } + + // @@protoc_insertion_point(class_scope:tensorflow.MemoryLogTensorDeallocation) + private static final org.tensorflow.proto.framework.MemoryLogTensorDeallocation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.MemoryLogTensorDeallocation(); + } + + public static org.tensorflow.proto.framework.MemoryLogTensorDeallocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MemoryLogTensorDeallocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MemoryLogTensorDeallocation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogTensorDeallocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorDeallocationOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorDeallocationOrBuilder.java new file mode 100644 index 00000000000..7d45248a17a --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorDeallocationOrBuilder.java @@ -0,0 +1,37 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/log_memory.proto + +package org.tensorflow.proto.framework; + +public interface MemoryLogTensorDeallocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.MemoryLogTensorDeallocation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Id of the tensor buffer being deallocated, used to match to a
+   * corresponding allocation.
+   * 
+ * + * int64 allocation_id = 1; + */ + long getAllocationId(); + + /** + *
+   * Name of the allocator used.
+   * 
+ * + * string allocator_name = 2; + */ + java.lang.String getAllocatorName(); + /** + *
+   * Name of the allocator used.
+   * 
+ * + * string allocator_name = 2; + */ + com.google.protobuf.ByteString + getAllocatorNameBytes(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorOutput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorOutput.java new file mode 100644 index 00000000000..a8aaf7dc7d9 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorOutput.java @@ -0,0 +1,957 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/log_memory.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.MemoryLogTensorOutput} + */ +public final class MemoryLogTensorOutput extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogTensorOutput) + MemoryLogTensorOutputOrBuilder { +private static final long serialVersionUID = 0L; + // Use MemoryLogTensorOutput.newBuilder() to construct. + private MemoryLogTensorOutput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MemoryLogTensorOutput() { + kernelName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MemoryLogTensorOutput(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MemoryLogTensorOutput( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + stepId_ = input.readInt64(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + kernelName_ = s; + break; + } + case 24: { + + index_ = input.readInt32(); + break; + } + case 34: { + org.tensorflow.proto.framework.TensorDescription.Builder subBuilder = null; + if (tensor_ != null) { + subBuilder = tensor_.toBuilder(); + } + tensor_ = input.readMessage(org.tensorflow.proto.framework.TensorDescription.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tensor_); + tensor_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MemoryLogTensorOutput.class, org.tensorflow.proto.framework.MemoryLogTensorOutput.Builder.class); + } + + public static final int STEP_ID_FIELD_NUMBER = 1; + private long stepId_; + /** + *
+   * Process-unique step id.
+   * 
+ * + * int64 step_id = 1; + */ + public long getStepId() { + return stepId_; + } + + public static final int KERNEL_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object kernelName_; + /** + *
+   * Name of the kernel producing an output as set in GraphDef, e.g.,
+   * "affine2/weights/Assign".
+   * 
+ * + * string kernel_name = 2; + */ + public java.lang.String getKernelName() { + java.lang.Object ref = kernelName_; + 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(); + kernelName_ = s; + return s; + } + } + /** + *
+   * Name of the kernel producing an output as set in GraphDef, e.g.,
+   * "affine2/weights/Assign".
+   * 
+ * + * string kernel_name = 2; + */ + public com.google.protobuf.ByteString + getKernelNameBytes() { + java.lang.Object ref = kernelName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kernelName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_FIELD_NUMBER = 3; + private int index_; + /** + *
+   * Index of the output being set.
+   * 
+ * + * int32 index = 3; + */ + public int getIndex() { + return index_; + } + + public static final int TENSOR_FIELD_NUMBER = 4; + private org.tensorflow.proto.framework.TensorDescription tensor_; + /** + *
+   * Output tensor details.
+   * 
+ * + * .tensorflow.TensorDescription tensor = 4; + */ + public boolean hasTensor() { + return tensor_ != null; + } + /** + *
+   * Output tensor details.
+   * 
+ * + * .tensorflow.TensorDescription tensor = 4; + */ + public org.tensorflow.proto.framework.TensorDescription getTensor() { + return tensor_ == null ? org.tensorflow.proto.framework.TensorDescription.getDefaultInstance() : tensor_; + } + /** + *
+   * Output tensor details.
+   * 
+ * + * .tensorflow.TensorDescription tensor = 4; + */ + public org.tensorflow.proto.framework.TensorDescriptionOrBuilder getTensorOrBuilder() { + return getTensor(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (stepId_ != 0L) { + output.writeInt64(1, stepId_); + } + if (!getKernelNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kernelName_); + } + if (index_ != 0) { + output.writeInt32(3, index_); + } + if (tensor_ != null) { + output.writeMessage(4, getTensor()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (stepId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, stepId_); + } + if (!getKernelNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kernelName_); + } + if (index_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, index_); + } + if (tensor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getTensor()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.MemoryLogTensorOutput)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.MemoryLogTensorOutput other = (org.tensorflow.proto.framework.MemoryLogTensorOutput) obj; + + if (getStepId() + != other.getStepId()) return false; + if (!getKernelName() + .equals(other.getKernelName())) return false; + if (getIndex() + != other.getIndex()) return false; + if (hasTensor() != other.hasTensor()) return false; + if (hasTensor()) { + if (!getTensor() + .equals(other.getTensor())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STEP_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStepId()); + hash = (37 * hash) + KERNEL_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKernelName().hashCode(); + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex(); + if (hasTensor()) { + hash = (37 * hash) + TENSOR_FIELD_NUMBER; + hash = (53 * hash) + getTensor().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.MemoryLogTensorOutput parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogTensorOutput parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogTensorOutput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogTensorOutput 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.proto.framework.MemoryLogTensorOutput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryLogTensorOutput parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogTensorOutput parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogTensorOutput parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogTensorOutput parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogTensorOutput parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryLogTensorOutput parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryLogTensorOutput parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.MemoryLogTensorOutput prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.MemoryLogTensorOutput} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.MemoryLogTensorOutput) + org.tensorflow.proto.framework.MemoryLogTensorOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MemoryLogTensorOutput.class, org.tensorflow.proto.framework.MemoryLogTensorOutput.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.MemoryLogTensorOutput.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + stepId_ = 0L; + + kernelName_ = ""; + + index_ = 0; + + if (tensorBuilder_ == null) { + tensor_ = null; + } else { + tensor_ = null; + tensorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorOutput_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogTensorOutput getDefaultInstanceForType() { + return org.tensorflow.proto.framework.MemoryLogTensorOutput.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogTensorOutput build() { + org.tensorflow.proto.framework.MemoryLogTensorOutput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogTensorOutput buildPartial() { + org.tensorflow.proto.framework.MemoryLogTensorOutput result = new org.tensorflow.proto.framework.MemoryLogTensorOutput(this); + result.stepId_ = stepId_; + result.kernelName_ = kernelName_; + result.index_ = index_; + if (tensorBuilder_ == null) { + result.tensor_ = tensor_; + } else { + result.tensor_ = tensorBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.MemoryLogTensorOutput) { + return mergeFrom((org.tensorflow.proto.framework.MemoryLogTensorOutput)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.MemoryLogTensorOutput other) { + if (other == org.tensorflow.proto.framework.MemoryLogTensorOutput.getDefaultInstance()) return this; + if (other.getStepId() != 0L) { + setStepId(other.getStepId()); + } + if (!other.getKernelName().isEmpty()) { + kernelName_ = other.kernelName_; + onChanged(); + } + if (other.getIndex() != 0) { + setIndex(other.getIndex()); + } + if (other.hasTensor()) { + mergeTensor(other.getTensor()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.MemoryLogTensorOutput parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.MemoryLogTensorOutput) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long stepId_ ; + /** + *
+     * Process-unique step id.
+     * 
+ * + * int64 step_id = 1; + */ + public long getStepId() { + return stepId_; + } + /** + *
+     * Process-unique step id.
+     * 
+ * + * int64 step_id = 1; + */ + public Builder setStepId(long value) { + + stepId_ = value; + onChanged(); + return this; + } + /** + *
+     * Process-unique step id.
+     * 
+ * + * int64 step_id = 1; + */ + public Builder clearStepId() { + + stepId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object kernelName_ = ""; + /** + *
+     * Name of the kernel producing an output as set in GraphDef, e.g.,
+     * "affine2/weights/Assign".
+     * 
+ * + * string kernel_name = 2; + */ + public java.lang.String getKernelName() { + java.lang.Object ref = kernelName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kernelName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the kernel producing an output as set in GraphDef, e.g.,
+     * "affine2/weights/Assign".
+     * 
+ * + * string kernel_name = 2; + */ + public com.google.protobuf.ByteString + getKernelNameBytes() { + java.lang.Object ref = kernelName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kernelName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the kernel producing an output as set in GraphDef, e.g.,
+     * "affine2/weights/Assign".
+     * 
+ * + * string kernel_name = 2; + */ + public Builder setKernelName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kernelName_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the kernel producing an output as set in GraphDef, e.g.,
+     * "affine2/weights/Assign".
+     * 
+ * + * string kernel_name = 2; + */ + public Builder clearKernelName() { + + kernelName_ = getDefaultInstance().getKernelName(); + onChanged(); + return this; + } + /** + *
+     * Name of the kernel producing an output as set in GraphDef, e.g.,
+     * "affine2/weights/Assign".
+     * 
+ * + * string kernel_name = 2; + */ + public Builder setKernelNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kernelName_ = value; + onChanged(); + return this; + } + + private int index_ ; + /** + *
+     * Index of the output being set.
+     * 
+ * + * int32 index = 3; + */ + public int getIndex() { + return index_; + } + /** + *
+     * Index of the output being set.
+     * 
+ * + * int32 index = 3; + */ + public Builder setIndex(int value) { + + index_ = value; + onChanged(); + return this; + } + /** + *
+     * Index of the output being set.
+     * 
+ * + * int32 index = 3; + */ + public Builder clearIndex() { + + index_ = 0; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.TensorDescription tensor_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorDescription, org.tensorflow.proto.framework.TensorDescription.Builder, org.tensorflow.proto.framework.TensorDescriptionOrBuilder> tensorBuilder_; + /** + *
+     * Output tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 4; + */ + public boolean hasTensor() { + return tensorBuilder_ != null || tensor_ != null; + } + /** + *
+     * Output tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 4; + */ + public org.tensorflow.proto.framework.TensorDescription getTensor() { + if (tensorBuilder_ == null) { + return tensor_ == null ? org.tensorflow.proto.framework.TensorDescription.getDefaultInstance() : tensor_; + } else { + return tensorBuilder_.getMessage(); + } + } + /** + *
+     * Output tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 4; + */ + public Builder setTensor(org.tensorflow.proto.framework.TensorDescription value) { + if (tensorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tensor_ = value; + onChanged(); + } else { + tensorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 4; + */ + public Builder setTensor( + org.tensorflow.proto.framework.TensorDescription.Builder builderForValue) { + if (tensorBuilder_ == null) { + tensor_ = builderForValue.build(); + onChanged(); + } else { + tensorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 4; + */ + public Builder mergeTensor(org.tensorflow.proto.framework.TensorDescription value) { + if (tensorBuilder_ == null) { + if (tensor_ != null) { + tensor_ = + org.tensorflow.proto.framework.TensorDescription.newBuilder(tensor_).mergeFrom(value).buildPartial(); + } else { + tensor_ = value; + } + onChanged(); + } else { + tensorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 4; + */ + public Builder clearTensor() { + if (tensorBuilder_ == null) { + tensor_ = null; + onChanged(); + } else { + tensor_ = null; + tensorBuilder_ = null; + } + + return this; + } + /** + *
+     * Output tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 4; + */ + public org.tensorflow.proto.framework.TensorDescription.Builder getTensorBuilder() { + + onChanged(); + return getTensorFieldBuilder().getBuilder(); + } + /** + *
+     * Output tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 4; + */ + public org.tensorflow.proto.framework.TensorDescriptionOrBuilder getTensorOrBuilder() { + if (tensorBuilder_ != null) { + return tensorBuilder_.getMessageOrBuilder(); + } else { + return tensor_ == null ? + org.tensorflow.proto.framework.TensorDescription.getDefaultInstance() : tensor_; + } + } + /** + *
+     * Output tensor details.
+     * 
+ * + * .tensorflow.TensorDescription tensor = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorDescription, org.tensorflow.proto.framework.TensorDescription.Builder, org.tensorflow.proto.framework.TensorDescriptionOrBuilder> + getTensorFieldBuilder() { + if (tensorBuilder_ == null) { + tensorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorDescription, org.tensorflow.proto.framework.TensorDescription.Builder, org.tensorflow.proto.framework.TensorDescriptionOrBuilder>( + getTensor(), + getParentForChildren(), + isClean()); + tensor_ = null; + } + return tensorBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.MemoryLogTensorOutput) + } + + // @@protoc_insertion_point(class_scope:tensorflow.MemoryLogTensorOutput) + private static final org.tensorflow.proto.framework.MemoryLogTensorOutput DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.MemoryLogTensorOutput(); + } + + public static org.tensorflow.proto.framework.MemoryLogTensorOutput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MemoryLogTensorOutput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MemoryLogTensorOutput(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryLogTensorOutput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorOutputOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorOutputOrBuilder.java new file mode 100644 index 00000000000..b9275e22f7e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryLogTensorOutputOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/log_memory.proto + +package org.tensorflow.proto.framework; + +public interface MemoryLogTensorOutputOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.MemoryLogTensorOutput) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Process-unique step id.
+   * 
+ * + * int64 step_id = 1; + */ + long getStepId(); + + /** + *
+   * Name of the kernel producing an output as set in GraphDef, e.g.,
+   * "affine2/weights/Assign".
+   * 
+ * + * string kernel_name = 2; + */ + java.lang.String getKernelName(); + /** + *
+   * Name of the kernel producing an output as set in GraphDef, e.g.,
+   * "affine2/weights/Assign".
+   * 
+ * + * string kernel_name = 2; + */ + com.google.protobuf.ByteString + getKernelNameBytes(); + + /** + *
+   * Index of the output being set.
+   * 
+ * + * int32 index = 3; + */ + int getIndex(); + + /** + *
+   * Output tensor details.
+   * 
+ * + * .tensorflow.TensorDescription tensor = 4; + */ + boolean hasTensor(); + /** + *
+   * Output tensor details.
+   * 
+ * + * .tensorflow.TensorDescription tensor = 4; + */ + org.tensorflow.proto.framework.TensorDescription getTensor(); + /** + *
+   * Output tensor details.
+   * 
+ * + * .tensorflow.TensorDescription tensor = 4; + */ + org.tensorflow.proto.framework.TensorDescriptionOrBuilder getTensorOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryStats.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryStats.java new file mode 100644 index 00000000000..e351d0be2b0 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryStats.java @@ -0,0 +1,981 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/step_stats.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * For memory tracking.
+ * 
+ * + * Protobuf type {@code tensorflow.MemoryStats} + */ +public final class MemoryStats extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.MemoryStats) + MemoryStatsOrBuilder { +private static final long serialVersionUID = 0L; + // Use MemoryStats.newBuilder() to construct. + private MemoryStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MemoryStats() { + persistentTensorAllocIds_ = emptyLongList(); + devicePersistentTensorAllocIds_ = emptyLongList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MemoryStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MemoryStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + tempMemorySize_ = input.readInt64(); + break; + } + case 16: { + + deviceTempMemorySize_ = input.readInt64(); + break; + } + case 24: { + + persistentMemorySize_ = input.readInt64(); + break; + } + case 32: { + + devicePersistentMemorySize_ = input.readInt64(); + break; + } + case 40: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + persistentTensorAllocIds_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + persistentTensorAllocIds_.addLong(input.readInt64()); + break; + } + case 42: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + persistentTensorAllocIds_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + persistentTensorAllocIds_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 48: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + devicePersistentTensorAllocIds_ = newLongList(); + mutable_bitField0_ |= 0x00000002; + } + devicePersistentTensorAllocIds_.addLong(input.readInt64()); + break; + } + case 50: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { + devicePersistentTensorAllocIds_ = newLongList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + devicePersistentTensorAllocIds_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + persistentTensorAllocIds_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + devicePersistentTensorAllocIds_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_MemoryStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_MemoryStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MemoryStats.class, org.tensorflow.proto.framework.MemoryStats.Builder.class); + } + + public static final int TEMP_MEMORY_SIZE_FIELD_NUMBER = 1; + private long tempMemorySize_; + /** + * int64 temp_memory_size = 1; + */ + public long getTempMemorySize() { + return tempMemorySize_; + } + + public static final int PERSISTENT_MEMORY_SIZE_FIELD_NUMBER = 3; + private long persistentMemorySize_; + /** + * int64 persistent_memory_size = 3; + */ + public long getPersistentMemorySize() { + return persistentMemorySize_; + } + + public static final int PERSISTENT_TENSOR_ALLOC_IDS_FIELD_NUMBER = 5; + private com.google.protobuf.Internal.LongList persistentTensorAllocIds_; + /** + * repeated int64 persistent_tensor_alloc_ids = 5; + */ + public java.util.List + getPersistentTensorAllocIdsList() { + return persistentTensorAllocIds_; + } + /** + * repeated int64 persistent_tensor_alloc_ids = 5; + */ + public int getPersistentTensorAllocIdsCount() { + return persistentTensorAllocIds_.size(); + } + /** + * repeated int64 persistent_tensor_alloc_ids = 5; + */ + public long getPersistentTensorAllocIds(int index) { + return persistentTensorAllocIds_.getLong(index); + } + private int persistentTensorAllocIdsMemoizedSerializedSize = -1; + + public static final int DEVICE_TEMP_MEMORY_SIZE_FIELD_NUMBER = 2; + private long deviceTempMemorySize_; + /** + * int64 device_temp_memory_size = 2 [deprecated = true]; + */ + @java.lang.Deprecated public long getDeviceTempMemorySize() { + return deviceTempMemorySize_; + } + + public static final int DEVICE_PERSISTENT_MEMORY_SIZE_FIELD_NUMBER = 4; + private long devicePersistentMemorySize_; + /** + * int64 device_persistent_memory_size = 4 [deprecated = true]; + */ + @java.lang.Deprecated public long getDevicePersistentMemorySize() { + return devicePersistentMemorySize_; + } + + public static final int DEVICE_PERSISTENT_TENSOR_ALLOC_IDS_FIELD_NUMBER = 6; + private com.google.protobuf.Internal.LongList devicePersistentTensorAllocIds_; + /** + * repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true]; + */ + @java.lang.Deprecated public java.util.List + getDevicePersistentTensorAllocIdsList() { + return devicePersistentTensorAllocIds_; + } + /** + * repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true]; + */ + @java.lang.Deprecated public int getDevicePersistentTensorAllocIdsCount() { + return devicePersistentTensorAllocIds_.size(); + } + /** + * repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true]; + */ + @java.lang.Deprecated public long getDevicePersistentTensorAllocIds(int index) { + return devicePersistentTensorAllocIds_.getLong(index); + } + private int devicePersistentTensorAllocIdsMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (tempMemorySize_ != 0L) { + output.writeInt64(1, tempMemorySize_); + } + if (deviceTempMemorySize_ != 0L) { + output.writeInt64(2, deviceTempMemorySize_); + } + if (persistentMemorySize_ != 0L) { + output.writeInt64(3, persistentMemorySize_); + } + if (devicePersistentMemorySize_ != 0L) { + output.writeInt64(4, devicePersistentMemorySize_); + } + if (getPersistentTensorAllocIdsList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(persistentTensorAllocIdsMemoizedSerializedSize); + } + for (int i = 0; i < persistentTensorAllocIds_.size(); i++) { + output.writeInt64NoTag(persistentTensorAllocIds_.getLong(i)); + } + if (getDevicePersistentTensorAllocIdsList().size() > 0) { + output.writeUInt32NoTag(50); + output.writeUInt32NoTag(devicePersistentTensorAllocIdsMemoizedSerializedSize); + } + for (int i = 0; i < devicePersistentTensorAllocIds_.size(); i++) { + output.writeInt64NoTag(devicePersistentTensorAllocIds_.getLong(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tempMemorySize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, tempMemorySize_); + } + if (deviceTempMemorySize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, deviceTempMemorySize_); + } + if (persistentMemorySize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, persistentMemorySize_); + } + if (devicePersistentMemorySize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, devicePersistentMemorySize_); + } + { + int dataSize = 0; + for (int i = 0; i < persistentTensorAllocIds_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(persistentTensorAllocIds_.getLong(i)); + } + size += dataSize; + if (!getPersistentTensorAllocIdsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + persistentTensorAllocIdsMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < devicePersistentTensorAllocIds_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(devicePersistentTensorAllocIds_.getLong(i)); + } + size += dataSize; + if (!getDevicePersistentTensorAllocIdsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + devicePersistentTensorAllocIdsMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.MemoryStats)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.MemoryStats other = (org.tensorflow.proto.framework.MemoryStats) obj; + + if (getTempMemorySize() + != other.getTempMemorySize()) return false; + if (getPersistentMemorySize() + != other.getPersistentMemorySize()) return false; + if (!getPersistentTensorAllocIdsList() + .equals(other.getPersistentTensorAllocIdsList())) return false; + if (getDeviceTempMemorySize() + != other.getDeviceTempMemorySize()) return false; + if (getDevicePersistentMemorySize() + != other.getDevicePersistentMemorySize()) return false; + if (!getDevicePersistentTensorAllocIdsList() + .equals(other.getDevicePersistentTensorAllocIdsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TEMP_MEMORY_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTempMemorySize()); + hash = (37 * hash) + PERSISTENT_MEMORY_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPersistentMemorySize()); + if (getPersistentTensorAllocIdsCount() > 0) { + hash = (37 * hash) + PERSISTENT_TENSOR_ALLOC_IDS_FIELD_NUMBER; + hash = (53 * hash) + getPersistentTensorAllocIdsList().hashCode(); + } + hash = (37 * hash) + DEVICE_TEMP_MEMORY_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDeviceTempMemorySize()); + hash = (37 * hash) + DEVICE_PERSISTENT_MEMORY_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDevicePersistentMemorySize()); + if (getDevicePersistentTensorAllocIdsCount() > 0) { + hash = (37 * hash) + DEVICE_PERSISTENT_TENSOR_ALLOC_IDS_FIELD_NUMBER; + hash = (53 * hash) + getDevicePersistentTensorAllocIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.MemoryStats parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryStats parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryStats 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.proto.framework.MemoryStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MemoryStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryStats parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryStats parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MemoryStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MemoryStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.MemoryStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * For memory tracking.
+   * 
+ * + * Protobuf type {@code tensorflow.MemoryStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.MemoryStats) + org.tensorflow.proto.framework.MemoryStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_MemoryStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_MemoryStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MemoryStats.class, org.tensorflow.proto.framework.MemoryStats.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.MemoryStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + tempMemorySize_ = 0L; + + persistentMemorySize_ = 0L; + + persistentTensorAllocIds_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + deviceTempMemorySize_ = 0L; + + devicePersistentMemorySize_ = 0L; + + devicePersistentTensorAllocIds_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_MemoryStats_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryStats getDefaultInstanceForType() { + return org.tensorflow.proto.framework.MemoryStats.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryStats build() { + org.tensorflow.proto.framework.MemoryStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryStats buildPartial() { + org.tensorflow.proto.framework.MemoryStats result = new org.tensorflow.proto.framework.MemoryStats(this); + int from_bitField0_ = bitField0_; + result.tempMemorySize_ = tempMemorySize_; + result.persistentMemorySize_ = persistentMemorySize_; + if (((bitField0_ & 0x00000001) != 0)) { + persistentTensorAllocIds_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.persistentTensorAllocIds_ = persistentTensorAllocIds_; + result.deviceTempMemorySize_ = deviceTempMemorySize_; + result.devicePersistentMemorySize_ = devicePersistentMemorySize_; + if (((bitField0_ & 0x00000002) != 0)) { + devicePersistentTensorAllocIds_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.devicePersistentTensorAllocIds_ = devicePersistentTensorAllocIds_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.MemoryStats) { + return mergeFrom((org.tensorflow.proto.framework.MemoryStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.MemoryStats other) { + if (other == org.tensorflow.proto.framework.MemoryStats.getDefaultInstance()) return this; + if (other.getTempMemorySize() != 0L) { + setTempMemorySize(other.getTempMemorySize()); + } + if (other.getPersistentMemorySize() != 0L) { + setPersistentMemorySize(other.getPersistentMemorySize()); + } + if (!other.persistentTensorAllocIds_.isEmpty()) { + if (persistentTensorAllocIds_.isEmpty()) { + persistentTensorAllocIds_ = other.persistentTensorAllocIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePersistentTensorAllocIdsIsMutable(); + persistentTensorAllocIds_.addAll(other.persistentTensorAllocIds_); + } + onChanged(); + } + if (other.getDeviceTempMemorySize() != 0L) { + setDeviceTempMemorySize(other.getDeviceTempMemorySize()); + } + if (other.getDevicePersistentMemorySize() != 0L) { + setDevicePersistentMemorySize(other.getDevicePersistentMemorySize()); + } + if (!other.devicePersistentTensorAllocIds_.isEmpty()) { + if (devicePersistentTensorAllocIds_.isEmpty()) { + devicePersistentTensorAllocIds_ = other.devicePersistentTensorAllocIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDevicePersistentTensorAllocIdsIsMutable(); + devicePersistentTensorAllocIds_.addAll(other.devicePersistentTensorAllocIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.MemoryStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.MemoryStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long tempMemorySize_ ; + /** + * int64 temp_memory_size = 1; + */ + public long getTempMemorySize() { + return tempMemorySize_; + } + /** + * int64 temp_memory_size = 1; + */ + public Builder setTempMemorySize(long value) { + + tempMemorySize_ = value; + onChanged(); + return this; + } + /** + * int64 temp_memory_size = 1; + */ + public Builder clearTempMemorySize() { + + tempMemorySize_ = 0L; + onChanged(); + return this; + } + + private long persistentMemorySize_ ; + /** + * int64 persistent_memory_size = 3; + */ + public long getPersistentMemorySize() { + return persistentMemorySize_; + } + /** + * int64 persistent_memory_size = 3; + */ + public Builder setPersistentMemorySize(long value) { + + persistentMemorySize_ = value; + onChanged(); + return this; + } + /** + * int64 persistent_memory_size = 3; + */ + public Builder clearPersistentMemorySize() { + + persistentMemorySize_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList persistentTensorAllocIds_ = emptyLongList(); + private void ensurePersistentTensorAllocIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + persistentTensorAllocIds_ = mutableCopy(persistentTensorAllocIds_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated int64 persistent_tensor_alloc_ids = 5; + */ + public java.util.List + getPersistentTensorAllocIdsList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(persistentTensorAllocIds_) : persistentTensorAllocIds_; + } + /** + * repeated int64 persistent_tensor_alloc_ids = 5; + */ + public int getPersistentTensorAllocIdsCount() { + return persistentTensorAllocIds_.size(); + } + /** + * repeated int64 persistent_tensor_alloc_ids = 5; + */ + public long getPersistentTensorAllocIds(int index) { + return persistentTensorAllocIds_.getLong(index); + } + /** + * repeated int64 persistent_tensor_alloc_ids = 5; + */ + public Builder setPersistentTensorAllocIds( + int index, long value) { + ensurePersistentTensorAllocIdsIsMutable(); + persistentTensorAllocIds_.setLong(index, value); + onChanged(); + return this; + } + /** + * repeated int64 persistent_tensor_alloc_ids = 5; + */ + public Builder addPersistentTensorAllocIds(long value) { + ensurePersistentTensorAllocIdsIsMutable(); + persistentTensorAllocIds_.addLong(value); + onChanged(); + return this; + } + /** + * repeated int64 persistent_tensor_alloc_ids = 5; + */ + public Builder addAllPersistentTensorAllocIds( + java.lang.Iterable values) { + ensurePersistentTensorAllocIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, persistentTensorAllocIds_); + onChanged(); + return this; + } + /** + * repeated int64 persistent_tensor_alloc_ids = 5; + */ + public Builder clearPersistentTensorAllocIds() { + persistentTensorAllocIds_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private long deviceTempMemorySize_ ; + /** + * int64 device_temp_memory_size = 2 [deprecated = true]; + */ + @java.lang.Deprecated public long getDeviceTempMemorySize() { + return deviceTempMemorySize_; + } + /** + * int64 device_temp_memory_size = 2 [deprecated = true]; + */ + @java.lang.Deprecated public Builder setDeviceTempMemorySize(long value) { + + deviceTempMemorySize_ = value; + onChanged(); + return this; + } + /** + * int64 device_temp_memory_size = 2 [deprecated = true]; + */ + @java.lang.Deprecated public Builder clearDeviceTempMemorySize() { + + deviceTempMemorySize_ = 0L; + onChanged(); + return this; + } + + private long devicePersistentMemorySize_ ; + /** + * int64 device_persistent_memory_size = 4 [deprecated = true]; + */ + @java.lang.Deprecated public long getDevicePersistentMemorySize() { + return devicePersistentMemorySize_; + } + /** + * int64 device_persistent_memory_size = 4 [deprecated = true]; + */ + @java.lang.Deprecated public Builder setDevicePersistentMemorySize(long value) { + + devicePersistentMemorySize_ = value; + onChanged(); + return this; + } + /** + * int64 device_persistent_memory_size = 4 [deprecated = true]; + */ + @java.lang.Deprecated public Builder clearDevicePersistentMemorySize() { + + devicePersistentMemorySize_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList devicePersistentTensorAllocIds_ = emptyLongList(); + private void ensureDevicePersistentTensorAllocIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + devicePersistentTensorAllocIds_ = mutableCopy(devicePersistentTensorAllocIds_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true]; + */ + @java.lang.Deprecated public java.util.List + getDevicePersistentTensorAllocIdsList() { + return ((bitField0_ & 0x00000002) != 0) ? + java.util.Collections.unmodifiableList(devicePersistentTensorAllocIds_) : devicePersistentTensorAllocIds_; + } + /** + * repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true]; + */ + @java.lang.Deprecated public int getDevicePersistentTensorAllocIdsCount() { + return devicePersistentTensorAllocIds_.size(); + } + /** + * repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true]; + */ + @java.lang.Deprecated public long getDevicePersistentTensorAllocIds(int index) { + return devicePersistentTensorAllocIds_.getLong(index); + } + /** + * repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true]; + */ + @java.lang.Deprecated public Builder setDevicePersistentTensorAllocIds( + int index, long value) { + ensureDevicePersistentTensorAllocIdsIsMutable(); + devicePersistentTensorAllocIds_.setLong(index, value); + onChanged(); + return this; + } + /** + * repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true]; + */ + @java.lang.Deprecated public Builder addDevicePersistentTensorAllocIds(long value) { + ensureDevicePersistentTensorAllocIdsIsMutable(); + devicePersistentTensorAllocIds_.addLong(value); + onChanged(); + return this; + } + /** + * repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true]; + */ + @java.lang.Deprecated public Builder addAllDevicePersistentTensorAllocIds( + java.lang.Iterable values) { + ensureDevicePersistentTensorAllocIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, devicePersistentTensorAllocIds_); + onChanged(); + return this; + } + /** + * repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true]; + */ + @java.lang.Deprecated public Builder clearDevicePersistentTensorAllocIds() { + devicePersistentTensorAllocIds_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.MemoryStats) + } + + // @@protoc_insertion_point(class_scope:tensorflow.MemoryStats) + private static final org.tensorflow.proto.framework.MemoryStats DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.MemoryStats(); + } + + public static org.tensorflow.proto.framework.MemoryStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MemoryStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MemoryStats(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MemoryStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryStatsOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryStatsOrBuilder.java new file mode 100644 index 00000000000..db3c896352c --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MemoryStatsOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/step_stats.proto + +package org.tensorflow.proto.framework; + +public interface MemoryStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.MemoryStats) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 temp_memory_size = 1; + */ + long getTempMemorySize(); + + /** + * int64 persistent_memory_size = 3; + */ + long getPersistentMemorySize(); + + /** + * repeated int64 persistent_tensor_alloc_ids = 5; + */ + java.util.List getPersistentTensorAllocIdsList(); + /** + * repeated int64 persistent_tensor_alloc_ids = 5; + */ + int getPersistentTensorAllocIdsCount(); + /** + * repeated int64 persistent_tensor_alloc_ids = 5; + */ + long getPersistentTensorAllocIds(int index); + + /** + * int64 device_temp_memory_size = 2 [deprecated = true]; + */ + @java.lang.Deprecated long getDeviceTempMemorySize(); + + /** + * int64 device_persistent_memory_size = 4 [deprecated = true]; + */ + @java.lang.Deprecated long getDevicePersistentMemorySize(); + + /** + * repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true]; + */ + @java.lang.Deprecated java.util.List getDevicePersistentTensorAllocIdsList(); + /** + * repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true]; + */ + @java.lang.Deprecated int getDevicePersistentTensorAllocIdsCount(); + /** + * repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true]; + */ + @java.lang.Deprecated long getDevicePersistentTensorAllocIds(int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MetaGraphDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MetaGraphDef.java new file mode 100644 index 00000000000..b071cf84bf8 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MetaGraphDef.java @@ -0,0 +1,4702 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/meta_graph.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * NOTE: This protocol buffer is evolving, and will go through revisions in the
+ * coming months.
+ * Protocol buffer containing the following which are necessary to restart
+ * training, run inference. It can be used to serialize/de-serialize memory
+ * objects necessary for running computation in a graph when crossing the
+ * process boundary. It can be used for long term storage of graphs,
+ * cross-language execution of graphs, etc.
+ *   MetaInfoDef
+ *   GraphDef
+ *   SaverDef
+ *   CollectionDef
+ *   TensorInfo
+ *   SignatureDef
+ * 
+ * + * Protobuf type {@code tensorflow.MetaGraphDef} + */ +public final class MetaGraphDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.MetaGraphDef) + MetaGraphDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use MetaGraphDef.newBuilder() to construct. + private MetaGraphDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MetaGraphDef() { + assetFileDef_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MetaGraphDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MetaGraphDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.Builder subBuilder = null; + if (metaInfoDef_ != null) { + subBuilder = metaInfoDef_.toBuilder(); + } + metaInfoDef_ = input.readMessage(org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metaInfoDef_); + metaInfoDef_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + org.tensorflow.proto.framework.GraphDef.Builder subBuilder = null; + if (graphDef_ != null) { + subBuilder = graphDef_.toBuilder(); + } + graphDef_ = input.readMessage(org.tensorflow.proto.framework.GraphDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(graphDef_); + graphDef_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + org.tensorflow.proto.util.SaverDef.Builder subBuilder = null; + if (saverDef_ != null) { + subBuilder = saverDef_.toBuilder(); + } + saverDef_ = input.readMessage(org.tensorflow.proto.util.SaverDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(saverDef_); + saverDef_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + collectionDef_ = com.google.protobuf.MapField.newMapField( + CollectionDefDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + collectionDef__ = input.readMessage( + CollectionDefDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + collectionDef_.getMutableMap().put( + collectionDef__.getKey(), collectionDef__.getValue()); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + signatureDef_ = com.google.protobuf.MapField.newMapField( + SignatureDefDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + signatureDef__ = input.readMessage( + SignatureDefDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + signatureDef_.getMutableMap().put( + signatureDef__.getKey(), signatureDef__.getValue()); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + assetFileDef_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + assetFileDef_.add( + input.readMessage(org.tensorflow.proto.framework.AssetFileDef.parser(), extensionRegistry)); + break; + } + case 58: { + org.tensorflow.proto.framework.SavedObjectGraph.Builder subBuilder = null; + if (objectGraphDef_ != null) { + subBuilder = objectGraphDef_.toBuilder(); + } + objectGraphDef_ = input.readMessage(org.tensorflow.proto.framework.SavedObjectGraph.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(objectGraphDef_); + objectGraphDef_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) != 0)) { + assetFileDef_ = java.util.Collections.unmodifiableList(assetFileDef_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetCollectionDef(); + case 5: + return internalGetSignatureDef(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MetaGraphDef.class, org.tensorflow.proto.framework.MetaGraphDef.Builder.class); + } + + public interface MetaInfoDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.MetaGraphDef.MetaInfoDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * User specified Version string. Can be the name of the model and revision,
+     * steps this model has been trained to, etc.
+     * 
+ * + * string meta_graph_version = 1; + */ + java.lang.String getMetaGraphVersion(); + /** + *
+     * User specified Version string. Can be the name of the model and revision,
+     * steps this model has been trained to, etc.
+     * 
+ * + * string meta_graph_version = 1; + */ + com.google.protobuf.ByteString + getMetaGraphVersionBytes(); + + /** + *
+     * A copy of the OpDefs used by the producer of this graph_def.
+     * Descriptions and Ops not used in graph_def are stripped out.
+     * 
+ * + * .tensorflow.OpList stripped_op_list = 2; + */ + boolean hasStrippedOpList(); + /** + *
+     * A copy of the OpDefs used by the producer of this graph_def.
+     * Descriptions and Ops not used in graph_def are stripped out.
+     * 
+ * + * .tensorflow.OpList stripped_op_list = 2; + */ + org.tensorflow.proto.framework.OpList getStrippedOpList(); + /** + *
+     * A copy of the OpDefs used by the producer of this graph_def.
+     * Descriptions and Ops not used in graph_def are stripped out.
+     * 
+ * + * .tensorflow.OpList stripped_op_list = 2; + */ + org.tensorflow.proto.framework.OpListOrBuilder getStrippedOpListOrBuilder(); + + /** + *
+     * A serialized protobuf. Can be the time this meta graph is created, or
+     * modified, or name of the model.
+     * 
+ * + * .google.protobuf.Any any_info = 3; + */ + boolean hasAnyInfo(); + /** + *
+     * A serialized protobuf. Can be the time this meta graph is created, or
+     * modified, or name of the model.
+     * 
+ * + * .google.protobuf.Any any_info = 3; + */ + com.google.protobuf.Any getAnyInfo(); + /** + *
+     * A serialized protobuf. Can be the time this meta graph is created, or
+     * modified, or name of the model.
+     * 
+ * + * .google.protobuf.Any any_info = 3; + */ + com.google.protobuf.AnyOrBuilder getAnyInfoOrBuilder(); + + /** + *
+     * User supplied tag(s) on the meta_graph and included graph_def.
+     * MetaGraphDefs should be tagged with their capabilities or use-cases.
+     * Examples: "train", "serve", "gpu", "tpu", etc.
+     * These tags enable loaders to access the MetaGraph(s) appropriate for a
+     * specific use-case or runtime environment.
+     * 
+ * + * repeated string tags = 4; + */ + java.util.List + getTagsList(); + /** + *
+     * User supplied tag(s) on the meta_graph and included graph_def.
+     * MetaGraphDefs should be tagged with their capabilities or use-cases.
+     * Examples: "train", "serve", "gpu", "tpu", etc.
+     * These tags enable loaders to access the MetaGraph(s) appropriate for a
+     * specific use-case or runtime environment.
+     * 
+ * + * repeated string tags = 4; + */ + int getTagsCount(); + /** + *
+     * User supplied tag(s) on the meta_graph and included graph_def.
+     * MetaGraphDefs should be tagged with their capabilities or use-cases.
+     * Examples: "train", "serve", "gpu", "tpu", etc.
+     * These tags enable loaders to access the MetaGraph(s) appropriate for a
+     * specific use-case or runtime environment.
+     * 
+ * + * repeated string tags = 4; + */ + java.lang.String getTags(int index); + /** + *
+     * User supplied tag(s) on the meta_graph and included graph_def.
+     * MetaGraphDefs should be tagged with their capabilities or use-cases.
+     * Examples: "train", "serve", "gpu", "tpu", etc.
+     * These tags enable loaders to access the MetaGraph(s) appropriate for a
+     * specific use-case or runtime environment.
+     * 
+ * + * repeated string tags = 4; + */ + com.google.protobuf.ByteString + getTagsBytes(int index); + + /** + *
+     * The __version__ string of the tensorflow build used to write this graph.
+     * This will be populated by the framework, which will overwrite any user
+     * supplied value.
+     * 
+ * + * string tensorflow_version = 5; + */ + java.lang.String getTensorflowVersion(); + /** + *
+     * The __version__ string of the tensorflow build used to write this graph.
+     * This will be populated by the framework, which will overwrite any user
+     * supplied value.
+     * 
+ * + * string tensorflow_version = 5; + */ + com.google.protobuf.ByteString + getTensorflowVersionBytes(); + + /** + *
+     * The __git_version__ string of the tensorflow build used to write this
+     * graph. This will be populated by the framework, which will overwrite any
+     * user supplied value.
+     * 
+ * + * string tensorflow_git_version = 6; + */ + java.lang.String getTensorflowGitVersion(); + /** + *
+     * The __git_version__ string of the tensorflow build used to write this
+     * graph. This will be populated by the framework, which will overwrite any
+     * user supplied value.
+     * 
+ * + * string tensorflow_git_version = 6; + */ + com.google.protobuf.ByteString + getTensorflowGitVersionBytes(); + + /** + *
+     * A flag to denote whether default-valued attrs have been stripped from
+     * the nodes in this graph_def.
+     * 
+ * + * bool stripped_default_attrs = 7; + */ + boolean getStrippedDefaultAttrs(); + + /** + *
+     * FunctionDef name to aliases mapping.
+     * 
+ * + * map<string, string> function_aliases = 8; + */ + int getFunctionAliasesCount(); + /** + *
+     * FunctionDef name to aliases mapping.
+     * 
+ * + * map<string, string> function_aliases = 8; + */ + boolean containsFunctionAliases( + java.lang.String key); + /** + * Use {@link #getFunctionAliasesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getFunctionAliases(); + /** + *
+     * FunctionDef name to aliases mapping.
+     * 
+ * + * map<string, string> function_aliases = 8; + */ + java.util.Map + getFunctionAliasesMap(); + /** + *
+     * FunctionDef name to aliases mapping.
+     * 
+ * + * map<string, string> function_aliases = 8; + */ + + java.lang.String getFunctionAliasesOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+     * FunctionDef name to aliases mapping.
+     * 
+ * + * map<string, string> function_aliases = 8; + */ + + java.lang.String getFunctionAliasesOrThrow( + java.lang.String key); + } + /** + *
+   * Meta information regarding the graph to be exported.  To be used by users
+   * of this protocol buffer to encode information regarding their meta graph.
+   * 
+ * + * Protobuf type {@code tensorflow.MetaGraphDef.MetaInfoDef} + */ + public static final class MetaInfoDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.MetaGraphDef.MetaInfoDef) + MetaInfoDefOrBuilder { + private static final long serialVersionUID = 0L; + // Use MetaInfoDef.newBuilder() to construct. + private MetaInfoDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MetaInfoDef() { + metaGraphVersion_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + tensorflowVersion_ = ""; + tensorflowGitVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MetaInfoDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MetaInfoDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + metaGraphVersion_ = s; + break; + } + case 18: { + org.tensorflow.proto.framework.OpList.Builder subBuilder = null; + if (strippedOpList_ != null) { + subBuilder = strippedOpList_.toBuilder(); + } + strippedOpList_ = input.readMessage(org.tensorflow.proto.framework.OpList.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(strippedOpList_); + strippedOpList_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.protobuf.Any.Builder subBuilder = null; + if (anyInfo_ != null) { + subBuilder = anyInfo_.toBuilder(); + } + anyInfo_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(anyInfo_); + anyInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + tags_.add(s); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + tensorflowVersion_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + tensorflowGitVersion_ = s; + break; + } + case 56: { + + strippedDefaultAttrs_ = input.readBool(); + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + functionAliases_ = com.google.protobuf.MapField.newMapField( + FunctionAliasesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + functionAliases__ = input.readMessage( + FunctionAliasesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + functionAliases_.getMutableMap().put( + functionAliases__.getKey(), functionAliases__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + tags_ = tags_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_MetaInfoDef_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 8: + return internalGetFunctionAliases(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_MetaInfoDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.class, org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.Builder.class); + } + + public static final int META_GRAPH_VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object metaGraphVersion_; + /** + *
+     * User specified Version string. Can be the name of the model and revision,
+     * steps this model has been trained to, etc.
+     * 
+ * + * string meta_graph_version = 1; + */ + public java.lang.String getMetaGraphVersion() { + java.lang.Object ref = metaGraphVersion_; + 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(); + metaGraphVersion_ = s; + return s; + } + } + /** + *
+     * User specified Version string. Can be the name of the model and revision,
+     * steps this model has been trained to, etc.
+     * 
+ * + * string meta_graph_version = 1; + */ + public com.google.protobuf.ByteString + getMetaGraphVersionBytes() { + java.lang.Object ref = metaGraphVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metaGraphVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STRIPPED_OP_LIST_FIELD_NUMBER = 2; + private org.tensorflow.proto.framework.OpList strippedOpList_; + /** + *
+     * A copy of the OpDefs used by the producer of this graph_def.
+     * Descriptions and Ops not used in graph_def are stripped out.
+     * 
+ * + * .tensorflow.OpList stripped_op_list = 2; + */ + public boolean hasStrippedOpList() { + return strippedOpList_ != null; + } + /** + *
+     * A copy of the OpDefs used by the producer of this graph_def.
+     * Descriptions and Ops not used in graph_def are stripped out.
+     * 
+ * + * .tensorflow.OpList stripped_op_list = 2; + */ + public org.tensorflow.proto.framework.OpList getStrippedOpList() { + return strippedOpList_ == null ? org.tensorflow.proto.framework.OpList.getDefaultInstance() : strippedOpList_; + } + /** + *
+     * A copy of the OpDefs used by the producer of this graph_def.
+     * Descriptions and Ops not used in graph_def are stripped out.
+     * 
+ * + * .tensorflow.OpList stripped_op_list = 2; + */ + public org.tensorflow.proto.framework.OpListOrBuilder getStrippedOpListOrBuilder() { + return getStrippedOpList(); + } + + public static final int ANY_INFO_FIELD_NUMBER = 3; + private com.google.protobuf.Any anyInfo_; + /** + *
+     * A serialized protobuf. Can be the time this meta graph is created, or
+     * modified, or name of the model.
+     * 
+ * + * .google.protobuf.Any any_info = 3; + */ + public boolean hasAnyInfo() { + return anyInfo_ != null; + } + /** + *
+     * A serialized protobuf. Can be the time this meta graph is created, or
+     * modified, or name of the model.
+     * 
+ * + * .google.protobuf.Any any_info = 3; + */ + public com.google.protobuf.Any getAnyInfo() { + return anyInfo_ == null ? com.google.protobuf.Any.getDefaultInstance() : anyInfo_; + } + /** + *
+     * A serialized protobuf. Can be the time this meta graph is created, or
+     * modified, or name of the model.
+     * 
+ * + * .google.protobuf.Any any_info = 3; + */ + public com.google.protobuf.AnyOrBuilder getAnyInfoOrBuilder() { + return getAnyInfo(); + } + + public static final int TAGS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList tags_; + /** + *
+     * User supplied tag(s) on the meta_graph and included graph_def.
+     * MetaGraphDefs should be tagged with their capabilities or use-cases.
+     * Examples: "train", "serve", "gpu", "tpu", etc.
+     * These tags enable loaders to access the MetaGraph(s) appropriate for a
+     * specific use-case or runtime environment.
+     * 
+ * + * repeated string tags = 4; + */ + public com.google.protobuf.ProtocolStringList + getTagsList() { + return tags_; + } + /** + *
+     * User supplied tag(s) on the meta_graph and included graph_def.
+     * MetaGraphDefs should be tagged with their capabilities or use-cases.
+     * Examples: "train", "serve", "gpu", "tpu", etc.
+     * These tags enable loaders to access the MetaGraph(s) appropriate for a
+     * specific use-case or runtime environment.
+     * 
+ * + * repeated string tags = 4; + */ + public int getTagsCount() { + return tags_.size(); + } + /** + *
+     * User supplied tag(s) on the meta_graph and included graph_def.
+     * MetaGraphDefs should be tagged with their capabilities or use-cases.
+     * Examples: "train", "serve", "gpu", "tpu", etc.
+     * These tags enable loaders to access the MetaGraph(s) appropriate for a
+     * specific use-case or runtime environment.
+     * 
+ * + * repeated string tags = 4; + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + *
+     * User supplied tag(s) on the meta_graph and included graph_def.
+     * MetaGraphDefs should be tagged with their capabilities or use-cases.
+     * Examples: "train", "serve", "gpu", "tpu", etc.
+     * These tags enable loaders to access the MetaGraph(s) appropriate for a
+     * specific use-case or runtime environment.
+     * 
+ * + * repeated string tags = 4; + */ + public com.google.protobuf.ByteString + getTagsBytes(int index) { + return tags_.getByteString(index); + } + + public static final int TENSORFLOW_VERSION_FIELD_NUMBER = 5; + private volatile java.lang.Object tensorflowVersion_; + /** + *
+     * The __version__ string of the tensorflow build used to write this graph.
+     * This will be populated by the framework, which will overwrite any user
+     * supplied value.
+     * 
+ * + * string tensorflow_version = 5; + */ + public java.lang.String getTensorflowVersion() { + java.lang.Object ref = tensorflowVersion_; + 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(); + tensorflowVersion_ = s; + return s; + } + } + /** + *
+     * The __version__ string of the tensorflow build used to write this graph.
+     * This will be populated by the framework, which will overwrite any user
+     * supplied value.
+     * 
+ * + * string tensorflow_version = 5; + */ + public com.google.protobuf.ByteString + getTensorflowVersionBytes() { + java.lang.Object ref = tensorflowVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tensorflowVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TENSORFLOW_GIT_VERSION_FIELD_NUMBER = 6; + private volatile java.lang.Object tensorflowGitVersion_; + /** + *
+     * The __git_version__ string of the tensorflow build used to write this
+     * graph. This will be populated by the framework, which will overwrite any
+     * user supplied value.
+     * 
+ * + * string tensorflow_git_version = 6; + */ + public java.lang.String getTensorflowGitVersion() { + java.lang.Object ref = tensorflowGitVersion_; + 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(); + tensorflowGitVersion_ = s; + return s; + } + } + /** + *
+     * The __git_version__ string of the tensorflow build used to write this
+     * graph. This will be populated by the framework, which will overwrite any
+     * user supplied value.
+     * 
+ * + * string tensorflow_git_version = 6; + */ + public com.google.protobuf.ByteString + getTensorflowGitVersionBytes() { + java.lang.Object ref = tensorflowGitVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tensorflowGitVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STRIPPED_DEFAULT_ATTRS_FIELD_NUMBER = 7; + private boolean strippedDefaultAttrs_; + /** + *
+     * A flag to denote whether default-valued attrs have been stripped from
+     * the nodes in this graph_def.
+     * 
+ * + * bool stripped_default_attrs = 7; + */ + public boolean getStrippedDefaultAttrs() { + return strippedDefaultAttrs_; + } + + public static final int FUNCTION_ALIASES_FIELD_NUMBER = 8; + private static final class FunctionAliasesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> functionAliases_; + private com.google.protobuf.MapField + internalGetFunctionAliases() { + if (functionAliases_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FunctionAliasesDefaultEntryHolder.defaultEntry); + } + return functionAliases_; + } + + public int getFunctionAliasesCount() { + return internalGetFunctionAliases().getMap().size(); + } + /** + *
+     * FunctionDef name to aliases mapping.
+     * 
+ * + * map<string, string> function_aliases = 8; + */ + + public boolean containsFunctionAliases( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFunctionAliases().getMap().containsKey(key); + } + /** + * Use {@link #getFunctionAliasesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getFunctionAliases() { + return getFunctionAliasesMap(); + } + /** + *
+     * FunctionDef name to aliases mapping.
+     * 
+ * + * map<string, string> function_aliases = 8; + */ + + public java.util.Map getFunctionAliasesMap() { + return internalGetFunctionAliases().getMap(); + } + /** + *
+     * FunctionDef name to aliases mapping.
+     * 
+ * + * map<string, string> function_aliases = 8; + */ + + public java.lang.String getFunctionAliasesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFunctionAliases().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * FunctionDef name to aliases mapping.
+     * 
+ * + * map<string, string> function_aliases = 8; + */ + + public java.lang.String getFunctionAliasesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFunctionAliases().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMetaGraphVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, metaGraphVersion_); + } + if (strippedOpList_ != null) { + output.writeMessage(2, getStrippedOpList()); + } + if (anyInfo_ != null) { + output.writeMessage(3, getAnyInfo()); + } + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, tags_.getRaw(i)); + } + if (!getTensorflowVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, tensorflowVersion_); + } + if (!getTensorflowGitVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, tensorflowGitVersion_); + } + if (strippedDefaultAttrs_ != false) { + output.writeBool(7, strippedDefaultAttrs_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetFunctionAliases(), + FunctionAliasesDefaultEntryHolder.defaultEntry, + 8); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMetaGraphVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, metaGraphVersion_); + } + if (strippedOpList_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getStrippedOpList()); + } + if (anyInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getAnyInfo()); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagsList().size(); + } + if (!getTensorflowVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, tensorflowVersion_); + } + if (!getTensorflowGitVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, tensorflowGitVersion_); + } + if (strippedDefaultAttrs_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, strippedDefaultAttrs_); + } + for (java.util.Map.Entry entry + : internalGetFunctionAliases().getMap().entrySet()) { + com.google.protobuf.MapEntry + functionAliases__ = FunctionAliasesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, functionAliases__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef other = (org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef) obj; + + if (!getMetaGraphVersion() + .equals(other.getMetaGraphVersion())) return false; + if (hasStrippedOpList() != other.hasStrippedOpList()) return false; + if (hasStrippedOpList()) { + if (!getStrippedOpList() + .equals(other.getStrippedOpList())) return false; + } + if (hasAnyInfo() != other.hasAnyInfo()) return false; + if (hasAnyInfo()) { + if (!getAnyInfo() + .equals(other.getAnyInfo())) return false; + } + if (!getTagsList() + .equals(other.getTagsList())) return false; + if (!getTensorflowVersion() + .equals(other.getTensorflowVersion())) return false; + if (!getTensorflowGitVersion() + .equals(other.getTensorflowGitVersion())) return false; + if (getStrippedDefaultAttrs() + != other.getStrippedDefaultAttrs()) return false; + if (!internalGetFunctionAliases().equals( + other.internalGetFunctionAliases())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + META_GRAPH_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getMetaGraphVersion().hashCode(); + if (hasStrippedOpList()) { + hash = (37 * hash) + STRIPPED_OP_LIST_FIELD_NUMBER; + hash = (53 * hash) + getStrippedOpList().hashCode(); + } + if (hasAnyInfo()) { + hash = (37 * hash) + ANY_INFO_FIELD_NUMBER; + hash = (53 * hash) + getAnyInfo().hashCode(); + } + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + hash = (37 * hash) + TENSORFLOW_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getTensorflowVersion().hashCode(); + hash = (37 * hash) + TENSORFLOW_GIT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getTensorflowGitVersion().hashCode(); + hash = (37 * hash) + STRIPPED_DEFAULT_ATTRS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getStrippedDefaultAttrs()); + if (!internalGetFunctionAliases().getMap().isEmpty()) { + hash = (37 * hash) + FUNCTION_ALIASES_FIELD_NUMBER; + hash = (53 * hash) + internalGetFunctionAliases().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef 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.proto.framework.MetaGraphDef.MetaInfoDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Meta information regarding the graph to be exported.  To be used by users
+     * of this protocol buffer to encode information regarding their meta graph.
+     * 
+ * + * Protobuf type {@code tensorflow.MetaGraphDef.MetaInfoDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.MetaGraphDef.MetaInfoDef) + org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_MetaInfoDef_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 8: + return internalGetFunctionAliases(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 8: + return internalGetMutableFunctionAliases(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_MetaInfoDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.class, org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + metaGraphVersion_ = ""; + + if (strippedOpListBuilder_ == null) { + strippedOpList_ = null; + } else { + strippedOpList_ = null; + strippedOpListBuilder_ = null; + } + if (anyInfoBuilder_ == null) { + anyInfo_ = null; + } else { + anyInfo_ = null; + anyInfoBuilder_ = null; + } + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + tensorflowVersion_ = ""; + + tensorflowGitVersion_ = ""; + + strippedDefaultAttrs_ = false; + + internalGetMutableFunctionAliases().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_MetaInfoDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef build() { + org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef buildPartial() { + org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef result = new org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef(this); + int from_bitField0_ = bitField0_; + result.metaGraphVersion_ = metaGraphVersion_; + if (strippedOpListBuilder_ == null) { + result.strippedOpList_ = strippedOpList_; + } else { + result.strippedOpList_ = strippedOpListBuilder_.build(); + } + if (anyInfoBuilder_ == null) { + result.anyInfo_ = anyInfo_; + } else { + result.anyInfo_ = anyInfoBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + tags_ = tags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tags_ = tags_; + result.tensorflowVersion_ = tensorflowVersion_; + result.tensorflowGitVersion_ = tensorflowGitVersion_; + result.strippedDefaultAttrs_ = strippedDefaultAttrs_; + result.functionAliases_ = internalGetFunctionAliases(); + result.functionAliases_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef) { + return mergeFrom((org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef other) { + if (other == org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.getDefaultInstance()) return this; + if (!other.getMetaGraphVersion().isEmpty()) { + metaGraphVersion_ = other.metaGraphVersion_; + onChanged(); + } + if (other.hasStrippedOpList()) { + mergeStrippedOpList(other.getStrippedOpList()); + } + if (other.hasAnyInfo()) { + mergeAnyInfo(other.getAnyInfo()); + } + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (!other.getTensorflowVersion().isEmpty()) { + tensorflowVersion_ = other.tensorflowVersion_; + onChanged(); + } + if (!other.getTensorflowGitVersion().isEmpty()) { + tensorflowGitVersion_ = other.tensorflowGitVersion_; + onChanged(); + } + if (other.getStrippedDefaultAttrs() != false) { + setStrippedDefaultAttrs(other.getStrippedDefaultAttrs()); + } + internalGetMutableFunctionAliases().mergeFrom( + other.internalGetFunctionAliases()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object metaGraphVersion_ = ""; + /** + *
+       * User specified Version string. Can be the name of the model and revision,
+       * steps this model has been trained to, etc.
+       * 
+ * + * string meta_graph_version = 1; + */ + public java.lang.String getMetaGraphVersion() { + java.lang.Object ref = metaGraphVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metaGraphVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * User specified Version string. Can be the name of the model and revision,
+       * steps this model has been trained to, etc.
+       * 
+ * + * string meta_graph_version = 1; + */ + public com.google.protobuf.ByteString + getMetaGraphVersionBytes() { + java.lang.Object ref = metaGraphVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metaGraphVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * User specified Version string. Can be the name of the model and revision,
+       * steps this model has been trained to, etc.
+       * 
+ * + * string meta_graph_version = 1; + */ + public Builder setMetaGraphVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + metaGraphVersion_ = value; + onChanged(); + return this; + } + /** + *
+       * User specified Version string. Can be the name of the model and revision,
+       * steps this model has been trained to, etc.
+       * 
+ * + * string meta_graph_version = 1; + */ + public Builder clearMetaGraphVersion() { + + metaGraphVersion_ = getDefaultInstance().getMetaGraphVersion(); + onChanged(); + return this; + } + /** + *
+       * User specified Version string. Can be the name of the model and revision,
+       * steps this model has been trained to, etc.
+       * 
+ * + * string meta_graph_version = 1; + */ + public Builder setMetaGraphVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + metaGraphVersion_ = value; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.OpList strippedOpList_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.OpList, org.tensorflow.proto.framework.OpList.Builder, org.tensorflow.proto.framework.OpListOrBuilder> strippedOpListBuilder_; + /** + *
+       * A copy of the OpDefs used by the producer of this graph_def.
+       * Descriptions and Ops not used in graph_def are stripped out.
+       * 
+ * + * .tensorflow.OpList stripped_op_list = 2; + */ + public boolean hasStrippedOpList() { + return strippedOpListBuilder_ != null || strippedOpList_ != null; + } + /** + *
+       * A copy of the OpDefs used by the producer of this graph_def.
+       * Descriptions and Ops not used in graph_def are stripped out.
+       * 
+ * + * .tensorflow.OpList stripped_op_list = 2; + */ + public org.tensorflow.proto.framework.OpList getStrippedOpList() { + if (strippedOpListBuilder_ == null) { + return strippedOpList_ == null ? org.tensorflow.proto.framework.OpList.getDefaultInstance() : strippedOpList_; + } else { + return strippedOpListBuilder_.getMessage(); + } + } + /** + *
+       * A copy of the OpDefs used by the producer of this graph_def.
+       * Descriptions and Ops not used in graph_def are stripped out.
+       * 
+ * + * .tensorflow.OpList stripped_op_list = 2; + */ + public Builder setStrippedOpList(org.tensorflow.proto.framework.OpList value) { + if (strippedOpListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + strippedOpList_ = value; + onChanged(); + } else { + strippedOpListBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * A copy of the OpDefs used by the producer of this graph_def.
+       * Descriptions and Ops not used in graph_def are stripped out.
+       * 
+ * + * .tensorflow.OpList stripped_op_list = 2; + */ + public Builder setStrippedOpList( + org.tensorflow.proto.framework.OpList.Builder builderForValue) { + if (strippedOpListBuilder_ == null) { + strippedOpList_ = builderForValue.build(); + onChanged(); + } else { + strippedOpListBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * A copy of the OpDefs used by the producer of this graph_def.
+       * Descriptions and Ops not used in graph_def are stripped out.
+       * 
+ * + * .tensorflow.OpList stripped_op_list = 2; + */ + public Builder mergeStrippedOpList(org.tensorflow.proto.framework.OpList value) { + if (strippedOpListBuilder_ == null) { + if (strippedOpList_ != null) { + strippedOpList_ = + org.tensorflow.proto.framework.OpList.newBuilder(strippedOpList_).mergeFrom(value).buildPartial(); + } else { + strippedOpList_ = value; + } + onChanged(); + } else { + strippedOpListBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * A copy of the OpDefs used by the producer of this graph_def.
+       * Descriptions and Ops not used in graph_def are stripped out.
+       * 
+ * + * .tensorflow.OpList stripped_op_list = 2; + */ + public Builder clearStrippedOpList() { + if (strippedOpListBuilder_ == null) { + strippedOpList_ = null; + onChanged(); + } else { + strippedOpList_ = null; + strippedOpListBuilder_ = null; + } + + return this; + } + /** + *
+       * A copy of the OpDefs used by the producer of this graph_def.
+       * Descriptions and Ops not used in graph_def are stripped out.
+       * 
+ * + * .tensorflow.OpList stripped_op_list = 2; + */ + public org.tensorflow.proto.framework.OpList.Builder getStrippedOpListBuilder() { + + onChanged(); + return getStrippedOpListFieldBuilder().getBuilder(); + } + /** + *
+       * A copy of the OpDefs used by the producer of this graph_def.
+       * Descriptions and Ops not used in graph_def are stripped out.
+       * 
+ * + * .tensorflow.OpList stripped_op_list = 2; + */ + public org.tensorflow.proto.framework.OpListOrBuilder getStrippedOpListOrBuilder() { + if (strippedOpListBuilder_ != null) { + return strippedOpListBuilder_.getMessageOrBuilder(); + } else { + return strippedOpList_ == null ? + org.tensorflow.proto.framework.OpList.getDefaultInstance() : strippedOpList_; + } + } + /** + *
+       * A copy of the OpDefs used by the producer of this graph_def.
+       * Descriptions and Ops not used in graph_def are stripped out.
+       * 
+ * + * .tensorflow.OpList stripped_op_list = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.OpList, org.tensorflow.proto.framework.OpList.Builder, org.tensorflow.proto.framework.OpListOrBuilder> + getStrippedOpListFieldBuilder() { + if (strippedOpListBuilder_ == null) { + strippedOpListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.OpList, org.tensorflow.proto.framework.OpList.Builder, org.tensorflow.proto.framework.OpListOrBuilder>( + getStrippedOpList(), + getParentForChildren(), + isClean()); + strippedOpList_ = null; + } + return strippedOpListBuilder_; + } + + private com.google.protobuf.Any anyInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> anyInfoBuilder_; + /** + *
+       * A serialized protobuf. Can be the time this meta graph is created, or
+       * modified, or name of the model.
+       * 
+ * + * .google.protobuf.Any any_info = 3; + */ + public boolean hasAnyInfo() { + return anyInfoBuilder_ != null || anyInfo_ != null; + } + /** + *
+       * A serialized protobuf. Can be the time this meta graph is created, or
+       * modified, or name of the model.
+       * 
+ * + * .google.protobuf.Any any_info = 3; + */ + public com.google.protobuf.Any getAnyInfo() { + if (anyInfoBuilder_ == null) { + return anyInfo_ == null ? com.google.protobuf.Any.getDefaultInstance() : anyInfo_; + } else { + return anyInfoBuilder_.getMessage(); + } + } + /** + *
+       * A serialized protobuf. Can be the time this meta graph is created, or
+       * modified, or name of the model.
+       * 
+ * + * .google.protobuf.Any any_info = 3; + */ + public Builder setAnyInfo(com.google.protobuf.Any value) { + if (anyInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + anyInfo_ = value; + onChanged(); + } else { + anyInfoBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * A serialized protobuf. Can be the time this meta graph is created, or
+       * modified, or name of the model.
+       * 
+ * + * .google.protobuf.Any any_info = 3; + */ + public Builder setAnyInfo( + com.google.protobuf.Any.Builder builderForValue) { + if (anyInfoBuilder_ == null) { + anyInfo_ = builderForValue.build(); + onChanged(); + } else { + anyInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * A serialized protobuf. Can be the time this meta graph is created, or
+       * modified, or name of the model.
+       * 
+ * + * .google.protobuf.Any any_info = 3; + */ + public Builder mergeAnyInfo(com.google.protobuf.Any value) { + if (anyInfoBuilder_ == null) { + if (anyInfo_ != null) { + anyInfo_ = + com.google.protobuf.Any.newBuilder(anyInfo_).mergeFrom(value).buildPartial(); + } else { + anyInfo_ = value; + } + onChanged(); + } else { + anyInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * A serialized protobuf. Can be the time this meta graph is created, or
+       * modified, or name of the model.
+       * 
+ * + * .google.protobuf.Any any_info = 3; + */ + public Builder clearAnyInfo() { + if (anyInfoBuilder_ == null) { + anyInfo_ = null; + onChanged(); + } else { + anyInfo_ = null; + anyInfoBuilder_ = null; + } + + return this; + } + /** + *
+       * A serialized protobuf. Can be the time this meta graph is created, or
+       * modified, or name of the model.
+       * 
+ * + * .google.protobuf.Any any_info = 3; + */ + public com.google.protobuf.Any.Builder getAnyInfoBuilder() { + + onChanged(); + return getAnyInfoFieldBuilder().getBuilder(); + } + /** + *
+       * A serialized protobuf. Can be the time this meta graph is created, or
+       * modified, or name of the model.
+       * 
+ * + * .google.protobuf.Any any_info = 3; + */ + public com.google.protobuf.AnyOrBuilder getAnyInfoOrBuilder() { + if (anyInfoBuilder_ != null) { + return anyInfoBuilder_.getMessageOrBuilder(); + } else { + return anyInfo_ == null ? + com.google.protobuf.Any.getDefaultInstance() : anyInfo_; + } + } + /** + *
+       * A serialized protobuf. Can be the time this meta graph is created, or
+       * modified, or name of the model.
+       * 
+ * + * .google.protobuf.Any any_info = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getAnyInfoFieldBuilder() { + if (anyInfoBuilder_ == null) { + anyInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + getAnyInfo(), + getParentForChildren(), + isClean()); + anyInfo_ = null; + } + return anyInfoBuilder_; + } + + private com.google.protobuf.LazyStringList tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * User supplied tag(s) on the meta_graph and included graph_def.
+       * MetaGraphDefs should be tagged with their capabilities or use-cases.
+       * Examples: "train", "serve", "gpu", "tpu", etc.
+       * These tags enable loaders to access the MetaGraph(s) appropriate for a
+       * specific use-case or runtime environment.
+       * 
+ * + * repeated string tags = 4; + */ + public com.google.protobuf.ProtocolStringList + getTagsList() { + return tags_.getUnmodifiableView(); + } + /** + *
+       * User supplied tag(s) on the meta_graph and included graph_def.
+       * MetaGraphDefs should be tagged with their capabilities or use-cases.
+       * Examples: "train", "serve", "gpu", "tpu", etc.
+       * These tags enable loaders to access the MetaGraph(s) appropriate for a
+       * specific use-case or runtime environment.
+       * 
+ * + * repeated string tags = 4; + */ + public int getTagsCount() { + return tags_.size(); + } + /** + *
+       * User supplied tag(s) on the meta_graph and included graph_def.
+       * MetaGraphDefs should be tagged with their capabilities or use-cases.
+       * Examples: "train", "serve", "gpu", "tpu", etc.
+       * These tags enable loaders to access the MetaGraph(s) appropriate for a
+       * specific use-case or runtime environment.
+       * 
+ * + * repeated string tags = 4; + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + *
+       * User supplied tag(s) on the meta_graph and included graph_def.
+       * MetaGraphDefs should be tagged with their capabilities or use-cases.
+       * Examples: "train", "serve", "gpu", "tpu", etc.
+       * These tags enable loaders to access the MetaGraph(s) appropriate for a
+       * specific use-case or runtime environment.
+       * 
+ * + * repeated string tags = 4; + */ + public com.google.protobuf.ByteString + getTagsBytes(int index) { + return tags_.getByteString(index); + } + /** + *
+       * User supplied tag(s) on the meta_graph and included graph_def.
+       * MetaGraphDefs should be tagged with their capabilities or use-cases.
+       * Examples: "train", "serve", "gpu", "tpu", etc.
+       * These tags enable loaders to access the MetaGraph(s) appropriate for a
+       * specific use-case or runtime environment.
+       * 
+ * + * repeated string tags = 4; + */ + public Builder setTags( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * User supplied tag(s) on the meta_graph and included graph_def.
+       * MetaGraphDefs should be tagged with their capabilities or use-cases.
+       * Examples: "train", "serve", "gpu", "tpu", etc.
+       * These tags enable loaders to access the MetaGraph(s) appropriate for a
+       * specific use-case or runtime environment.
+       * 
+ * + * repeated string tags = 4; + */ + public Builder addTags( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + /** + *
+       * User supplied tag(s) on the meta_graph and included graph_def.
+       * MetaGraphDefs should be tagged with their capabilities or use-cases.
+       * Examples: "train", "serve", "gpu", "tpu", etc.
+       * These tags enable loaders to access the MetaGraph(s) appropriate for a
+       * specific use-case or runtime environment.
+       * 
+ * + * repeated string tags = 4; + */ + public Builder addAllTags( + java.lang.Iterable values) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tags_); + onChanged(); + return this; + } + /** + *
+       * User supplied tag(s) on the meta_graph and included graph_def.
+       * MetaGraphDefs should be tagged with their capabilities or use-cases.
+       * Examples: "train", "serve", "gpu", "tpu", etc.
+       * These tags enable loaders to access the MetaGraph(s) appropriate for a
+       * specific use-case or runtime environment.
+       * 
+ * + * repeated string tags = 4; + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * User supplied tag(s) on the meta_graph and included graph_def.
+       * MetaGraphDefs should be tagged with their capabilities or use-cases.
+       * Examples: "train", "serve", "gpu", "tpu", etc.
+       * These tags enable loaders to access the MetaGraph(s) appropriate for a
+       * specific use-case or runtime environment.
+       * 
+ * + * repeated string tags = 4; + */ + public Builder addTagsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + + private java.lang.Object tensorflowVersion_ = ""; + /** + *
+       * The __version__ string of the tensorflow build used to write this graph.
+       * This will be populated by the framework, which will overwrite any user
+       * supplied value.
+       * 
+ * + * string tensorflow_version = 5; + */ + public java.lang.String getTensorflowVersion() { + java.lang.Object ref = tensorflowVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tensorflowVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The __version__ string of the tensorflow build used to write this graph.
+       * This will be populated by the framework, which will overwrite any user
+       * supplied value.
+       * 
+ * + * string tensorflow_version = 5; + */ + public com.google.protobuf.ByteString + getTensorflowVersionBytes() { + java.lang.Object ref = tensorflowVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tensorflowVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The __version__ string of the tensorflow build used to write this graph.
+       * This will be populated by the framework, which will overwrite any user
+       * supplied value.
+       * 
+ * + * string tensorflow_version = 5; + */ + public Builder setTensorflowVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tensorflowVersion_ = value; + onChanged(); + return this; + } + /** + *
+       * The __version__ string of the tensorflow build used to write this graph.
+       * This will be populated by the framework, which will overwrite any user
+       * supplied value.
+       * 
+ * + * string tensorflow_version = 5; + */ + public Builder clearTensorflowVersion() { + + tensorflowVersion_ = getDefaultInstance().getTensorflowVersion(); + onChanged(); + return this; + } + /** + *
+       * The __version__ string of the tensorflow build used to write this graph.
+       * This will be populated by the framework, which will overwrite any user
+       * supplied value.
+       * 
+ * + * string tensorflow_version = 5; + */ + public Builder setTensorflowVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tensorflowVersion_ = value; + onChanged(); + return this; + } + + private java.lang.Object tensorflowGitVersion_ = ""; + /** + *
+       * The __git_version__ string of the tensorflow build used to write this
+       * graph. This will be populated by the framework, which will overwrite any
+       * user supplied value.
+       * 
+ * + * string tensorflow_git_version = 6; + */ + public java.lang.String getTensorflowGitVersion() { + java.lang.Object ref = tensorflowGitVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tensorflowGitVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The __git_version__ string of the tensorflow build used to write this
+       * graph. This will be populated by the framework, which will overwrite any
+       * user supplied value.
+       * 
+ * + * string tensorflow_git_version = 6; + */ + public com.google.protobuf.ByteString + getTensorflowGitVersionBytes() { + java.lang.Object ref = tensorflowGitVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tensorflowGitVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The __git_version__ string of the tensorflow build used to write this
+       * graph. This will be populated by the framework, which will overwrite any
+       * user supplied value.
+       * 
+ * + * string tensorflow_git_version = 6; + */ + public Builder setTensorflowGitVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tensorflowGitVersion_ = value; + onChanged(); + return this; + } + /** + *
+       * The __git_version__ string of the tensorflow build used to write this
+       * graph. This will be populated by the framework, which will overwrite any
+       * user supplied value.
+       * 
+ * + * string tensorflow_git_version = 6; + */ + public Builder clearTensorflowGitVersion() { + + tensorflowGitVersion_ = getDefaultInstance().getTensorflowGitVersion(); + onChanged(); + return this; + } + /** + *
+       * The __git_version__ string of the tensorflow build used to write this
+       * graph. This will be populated by the framework, which will overwrite any
+       * user supplied value.
+       * 
+ * + * string tensorflow_git_version = 6; + */ + public Builder setTensorflowGitVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tensorflowGitVersion_ = value; + onChanged(); + return this; + } + + private boolean strippedDefaultAttrs_ ; + /** + *
+       * A flag to denote whether default-valued attrs have been stripped from
+       * the nodes in this graph_def.
+       * 
+ * + * bool stripped_default_attrs = 7; + */ + public boolean getStrippedDefaultAttrs() { + return strippedDefaultAttrs_; + } + /** + *
+       * A flag to denote whether default-valued attrs have been stripped from
+       * the nodes in this graph_def.
+       * 
+ * + * bool stripped_default_attrs = 7; + */ + public Builder setStrippedDefaultAttrs(boolean value) { + + strippedDefaultAttrs_ = value; + onChanged(); + return this; + } + /** + *
+       * A flag to denote whether default-valued attrs have been stripped from
+       * the nodes in this graph_def.
+       * 
+ * + * bool stripped_default_attrs = 7; + */ + public Builder clearStrippedDefaultAttrs() { + + strippedDefaultAttrs_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> functionAliases_; + private com.google.protobuf.MapField + internalGetFunctionAliases() { + if (functionAliases_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FunctionAliasesDefaultEntryHolder.defaultEntry); + } + return functionAliases_; + } + private com.google.protobuf.MapField + internalGetMutableFunctionAliases() { + onChanged();; + if (functionAliases_ == null) { + functionAliases_ = com.google.protobuf.MapField.newMapField( + FunctionAliasesDefaultEntryHolder.defaultEntry); + } + if (!functionAliases_.isMutable()) { + functionAliases_ = functionAliases_.copy(); + } + return functionAliases_; + } + + public int getFunctionAliasesCount() { + return internalGetFunctionAliases().getMap().size(); + } + /** + *
+       * FunctionDef name to aliases mapping.
+       * 
+ * + * map<string, string> function_aliases = 8; + */ + + public boolean containsFunctionAliases( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetFunctionAliases().getMap().containsKey(key); + } + /** + * Use {@link #getFunctionAliasesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getFunctionAliases() { + return getFunctionAliasesMap(); + } + /** + *
+       * FunctionDef name to aliases mapping.
+       * 
+ * + * map<string, string> function_aliases = 8; + */ + + public java.util.Map getFunctionAliasesMap() { + return internalGetFunctionAliases().getMap(); + } + /** + *
+       * FunctionDef name to aliases mapping.
+       * 
+ * + * map<string, string> function_aliases = 8; + */ + + public java.lang.String getFunctionAliasesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFunctionAliases().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * FunctionDef name to aliases mapping.
+       * 
+ * + * map<string, string> function_aliases = 8; + */ + + public java.lang.String getFunctionAliasesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetFunctionAliases().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearFunctionAliases() { + internalGetMutableFunctionAliases().getMutableMap() + .clear(); + return this; + } + /** + *
+       * FunctionDef name to aliases mapping.
+       * 
+ * + * map<string, string> function_aliases = 8; + */ + + public Builder removeFunctionAliases( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFunctionAliases().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableFunctionAliases() { + return internalGetMutableFunctionAliases().getMutableMap(); + } + /** + *
+       * FunctionDef name to aliases mapping.
+       * 
+ * + * map<string, string> function_aliases = 8; + */ + public Builder putFunctionAliases( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableFunctionAliases().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * FunctionDef name to aliases mapping.
+       * 
+ * + * map<string, string> function_aliases = 8; + */ + + public Builder putAllFunctionAliases( + java.util.Map values) { + internalGetMutableFunctionAliases().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.MetaGraphDef.MetaInfoDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.MetaGraphDef.MetaInfoDef) + private static final org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef(); + } + + public static org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetaInfoDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MetaInfoDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int META_INFO_DEF_FIELD_NUMBER = 1; + private org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef metaInfoDef_; + /** + * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; + */ + public boolean hasMetaInfoDef() { + return metaInfoDef_ != null; + } + /** + * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; + */ + public org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef getMetaInfoDef() { + return metaInfoDef_ == null ? org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.getDefaultInstance() : metaInfoDef_; + } + /** + * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; + */ + public org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDefOrBuilder getMetaInfoDefOrBuilder() { + return getMetaInfoDef(); + } + + public static final int GRAPH_DEF_FIELD_NUMBER = 2; + private org.tensorflow.proto.framework.GraphDef graphDef_; + /** + *
+   * GraphDef.
+   * 
+ * + * .tensorflow.GraphDef graph_def = 2; + */ + public boolean hasGraphDef() { + return graphDef_ != null; + } + /** + *
+   * GraphDef.
+   * 
+ * + * .tensorflow.GraphDef graph_def = 2; + */ + public org.tensorflow.proto.framework.GraphDef getGraphDef() { + return graphDef_ == null ? org.tensorflow.proto.framework.GraphDef.getDefaultInstance() : graphDef_; + } + /** + *
+   * GraphDef.
+   * 
+ * + * .tensorflow.GraphDef graph_def = 2; + */ + public org.tensorflow.proto.framework.GraphDefOrBuilder getGraphDefOrBuilder() { + return getGraphDef(); + } + + public static final int SAVER_DEF_FIELD_NUMBER = 3; + private org.tensorflow.proto.util.SaverDef saverDef_; + /** + *
+   * SaverDef.
+   * 
+ * + * .tensorflow.SaverDef saver_def = 3; + */ + public boolean hasSaverDef() { + return saverDef_ != null; + } + /** + *
+   * SaverDef.
+   * 
+ * + * .tensorflow.SaverDef saver_def = 3; + */ + public org.tensorflow.proto.util.SaverDef getSaverDef() { + return saverDef_ == null ? org.tensorflow.proto.util.SaverDef.getDefaultInstance() : saverDef_; + } + /** + *
+   * SaverDef.
+   * 
+ * + * .tensorflow.SaverDef saver_def = 3; + */ + public org.tensorflow.proto.util.SaverDefOrBuilder getSaverDefOrBuilder() { + return getSaverDef(); + } + + public static final int COLLECTION_DEF_FIELD_NUMBER = 4; + private static final class CollectionDefDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, org.tensorflow.proto.framework.CollectionDef> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_CollectionDefEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.framework.CollectionDef.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.CollectionDef> collectionDef_; + private com.google.protobuf.MapField + internalGetCollectionDef() { + if (collectionDef_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CollectionDefDefaultEntryHolder.defaultEntry); + } + return collectionDef_; + } + + public int getCollectionDefCount() { + return internalGetCollectionDef().getMap().size(); + } + /** + *
+   * collection_def: Map from collection name to collections.
+   * See CollectionDef section for details.
+   * 
+ * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + + public boolean containsCollectionDef( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetCollectionDef().getMap().containsKey(key); + } + /** + * Use {@link #getCollectionDefMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getCollectionDef() { + return getCollectionDefMap(); + } + /** + *
+   * collection_def: Map from collection name to collections.
+   * See CollectionDef section for details.
+   * 
+ * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + + public java.util.Map getCollectionDefMap() { + return internalGetCollectionDef().getMap(); + } + /** + *
+   * collection_def: Map from collection name to collections.
+   * See CollectionDef section for details.
+   * 
+ * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + + public org.tensorflow.proto.framework.CollectionDef getCollectionDefOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.CollectionDef defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetCollectionDef().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * collection_def: Map from collection name to collections.
+   * See CollectionDef section for details.
+   * 
+ * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + + public org.tensorflow.proto.framework.CollectionDef getCollectionDefOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetCollectionDef().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SIGNATURE_DEF_FIELD_NUMBER = 5; + private static final class SignatureDefDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, org.tensorflow.proto.framework.SignatureDef> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_SignatureDefEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.framework.SignatureDef.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.SignatureDef> signatureDef_; + private com.google.protobuf.MapField + internalGetSignatureDef() { + if (signatureDef_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SignatureDefDefaultEntryHolder.defaultEntry); + } + return signatureDef_; + } + + public int getSignatureDefCount() { + return internalGetSignatureDef().getMap().size(); + } + /** + *
+   * signature_def: Map from user supplied key for a signature to a single
+   * SignatureDef.
+   * 
+ * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + + public boolean containsSignatureDef( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetSignatureDef().getMap().containsKey(key); + } + /** + * Use {@link #getSignatureDefMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getSignatureDef() { + return getSignatureDefMap(); + } + /** + *
+   * signature_def: Map from user supplied key for a signature to a single
+   * SignatureDef.
+   * 
+ * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + + public java.util.Map getSignatureDefMap() { + return internalGetSignatureDef().getMap(); + } + /** + *
+   * signature_def: Map from user supplied key for a signature to a single
+   * SignatureDef.
+   * 
+ * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + + public org.tensorflow.proto.framework.SignatureDef getSignatureDefOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.SignatureDef defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetSignatureDef().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * signature_def: Map from user supplied key for a signature to a single
+   * SignatureDef.
+   * 
+ * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + + public org.tensorflow.proto.framework.SignatureDef getSignatureDefOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetSignatureDef().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ASSET_FILE_DEF_FIELD_NUMBER = 6; + private java.util.List assetFileDef_; + /** + *
+   * Asset file def to be used with the defined graph.
+   * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public java.util.List getAssetFileDefList() { + return assetFileDef_; + } + /** + *
+   * Asset file def to be used with the defined graph.
+   * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public java.util.List + getAssetFileDefOrBuilderList() { + return assetFileDef_; + } + /** + *
+   * Asset file def to be used with the defined graph.
+   * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public int getAssetFileDefCount() { + return assetFileDef_.size(); + } + /** + *
+   * Asset file def to be used with the defined graph.
+   * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public org.tensorflow.proto.framework.AssetFileDef getAssetFileDef(int index) { + return assetFileDef_.get(index); + } + /** + *
+   * Asset file def to be used with the defined graph.
+   * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public org.tensorflow.proto.framework.AssetFileDefOrBuilder getAssetFileDefOrBuilder( + int index) { + return assetFileDef_.get(index); + } + + public static final int OBJECT_GRAPH_DEF_FIELD_NUMBER = 7; + private org.tensorflow.proto.framework.SavedObjectGraph objectGraphDef_; + /** + *
+   * Extra information about the structure of functions and stateful objects.
+   * 
+ * + * .tensorflow.SavedObjectGraph object_graph_def = 7; + */ + public boolean hasObjectGraphDef() { + return objectGraphDef_ != null; + } + /** + *
+   * Extra information about the structure of functions and stateful objects.
+   * 
+ * + * .tensorflow.SavedObjectGraph object_graph_def = 7; + */ + public org.tensorflow.proto.framework.SavedObjectGraph getObjectGraphDef() { + return objectGraphDef_ == null ? org.tensorflow.proto.framework.SavedObjectGraph.getDefaultInstance() : objectGraphDef_; + } + /** + *
+   * Extra information about the structure of functions and stateful objects.
+   * 
+ * + * .tensorflow.SavedObjectGraph object_graph_def = 7; + */ + public org.tensorflow.proto.framework.SavedObjectGraphOrBuilder getObjectGraphDefOrBuilder() { + return getObjectGraphDef(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (metaInfoDef_ != null) { + output.writeMessage(1, getMetaInfoDef()); + } + if (graphDef_ != null) { + output.writeMessage(2, getGraphDef()); + } + if (saverDef_ != null) { + output.writeMessage(3, getSaverDef()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetCollectionDef(), + CollectionDefDefaultEntryHolder.defaultEntry, + 4); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetSignatureDef(), + SignatureDefDefaultEntryHolder.defaultEntry, + 5); + for (int i = 0; i < assetFileDef_.size(); i++) { + output.writeMessage(6, assetFileDef_.get(i)); + } + if (objectGraphDef_ != null) { + output.writeMessage(7, getObjectGraphDef()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (metaInfoDef_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMetaInfoDef()); + } + if (graphDef_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getGraphDef()); + } + if (saverDef_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getSaverDef()); + } + for (java.util.Map.Entry entry + : internalGetCollectionDef().getMap().entrySet()) { + com.google.protobuf.MapEntry + collectionDef__ = CollectionDefDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, collectionDef__); + } + for (java.util.Map.Entry entry + : internalGetSignatureDef().getMap().entrySet()) { + com.google.protobuf.MapEntry + signatureDef__ = SignatureDefDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, signatureDef__); + } + for (int i = 0; i < assetFileDef_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, assetFileDef_.get(i)); + } + if (objectGraphDef_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getObjectGraphDef()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.MetaGraphDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.MetaGraphDef other = (org.tensorflow.proto.framework.MetaGraphDef) obj; + + if (hasMetaInfoDef() != other.hasMetaInfoDef()) return false; + if (hasMetaInfoDef()) { + if (!getMetaInfoDef() + .equals(other.getMetaInfoDef())) return false; + } + if (hasGraphDef() != other.hasGraphDef()) return false; + if (hasGraphDef()) { + if (!getGraphDef() + .equals(other.getGraphDef())) return false; + } + if (hasSaverDef() != other.hasSaverDef()) return false; + if (hasSaverDef()) { + if (!getSaverDef() + .equals(other.getSaverDef())) return false; + } + if (!internalGetCollectionDef().equals( + other.internalGetCollectionDef())) return false; + if (!internalGetSignatureDef().equals( + other.internalGetSignatureDef())) return false; + if (!getAssetFileDefList() + .equals(other.getAssetFileDefList())) return false; + if (hasObjectGraphDef() != other.hasObjectGraphDef()) return false; + if (hasObjectGraphDef()) { + if (!getObjectGraphDef() + .equals(other.getObjectGraphDef())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMetaInfoDef()) { + hash = (37 * hash) + META_INFO_DEF_FIELD_NUMBER; + hash = (53 * hash) + getMetaInfoDef().hashCode(); + } + if (hasGraphDef()) { + hash = (37 * hash) + GRAPH_DEF_FIELD_NUMBER; + hash = (53 * hash) + getGraphDef().hashCode(); + } + if (hasSaverDef()) { + hash = (37 * hash) + SAVER_DEF_FIELD_NUMBER; + hash = (53 * hash) + getSaverDef().hashCode(); + } + if (!internalGetCollectionDef().getMap().isEmpty()) { + hash = (37 * hash) + COLLECTION_DEF_FIELD_NUMBER; + hash = (53 * hash) + internalGetCollectionDef().hashCode(); + } + if (!internalGetSignatureDef().getMap().isEmpty()) { + hash = (37 * hash) + SIGNATURE_DEF_FIELD_NUMBER; + hash = (53 * hash) + internalGetSignatureDef().hashCode(); + } + if (getAssetFileDefCount() > 0) { + hash = (37 * hash) + ASSET_FILE_DEF_FIELD_NUMBER; + hash = (53 * hash) + getAssetFileDefList().hashCode(); + } + if (hasObjectGraphDef()) { + hash = (37 * hash) + OBJECT_GRAPH_DEF_FIELD_NUMBER; + hash = (53 * hash) + getObjectGraphDef().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.MetaGraphDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MetaGraphDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MetaGraphDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MetaGraphDef 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.proto.framework.MetaGraphDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.MetaGraphDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.MetaGraphDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MetaGraphDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MetaGraphDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MetaGraphDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.MetaGraphDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.MetaGraphDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.MetaGraphDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * NOTE: This protocol buffer is evolving, and will go through revisions in the
+   * coming months.
+   * Protocol buffer containing the following which are necessary to restart
+   * training, run inference. It can be used to serialize/de-serialize memory
+   * objects necessary for running computation in a graph when crossing the
+   * process boundary. It can be used for long term storage of graphs,
+   * cross-language execution of graphs, etc.
+   *   MetaInfoDef
+   *   GraphDef
+   *   SaverDef
+   *   CollectionDef
+   *   TensorInfo
+   *   SignatureDef
+   * 
+ * + * Protobuf type {@code tensorflow.MetaGraphDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.MetaGraphDef) + org.tensorflow.proto.framework.MetaGraphDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetCollectionDef(); + case 5: + return internalGetSignatureDef(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 4: + return internalGetMutableCollectionDef(); + case 5: + return internalGetMutableSignatureDef(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.MetaGraphDef.class, org.tensorflow.proto.framework.MetaGraphDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.MetaGraphDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAssetFileDefFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (metaInfoDefBuilder_ == null) { + metaInfoDef_ = null; + } else { + metaInfoDef_ = null; + metaInfoDefBuilder_ = null; + } + if (graphDefBuilder_ == null) { + graphDef_ = null; + } else { + graphDef_ = null; + graphDefBuilder_ = null; + } + if (saverDefBuilder_ == null) { + saverDef_ = null; + } else { + saverDef_ = null; + saverDefBuilder_ = null; + } + internalGetMutableCollectionDef().clear(); + internalGetMutableSignatureDef().clear(); + if (assetFileDefBuilder_ == null) { + assetFileDef_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + assetFileDefBuilder_.clear(); + } + if (objectGraphDefBuilder_ == null) { + objectGraphDef_ = null; + } else { + objectGraphDef_ = null; + objectGraphDefBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MetaGraphDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.MetaGraphDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.MetaGraphDef build() { + org.tensorflow.proto.framework.MetaGraphDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MetaGraphDef buildPartial() { + org.tensorflow.proto.framework.MetaGraphDef result = new org.tensorflow.proto.framework.MetaGraphDef(this); + int from_bitField0_ = bitField0_; + if (metaInfoDefBuilder_ == null) { + result.metaInfoDef_ = metaInfoDef_; + } else { + result.metaInfoDef_ = metaInfoDefBuilder_.build(); + } + if (graphDefBuilder_ == null) { + result.graphDef_ = graphDef_; + } else { + result.graphDef_ = graphDefBuilder_.build(); + } + if (saverDefBuilder_ == null) { + result.saverDef_ = saverDef_; + } else { + result.saverDef_ = saverDefBuilder_.build(); + } + result.collectionDef_ = internalGetCollectionDef(); + result.collectionDef_.makeImmutable(); + result.signatureDef_ = internalGetSignatureDef(); + result.signatureDef_.makeImmutable(); + if (assetFileDefBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + assetFileDef_ = java.util.Collections.unmodifiableList(assetFileDef_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.assetFileDef_ = assetFileDef_; + } else { + result.assetFileDef_ = assetFileDefBuilder_.build(); + } + if (objectGraphDefBuilder_ == null) { + result.objectGraphDef_ = objectGraphDef_; + } else { + result.objectGraphDef_ = objectGraphDefBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.MetaGraphDef) { + return mergeFrom((org.tensorflow.proto.framework.MetaGraphDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.MetaGraphDef other) { + if (other == org.tensorflow.proto.framework.MetaGraphDef.getDefaultInstance()) return this; + if (other.hasMetaInfoDef()) { + mergeMetaInfoDef(other.getMetaInfoDef()); + } + if (other.hasGraphDef()) { + mergeGraphDef(other.getGraphDef()); + } + if (other.hasSaverDef()) { + mergeSaverDef(other.getSaverDef()); + } + internalGetMutableCollectionDef().mergeFrom( + other.internalGetCollectionDef()); + internalGetMutableSignatureDef().mergeFrom( + other.internalGetSignatureDef()); + if (assetFileDefBuilder_ == null) { + if (!other.assetFileDef_.isEmpty()) { + if (assetFileDef_.isEmpty()) { + assetFileDef_ = other.assetFileDef_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureAssetFileDefIsMutable(); + assetFileDef_.addAll(other.assetFileDef_); + } + onChanged(); + } + } else { + if (!other.assetFileDef_.isEmpty()) { + if (assetFileDefBuilder_.isEmpty()) { + assetFileDefBuilder_.dispose(); + assetFileDefBuilder_ = null; + assetFileDef_ = other.assetFileDef_; + bitField0_ = (bitField0_ & ~0x00000004); + assetFileDefBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAssetFileDefFieldBuilder() : null; + } else { + assetFileDefBuilder_.addAllMessages(other.assetFileDef_); + } + } + } + if (other.hasObjectGraphDef()) { + mergeObjectGraphDef(other.getObjectGraphDef()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.MetaGraphDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.MetaGraphDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef metaInfoDef_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef, org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.Builder, org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDefOrBuilder> metaInfoDefBuilder_; + /** + * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; + */ + public boolean hasMetaInfoDef() { + return metaInfoDefBuilder_ != null || metaInfoDef_ != null; + } + /** + * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; + */ + public org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef getMetaInfoDef() { + if (metaInfoDefBuilder_ == null) { + return metaInfoDef_ == null ? org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.getDefaultInstance() : metaInfoDef_; + } else { + return metaInfoDefBuilder_.getMessage(); + } + } + /** + * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; + */ + public Builder setMetaInfoDef(org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef value) { + if (metaInfoDefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metaInfoDef_ = value; + onChanged(); + } else { + metaInfoDefBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; + */ + public Builder setMetaInfoDef( + org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.Builder builderForValue) { + if (metaInfoDefBuilder_ == null) { + metaInfoDef_ = builderForValue.build(); + onChanged(); + } else { + metaInfoDefBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; + */ + public Builder mergeMetaInfoDef(org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef value) { + if (metaInfoDefBuilder_ == null) { + if (metaInfoDef_ != null) { + metaInfoDef_ = + org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.newBuilder(metaInfoDef_).mergeFrom(value).buildPartial(); + } else { + metaInfoDef_ = value; + } + onChanged(); + } else { + metaInfoDefBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; + */ + public Builder clearMetaInfoDef() { + if (metaInfoDefBuilder_ == null) { + metaInfoDef_ = null; + onChanged(); + } else { + metaInfoDef_ = null; + metaInfoDefBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; + */ + public org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.Builder getMetaInfoDefBuilder() { + + onChanged(); + return getMetaInfoDefFieldBuilder().getBuilder(); + } + /** + * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; + */ + public org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDefOrBuilder getMetaInfoDefOrBuilder() { + if (metaInfoDefBuilder_ != null) { + return metaInfoDefBuilder_.getMessageOrBuilder(); + } else { + return metaInfoDef_ == null ? + org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.getDefaultInstance() : metaInfoDef_; + } + } + /** + * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef, org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.Builder, org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDefOrBuilder> + getMetaInfoDefFieldBuilder() { + if (metaInfoDefBuilder_ == null) { + metaInfoDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef, org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef.Builder, org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDefOrBuilder>( + getMetaInfoDef(), + getParentForChildren(), + isClean()); + metaInfoDef_ = null; + } + return metaInfoDefBuilder_; + } + + private org.tensorflow.proto.framework.GraphDef graphDef_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder> graphDefBuilder_; + /** + *
+     * GraphDef.
+     * 
+ * + * .tensorflow.GraphDef graph_def = 2; + */ + public boolean hasGraphDef() { + return graphDefBuilder_ != null || graphDef_ != null; + } + /** + *
+     * GraphDef.
+     * 
+ * + * .tensorflow.GraphDef graph_def = 2; + */ + public org.tensorflow.proto.framework.GraphDef getGraphDef() { + if (graphDefBuilder_ == null) { + return graphDef_ == null ? org.tensorflow.proto.framework.GraphDef.getDefaultInstance() : graphDef_; + } else { + return graphDefBuilder_.getMessage(); + } + } + /** + *
+     * GraphDef.
+     * 
+ * + * .tensorflow.GraphDef graph_def = 2; + */ + public Builder setGraphDef(org.tensorflow.proto.framework.GraphDef value) { + if (graphDefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + graphDef_ = value; + onChanged(); + } else { + graphDefBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * GraphDef.
+     * 
+ * + * .tensorflow.GraphDef graph_def = 2; + */ + public Builder setGraphDef( + org.tensorflow.proto.framework.GraphDef.Builder builderForValue) { + if (graphDefBuilder_ == null) { + graphDef_ = builderForValue.build(); + onChanged(); + } else { + graphDefBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * GraphDef.
+     * 
+ * + * .tensorflow.GraphDef graph_def = 2; + */ + public Builder mergeGraphDef(org.tensorflow.proto.framework.GraphDef value) { + if (graphDefBuilder_ == null) { + if (graphDef_ != null) { + graphDef_ = + org.tensorflow.proto.framework.GraphDef.newBuilder(graphDef_).mergeFrom(value).buildPartial(); + } else { + graphDef_ = value; + } + onChanged(); + } else { + graphDefBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * GraphDef.
+     * 
+ * + * .tensorflow.GraphDef graph_def = 2; + */ + public Builder clearGraphDef() { + if (graphDefBuilder_ == null) { + graphDef_ = null; + onChanged(); + } else { + graphDef_ = null; + graphDefBuilder_ = null; + } + + return this; + } + /** + *
+     * GraphDef.
+     * 
+ * + * .tensorflow.GraphDef graph_def = 2; + */ + public org.tensorflow.proto.framework.GraphDef.Builder getGraphDefBuilder() { + + onChanged(); + return getGraphDefFieldBuilder().getBuilder(); + } + /** + *
+     * GraphDef.
+     * 
+ * + * .tensorflow.GraphDef graph_def = 2; + */ + public org.tensorflow.proto.framework.GraphDefOrBuilder getGraphDefOrBuilder() { + if (graphDefBuilder_ != null) { + return graphDefBuilder_.getMessageOrBuilder(); + } else { + return graphDef_ == null ? + org.tensorflow.proto.framework.GraphDef.getDefaultInstance() : graphDef_; + } + } + /** + *
+     * GraphDef.
+     * 
+ * + * .tensorflow.GraphDef graph_def = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder> + getGraphDefFieldBuilder() { + if (graphDefBuilder_ == null) { + graphDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder>( + getGraphDef(), + getParentForChildren(), + isClean()); + graphDef_ = null; + } + return graphDefBuilder_; + } + + private org.tensorflow.proto.util.SaverDef saverDef_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.util.SaverDef, org.tensorflow.proto.util.SaverDef.Builder, org.tensorflow.proto.util.SaverDefOrBuilder> saverDefBuilder_; + /** + *
+     * SaverDef.
+     * 
+ * + * .tensorflow.SaverDef saver_def = 3; + */ + public boolean hasSaverDef() { + return saverDefBuilder_ != null || saverDef_ != null; + } + /** + *
+     * SaverDef.
+     * 
+ * + * .tensorflow.SaverDef saver_def = 3; + */ + public org.tensorflow.proto.util.SaverDef getSaverDef() { + if (saverDefBuilder_ == null) { + return saverDef_ == null ? org.tensorflow.proto.util.SaverDef.getDefaultInstance() : saverDef_; + } else { + return saverDefBuilder_.getMessage(); + } + } + /** + *
+     * SaverDef.
+     * 
+ * + * .tensorflow.SaverDef saver_def = 3; + */ + public Builder setSaverDef(org.tensorflow.proto.util.SaverDef value) { + if (saverDefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + saverDef_ = value; + onChanged(); + } else { + saverDefBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * SaverDef.
+     * 
+ * + * .tensorflow.SaverDef saver_def = 3; + */ + public Builder setSaverDef( + org.tensorflow.proto.util.SaverDef.Builder builderForValue) { + if (saverDefBuilder_ == null) { + saverDef_ = builderForValue.build(); + onChanged(); + } else { + saverDefBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * SaverDef.
+     * 
+ * + * .tensorflow.SaverDef saver_def = 3; + */ + public Builder mergeSaverDef(org.tensorflow.proto.util.SaverDef value) { + if (saverDefBuilder_ == null) { + if (saverDef_ != null) { + saverDef_ = + org.tensorflow.proto.util.SaverDef.newBuilder(saverDef_).mergeFrom(value).buildPartial(); + } else { + saverDef_ = value; + } + onChanged(); + } else { + saverDefBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * SaverDef.
+     * 
+ * + * .tensorflow.SaverDef saver_def = 3; + */ + public Builder clearSaverDef() { + if (saverDefBuilder_ == null) { + saverDef_ = null; + onChanged(); + } else { + saverDef_ = null; + saverDefBuilder_ = null; + } + + return this; + } + /** + *
+     * SaverDef.
+     * 
+ * + * .tensorflow.SaverDef saver_def = 3; + */ + public org.tensorflow.proto.util.SaverDef.Builder getSaverDefBuilder() { + + onChanged(); + return getSaverDefFieldBuilder().getBuilder(); + } + /** + *
+     * SaverDef.
+     * 
+ * + * .tensorflow.SaverDef saver_def = 3; + */ + public org.tensorflow.proto.util.SaverDefOrBuilder getSaverDefOrBuilder() { + if (saverDefBuilder_ != null) { + return saverDefBuilder_.getMessageOrBuilder(); + } else { + return saverDef_ == null ? + org.tensorflow.proto.util.SaverDef.getDefaultInstance() : saverDef_; + } + } + /** + *
+     * SaverDef.
+     * 
+ * + * .tensorflow.SaverDef saver_def = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.util.SaverDef, org.tensorflow.proto.util.SaverDef.Builder, org.tensorflow.proto.util.SaverDefOrBuilder> + getSaverDefFieldBuilder() { + if (saverDefBuilder_ == null) { + saverDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.util.SaverDef, org.tensorflow.proto.util.SaverDef.Builder, org.tensorflow.proto.util.SaverDefOrBuilder>( + getSaverDef(), + getParentForChildren(), + isClean()); + saverDef_ = null; + } + return saverDefBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.CollectionDef> collectionDef_; + private com.google.protobuf.MapField + internalGetCollectionDef() { + if (collectionDef_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CollectionDefDefaultEntryHolder.defaultEntry); + } + return collectionDef_; + } + private com.google.protobuf.MapField + internalGetMutableCollectionDef() { + onChanged();; + if (collectionDef_ == null) { + collectionDef_ = com.google.protobuf.MapField.newMapField( + CollectionDefDefaultEntryHolder.defaultEntry); + } + if (!collectionDef_.isMutable()) { + collectionDef_ = collectionDef_.copy(); + } + return collectionDef_; + } + + public int getCollectionDefCount() { + return internalGetCollectionDef().getMap().size(); + } + /** + *
+     * collection_def: Map from collection name to collections.
+     * See CollectionDef section for details.
+     * 
+ * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + + public boolean containsCollectionDef( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetCollectionDef().getMap().containsKey(key); + } + /** + * Use {@link #getCollectionDefMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getCollectionDef() { + return getCollectionDefMap(); + } + /** + *
+     * collection_def: Map from collection name to collections.
+     * See CollectionDef section for details.
+     * 
+ * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + + public java.util.Map getCollectionDefMap() { + return internalGetCollectionDef().getMap(); + } + /** + *
+     * collection_def: Map from collection name to collections.
+     * See CollectionDef section for details.
+     * 
+ * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + + public org.tensorflow.proto.framework.CollectionDef getCollectionDefOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.CollectionDef defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetCollectionDef().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * collection_def: Map from collection name to collections.
+     * See CollectionDef section for details.
+     * 
+ * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + + public org.tensorflow.proto.framework.CollectionDef getCollectionDefOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetCollectionDef().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearCollectionDef() { + internalGetMutableCollectionDef().getMutableMap() + .clear(); + return this; + } + /** + *
+     * collection_def: Map from collection name to collections.
+     * See CollectionDef section for details.
+     * 
+ * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + + public Builder removeCollectionDef( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableCollectionDef().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableCollectionDef() { + return internalGetMutableCollectionDef().getMutableMap(); + } + /** + *
+     * collection_def: Map from collection name to collections.
+     * See CollectionDef section for details.
+     * 
+ * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + public Builder putCollectionDef( + java.lang.String key, + org.tensorflow.proto.framework.CollectionDef value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableCollectionDef().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * collection_def: Map from collection name to collections.
+     * See CollectionDef section for details.
+     * 
+ * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + + public Builder putAllCollectionDef( + java.util.Map values) { + internalGetMutableCollectionDef().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.SignatureDef> signatureDef_; + private com.google.protobuf.MapField + internalGetSignatureDef() { + if (signatureDef_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SignatureDefDefaultEntryHolder.defaultEntry); + } + return signatureDef_; + } + private com.google.protobuf.MapField + internalGetMutableSignatureDef() { + onChanged();; + if (signatureDef_ == null) { + signatureDef_ = com.google.protobuf.MapField.newMapField( + SignatureDefDefaultEntryHolder.defaultEntry); + } + if (!signatureDef_.isMutable()) { + signatureDef_ = signatureDef_.copy(); + } + return signatureDef_; + } + + public int getSignatureDefCount() { + return internalGetSignatureDef().getMap().size(); + } + /** + *
+     * signature_def: Map from user supplied key for a signature to a single
+     * SignatureDef.
+     * 
+ * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + + public boolean containsSignatureDef( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetSignatureDef().getMap().containsKey(key); + } + /** + * Use {@link #getSignatureDefMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getSignatureDef() { + return getSignatureDefMap(); + } + /** + *
+     * signature_def: Map from user supplied key for a signature to a single
+     * SignatureDef.
+     * 
+ * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + + public java.util.Map getSignatureDefMap() { + return internalGetSignatureDef().getMap(); + } + /** + *
+     * signature_def: Map from user supplied key for a signature to a single
+     * SignatureDef.
+     * 
+ * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + + public org.tensorflow.proto.framework.SignatureDef getSignatureDefOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.SignatureDef defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetSignatureDef().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * signature_def: Map from user supplied key for a signature to a single
+     * SignatureDef.
+     * 
+ * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + + public org.tensorflow.proto.framework.SignatureDef getSignatureDefOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetSignatureDef().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearSignatureDef() { + internalGetMutableSignatureDef().getMutableMap() + .clear(); + return this; + } + /** + *
+     * signature_def: Map from user supplied key for a signature to a single
+     * SignatureDef.
+     * 
+ * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + + public Builder removeSignatureDef( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableSignatureDef().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableSignatureDef() { + return internalGetMutableSignatureDef().getMutableMap(); + } + /** + *
+     * signature_def: Map from user supplied key for a signature to a single
+     * SignatureDef.
+     * 
+ * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + public Builder putSignatureDef( + java.lang.String key, + org.tensorflow.proto.framework.SignatureDef value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableSignatureDef().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * signature_def: Map from user supplied key for a signature to a single
+     * SignatureDef.
+     * 
+ * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + + public Builder putAllSignatureDef( + java.util.Map values) { + internalGetMutableSignatureDef().getMutableMap() + .putAll(values); + return this; + } + + private java.util.List assetFileDef_ = + java.util.Collections.emptyList(); + private void ensureAssetFileDefIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + assetFileDef_ = new java.util.ArrayList(assetFileDef_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.AssetFileDef, org.tensorflow.proto.framework.AssetFileDef.Builder, org.tensorflow.proto.framework.AssetFileDefOrBuilder> assetFileDefBuilder_; + + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public java.util.List getAssetFileDefList() { + if (assetFileDefBuilder_ == null) { + return java.util.Collections.unmodifiableList(assetFileDef_); + } else { + return assetFileDefBuilder_.getMessageList(); + } + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public int getAssetFileDefCount() { + if (assetFileDefBuilder_ == null) { + return assetFileDef_.size(); + } else { + return assetFileDefBuilder_.getCount(); + } + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public org.tensorflow.proto.framework.AssetFileDef getAssetFileDef(int index) { + if (assetFileDefBuilder_ == null) { + return assetFileDef_.get(index); + } else { + return assetFileDefBuilder_.getMessage(index); + } + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public Builder setAssetFileDef( + int index, org.tensorflow.proto.framework.AssetFileDef value) { + if (assetFileDefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetFileDefIsMutable(); + assetFileDef_.set(index, value); + onChanged(); + } else { + assetFileDefBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public Builder setAssetFileDef( + int index, org.tensorflow.proto.framework.AssetFileDef.Builder builderForValue) { + if (assetFileDefBuilder_ == null) { + ensureAssetFileDefIsMutable(); + assetFileDef_.set(index, builderForValue.build()); + onChanged(); + } else { + assetFileDefBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public Builder addAssetFileDef(org.tensorflow.proto.framework.AssetFileDef value) { + if (assetFileDefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetFileDefIsMutable(); + assetFileDef_.add(value); + onChanged(); + } else { + assetFileDefBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public Builder addAssetFileDef( + int index, org.tensorflow.proto.framework.AssetFileDef value) { + if (assetFileDefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetFileDefIsMutable(); + assetFileDef_.add(index, value); + onChanged(); + } else { + assetFileDefBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public Builder addAssetFileDef( + org.tensorflow.proto.framework.AssetFileDef.Builder builderForValue) { + if (assetFileDefBuilder_ == null) { + ensureAssetFileDefIsMutable(); + assetFileDef_.add(builderForValue.build()); + onChanged(); + } else { + assetFileDefBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public Builder addAssetFileDef( + int index, org.tensorflow.proto.framework.AssetFileDef.Builder builderForValue) { + if (assetFileDefBuilder_ == null) { + ensureAssetFileDefIsMutable(); + assetFileDef_.add(index, builderForValue.build()); + onChanged(); + } else { + assetFileDefBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public Builder addAllAssetFileDef( + java.lang.Iterable values) { + if (assetFileDefBuilder_ == null) { + ensureAssetFileDefIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assetFileDef_); + onChanged(); + } else { + assetFileDefBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public Builder clearAssetFileDef() { + if (assetFileDefBuilder_ == null) { + assetFileDef_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + assetFileDefBuilder_.clear(); + } + return this; + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public Builder removeAssetFileDef(int index) { + if (assetFileDefBuilder_ == null) { + ensureAssetFileDefIsMutable(); + assetFileDef_.remove(index); + onChanged(); + } else { + assetFileDefBuilder_.remove(index); + } + return this; + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public org.tensorflow.proto.framework.AssetFileDef.Builder getAssetFileDefBuilder( + int index) { + return getAssetFileDefFieldBuilder().getBuilder(index); + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public org.tensorflow.proto.framework.AssetFileDefOrBuilder getAssetFileDefOrBuilder( + int index) { + if (assetFileDefBuilder_ == null) { + return assetFileDef_.get(index); } else { + return assetFileDefBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public java.util.List + getAssetFileDefOrBuilderList() { + if (assetFileDefBuilder_ != null) { + return assetFileDefBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(assetFileDef_); + } + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public org.tensorflow.proto.framework.AssetFileDef.Builder addAssetFileDefBuilder() { + return getAssetFileDefFieldBuilder().addBuilder( + org.tensorflow.proto.framework.AssetFileDef.getDefaultInstance()); + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public org.tensorflow.proto.framework.AssetFileDef.Builder addAssetFileDefBuilder( + int index) { + return getAssetFileDefFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.AssetFileDef.getDefaultInstance()); + } + /** + *
+     * Asset file def to be used with the defined graph.
+     * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + public java.util.List + getAssetFileDefBuilderList() { + return getAssetFileDefFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.AssetFileDef, org.tensorflow.proto.framework.AssetFileDef.Builder, org.tensorflow.proto.framework.AssetFileDefOrBuilder> + getAssetFileDefFieldBuilder() { + if (assetFileDefBuilder_ == null) { + assetFileDefBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.AssetFileDef, org.tensorflow.proto.framework.AssetFileDef.Builder, org.tensorflow.proto.framework.AssetFileDefOrBuilder>( + assetFileDef_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + assetFileDef_ = null; + } + return assetFileDefBuilder_; + } + + private org.tensorflow.proto.framework.SavedObjectGraph objectGraphDef_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedObjectGraph, org.tensorflow.proto.framework.SavedObjectGraph.Builder, org.tensorflow.proto.framework.SavedObjectGraphOrBuilder> objectGraphDefBuilder_; + /** + *
+     * Extra information about the structure of functions and stateful objects.
+     * 
+ * + * .tensorflow.SavedObjectGraph object_graph_def = 7; + */ + public boolean hasObjectGraphDef() { + return objectGraphDefBuilder_ != null || objectGraphDef_ != null; + } + /** + *
+     * Extra information about the structure of functions and stateful objects.
+     * 
+ * + * .tensorflow.SavedObjectGraph object_graph_def = 7; + */ + public org.tensorflow.proto.framework.SavedObjectGraph getObjectGraphDef() { + if (objectGraphDefBuilder_ == null) { + return objectGraphDef_ == null ? org.tensorflow.proto.framework.SavedObjectGraph.getDefaultInstance() : objectGraphDef_; + } else { + return objectGraphDefBuilder_.getMessage(); + } + } + /** + *
+     * Extra information about the structure of functions and stateful objects.
+     * 
+ * + * .tensorflow.SavedObjectGraph object_graph_def = 7; + */ + public Builder setObjectGraphDef(org.tensorflow.proto.framework.SavedObjectGraph value) { + if (objectGraphDefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + objectGraphDef_ = value; + onChanged(); + } else { + objectGraphDefBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Extra information about the structure of functions and stateful objects.
+     * 
+ * + * .tensorflow.SavedObjectGraph object_graph_def = 7; + */ + public Builder setObjectGraphDef( + org.tensorflow.proto.framework.SavedObjectGraph.Builder builderForValue) { + if (objectGraphDefBuilder_ == null) { + objectGraphDef_ = builderForValue.build(); + onChanged(); + } else { + objectGraphDefBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Extra information about the structure of functions and stateful objects.
+     * 
+ * + * .tensorflow.SavedObjectGraph object_graph_def = 7; + */ + public Builder mergeObjectGraphDef(org.tensorflow.proto.framework.SavedObjectGraph value) { + if (objectGraphDefBuilder_ == null) { + if (objectGraphDef_ != null) { + objectGraphDef_ = + org.tensorflow.proto.framework.SavedObjectGraph.newBuilder(objectGraphDef_).mergeFrom(value).buildPartial(); + } else { + objectGraphDef_ = value; + } + onChanged(); + } else { + objectGraphDefBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Extra information about the structure of functions and stateful objects.
+     * 
+ * + * .tensorflow.SavedObjectGraph object_graph_def = 7; + */ + public Builder clearObjectGraphDef() { + if (objectGraphDefBuilder_ == null) { + objectGraphDef_ = null; + onChanged(); + } else { + objectGraphDef_ = null; + objectGraphDefBuilder_ = null; + } + + return this; + } + /** + *
+     * Extra information about the structure of functions and stateful objects.
+     * 
+ * + * .tensorflow.SavedObjectGraph object_graph_def = 7; + */ + public org.tensorflow.proto.framework.SavedObjectGraph.Builder getObjectGraphDefBuilder() { + + onChanged(); + return getObjectGraphDefFieldBuilder().getBuilder(); + } + /** + *
+     * Extra information about the structure of functions and stateful objects.
+     * 
+ * + * .tensorflow.SavedObjectGraph object_graph_def = 7; + */ + public org.tensorflow.proto.framework.SavedObjectGraphOrBuilder getObjectGraphDefOrBuilder() { + if (objectGraphDefBuilder_ != null) { + return objectGraphDefBuilder_.getMessageOrBuilder(); + } else { + return objectGraphDef_ == null ? + org.tensorflow.proto.framework.SavedObjectGraph.getDefaultInstance() : objectGraphDef_; + } + } + /** + *
+     * Extra information about the structure of functions and stateful objects.
+     * 
+ * + * .tensorflow.SavedObjectGraph object_graph_def = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedObjectGraph, org.tensorflow.proto.framework.SavedObjectGraph.Builder, org.tensorflow.proto.framework.SavedObjectGraphOrBuilder> + getObjectGraphDefFieldBuilder() { + if (objectGraphDefBuilder_ == null) { + objectGraphDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedObjectGraph, org.tensorflow.proto.framework.SavedObjectGraph.Builder, org.tensorflow.proto.framework.SavedObjectGraphOrBuilder>( + getObjectGraphDef(), + getParentForChildren(), + isClean()); + objectGraphDef_ = null; + } + return objectGraphDefBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.MetaGraphDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.MetaGraphDef) + private static final org.tensorflow.proto.framework.MetaGraphDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.MetaGraphDef(); + } + + public static org.tensorflow.proto.framework.MetaGraphDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetaGraphDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MetaGraphDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.MetaGraphDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MetaGraphDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MetaGraphDefOrBuilder.java new file mode 100644 index 00000000000..ca9cf06f97b --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MetaGraphDefOrBuilder.java @@ -0,0 +1,259 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/meta_graph.proto + +package org.tensorflow.proto.framework; + +public interface MetaGraphDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.MetaGraphDef) + com.google.protobuf.MessageOrBuilder { + + /** + * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; + */ + boolean hasMetaInfoDef(); + /** + * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; + */ + org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDef getMetaInfoDef(); + /** + * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; + */ + org.tensorflow.proto.framework.MetaGraphDef.MetaInfoDefOrBuilder getMetaInfoDefOrBuilder(); + + /** + *
+   * GraphDef.
+   * 
+ * + * .tensorflow.GraphDef graph_def = 2; + */ + boolean hasGraphDef(); + /** + *
+   * GraphDef.
+   * 
+ * + * .tensorflow.GraphDef graph_def = 2; + */ + org.tensorflow.proto.framework.GraphDef getGraphDef(); + /** + *
+   * GraphDef.
+   * 
+ * + * .tensorflow.GraphDef graph_def = 2; + */ + org.tensorflow.proto.framework.GraphDefOrBuilder getGraphDefOrBuilder(); + + /** + *
+   * SaverDef.
+   * 
+ * + * .tensorflow.SaverDef saver_def = 3; + */ + boolean hasSaverDef(); + /** + *
+   * SaverDef.
+   * 
+ * + * .tensorflow.SaverDef saver_def = 3; + */ + org.tensorflow.proto.util.SaverDef getSaverDef(); + /** + *
+   * SaverDef.
+   * 
+ * + * .tensorflow.SaverDef saver_def = 3; + */ + org.tensorflow.proto.util.SaverDefOrBuilder getSaverDefOrBuilder(); + + /** + *
+   * collection_def: Map from collection name to collections.
+   * See CollectionDef section for details.
+   * 
+ * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + int getCollectionDefCount(); + /** + *
+   * collection_def: Map from collection name to collections.
+   * See CollectionDef section for details.
+   * 
+ * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + boolean containsCollectionDef( + java.lang.String key); + /** + * Use {@link #getCollectionDefMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getCollectionDef(); + /** + *
+   * collection_def: Map from collection name to collections.
+   * See CollectionDef section for details.
+   * 
+ * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + java.util.Map + getCollectionDefMap(); + /** + *
+   * collection_def: Map from collection name to collections.
+   * See CollectionDef section for details.
+   * 
+ * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + + org.tensorflow.proto.framework.CollectionDef getCollectionDefOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.CollectionDef defaultValue); + /** + *
+   * collection_def: Map from collection name to collections.
+   * See CollectionDef section for details.
+   * 
+ * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + + org.tensorflow.proto.framework.CollectionDef getCollectionDefOrThrow( + java.lang.String key); + + /** + *
+   * signature_def: Map from user supplied key for a signature to a single
+   * SignatureDef.
+   * 
+ * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + int getSignatureDefCount(); + /** + *
+   * signature_def: Map from user supplied key for a signature to a single
+   * SignatureDef.
+   * 
+ * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + boolean containsSignatureDef( + java.lang.String key); + /** + * Use {@link #getSignatureDefMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getSignatureDef(); + /** + *
+   * signature_def: Map from user supplied key for a signature to a single
+   * SignatureDef.
+   * 
+ * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + java.util.Map + getSignatureDefMap(); + /** + *
+   * signature_def: Map from user supplied key for a signature to a single
+   * SignatureDef.
+   * 
+ * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + + org.tensorflow.proto.framework.SignatureDef getSignatureDefOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.SignatureDef defaultValue); + /** + *
+   * signature_def: Map from user supplied key for a signature to a single
+   * SignatureDef.
+   * 
+ * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + + org.tensorflow.proto.framework.SignatureDef getSignatureDefOrThrow( + java.lang.String key); + + /** + *
+   * Asset file def to be used with the defined graph.
+   * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + java.util.List + getAssetFileDefList(); + /** + *
+   * Asset file def to be used with the defined graph.
+   * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + org.tensorflow.proto.framework.AssetFileDef getAssetFileDef(int index); + /** + *
+   * Asset file def to be used with the defined graph.
+   * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + int getAssetFileDefCount(); + /** + *
+   * Asset file def to be used with the defined graph.
+   * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + java.util.List + getAssetFileDefOrBuilderList(); + /** + *
+   * Asset file def to be used with the defined graph.
+   * 
+ * + * repeated .tensorflow.AssetFileDef asset_file_def = 6; + */ + org.tensorflow.proto.framework.AssetFileDefOrBuilder getAssetFileDefOrBuilder( + int index); + + /** + *
+   * Extra information about the structure of functions and stateful objects.
+   * 
+ * + * .tensorflow.SavedObjectGraph object_graph_def = 7; + */ + boolean hasObjectGraphDef(); + /** + *
+   * Extra information about the structure of functions and stateful objects.
+   * 
+ * + * .tensorflow.SavedObjectGraph object_graph_def = 7; + */ + org.tensorflow.proto.framework.SavedObjectGraph getObjectGraphDef(); + /** + *
+   * Extra information about the structure of functions and stateful objects.
+   * 
+ * + * .tensorflow.SavedObjectGraph object_graph_def = 7; + */ + org.tensorflow.proto.framework.SavedObjectGraphOrBuilder getObjectGraphDefOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MetaGraphProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MetaGraphProtos.java new file mode 100644 index 00000000000..cd79fd2f986 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/MetaGraphProtos.java @@ -0,0 +1,318 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/meta_graph.proto + +package org.tensorflow.proto.framework; + +public final class MetaGraphProtos { + private MetaGraphProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_MetaGraphDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_MetaGraphDef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_MetaGraphDef_MetaInfoDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_MetaGraphDef_MetaInfoDef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_MetaGraphDef_CollectionDefEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_MetaGraphDef_CollectionDefEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_MetaGraphDef_SignatureDefEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_MetaGraphDef_SignatureDefEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_CollectionDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_CollectionDef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_CollectionDef_NodeList_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_CollectionDef_NodeList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_CollectionDef_BytesList_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_CollectionDef_BytesList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_CollectionDef_Int64List_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_CollectionDef_Int64List_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_CollectionDef_FloatList_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_CollectionDef_FloatList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_CollectionDef_AnyList_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_CollectionDef_AnyList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_TensorInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_TensorInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_TensorInfo_CooSparse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_TensorInfo_CooSparse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_TensorInfo_CompositeTensor_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_TensorInfo_CompositeTensor_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SignatureDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SignatureDef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SignatureDef_InputsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SignatureDef_InputsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SignatureDef_OutputsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SignatureDef_OutputsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_AssetFileDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_AssetFileDef_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/protobuf/meta_graph.pr" + + "oto\022\ntensorflow\032\031google/protobuf/any.pro" + + "to\032%tensorflow/core/framework/graph.prot" + + "o\032&tensorflow/core/framework/op_def.prot" + + "o\032,tensorflow/core/framework/tensor_shap" + + "e.proto\032%tensorflow/core/framework/types" + + ".proto\0321tensorflow/core/protobuf/saved_o" + + "bject_graph.proto\032$tensorflow/core/proto" + + "buf/saver.proto\032%tensorflow/core/protobu" + + "f/struct.proto\"\250\007\n\014MetaGraphDef\022;\n\rmeta_" + + "info_def\030\001 \001(\0132$.tensorflow.MetaGraphDef" + + ".MetaInfoDef\022\'\n\tgraph_def\030\002 \001(\0132\024.tensor" + + "flow.GraphDef\022\'\n\tsaver_def\030\003 \001(\0132\024.tenso" + + "rflow.SaverDef\022C\n\016collection_def\030\004 \003(\0132+" + + ".tensorflow.MetaGraphDef.CollectionDefEn" + + "try\022A\n\rsignature_def\030\005 \003(\0132*.tensorflow." + + "MetaGraphDef.SignatureDefEntry\0220\n\016asset_" + + "file_def\030\006 \003(\0132\030.tensorflow.AssetFileDef" + + "\0226\n\020object_graph_def\030\007 \001(\0132\034.tensorflow." + + "SavedObjectGraph\032\366\002\n\013MetaInfoDef\022\032\n\022meta" + + "_graph_version\030\001 \001(\t\022,\n\020stripped_op_list" + + "\030\002 \001(\0132\022.tensorflow.OpList\022&\n\010any_info\030\003" + + " \001(\0132\024.google.protobuf.Any\022\014\n\004tags\030\004 \003(\t" + + "\022\032\n\022tensorflow_version\030\005 \001(\t\022\036\n\026tensorfl" + + "ow_git_version\030\006 \001(\t\022\036\n\026stripped_default" + + "_attrs\030\007 \001(\010\022S\n\020function_aliases\030\010 \003(\01329" + + ".tensorflow.MetaGraphDef.MetaInfoDef.Fun" + + "ctionAliasesEntry\0326\n\024FunctionAliasesEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032O\n\022Col" + + "lectionDefEntry\022\013\n\003key\030\001 \001(\t\022(\n\005value\030\002 " + + "\001(\0132\031.tensorflow.CollectionDef:\0028\001\032M\n\021Si" + + "gnatureDefEntry\022\013\n\003key\030\001 \001(\t\022\'\n\005value\030\002 " + + "\001(\0132\030.tensorflow.SignatureDef:\0028\001\"\337\003\n\rCo" + + "llectionDef\0227\n\tnode_list\030\001 \001(\0132\".tensorf" + + "low.CollectionDef.NodeListH\000\0229\n\nbytes_li" + + "st\030\002 \001(\0132#.tensorflow.CollectionDef.Byte" + + "sListH\000\0229\n\nint64_list\030\003 \001(\0132#.tensorflow" + + ".CollectionDef.Int64ListH\000\0229\n\nfloat_list" + + "\030\004 \001(\0132#.tensorflow.CollectionDef.FloatL" + + "istH\000\0225\n\010any_list\030\005 \001(\0132!.tensorflow.Col" + + "lectionDef.AnyListH\000\032\031\n\010NodeList\022\r\n\005valu" + + "e\030\001 \003(\t\032\032\n\tBytesList\022\r\n\005value\030\001 \003(\014\032\036\n\tI" + + "nt64List\022\021\n\005value\030\001 \003(\003B\002\020\001\032\036\n\tFloatList" + + "\022\021\n\005value\030\001 \003(\002B\002\020\001\032.\n\007AnyList\022#\n\005value\030" + + "\001 \003(\0132\024.google.protobuf.AnyB\006\n\004kind\"\321\003\n\n" + + "TensorInfo\022\016\n\004name\030\001 \001(\tH\000\0226\n\ncoo_sparse" + + "\030\004 \001(\0132 .tensorflow.TensorInfo.CooSparse" + + "H\000\022B\n\020composite_tensor\030\005 \001(\0132&.tensorflo" + + "w.TensorInfo.CompositeTensorH\000\022#\n\005dtype\030" + + "\002 \001(\0162\024.tensorflow.DataType\0222\n\014tensor_sh" + + "ape\030\003 \001(\0132\034.tensorflow.TensorShapeProto\032" + + "e\n\tCooSparse\022\032\n\022values_tensor_name\030\001 \001(\t" + + "\022\033\n\023indices_tensor_name\030\002 \001(\t\022\037\n\027dense_s" + + "hape_tensor_name\030\003 \001(\t\032k\n\017CompositeTenso" + + "r\022,\n\ttype_spec\030\001 \001(\0132\031.tensorflow.TypeSp" + + "ecProto\022*\n\ncomponents\030\002 \003(\0132\026.tensorflow" + + ".TensorInfoB\n\n\010encoding\"\240\002\n\014SignatureDef" + + "\0224\n\006inputs\030\001 \003(\0132$.tensorflow.SignatureD" + + "ef.InputsEntry\0226\n\007outputs\030\002 \003(\0132%.tensor" + + "flow.SignatureDef.OutputsEntry\022\023\n\013method" + + "_name\030\003 \001(\t\032E\n\013InputsEntry\022\013\n\003key\030\001 \001(\t\022" + + "%\n\005value\030\002 \001(\0132\026.tensorflow.TensorInfo:\002" + + "8\001\032F\n\014OutputsEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value" + + "\030\002 \001(\0132\026.tensorflow.TensorInfo:\0028\001\"M\n\014As" + + "setFileDef\022+\n\013tensor_info\030\001 \001(\0132\026.tensor" + + "flow.TensorInfo\022\020\n\010filename\030\002 \001(\tB\200\001\n\036or" + + "g.tensorflow.proto.frameworkB\017MetaGraphP" + + "rotosP\001ZHgithub.com/tensorflow/tensorflo" + + "w/tensorflow/go/core/core_protos_go_prot" + + "o\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.AnyProto.getDescriptor(), + org.tensorflow.proto.framework.GraphProtos.getDescriptor(), + org.tensorflow.proto.framework.OpDefProtos.getDescriptor(), + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(), + org.tensorflow.proto.framework.TypesProtos.getDescriptor(), + org.tensorflow.proto.framework.SavedObjectGraphProtos.getDescriptor(), + org.tensorflow.proto.util.SaverProtos.getDescriptor(), + org.tensorflow.proto.framework.StructProtos.getDescriptor(), + }); + internal_static_tensorflow_MetaGraphDef_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_MetaGraphDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_MetaGraphDef_descriptor, + new java.lang.String[] { "MetaInfoDef", "GraphDef", "SaverDef", "CollectionDef", "SignatureDef", "AssetFileDef", "ObjectGraphDef", }); + internal_static_tensorflow_MetaGraphDef_MetaInfoDef_descriptor = + internal_static_tensorflow_MetaGraphDef_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_MetaGraphDef_MetaInfoDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_MetaGraphDef_MetaInfoDef_descriptor, + new java.lang.String[] { "MetaGraphVersion", "StrippedOpList", "AnyInfo", "Tags", "TensorflowVersion", "TensorflowGitVersion", "StrippedDefaultAttrs", "FunctionAliases", }); + internal_static_tensorflow_MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_descriptor = + internal_static_tensorflow_MetaGraphDef_MetaInfoDef_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_MetaGraphDef_CollectionDefEntry_descriptor = + internal_static_tensorflow_MetaGraphDef_descriptor.getNestedTypes().get(1); + internal_static_tensorflow_MetaGraphDef_CollectionDefEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_MetaGraphDef_CollectionDefEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_MetaGraphDef_SignatureDefEntry_descriptor = + internal_static_tensorflow_MetaGraphDef_descriptor.getNestedTypes().get(2); + internal_static_tensorflow_MetaGraphDef_SignatureDefEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_MetaGraphDef_SignatureDefEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_CollectionDef_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_CollectionDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_CollectionDef_descriptor, + new java.lang.String[] { "NodeList", "BytesList", "Int64List", "FloatList", "AnyList", "Kind", }); + internal_static_tensorflow_CollectionDef_NodeList_descriptor = + internal_static_tensorflow_CollectionDef_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_CollectionDef_NodeList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_CollectionDef_NodeList_descriptor, + new java.lang.String[] { "Value", }); + internal_static_tensorflow_CollectionDef_BytesList_descriptor = + internal_static_tensorflow_CollectionDef_descriptor.getNestedTypes().get(1); + internal_static_tensorflow_CollectionDef_BytesList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_CollectionDef_BytesList_descriptor, + new java.lang.String[] { "Value", }); + internal_static_tensorflow_CollectionDef_Int64List_descriptor = + internal_static_tensorflow_CollectionDef_descriptor.getNestedTypes().get(2); + internal_static_tensorflow_CollectionDef_Int64List_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_CollectionDef_Int64List_descriptor, + new java.lang.String[] { "Value", }); + internal_static_tensorflow_CollectionDef_FloatList_descriptor = + internal_static_tensorflow_CollectionDef_descriptor.getNestedTypes().get(3); + internal_static_tensorflow_CollectionDef_FloatList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_CollectionDef_FloatList_descriptor, + new java.lang.String[] { "Value", }); + internal_static_tensorflow_CollectionDef_AnyList_descriptor = + internal_static_tensorflow_CollectionDef_descriptor.getNestedTypes().get(4); + internal_static_tensorflow_CollectionDef_AnyList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_CollectionDef_AnyList_descriptor, + new java.lang.String[] { "Value", }); + internal_static_tensorflow_TensorInfo_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_tensorflow_TensorInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_TensorInfo_descriptor, + new java.lang.String[] { "Name", "CooSparse", "CompositeTensor", "Dtype", "TensorShape", "Encoding", }); + internal_static_tensorflow_TensorInfo_CooSparse_descriptor = + internal_static_tensorflow_TensorInfo_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_TensorInfo_CooSparse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_TensorInfo_CooSparse_descriptor, + new java.lang.String[] { "ValuesTensorName", "IndicesTensorName", "DenseShapeTensorName", }); + internal_static_tensorflow_TensorInfo_CompositeTensor_descriptor = + internal_static_tensorflow_TensorInfo_descriptor.getNestedTypes().get(1); + internal_static_tensorflow_TensorInfo_CompositeTensor_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_TensorInfo_CompositeTensor_descriptor, + new java.lang.String[] { "TypeSpec", "Components", }); + internal_static_tensorflow_SignatureDef_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_tensorflow_SignatureDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SignatureDef_descriptor, + new java.lang.String[] { "Inputs", "Outputs", "MethodName", }); + internal_static_tensorflow_SignatureDef_InputsEntry_descriptor = + internal_static_tensorflow_SignatureDef_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_SignatureDef_InputsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SignatureDef_InputsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_SignatureDef_OutputsEntry_descriptor = + internal_static_tensorflow_SignatureDef_descriptor.getNestedTypes().get(1); + internal_static_tensorflow_SignatureDef_OutputsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SignatureDef_OutputsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_AssetFileDef_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_tensorflow_AssetFileDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_AssetFileDef_descriptor, + new java.lang.String[] { "TensorInfo", "Filename", }); + com.google.protobuf.AnyProto.getDescriptor(); + org.tensorflow.proto.framework.GraphProtos.getDescriptor(); + org.tensorflow.proto.framework.OpDefProtos.getDescriptor(); + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(); + org.tensorflow.proto.framework.TypesProtos.getDescriptor(); + org.tensorflow.proto.framework.SavedObjectGraphProtos.getDescriptor(); + org.tensorflow.proto.util.SaverProtos.getDescriptor(); + org.tensorflow.proto.framework.StructProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NameAttrList.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NameAttrList.java new file mode 100644 index 00000000000..a17b31f8aa1 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NameAttrList.java @@ -0,0 +1,832 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/attr_value.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * A list of attr names and their values. The whole list is attached
+ * with a string name.  E.g., MatMul[T=float].
+ * 
+ * + * Protobuf type {@code tensorflow.NameAttrList} + */ +public final class NameAttrList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.NameAttrList) + NameAttrListOrBuilder { +private static final long serialVersionUID = 0L; + // Use NameAttrList.newBuilder() to construct. + private NameAttrList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NameAttrList() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NameAttrList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NameAttrList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + attr_ = com.google.protobuf.MapField.newMapField( + AttrDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + attr__ = input.readMessage( + AttrDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + attr_.getMutableMap().put( + attr__.getKey(), attr__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.AttrValueProtos.internal_static_tensorflow_NameAttrList_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetAttr(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.AttrValueProtos.internal_static_tensorflow_NameAttrList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NameAttrList.class, org.tensorflow.proto.framework.NameAttrList.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * 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; + } + } + /** + * 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.proto.framework.AttrValue> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.AttrValueProtos.internal_static_tensorflow_NameAttrList_AttrEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.framework.AttrValue.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.AttrValue> attr_; + private com.google.protobuf.MapField + internalGetAttr() { + if (attr_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttrDefaultEntryHolder.defaultEntry); + } + return attr_; + } + + public int getAttrCount() { + return internalGetAttr().getMap().size(); + } + /** + * map<string, .tensorflow.AttrValue> attr = 2; + */ + + public boolean containsAttr( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetAttr().getMap().containsKey(key); + } + /** + * Use {@link #getAttrMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getAttr() { + return getAttrMap(); + } + /** + * map<string, .tensorflow.AttrValue> attr = 2; + */ + + public java.util.Map getAttrMap() { + return internalGetAttr().getMap(); + } + /** + * map<string, .tensorflow.AttrValue> attr = 2; + */ + + public org.tensorflow.proto.framework.AttrValue getAttrOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttr().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .tensorflow.AttrValue> attr = 2; + */ + + public org.tensorflow.proto.framework.AttrValue getAttrOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttr().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetAttr(), + AttrDefaultEntryHolder.defaultEntry, + 2); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (java.util.Map.Entry entry + : internalGetAttr().getMap().entrySet()) { + com.google.protobuf.MapEntry + attr__ = AttrDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, attr__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.NameAttrList)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.NameAttrList other = (org.tensorflow.proto.framework.NameAttrList) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!internalGetAttr().equals( + other.internalGetAttr())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (!internalGetAttr().getMap().isEmpty()) { + hash = (37 * hash) + ATTR_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttr().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.NameAttrList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NameAttrList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NameAttrList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NameAttrList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NameAttrList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NameAttrList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NameAttrList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NameAttrList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NameAttrList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NameAttrList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NameAttrList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NameAttrList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.NameAttrList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A list of attr names and their values. The whole list is attached
+   * with a string name.  E.g., MatMul[T=float].
+   * 
+ * + * Protobuf type {@code tensorflow.NameAttrList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.NameAttrList) + org.tensorflow.proto.framework.NameAttrListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.AttrValueProtos.internal_static_tensorflow_NameAttrList_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetAttr(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableAttr(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.AttrValueProtos.internal_static_tensorflow_NameAttrList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NameAttrList.class, org.tensorflow.proto.framework.NameAttrList.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.NameAttrList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + internalGetMutableAttr().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.AttrValueProtos.internal_static_tensorflow_NameAttrList_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NameAttrList getDefaultInstanceForType() { + return org.tensorflow.proto.framework.NameAttrList.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.NameAttrList build() { + org.tensorflow.proto.framework.NameAttrList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NameAttrList buildPartial() { + org.tensorflow.proto.framework.NameAttrList result = new org.tensorflow.proto.framework.NameAttrList(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.attr_ = internalGetAttr(); + result.attr_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.NameAttrList) { + return mergeFrom((org.tensorflow.proto.framework.NameAttrList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.NameAttrList other) { + if (other == org.tensorflow.proto.framework.NameAttrList.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + internalGetMutableAttr().mergeFrom( + other.internalGetAttr()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.NameAttrList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.NameAttrList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * 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; + } + } + /** + * 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; + } + } + /** + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * 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.proto.framework.AttrValue> attr_; + private com.google.protobuf.MapField + internalGetAttr() { + if (attr_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttrDefaultEntryHolder.defaultEntry); + } + return attr_; + } + private com.google.protobuf.MapField + internalGetMutableAttr() { + onChanged();; + if (attr_ == null) { + attr_ = com.google.protobuf.MapField.newMapField( + AttrDefaultEntryHolder.defaultEntry); + } + if (!attr_.isMutable()) { + attr_ = attr_.copy(); + } + return attr_; + } + + public int getAttrCount() { + return internalGetAttr().getMap().size(); + } + /** + * map<string, .tensorflow.AttrValue> attr = 2; + */ + + public boolean containsAttr( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetAttr().getMap().containsKey(key); + } + /** + * Use {@link #getAttrMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getAttr() { + return getAttrMap(); + } + /** + * map<string, .tensorflow.AttrValue> attr = 2; + */ + + public java.util.Map getAttrMap() { + return internalGetAttr().getMap(); + } + /** + * map<string, .tensorflow.AttrValue> attr = 2; + */ + + public org.tensorflow.proto.framework.AttrValue getAttrOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttr().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .tensorflow.AttrValue> attr = 2; + */ + + public org.tensorflow.proto.framework.AttrValue getAttrOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttr().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAttr() { + internalGetMutableAttr().getMutableMap() + .clear(); + return this; + } + /** + * map<string, .tensorflow.AttrValue> attr = 2; + */ + + public Builder removeAttr( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableAttr().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableAttr() { + return internalGetMutableAttr().getMutableMap(); + } + /** + * map<string, .tensorflow.AttrValue> attr = 2; + */ + public Builder putAttr( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableAttr().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, .tensorflow.AttrValue> attr = 2; + */ + + public Builder putAllAttr( + java.util.Map values) { + internalGetMutableAttr().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.NameAttrList) + } + + // @@protoc_insertion_point(class_scope:tensorflow.NameAttrList) + private static final org.tensorflow.proto.framework.NameAttrList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.NameAttrList(); + } + + public static org.tensorflow.proto.framework.NameAttrList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NameAttrList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NameAttrList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NameAttrList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NameAttrListOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NameAttrListOrBuilder.java new file mode 100644 index 00000000000..293b4278408 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NameAttrListOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/attr_value.proto + +package org.tensorflow.proto.framework; + +public interface NameAttrListOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.NameAttrList) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + */ + java.lang.String getName(); + /** + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * map<string, .tensorflow.AttrValue> attr = 2; + */ + int getAttrCount(); + /** + * map<string, .tensorflow.AttrValue> attr = 2; + */ + boolean containsAttr( + java.lang.String key); + /** + * Use {@link #getAttrMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getAttr(); + /** + * map<string, .tensorflow.AttrValue> attr = 2; + */ + java.util.Map + getAttrMap(); + /** + * map<string, .tensorflow.AttrValue> attr = 2; + */ + + org.tensorflow.proto.framework.AttrValue getAttrOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue defaultValue); + /** + * map<string, .tensorflow.AttrValue> attr = 2; + */ + + org.tensorflow.proto.framework.AttrValue getAttrOrThrow( + java.lang.String key); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedDevice.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedDevice.java new file mode 100644 index 00000000000..02a1dc9f6c7 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedDevice.java @@ -0,0 +1,727 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/device_properties.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.NamedDevice} + */ +public final class NamedDevice extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.NamedDevice) + NamedDeviceOrBuilder { +private static final long serialVersionUID = 0L; + // Use NamedDevice.newBuilder() to construct. + private NamedDevice(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NamedDevice() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NamedDevice(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NamedDevice( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + org.tensorflow.proto.framework.DeviceProperties.Builder subBuilder = null; + if (properties_ != null) { + subBuilder = properties_.toBuilder(); + } + properties_ = input.readMessage(org.tensorflow.proto.framework.DeviceProperties.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(properties_); + properties_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DevicePropertiesProtos.internal_static_tensorflow_NamedDevice_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DevicePropertiesProtos.internal_static_tensorflow_NamedDevice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NamedDevice.class, org.tensorflow.proto.framework.NamedDevice.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * 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; + } + } + /** + * 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 PROPERTIES_FIELD_NUMBER = 2; + private org.tensorflow.proto.framework.DeviceProperties properties_; + /** + * .tensorflow.DeviceProperties properties = 2; + */ + public boolean hasProperties() { + return properties_ != null; + } + /** + * .tensorflow.DeviceProperties properties = 2; + */ + public org.tensorflow.proto.framework.DeviceProperties getProperties() { + return properties_ == null ? org.tensorflow.proto.framework.DeviceProperties.getDefaultInstance() : properties_; + } + /** + * .tensorflow.DeviceProperties properties = 2; + */ + public org.tensorflow.proto.framework.DevicePropertiesOrBuilder getPropertiesOrBuilder() { + return getProperties(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (properties_ != null) { + output.writeMessage(2, getProperties()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (properties_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getProperties()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.NamedDevice)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.NamedDevice other = (org.tensorflow.proto.framework.NamedDevice) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasProperties() != other.hasProperties()) return false; + if (hasProperties()) { + if (!getProperties() + .equals(other.getProperties())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasProperties()) { + hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getProperties().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.NamedDevice parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NamedDevice parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NamedDevice parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NamedDevice 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.proto.framework.NamedDevice parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NamedDevice parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NamedDevice parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NamedDevice parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NamedDevice parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NamedDevice parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NamedDevice parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NamedDevice parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.NamedDevice prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.NamedDevice} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.NamedDevice) + org.tensorflow.proto.framework.NamedDeviceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.DevicePropertiesProtos.internal_static_tensorflow_NamedDevice_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.DevicePropertiesProtos.internal_static_tensorflow_NamedDevice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NamedDevice.class, org.tensorflow.proto.framework.NamedDevice.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.NamedDevice.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (propertiesBuilder_ == null) { + properties_ = null; + } else { + properties_ = null; + propertiesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.DevicePropertiesProtos.internal_static_tensorflow_NamedDevice_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NamedDevice getDefaultInstanceForType() { + return org.tensorflow.proto.framework.NamedDevice.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.NamedDevice build() { + org.tensorflow.proto.framework.NamedDevice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NamedDevice buildPartial() { + org.tensorflow.proto.framework.NamedDevice result = new org.tensorflow.proto.framework.NamedDevice(this); + result.name_ = name_; + if (propertiesBuilder_ == null) { + result.properties_ = properties_; + } else { + result.properties_ = propertiesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.NamedDevice) { + return mergeFrom((org.tensorflow.proto.framework.NamedDevice)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.NamedDevice other) { + if (other == org.tensorflow.proto.framework.NamedDevice.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasProperties()) { + mergeProperties(other.getProperties()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.NamedDevice parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.NamedDevice) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * 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; + } + } + /** + * 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; + } + } + /** + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * 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 org.tensorflow.proto.framework.DeviceProperties properties_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.DeviceProperties, org.tensorflow.proto.framework.DeviceProperties.Builder, org.tensorflow.proto.framework.DevicePropertiesOrBuilder> propertiesBuilder_; + /** + * .tensorflow.DeviceProperties properties = 2; + */ + public boolean hasProperties() { + return propertiesBuilder_ != null || properties_ != null; + } + /** + * .tensorflow.DeviceProperties properties = 2; + */ + public org.tensorflow.proto.framework.DeviceProperties getProperties() { + if (propertiesBuilder_ == null) { + return properties_ == null ? org.tensorflow.proto.framework.DeviceProperties.getDefaultInstance() : properties_; + } else { + return propertiesBuilder_.getMessage(); + } + } + /** + * .tensorflow.DeviceProperties properties = 2; + */ + public Builder setProperties(org.tensorflow.proto.framework.DeviceProperties value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + properties_ = value; + onChanged(); + } else { + propertiesBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.DeviceProperties properties = 2; + */ + public Builder setProperties( + org.tensorflow.proto.framework.DeviceProperties.Builder builderForValue) { + if (propertiesBuilder_ == null) { + properties_ = builderForValue.build(); + onChanged(); + } else { + propertiesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.DeviceProperties properties = 2; + */ + public Builder mergeProperties(org.tensorflow.proto.framework.DeviceProperties value) { + if (propertiesBuilder_ == null) { + if (properties_ != null) { + properties_ = + org.tensorflow.proto.framework.DeviceProperties.newBuilder(properties_).mergeFrom(value).buildPartial(); + } else { + properties_ = value; + } + onChanged(); + } else { + propertiesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.DeviceProperties properties = 2; + */ + public Builder clearProperties() { + if (propertiesBuilder_ == null) { + properties_ = null; + onChanged(); + } else { + properties_ = null; + propertiesBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.DeviceProperties properties = 2; + */ + public org.tensorflow.proto.framework.DeviceProperties.Builder getPropertiesBuilder() { + + onChanged(); + return getPropertiesFieldBuilder().getBuilder(); + } + /** + * .tensorflow.DeviceProperties properties = 2; + */ + public org.tensorflow.proto.framework.DevicePropertiesOrBuilder getPropertiesOrBuilder() { + if (propertiesBuilder_ != null) { + return propertiesBuilder_.getMessageOrBuilder(); + } else { + return properties_ == null ? + org.tensorflow.proto.framework.DeviceProperties.getDefaultInstance() : properties_; + } + } + /** + * .tensorflow.DeviceProperties properties = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.DeviceProperties, org.tensorflow.proto.framework.DeviceProperties.Builder, org.tensorflow.proto.framework.DevicePropertiesOrBuilder> + getPropertiesFieldBuilder() { + if (propertiesBuilder_ == null) { + propertiesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.DeviceProperties, org.tensorflow.proto.framework.DeviceProperties.Builder, org.tensorflow.proto.framework.DevicePropertiesOrBuilder>( + getProperties(), + getParentForChildren(), + isClean()); + properties_ = null; + } + return propertiesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.NamedDevice) + } + + // @@protoc_insertion_point(class_scope:tensorflow.NamedDevice) + private static final org.tensorflow.proto.framework.NamedDevice DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.NamedDevice(); + } + + public static org.tensorflow.proto.framework.NamedDevice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NamedDevice parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NamedDevice(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NamedDevice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedDeviceOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedDeviceOrBuilder.java new file mode 100644 index 00000000000..52eed19dd38 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedDeviceOrBuilder.java @@ -0,0 +1,32 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/device_properties.proto + +package org.tensorflow.proto.framework; + +public interface NamedDeviceOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.NamedDevice) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + */ + java.lang.String getName(); + /** + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * .tensorflow.DeviceProperties properties = 2; + */ + boolean hasProperties(); + /** + * .tensorflow.DeviceProperties properties = 2; + */ + org.tensorflow.proto.framework.DeviceProperties getProperties(); + /** + * .tensorflow.DeviceProperties properties = 2; + */ + org.tensorflow.proto.framework.DevicePropertiesOrBuilder getPropertiesOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedTensorProto.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedTensorProto.java new file mode 100644 index 00000000000..c5b5514e2e3 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedTensorProto.java @@ -0,0 +1,859 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/named_tensor.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * A pair of tensor name and tensor values.
+ * 
+ * + * Protobuf type {@code tensorflow.NamedTensorProto} + */ +public final class NamedTensorProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.NamedTensorProto) + NamedTensorProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use NamedTensorProto.newBuilder() to construct. + private NamedTensorProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NamedTensorProto() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NamedTensorProto(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NamedTensorProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + org.tensorflow.proto.framework.TensorProto.Builder subBuilder = null; + if (tensor_ != null) { + subBuilder = tensor_.toBuilder(); + } + tensor_ = input.readMessage(org.tensorflow.proto.framework.TensorProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tensor_); + tensor_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.NamedTensorProtos.internal_static_tensorflow_NamedTensorProto_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.NamedTensorProtos.internal_static_tensorflow_NamedTensorProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NamedTensorProto.class, org.tensorflow.proto.framework.NamedTensorProto.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Name of the tensor.
+   * 
+ * + * 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; + } + } + /** + *
+   * Name of the tensor.
+   * 
+ * + * 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 TENSOR_FIELD_NUMBER = 2; + private org.tensorflow.proto.framework.TensorProto tensor_; + /** + *
+   * The client can populate a TensorProto using a tensorflow::Tensor`, or
+   * directly using the protobuf field accessors.
+   * The client specifies whether the returned tensor values should be
+   * filled tensor fields (float_val, int_val, etc.) or encoded in a
+   * compact form in tensor.tensor_content.
+   * 
+ * + * .tensorflow.TensorProto tensor = 2; + */ + public boolean hasTensor() { + return tensor_ != null; + } + /** + *
+   * The client can populate a TensorProto using a tensorflow::Tensor`, or
+   * directly using the protobuf field accessors.
+   * The client specifies whether the returned tensor values should be
+   * filled tensor fields (float_val, int_val, etc.) or encoded in a
+   * compact form in tensor.tensor_content.
+   * 
+ * + * .tensorflow.TensorProto tensor = 2; + */ + public org.tensorflow.proto.framework.TensorProto getTensor() { + return tensor_ == null ? org.tensorflow.proto.framework.TensorProto.getDefaultInstance() : tensor_; + } + /** + *
+   * The client can populate a TensorProto using a tensorflow::Tensor`, or
+   * directly using the protobuf field accessors.
+   * The client specifies whether the returned tensor values should be
+   * filled tensor fields (float_val, int_val, etc.) or encoded in a
+   * compact form in tensor.tensor_content.
+   * 
+ * + * .tensorflow.TensorProto tensor = 2; + */ + public org.tensorflow.proto.framework.TensorProtoOrBuilder getTensorOrBuilder() { + return getTensor(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (tensor_ != null) { + output.writeMessage(2, getTensor()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (tensor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getTensor()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.NamedTensorProto)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.NamedTensorProto other = (org.tensorflow.proto.framework.NamedTensorProto) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasTensor() != other.hasTensor()) return false; + if (hasTensor()) { + if (!getTensor() + .equals(other.getTensor())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasTensor()) { + hash = (37 * hash) + TENSOR_FIELD_NUMBER; + hash = (53 * hash) + getTensor().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.NamedTensorProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NamedTensorProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NamedTensorProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NamedTensorProto 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.proto.framework.NamedTensorProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NamedTensorProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NamedTensorProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NamedTensorProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NamedTensorProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NamedTensorProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NamedTensorProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NamedTensorProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.NamedTensorProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A pair of tensor name and tensor values.
+   * 
+ * + * Protobuf type {@code tensorflow.NamedTensorProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.NamedTensorProto) + org.tensorflow.proto.framework.NamedTensorProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.NamedTensorProtos.internal_static_tensorflow_NamedTensorProto_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.NamedTensorProtos.internal_static_tensorflow_NamedTensorProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NamedTensorProto.class, org.tensorflow.proto.framework.NamedTensorProto.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.NamedTensorProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (tensorBuilder_ == null) { + tensor_ = null; + } else { + tensor_ = null; + tensorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.NamedTensorProtos.internal_static_tensorflow_NamedTensorProto_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NamedTensorProto getDefaultInstanceForType() { + return org.tensorflow.proto.framework.NamedTensorProto.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.NamedTensorProto build() { + org.tensorflow.proto.framework.NamedTensorProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NamedTensorProto buildPartial() { + org.tensorflow.proto.framework.NamedTensorProto result = new org.tensorflow.proto.framework.NamedTensorProto(this); + result.name_ = name_; + if (tensorBuilder_ == null) { + result.tensor_ = tensor_; + } else { + result.tensor_ = tensorBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.NamedTensorProto) { + return mergeFrom((org.tensorflow.proto.framework.NamedTensorProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.NamedTensorProto other) { + if (other == org.tensorflow.proto.framework.NamedTensorProto.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasTensor()) { + mergeTensor(other.getTensor()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.NamedTensorProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.NamedTensorProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Name of the tensor.
+     * 
+ * + * 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; + } + } + /** + *
+     * Name of the tensor.
+     * 
+ * + * 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; + } + } + /** + *
+     * Name of the tensor.
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the tensor.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Name of the tensor.
+     * 
+ * + * 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 org.tensorflow.proto.framework.TensorProto tensor_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorProto, org.tensorflow.proto.framework.TensorProto.Builder, org.tensorflow.proto.framework.TensorProtoOrBuilder> tensorBuilder_; + /** + *
+     * The client can populate a TensorProto using a tensorflow::Tensor`, or
+     * directly using the protobuf field accessors.
+     * The client specifies whether the returned tensor values should be
+     * filled tensor fields (float_val, int_val, etc.) or encoded in a
+     * compact form in tensor.tensor_content.
+     * 
+ * + * .tensorflow.TensorProto tensor = 2; + */ + public boolean hasTensor() { + return tensorBuilder_ != null || tensor_ != null; + } + /** + *
+     * The client can populate a TensorProto using a tensorflow::Tensor`, or
+     * directly using the protobuf field accessors.
+     * The client specifies whether the returned tensor values should be
+     * filled tensor fields (float_val, int_val, etc.) or encoded in a
+     * compact form in tensor.tensor_content.
+     * 
+ * + * .tensorflow.TensorProto tensor = 2; + */ + public org.tensorflow.proto.framework.TensorProto getTensor() { + if (tensorBuilder_ == null) { + return tensor_ == null ? org.tensorflow.proto.framework.TensorProto.getDefaultInstance() : tensor_; + } else { + return tensorBuilder_.getMessage(); + } + } + /** + *
+     * The client can populate a TensorProto using a tensorflow::Tensor`, or
+     * directly using the protobuf field accessors.
+     * The client specifies whether the returned tensor values should be
+     * filled tensor fields (float_val, int_val, etc.) or encoded in a
+     * compact form in tensor.tensor_content.
+     * 
+ * + * .tensorflow.TensorProto tensor = 2; + */ + public Builder setTensor(org.tensorflow.proto.framework.TensorProto value) { + if (tensorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tensor_ = value; + onChanged(); + } else { + tensorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The client can populate a TensorProto using a tensorflow::Tensor`, or
+     * directly using the protobuf field accessors.
+     * The client specifies whether the returned tensor values should be
+     * filled tensor fields (float_val, int_val, etc.) or encoded in a
+     * compact form in tensor.tensor_content.
+     * 
+ * + * .tensorflow.TensorProto tensor = 2; + */ + public Builder setTensor( + org.tensorflow.proto.framework.TensorProto.Builder builderForValue) { + if (tensorBuilder_ == null) { + tensor_ = builderForValue.build(); + onChanged(); + } else { + tensorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The client can populate a TensorProto using a tensorflow::Tensor`, or
+     * directly using the protobuf field accessors.
+     * The client specifies whether the returned tensor values should be
+     * filled tensor fields (float_val, int_val, etc.) or encoded in a
+     * compact form in tensor.tensor_content.
+     * 
+ * + * .tensorflow.TensorProto tensor = 2; + */ + public Builder mergeTensor(org.tensorflow.proto.framework.TensorProto value) { + if (tensorBuilder_ == null) { + if (tensor_ != null) { + tensor_ = + org.tensorflow.proto.framework.TensorProto.newBuilder(tensor_).mergeFrom(value).buildPartial(); + } else { + tensor_ = value; + } + onChanged(); + } else { + tensorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The client can populate a TensorProto using a tensorflow::Tensor`, or
+     * directly using the protobuf field accessors.
+     * The client specifies whether the returned tensor values should be
+     * filled tensor fields (float_val, int_val, etc.) or encoded in a
+     * compact form in tensor.tensor_content.
+     * 
+ * + * .tensorflow.TensorProto tensor = 2; + */ + public Builder clearTensor() { + if (tensorBuilder_ == null) { + tensor_ = null; + onChanged(); + } else { + tensor_ = null; + tensorBuilder_ = null; + } + + return this; + } + /** + *
+     * The client can populate a TensorProto using a tensorflow::Tensor`, or
+     * directly using the protobuf field accessors.
+     * The client specifies whether the returned tensor values should be
+     * filled tensor fields (float_val, int_val, etc.) or encoded in a
+     * compact form in tensor.tensor_content.
+     * 
+ * + * .tensorflow.TensorProto tensor = 2; + */ + public org.tensorflow.proto.framework.TensorProto.Builder getTensorBuilder() { + + onChanged(); + return getTensorFieldBuilder().getBuilder(); + } + /** + *
+     * The client can populate a TensorProto using a tensorflow::Tensor`, or
+     * directly using the protobuf field accessors.
+     * The client specifies whether the returned tensor values should be
+     * filled tensor fields (float_val, int_val, etc.) or encoded in a
+     * compact form in tensor.tensor_content.
+     * 
+ * + * .tensorflow.TensorProto tensor = 2; + */ + public org.tensorflow.proto.framework.TensorProtoOrBuilder getTensorOrBuilder() { + if (tensorBuilder_ != null) { + return tensorBuilder_.getMessageOrBuilder(); + } else { + return tensor_ == null ? + org.tensorflow.proto.framework.TensorProto.getDefaultInstance() : tensor_; + } + } + /** + *
+     * The client can populate a TensorProto using a tensorflow::Tensor`, or
+     * directly using the protobuf field accessors.
+     * The client specifies whether the returned tensor values should be
+     * filled tensor fields (float_val, int_val, etc.) or encoded in a
+     * compact form in tensor.tensor_content.
+     * 
+ * + * .tensorflow.TensorProto tensor = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorProto, org.tensorflow.proto.framework.TensorProto.Builder, org.tensorflow.proto.framework.TensorProtoOrBuilder> + getTensorFieldBuilder() { + if (tensorBuilder_ == null) { + tensorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorProto, org.tensorflow.proto.framework.TensorProto.Builder, org.tensorflow.proto.framework.TensorProtoOrBuilder>( + getTensor(), + getParentForChildren(), + isClean()); + tensor_ = null; + } + return tensorBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.NamedTensorProto) + } + + // @@protoc_insertion_point(class_scope:tensorflow.NamedTensorProto) + private static final org.tensorflow.proto.framework.NamedTensorProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.NamedTensorProto(); + } + + public static org.tensorflow.proto.framework.NamedTensorProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NamedTensorProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NamedTensorProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NamedTensorProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedTensorProtoOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedTensorProtoOrBuilder.java new file mode 100644 index 00000000000..41b758b2f91 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedTensorProtoOrBuilder.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/named_tensor.proto + +package org.tensorflow.proto.framework; + +public interface NamedTensorProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.NamedTensorProto) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Name of the tensor.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * Name of the tensor.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The client can populate a TensorProto using a tensorflow::Tensor`, or
+   * directly using the protobuf field accessors.
+   * The client specifies whether the returned tensor values should be
+   * filled tensor fields (float_val, int_val, etc.) or encoded in a
+   * compact form in tensor.tensor_content.
+   * 
+ * + * .tensorflow.TensorProto tensor = 2; + */ + boolean hasTensor(); + /** + *
+   * The client can populate a TensorProto using a tensorflow::Tensor`, or
+   * directly using the protobuf field accessors.
+   * The client specifies whether the returned tensor values should be
+   * filled tensor fields (float_val, int_val, etc.) or encoded in a
+   * compact form in tensor.tensor_content.
+   * 
+ * + * .tensorflow.TensorProto tensor = 2; + */ + org.tensorflow.proto.framework.TensorProto getTensor(); + /** + *
+   * The client can populate a TensorProto using a tensorflow::Tensor`, or
+   * directly using the protobuf field accessors.
+   * The client specifies whether the returned tensor values should be
+   * filled tensor fields (float_val, int_val, etc.) or encoded in a
+   * compact form in tensor.tensor_content.
+   * 
+ * + * .tensorflow.TensorProto tensor = 2; + */ + org.tensorflow.proto.framework.TensorProtoOrBuilder getTensorOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedTensorProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedTensorProtos.java new file mode 100644 index 00000000000..98685b73c33 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedTensorProtos.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/named_tensor.proto + +package org.tensorflow.proto.framework; + +public final class NamedTensorProtos { + private NamedTensorProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_NamedTensorProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_NamedTensorProto_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/protobuf/named_tensor." + + "proto\022\ntensorflow\032&tensorflow/core/frame" + + "work/tensor.proto\"I\n\020NamedTensorProto\022\014\n" + + "\004name\030\001 \001(\t\022\'\n\006tensor\030\002 \001(\0132\027.tensorflow" + + ".TensorProtoB\202\001\n\036org.tensorflow.proto.fr" + + "ameworkB\021NamedTensorProtosP\001ZHgithub.com" + + "/tensorflow/tensorflow/tensorflow/go/cor" + + "e/core_protos_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.TensorProtos.getDescriptor(), + }); + internal_static_tensorflow_NamedTensorProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_NamedTensorProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_NamedTensorProto_descriptor, + new java.lang.String[] { "Name", "Tensor", }); + org.tensorflow.proto.framework.TensorProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedTupleValue.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedTupleValue.java new file mode 100644 index 00000000000..e1adfe3a508 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedTupleValue.java @@ -0,0 +1,900 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/struct.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Represents Python's namedtuple.
+ * 
+ * + * Protobuf type {@code tensorflow.NamedTupleValue} + */ +public final class NamedTupleValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.NamedTupleValue) + NamedTupleValueOrBuilder { +private static final long serialVersionUID = 0L; + // Use NamedTupleValue.newBuilder() to construct. + private NamedTupleValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NamedTupleValue() { + name_ = ""; + values_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NamedTupleValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NamedTupleValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + values_.add( + input.readMessage(org.tensorflow.proto.framework.PairValue.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_NamedTupleValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_NamedTupleValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NamedTupleValue.class, org.tensorflow.proto.framework.NamedTupleValue.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * 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; + } + } + /** + * 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 VALUES_FIELD_NUMBER = 2; + private java.util.List values_; + /** + * repeated .tensorflow.PairValue values = 2; + */ + public java.util.List getValuesList() { + return values_; + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public java.util.List + getValuesOrBuilderList() { + return values_; + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public int getValuesCount() { + return values_.size(); + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public org.tensorflow.proto.framework.PairValue getValues(int index) { + return values_.get(index); + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public org.tensorflow.proto.framework.PairValueOrBuilder getValuesOrBuilder( + int index) { + return values_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < values_.size(); i++) { + output.writeMessage(2, values_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, values_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.NamedTupleValue)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.NamedTupleValue other = (org.tensorflow.proto.framework.NamedTupleValue) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getValuesList() + .equals(other.getValuesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.NamedTupleValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NamedTupleValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NamedTupleValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NamedTupleValue 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.proto.framework.NamedTupleValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NamedTupleValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NamedTupleValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NamedTupleValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NamedTupleValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NamedTupleValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NamedTupleValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NamedTupleValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.NamedTupleValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents Python's namedtuple.
+   * 
+ * + * Protobuf type {@code tensorflow.NamedTupleValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.NamedTupleValue) + org.tensorflow.proto.framework.NamedTupleValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_NamedTupleValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_NamedTupleValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NamedTupleValue.class, org.tensorflow.proto.framework.NamedTupleValue.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.NamedTupleValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + valuesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_NamedTupleValue_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NamedTupleValue getDefaultInstanceForType() { + return org.tensorflow.proto.framework.NamedTupleValue.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.NamedTupleValue build() { + org.tensorflow.proto.framework.NamedTupleValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NamedTupleValue buildPartial() { + org.tensorflow.proto.framework.NamedTupleValue result = new org.tensorflow.proto.framework.NamedTupleValue(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.NamedTupleValue) { + return mergeFrom((org.tensorflow.proto.framework.NamedTupleValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.NamedTupleValue other) { + if (other == org.tensorflow.proto.framework.NamedTupleValue.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + valuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getValuesFieldBuilder() : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.NamedTupleValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.NamedTupleValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * 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; + } + } + /** + * 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; + } + } + /** + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * 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.util.List values_ = + java.util.Collections.emptyList(); + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.PairValue, org.tensorflow.proto.framework.PairValue.Builder, org.tensorflow.proto.framework.PairValueOrBuilder> valuesBuilder_; + + /** + * repeated .tensorflow.PairValue values = 2; + */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public org.tensorflow.proto.framework.PairValue getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public Builder setValues( + int index, org.tensorflow.proto.framework.PairValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public Builder setValues( + int index, org.tensorflow.proto.framework.PairValue.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public Builder addValues(org.tensorflow.proto.framework.PairValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public Builder addValues( + int index, org.tensorflow.proto.framework.PairValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public Builder addValues( + org.tensorflow.proto.framework.PairValue.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public Builder addValues( + int index, org.tensorflow.proto.framework.PairValue.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public Builder addAllValues( + java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public org.tensorflow.proto.framework.PairValue.Builder getValuesBuilder( + int index) { + return getValuesFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public org.tensorflow.proto.framework.PairValueOrBuilder getValuesOrBuilder( + int index) { + if (valuesBuilder_ == null) { + return values_.get(index); } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public org.tensorflow.proto.framework.PairValue.Builder addValuesBuilder() { + return getValuesFieldBuilder().addBuilder( + org.tensorflow.proto.framework.PairValue.getDefaultInstance()); + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public org.tensorflow.proto.framework.PairValue.Builder addValuesBuilder( + int index) { + return getValuesFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.PairValue.getDefaultInstance()); + } + /** + * repeated .tensorflow.PairValue values = 2; + */ + public java.util.List + getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.PairValue, org.tensorflow.proto.framework.PairValue.Builder, org.tensorflow.proto.framework.PairValueOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.PairValue, org.tensorflow.proto.framework.PairValue.Builder, org.tensorflow.proto.framework.PairValueOrBuilder>( + values_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + values_ = null; + } + return valuesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.NamedTupleValue) + } + + // @@protoc_insertion_point(class_scope:tensorflow.NamedTupleValue) + private static final org.tensorflow.proto.framework.NamedTupleValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.NamedTupleValue(); + } + + public static org.tensorflow.proto.framework.NamedTupleValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NamedTupleValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NamedTupleValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NamedTupleValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedTupleValueOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedTupleValueOrBuilder.java new file mode 100644 index 00000000000..6829f4aa2ab --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NamedTupleValueOrBuilder.java @@ -0,0 +1,43 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/struct.proto + +package org.tensorflow.proto.framework; + +public interface NamedTupleValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.NamedTupleValue) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + */ + java.lang.String getName(); + /** + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * repeated .tensorflow.PairValue values = 2; + */ + java.util.List + getValuesList(); + /** + * repeated .tensorflow.PairValue values = 2; + */ + org.tensorflow.proto.framework.PairValue getValues(int index); + /** + * repeated .tensorflow.PairValue values = 2; + */ + int getValuesCount(); + /** + * repeated .tensorflow.PairValue values = 2; + */ + java.util.List + getValuesOrBuilderList(); + /** + * repeated .tensorflow.PairValue values = 2; + */ + org.tensorflow.proto.framework.PairValueOrBuilder getValuesOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeDef.java new file mode 100644 index 00000000000..9bfd5c5c1f3 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeDef.java @@ -0,0 +1,3076 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/node_def.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.NodeDef} + */ +public final class NodeDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.NodeDef) + NodeDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use NodeDef.newBuilder() to construct. + private NodeDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NodeDef() { + name_ = ""; + op_ = ""; + input_ = com.google.protobuf.LazyStringArrayList.EMPTY; + device_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NodeDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NodeDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + op_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + input_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + input_.add(s); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + device_ = s; + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + attr_ = com.google.protobuf.MapField.newMapField( + AttrDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + attr__ = input.readMessage( + AttrDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + attr_.getMutableMap().put( + attr__.getKey(), attr__.getValue()); + break; + } + case 50: { + org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.Builder subBuilder = null; + if (experimentalDebugInfo_ != null) { + subBuilder = experimentalDebugInfo_.toBuilder(); + } + experimentalDebugInfo_ = input.readMessage(org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(experimentalDebugInfo_); + experimentalDebugInfo_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + input_ = input_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.NodeProto.internal_static_tensorflow_NodeDef_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 5: + return internalGetAttr(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.NodeProto.internal_static_tensorflow_NodeDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NodeDef.class, org.tensorflow.proto.framework.NodeDef.Builder.class); + } + + public interface ExperimentalDebugInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.NodeDef.ExperimentalDebugInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Opaque string inserted into error messages created by the runtime.
+     * This is intended to store the list of names of the nodes from the
+     * original graph that this node was derived. For example if this node, say
+     * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+     * be {A, B}. This information can be used to map errors originating at the
+     * current node to some top level source code.
+     * 
+ * + * repeated string original_node_names = 1; + */ + java.util.List + getOriginalNodeNamesList(); + /** + *
+     * Opaque string inserted into error messages created by the runtime.
+     * This is intended to store the list of names of the nodes from the
+     * original graph that this node was derived. For example if this node, say
+     * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+     * be {A, B}. This information can be used to map errors originating at the
+     * current node to some top level source code.
+     * 
+ * + * repeated string original_node_names = 1; + */ + int getOriginalNodeNamesCount(); + /** + *
+     * Opaque string inserted into error messages created by the runtime.
+     * This is intended to store the list of names of the nodes from the
+     * original graph that this node was derived. For example if this node, say
+     * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+     * be {A, B}. This information can be used to map errors originating at the
+     * current node to some top level source code.
+     * 
+ * + * repeated string original_node_names = 1; + */ + java.lang.String getOriginalNodeNames(int index); + /** + *
+     * Opaque string inserted into error messages created by the runtime.
+     * This is intended to store the list of names of the nodes from the
+     * original graph that this node was derived. For example if this node, say
+     * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+     * be {A, B}. This information can be used to map errors originating at the
+     * current node to some top level source code.
+     * 
+ * + * repeated string original_node_names = 1; + */ + com.google.protobuf.ByteString + getOriginalNodeNamesBytes(int index); + + /** + *
+     * This is intended to store the list of names of the functions from the
+     * original graph that this node was derived. For example if this node, say
+     * C, was result of a fusion of node A in function FA and node B in function
+     * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+     * level graph, the `original_func` is empty. This information, with the
+     * `original_node_names` can be used to map errors originating at the
+     * current ndoe to some top level source code.
+     * 
+ * + * repeated string original_func_names = 2; + */ + java.util.List + getOriginalFuncNamesList(); + /** + *
+     * This is intended to store the list of names of the functions from the
+     * original graph that this node was derived. For example if this node, say
+     * C, was result of a fusion of node A in function FA and node B in function
+     * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+     * level graph, the `original_func` is empty. This information, with the
+     * `original_node_names` can be used to map errors originating at the
+     * current ndoe to some top level source code.
+     * 
+ * + * repeated string original_func_names = 2; + */ + int getOriginalFuncNamesCount(); + /** + *
+     * This is intended to store the list of names of the functions from the
+     * original graph that this node was derived. For example if this node, say
+     * C, was result of a fusion of node A in function FA and node B in function
+     * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+     * level graph, the `original_func` is empty. This information, with the
+     * `original_node_names` can be used to map errors originating at the
+     * current ndoe to some top level source code.
+     * 
+ * + * repeated string original_func_names = 2; + */ + java.lang.String getOriginalFuncNames(int index); + /** + *
+     * This is intended to store the list of names of the functions from the
+     * original graph that this node was derived. For example if this node, say
+     * C, was result of a fusion of node A in function FA and node B in function
+     * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+     * level graph, the `original_func` is empty. This information, with the
+     * `original_node_names` can be used to map errors originating at the
+     * current ndoe to some top level source code.
+     * 
+ * + * repeated string original_func_names = 2; + */ + com.google.protobuf.ByteString + getOriginalFuncNamesBytes(int index); + } + /** + * Protobuf type {@code tensorflow.NodeDef.ExperimentalDebugInfo} + */ + public static final class ExperimentalDebugInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.NodeDef.ExperimentalDebugInfo) + ExperimentalDebugInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExperimentalDebugInfo.newBuilder() to construct. + private ExperimentalDebugInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExperimentalDebugInfo() { + originalNodeNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + originalFuncNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExperimentalDebugInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ExperimentalDebugInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + originalNodeNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + originalNodeNames_.add(s); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + originalFuncNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + originalFuncNames_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + originalNodeNames_ = originalNodeNames_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + originalFuncNames_ = originalFuncNames_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.NodeProto.internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.NodeProto.internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.class, org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.Builder.class); + } + + public static final int ORIGINAL_NODE_NAMES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList originalNodeNames_; + /** + *
+     * Opaque string inserted into error messages created by the runtime.
+     * This is intended to store the list of names of the nodes from the
+     * original graph that this node was derived. For example if this node, say
+     * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+     * be {A, B}. This information can be used to map errors originating at the
+     * current node to some top level source code.
+     * 
+ * + * repeated string original_node_names = 1; + */ + public com.google.protobuf.ProtocolStringList + getOriginalNodeNamesList() { + return originalNodeNames_; + } + /** + *
+     * Opaque string inserted into error messages created by the runtime.
+     * This is intended to store the list of names of the nodes from the
+     * original graph that this node was derived. For example if this node, say
+     * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+     * be {A, B}. This information can be used to map errors originating at the
+     * current node to some top level source code.
+     * 
+ * + * repeated string original_node_names = 1; + */ + public int getOriginalNodeNamesCount() { + return originalNodeNames_.size(); + } + /** + *
+     * Opaque string inserted into error messages created by the runtime.
+     * This is intended to store the list of names of the nodes from the
+     * original graph that this node was derived. For example if this node, say
+     * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+     * be {A, B}. This information can be used to map errors originating at the
+     * current node to some top level source code.
+     * 
+ * + * repeated string original_node_names = 1; + */ + public java.lang.String getOriginalNodeNames(int index) { + return originalNodeNames_.get(index); + } + /** + *
+     * Opaque string inserted into error messages created by the runtime.
+     * This is intended to store the list of names of the nodes from the
+     * original graph that this node was derived. For example if this node, say
+     * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+     * be {A, B}. This information can be used to map errors originating at the
+     * current node to some top level source code.
+     * 
+ * + * repeated string original_node_names = 1; + */ + public com.google.protobuf.ByteString + getOriginalNodeNamesBytes(int index) { + return originalNodeNames_.getByteString(index); + } + + public static final int ORIGINAL_FUNC_NAMES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList originalFuncNames_; + /** + *
+     * This is intended to store the list of names of the functions from the
+     * original graph that this node was derived. For example if this node, say
+     * C, was result of a fusion of node A in function FA and node B in function
+     * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+     * level graph, the `original_func` is empty. This information, with the
+     * `original_node_names` can be used to map errors originating at the
+     * current ndoe to some top level source code.
+     * 
+ * + * repeated string original_func_names = 2; + */ + public com.google.protobuf.ProtocolStringList + getOriginalFuncNamesList() { + return originalFuncNames_; + } + /** + *
+     * This is intended to store the list of names of the functions from the
+     * original graph that this node was derived. For example if this node, say
+     * C, was result of a fusion of node A in function FA and node B in function
+     * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+     * level graph, the `original_func` is empty. This information, with the
+     * `original_node_names` can be used to map errors originating at the
+     * current ndoe to some top level source code.
+     * 
+ * + * repeated string original_func_names = 2; + */ + public int getOriginalFuncNamesCount() { + return originalFuncNames_.size(); + } + /** + *
+     * This is intended to store the list of names of the functions from the
+     * original graph that this node was derived. For example if this node, say
+     * C, was result of a fusion of node A in function FA and node B in function
+     * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+     * level graph, the `original_func` is empty. This information, with the
+     * `original_node_names` can be used to map errors originating at the
+     * current ndoe to some top level source code.
+     * 
+ * + * repeated string original_func_names = 2; + */ + public java.lang.String getOriginalFuncNames(int index) { + return originalFuncNames_.get(index); + } + /** + *
+     * This is intended to store the list of names of the functions from the
+     * original graph that this node was derived. For example if this node, say
+     * C, was result of a fusion of node A in function FA and node B in function
+     * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+     * level graph, the `original_func` is empty. This information, with the
+     * `original_node_names` can be used to map errors originating at the
+     * current ndoe to some top level source code.
+     * 
+ * + * repeated string original_func_names = 2; + */ + public com.google.protobuf.ByteString + getOriginalFuncNamesBytes(int index) { + return originalFuncNames_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < originalNodeNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, originalNodeNames_.getRaw(i)); + } + for (int i = 0; i < originalFuncNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, originalFuncNames_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < originalNodeNames_.size(); i++) { + dataSize += computeStringSizeNoTag(originalNodeNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getOriginalNodeNamesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < originalFuncNames_.size(); i++) { + dataSize += computeStringSizeNoTag(originalFuncNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getOriginalFuncNamesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo other = (org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo) obj; + + if (!getOriginalNodeNamesList() + .equals(other.getOriginalNodeNamesList())) return false; + if (!getOriginalFuncNamesList() + .equals(other.getOriginalFuncNamesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOriginalNodeNamesCount() > 0) { + hash = (37 * hash) + ORIGINAL_NODE_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getOriginalNodeNamesList().hashCode(); + } + if (getOriginalFuncNamesCount() > 0) { + hash = (37 * hash) + ORIGINAL_FUNC_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getOriginalFuncNamesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo 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.proto.framework.NodeDef.ExperimentalDebugInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.NodeDef.ExperimentalDebugInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.NodeDef.ExperimentalDebugInfo) + org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.NodeProto.internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.NodeProto.internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.class, org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + originalNodeNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + originalFuncNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.NodeProto.internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo getDefaultInstanceForType() { + return org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo build() { + org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo buildPartial() { + org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo result = new org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + originalNodeNames_ = originalNodeNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.originalNodeNames_ = originalNodeNames_; + if (((bitField0_ & 0x00000002) != 0)) { + originalFuncNames_ = originalFuncNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.originalFuncNames_ = originalFuncNames_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo) { + return mergeFrom((org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo other) { + if (other == org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.getDefaultInstance()) return this; + if (!other.originalNodeNames_.isEmpty()) { + if (originalNodeNames_.isEmpty()) { + originalNodeNames_ = other.originalNodeNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOriginalNodeNamesIsMutable(); + originalNodeNames_.addAll(other.originalNodeNames_); + } + onChanged(); + } + if (!other.originalFuncNames_.isEmpty()) { + if (originalFuncNames_.isEmpty()) { + originalFuncNames_ = other.originalFuncNames_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureOriginalFuncNamesIsMutable(); + originalFuncNames_.addAll(other.originalFuncNames_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList originalNodeNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureOriginalNodeNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + originalNodeNames_ = new com.google.protobuf.LazyStringArrayList(originalNodeNames_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * Opaque string inserted into error messages created by the runtime.
+       * This is intended to store the list of names of the nodes from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+       * be {A, B}. This information can be used to map errors originating at the
+       * current node to some top level source code.
+       * 
+ * + * repeated string original_node_names = 1; + */ + public com.google.protobuf.ProtocolStringList + getOriginalNodeNamesList() { + return originalNodeNames_.getUnmodifiableView(); + } + /** + *
+       * Opaque string inserted into error messages created by the runtime.
+       * This is intended to store the list of names of the nodes from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+       * be {A, B}. This information can be used to map errors originating at the
+       * current node to some top level source code.
+       * 
+ * + * repeated string original_node_names = 1; + */ + public int getOriginalNodeNamesCount() { + return originalNodeNames_.size(); + } + /** + *
+       * Opaque string inserted into error messages created by the runtime.
+       * This is intended to store the list of names of the nodes from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+       * be {A, B}. This information can be used to map errors originating at the
+       * current node to some top level source code.
+       * 
+ * + * repeated string original_node_names = 1; + */ + public java.lang.String getOriginalNodeNames(int index) { + return originalNodeNames_.get(index); + } + /** + *
+       * Opaque string inserted into error messages created by the runtime.
+       * This is intended to store the list of names of the nodes from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+       * be {A, B}. This information can be used to map errors originating at the
+       * current node to some top level source code.
+       * 
+ * + * repeated string original_node_names = 1; + */ + public com.google.protobuf.ByteString + getOriginalNodeNamesBytes(int index) { + return originalNodeNames_.getByteString(index); + } + /** + *
+       * Opaque string inserted into error messages created by the runtime.
+       * This is intended to store the list of names of the nodes from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+       * be {A, B}. This information can be used to map errors originating at the
+       * current node to some top level source code.
+       * 
+ * + * repeated string original_node_names = 1; + */ + public Builder setOriginalNodeNames( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOriginalNodeNamesIsMutable(); + originalNodeNames_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * Opaque string inserted into error messages created by the runtime.
+       * This is intended to store the list of names of the nodes from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+       * be {A, B}. This information can be used to map errors originating at the
+       * current node to some top level source code.
+       * 
+ * + * repeated string original_node_names = 1; + */ + public Builder addOriginalNodeNames( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOriginalNodeNamesIsMutable(); + originalNodeNames_.add(value); + onChanged(); + return this; + } + /** + *
+       * Opaque string inserted into error messages created by the runtime.
+       * This is intended to store the list of names of the nodes from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+       * be {A, B}. This information can be used to map errors originating at the
+       * current node to some top level source code.
+       * 
+ * + * repeated string original_node_names = 1; + */ + public Builder addAllOriginalNodeNames( + java.lang.Iterable values) { + ensureOriginalNodeNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, originalNodeNames_); + onChanged(); + return this; + } + /** + *
+       * Opaque string inserted into error messages created by the runtime.
+       * This is intended to store the list of names of the nodes from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+       * be {A, B}. This information can be used to map errors originating at the
+       * current node to some top level source code.
+       * 
+ * + * repeated string original_node_names = 1; + */ + public Builder clearOriginalNodeNames() { + originalNodeNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Opaque string inserted into error messages created by the runtime.
+       * This is intended to store the list of names of the nodes from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
+       * be {A, B}. This information can be used to map errors originating at the
+       * current node to some top level source code.
+       * 
+ * + * repeated string original_node_names = 1; + */ + public Builder addOriginalNodeNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureOriginalNodeNamesIsMutable(); + originalNodeNames_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList originalFuncNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureOriginalFuncNamesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + originalFuncNames_ = new com.google.protobuf.LazyStringArrayList(originalFuncNames_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       * This is intended to store the list of names of the functions from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of node A in function FA and node B in function
+       * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+       * level graph, the `original_func` is empty. This information, with the
+       * `original_node_names` can be used to map errors originating at the
+       * current ndoe to some top level source code.
+       * 
+ * + * repeated string original_func_names = 2; + */ + public com.google.protobuf.ProtocolStringList + getOriginalFuncNamesList() { + return originalFuncNames_.getUnmodifiableView(); + } + /** + *
+       * This is intended to store the list of names of the functions from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of node A in function FA and node B in function
+       * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+       * level graph, the `original_func` is empty. This information, with the
+       * `original_node_names` can be used to map errors originating at the
+       * current ndoe to some top level source code.
+       * 
+ * + * repeated string original_func_names = 2; + */ + public int getOriginalFuncNamesCount() { + return originalFuncNames_.size(); + } + /** + *
+       * This is intended to store the list of names of the functions from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of node A in function FA and node B in function
+       * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+       * level graph, the `original_func` is empty. This information, with the
+       * `original_node_names` can be used to map errors originating at the
+       * current ndoe to some top level source code.
+       * 
+ * + * repeated string original_func_names = 2; + */ + public java.lang.String getOriginalFuncNames(int index) { + return originalFuncNames_.get(index); + } + /** + *
+       * This is intended to store the list of names of the functions from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of node A in function FA and node B in function
+       * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+       * level graph, the `original_func` is empty. This information, with the
+       * `original_node_names` can be used to map errors originating at the
+       * current ndoe to some top level source code.
+       * 
+ * + * repeated string original_func_names = 2; + */ + public com.google.protobuf.ByteString + getOriginalFuncNamesBytes(int index) { + return originalFuncNames_.getByteString(index); + } + /** + *
+       * This is intended to store the list of names of the functions from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of node A in function FA and node B in function
+       * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+       * level graph, the `original_func` is empty. This information, with the
+       * `original_node_names` can be used to map errors originating at the
+       * current ndoe to some top level source code.
+       * 
+ * + * repeated string original_func_names = 2; + */ + public Builder setOriginalFuncNames( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOriginalFuncNamesIsMutable(); + originalFuncNames_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * This is intended to store the list of names of the functions from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of node A in function FA and node B in function
+       * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+       * level graph, the `original_func` is empty. This information, with the
+       * `original_node_names` can be used to map errors originating at the
+       * current ndoe to some top level source code.
+       * 
+ * + * repeated string original_func_names = 2; + */ + public Builder addOriginalFuncNames( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOriginalFuncNamesIsMutable(); + originalFuncNames_.add(value); + onChanged(); + return this; + } + /** + *
+       * This is intended to store the list of names of the functions from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of node A in function FA and node B in function
+       * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+       * level graph, the `original_func` is empty. This information, with the
+       * `original_node_names` can be used to map errors originating at the
+       * current ndoe to some top level source code.
+       * 
+ * + * repeated string original_func_names = 2; + */ + public Builder addAllOriginalFuncNames( + java.lang.Iterable values) { + ensureOriginalFuncNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, originalFuncNames_); + onChanged(); + return this; + } + /** + *
+       * This is intended to store the list of names of the functions from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of node A in function FA and node B in function
+       * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+       * level graph, the `original_func` is empty. This information, with the
+       * `original_node_names` can be used to map errors originating at the
+       * current ndoe to some top level source code.
+       * 
+ * + * repeated string original_func_names = 2; + */ + public Builder clearOriginalFuncNames() { + originalFuncNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * This is intended to store the list of names of the functions from the
+       * original graph that this node was derived. For example if this node, say
+       * C, was result of a fusion of node A in function FA and node B in function
+       * FB, then `original_funcs` would be {FA, FB}. If the node is in the top
+       * level graph, the `original_func` is empty. This information, with the
+       * `original_node_names` can be used to map errors originating at the
+       * current ndoe to some top level source code.
+       * 
+ * + * repeated string original_func_names = 2; + */ + public Builder addOriginalFuncNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureOriginalFuncNamesIsMutable(); + originalFuncNames_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.NodeDef.ExperimentalDebugInfo) + } + + // @@protoc_insertion_point(class_scope:tensorflow.NodeDef.ExperimentalDebugInfo) + private static final org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo(); + } + + public static org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExperimentalDebugInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExperimentalDebugInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * 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_>./]*".
+   * 
+ * + * 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; + } + } + /** + *
+   * 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_>./]*".
+   * 
+ * + * 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 OP_FIELD_NUMBER = 2; + private volatile java.lang.Object op_; + /** + *
+   * The operation name.  There may be custom parameters in attrs.
+   * Op names starting with an underscore are reserved for internal use.
+   * 
+ * + * string op = 2; + */ + 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; + } + } + /** + *
+   * The operation name.  There may be custom parameters in attrs.
+   * Op names starting with an underscore are reserved for internal use.
+   * 
+ * + * string op = 2; + */ + 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_; + /** + *
+   * 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".
+   * 
+ * + * repeated string input = 3; + */ + public com.google.protobuf.ProtocolStringList + getInputList() { + return input_; + } + /** + *
+   * 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".
+   * 
+ * + * repeated string input = 3; + */ + public int getInputCount() { + return input_.size(); + } + /** + *
+   * 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".
+   * 
+ * + * repeated string input = 3; + */ + public java.lang.String getInput(int index) { + return input_.get(index); + } + /** + *
+   * 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".
+   * 
+ * + * repeated string input = 3; + */ + 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_; + /** + *
+   * 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 ::= PARTIAL_SPEC
+   * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
+   * CONSTRAINT ::= ("job:" JOB_NAME)
+   *              | ("replica:" [1-9][0-9]*)
+   *              | ("task:" [1-9][0-9]*)
+   *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
+   * Valid values for this string include:
+   * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
+   * * "/job:worker/device: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.
+   * 
+ * + * string device = 4; + */ + 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; + } + } + /** + *
+   * 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 ::= PARTIAL_SPEC
+   * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
+   * CONSTRAINT ::= ("job:" JOB_NAME)
+   *              | ("replica:" [1-9][0-9]*)
+   *              | ("task:" [1-9][0-9]*)
+   *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
+   * Valid values for this string include:
+   * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
+   * * "/job:worker/device: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.
+   * 
+ * + * string device = 4; + */ + 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.proto.framework.AttrValue> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.NodeProto.internal_static_tensorflow_NodeDef_AttrEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.framework.AttrValue.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.AttrValue> attr_; + private com.google.protobuf.MapField + internalGetAttr() { + if (attr_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttrDefaultEntryHolder.defaultEntry); + } + return attr_; + } + + public int getAttrCount() { + return internalGetAttr().getMap().size(); + } + /** + *
+   * 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.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public boolean containsAttr( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetAttr().getMap().containsKey(key); + } + /** + * Use {@link #getAttrMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getAttr() { + return getAttrMap(); + } + /** + *
+   * 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.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public java.util.Map getAttrMap() { + return internalGetAttr().getMap(); + } + /** + *
+   * 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.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public org.tensorflow.proto.framework.AttrValue getAttrOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttr().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * 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.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public org.tensorflow.proto.framework.AttrValue getAttrOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttr().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int EXPERIMENTAL_DEBUG_INFO_FIELD_NUMBER = 6; + private org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo experimentalDebugInfo_; + /** + *
+   * This stores debug information associated with the node.
+   * 
+ * + * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; + */ + public boolean hasExperimentalDebugInfo() { + return experimentalDebugInfo_ != null; + } + /** + *
+   * This stores debug information associated with the node.
+   * 
+ * + * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; + */ + public org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo getExperimentalDebugInfo() { + return experimentalDebugInfo_ == null ? org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.getDefaultInstance() : experimentalDebugInfo_; + } + /** + *
+   * This stores debug information associated with the node.
+   * 
+ * + * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; + */ + public org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfoOrBuilder getExperimentalDebugInfoOrBuilder() { + return getExperimentalDebugInfo(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getOpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, op_); + } + for (int i = 0; i < input_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, input_.getRaw(i)); + } + if (!getDeviceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, device_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetAttr(), + AttrDefaultEntryHolder.defaultEntry, + 5); + if (experimentalDebugInfo_ != null) { + output.writeMessage(6, getExperimentalDebugInfo()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getOpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, op_); + } + { + int dataSize = 0; + for (int i = 0; i < input_.size(); i++) { + dataSize += computeStringSizeNoTag(input_.getRaw(i)); + } + size += dataSize; + size += 1 * getInputList().size(); + } + if (!getDeviceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, device_); + } + for (java.util.Map.Entry entry + : internalGetAttr().getMap().entrySet()) { + com.google.protobuf.MapEntry + attr__ = AttrDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, attr__); + } + if (experimentalDebugInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getExperimentalDebugInfo()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.NodeDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.NodeDef other = (org.tensorflow.proto.framework.NodeDef) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getOp() + .equals(other.getOp())) return false; + if (!getInputList() + .equals(other.getInputList())) return false; + if (!getDevice() + .equals(other.getDevice())) return false; + if (!internalGetAttr().equals( + other.internalGetAttr())) return false; + if (hasExperimentalDebugInfo() != other.hasExperimentalDebugInfo()) return false; + if (hasExperimentalDebugInfo()) { + if (!getExperimentalDebugInfo() + .equals(other.getExperimentalDebugInfo())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + OP_FIELD_NUMBER; + hash = (53 * hash) + getOp().hashCode(); + if (getInputCount() > 0) { + hash = (37 * hash) + INPUT_FIELD_NUMBER; + hash = (53 * hash) + getInputList().hashCode(); + } + hash = (37 * hash) + DEVICE_FIELD_NUMBER; + hash = (53 * hash) + getDevice().hashCode(); + if (!internalGetAttr().getMap().isEmpty()) { + hash = (37 * hash) + ATTR_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttr().hashCode(); + } + if (hasExperimentalDebugInfo()) { + hash = (37 * hash) + EXPERIMENTAL_DEBUG_INFO_FIELD_NUMBER; + hash = (53 * hash) + getExperimentalDebugInfo().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.NodeDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NodeDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NodeDef parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NodeDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NodeDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NodeDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NodeDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.NodeDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.NodeDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.NodeDef) + org.tensorflow.proto.framework.NodeDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.NodeProto.internal_static_tensorflow_NodeDef_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 5: + return internalGetAttr(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 5: + return internalGetMutableAttr(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.NodeProto.internal_static_tensorflow_NodeDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NodeDef.class, org.tensorflow.proto.framework.NodeDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.NodeDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + op_ = ""; + + input_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + device_ = ""; + + internalGetMutableAttr().clear(); + if (experimentalDebugInfoBuilder_ == null) { + experimentalDebugInfo_ = null; + } else { + experimentalDebugInfo_ = null; + experimentalDebugInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.NodeProto.internal_static_tensorflow_NodeDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NodeDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.NodeDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.NodeDef build() { + org.tensorflow.proto.framework.NodeDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NodeDef buildPartial() { + org.tensorflow.proto.framework.NodeDef result = new org.tensorflow.proto.framework.NodeDef(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.op_ = op_; + if (((bitField0_ & 0x00000001) != 0)) { + input_ = input_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.input_ = input_; + result.device_ = device_; + result.attr_ = internalGetAttr(); + result.attr_.makeImmutable(); + if (experimentalDebugInfoBuilder_ == null) { + result.experimentalDebugInfo_ = experimentalDebugInfo_; + } else { + result.experimentalDebugInfo_ = experimentalDebugInfoBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.NodeDef) { + return mergeFrom((org.tensorflow.proto.framework.NodeDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.NodeDef other) { + if (other == org.tensorflow.proto.framework.NodeDef.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getOp().isEmpty()) { + op_ = other.op_; + onChanged(); + } + if (!other.input_.isEmpty()) { + if (input_.isEmpty()) { + input_ = other.input_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInputIsMutable(); + input_.addAll(other.input_); + } + onChanged(); + } + if (!other.getDevice().isEmpty()) { + device_ = other.device_; + onChanged(); + } + internalGetMutableAttr().mergeFrom( + other.internalGetAttr()); + if (other.hasExperimentalDebugInfo()) { + mergeExperimentalDebugInfo(other.getExperimentalDebugInfo()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.NodeDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.NodeDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * 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_>./]*".
+     * 
+ * + * 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; + } + } + /** + *
+     * 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_>./]*".
+     * 
+ * + * 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; + } + } + /** + *
+     * 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_>./]*".
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * 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_>./]*".
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * 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_>./]*".
+     * 
+ * + * 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 op_ = ""; + /** + *
+     * The operation name.  There may be custom parameters in attrs.
+     * Op names starting with an underscore are reserved for internal use.
+     * 
+ * + * string op = 2; + */ + 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; + } + } + /** + *
+     * The operation name.  There may be custom parameters in attrs.
+     * Op names starting with an underscore are reserved for internal use.
+     * 
+ * + * string op = 2; + */ + 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; + } + } + /** + *
+     * The operation name.  There may be custom parameters in attrs.
+     * Op names starting with an underscore are reserved for internal use.
+     * 
+ * + * string op = 2; + */ + public Builder setOp( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + op_ = value; + onChanged(); + return this; + } + /** + *
+     * The operation name.  There may be custom parameters in attrs.
+     * Op names starting with an underscore are reserved for internal use.
+     * 
+ * + * string op = 2; + */ + public Builder clearOp() { + + op_ = getDefaultInstance().getOp(); + onChanged(); + return this; + } + /** + *
+     * The operation name.  There may be custom parameters in attrs.
+     * Op names starting with an underscore are reserved for internal use.
+     * 
+ * + * string op = 2; + */ + public Builder setOpBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + op_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList input_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureInputIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + input_ = new com.google.protobuf.LazyStringArrayList(input_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * 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".
+     * 
+ * + * repeated string input = 3; + */ + public com.google.protobuf.ProtocolStringList + getInputList() { + return input_.getUnmodifiableView(); + } + /** + *
+     * 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".
+     * 
+ * + * repeated string input = 3; + */ + public int getInputCount() { + return input_.size(); + } + /** + *
+     * 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".
+     * 
+ * + * repeated string input = 3; + */ + public java.lang.String getInput(int index) { + return input_.get(index); + } + /** + *
+     * 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".
+     * 
+ * + * repeated string input = 3; + */ + public com.google.protobuf.ByteString + getInputBytes(int index) { + return input_.getByteString(index); + } + /** + *
+     * 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".
+     * 
+ * + * repeated string input = 3; + */ + public Builder setInput( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputIsMutable(); + input_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * 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".
+     * 
+ * + * repeated string input = 3; + */ + public Builder addInput( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputIsMutable(); + input_.add(value); + onChanged(); + return this; + } + /** + *
+     * 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".
+     * 
+ * + * repeated string input = 3; + */ + public Builder addAllInput( + java.lang.Iterable values) { + ensureInputIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, input_); + onChanged(); + return this; + } + /** + *
+     * 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".
+     * 
+ * + * repeated string input = 3; + */ + public Builder clearInput() { + input_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * 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".
+     * 
+ * + * repeated string input = 3; + */ + public Builder addInputBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInputIsMutable(); + input_.add(value); + onChanged(); + return this; + } + + private java.lang.Object device_ = ""; + /** + *
+     * 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 ::= PARTIAL_SPEC
+     * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
+     * CONSTRAINT ::= ("job:" JOB_NAME)
+     *              | ("replica:" [1-9][0-9]*)
+     *              | ("task:" [1-9][0-9]*)
+     *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
+     * Valid values for this string include:
+     * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
+     * * "/job:worker/device: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.
+     * 
+ * + * string device = 4; + */ + 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; + } + } + /** + *
+     * 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 ::= PARTIAL_SPEC
+     * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
+     * CONSTRAINT ::= ("job:" JOB_NAME)
+     *              | ("replica:" [1-9][0-9]*)
+     *              | ("task:" [1-9][0-9]*)
+     *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
+     * Valid values for this string include:
+     * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
+     * * "/job:worker/device: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.
+     * 
+ * + * string device = 4; + */ + 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; + } + } + /** + *
+     * 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 ::= PARTIAL_SPEC
+     * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
+     * CONSTRAINT ::= ("job:" JOB_NAME)
+     *              | ("replica:" [1-9][0-9]*)
+     *              | ("task:" [1-9][0-9]*)
+     *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
+     * Valid values for this string include:
+     * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
+     * * "/job:worker/device: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.
+     * 
+ * + * string device = 4; + */ + public Builder setDevice( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + device_ = value; + onChanged(); + return this; + } + /** + *
+     * 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 ::= PARTIAL_SPEC
+     * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
+     * CONSTRAINT ::= ("job:" JOB_NAME)
+     *              | ("replica:" [1-9][0-9]*)
+     *              | ("task:" [1-9][0-9]*)
+     *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
+     * Valid values for this string include:
+     * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
+     * * "/job:worker/device: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.
+     * 
+ * + * string device = 4; + */ + public Builder clearDevice() { + + device_ = getDefaultInstance().getDevice(); + onChanged(); + return this; + } + /** + *
+     * 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 ::= PARTIAL_SPEC
+     * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
+     * CONSTRAINT ::= ("job:" JOB_NAME)
+     *              | ("replica:" [1-9][0-9]*)
+     *              | ("task:" [1-9][0-9]*)
+     *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
+     * Valid values for this string include:
+     * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
+     * * "/job:worker/device: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.
+     * 
+ * + * string device = 4; + */ + public Builder setDeviceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + device_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.AttrValue> attr_; + private com.google.protobuf.MapField + internalGetAttr() { + if (attr_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttrDefaultEntryHolder.defaultEntry); + } + return attr_; + } + private com.google.protobuf.MapField + internalGetMutableAttr() { + onChanged();; + if (attr_ == null) { + attr_ = com.google.protobuf.MapField.newMapField( + AttrDefaultEntryHolder.defaultEntry); + } + if (!attr_.isMutable()) { + attr_ = attr_.copy(); + } + return attr_; + } + + public int getAttrCount() { + return internalGetAttr().getMap().size(); + } + /** + *
+     * 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.
+     * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public boolean containsAttr( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetAttr().getMap().containsKey(key); + } + /** + * Use {@link #getAttrMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getAttr() { + return getAttrMap(); + } + /** + *
+     * 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.
+     * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public java.util.Map getAttrMap() { + return internalGetAttr().getMap(); + } + /** + *
+     * 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.
+     * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public org.tensorflow.proto.framework.AttrValue getAttrOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttr().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * 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.
+     * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public org.tensorflow.proto.framework.AttrValue getAttrOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttr().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAttr() { + internalGetMutableAttr().getMutableMap() + .clear(); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public Builder removeAttr( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableAttr().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableAttr() { + return internalGetMutableAttr().getMutableMap(); + } + /** + *
+     * 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.
+     * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + public Builder putAttr( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableAttr().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * 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.
+     * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + public Builder putAllAttr( + java.util.Map values) { + internalGetMutableAttr().getMutableMap() + .putAll(values); + return this; + } + + private org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo experimentalDebugInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo, org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.Builder, org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfoOrBuilder> experimentalDebugInfoBuilder_; + /** + *
+     * This stores debug information associated with the node.
+     * 
+ * + * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; + */ + public boolean hasExperimentalDebugInfo() { + return experimentalDebugInfoBuilder_ != null || experimentalDebugInfo_ != null; + } + /** + *
+     * This stores debug information associated with the node.
+     * 
+ * + * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; + */ + public org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo getExperimentalDebugInfo() { + if (experimentalDebugInfoBuilder_ == null) { + return experimentalDebugInfo_ == null ? org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.getDefaultInstance() : experimentalDebugInfo_; + } else { + return experimentalDebugInfoBuilder_.getMessage(); + } + } + /** + *
+     * This stores debug information associated with the node.
+     * 
+ * + * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; + */ + public Builder setExperimentalDebugInfo(org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo value) { + if (experimentalDebugInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + experimentalDebugInfo_ = value; + onChanged(); + } else { + experimentalDebugInfoBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * This stores debug information associated with the node.
+     * 
+ * + * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; + */ + public Builder setExperimentalDebugInfo( + org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.Builder builderForValue) { + if (experimentalDebugInfoBuilder_ == null) { + experimentalDebugInfo_ = builderForValue.build(); + onChanged(); + } else { + experimentalDebugInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * This stores debug information associated with the node.
+     * 
+ * + * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; + */ + public Builder mergeExperimentalDebugInfo(org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo value) { + if (experimentalDebugInfoBuilder_ == null) { + if (experimentalDebugInfo_ != null) { + experimentalDebugInfo_ = + org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.newBuilder(experimentalDebugInfo_).mergeFrom(value).buildPartial(); + } else { + experimentalDebugInfo_ = value; + } + onChanged(); + } else { + experimentalDebugInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * This stores debug information associated with the node.
+     * 
+ * + * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; + */ + public Builder clearExperimentalDebugInfo() { + if (experimentalDebugInfoBuilder_ == null) { + experimentalDebugInfo_ = null; + onChanged(); + } else { + experimentalDebugInfo_ = null; + experimentalDebugInfoBuilder_ = null; + } + + return this; + } + /** + *
+     * This stores debug information associated with the node.
+     * 
+ * + * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; + */ + public org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.Builder getExperimentalDebugInfoBuilder() { + + onChanged(); + return getExperimentalDebugInfoFieldBuilder().getBuilder(); + } + /** + *
+     * This stores debug information associated with the node.
+     * 
+ * + * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; + */ + public org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfoOrBuilder getExperimentalDebugInfoOrBuilder() { + if (experimentalDebugInfoBuilder_ != null) { + return experimentalDebugInfoBuilder_.getMessageOrBuilder(); + } else { + return experimentalDebugInfo_ == null ? + org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.getDefaultInstance() : experimentalDebugInfo_; + } + } + /** + *
+     * This stores debug information associated with the node.
+     * 
+ * + * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo, org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.Builder, org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfoOrBuilder> + getExperimentalDebugInfoFieldBuilder() { + if (experimentalDebugInfoBuilder_ == null) { + experimentalDebugInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo, org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo.Builder, org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfoOrBuilder>( + getExperimentalDebugInfo(), + getParentForChildren(), + isClean()); + experimentalDebugInfo_ = null; + } + return experimentalDebugInfoBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.NodeDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.NodeDef) + private static final org.tensorflow.proto.framework.NodeDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.NodeDef(); + } + + public static org.tensorflow.proto.framework.NodeDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NodeDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NodeDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NodeDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeDefOrBuilder.java new file mode 100644 index 00000000000..43971913d97 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeDefOrBuilder.java @@ -0,0 +1,284 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/node_def.proto + +package org.tensorflow.proto.framework; + +public interface NodeDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.NodeDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * 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_>./]*".
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * 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_>./]*".
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The operation name.  There may be custom parameters in attrs.
+   * Op names starting with an underscore are reserved for internal use.
+   * 
+ * + * string op = 2; + */ + java.lang.String getOp(); + /** + *
+   * The operation name.  There may be custom parameters in attrs.
+   * Op names starting with an underscore are reserved for internal use.
+   * 
+ * + * string op = 2; + */ + com.google.protobuf.ByteString + getOpBytes(); + + /** + *
+   * 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".
+   * 
+ * + * repeated string input = 3; + */ + java.util.List + getInputList(); + /** + *
+   * 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".
+   * 
+ * + * repeated string input = 3; + */ + int getInputCount(); + /** + *
+   * 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".
+   * 
+ * + * repeated string input = 3; + */ + java.lang.String getInput(int index); + /** + *
+   * 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".
+   * 
+ * + * repeated string input = 3; + */ + com.google.protobuf.ByteString + getInputBytes(int index); + + /** + *
+   * 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 ::= PARTIAL_SPEC
+   * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
+   * CONSTRAINT ::= ("job:" JOB_NAME)
+   *              | ("replica:" [1-9][0-9]*)
+   *              | ("task:" [1-9][0-9]*)
+   *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
+   * Valid values for this string include:
+   * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
+   * * "/job:worker/device: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.
+   * 
+ * + * string device = 4; + */ + java.lang.String getDevice(); + /** + *
+   * 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 ::= PARTIAL_SPEC
+   * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
+   * CONSTRAINT ::= ("job:" JOB_NAME)
+   *              | ("replica:" [1-9][0-9]*)
+   *              | ("task:" [1-9][0-9]*)
+   *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
+   * Valid values for this string include:
+   * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
+   * * "/job:worker/device: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.
+   * 
+ * + * string device = 4; + */ + com.google.protobuf.ByteString + getDeviceBytes(); + + /** + *
+   * 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.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + int getAttrCount(); + /** + *
+   * 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.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + boolean containsAttr( + java.lang.String key); + /** + * Use {@link #getAttrMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getAttr(); + /** + *
+   * 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.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + java.util.Map + getAttrMap(); + /** + *
+   * 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.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + org.tensorflow.proto.framework.AttrValue getAttrOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue defaultValue); + /** + *
+   * 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.
+   * 
+ * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + + org.tensorflow.proto.framework.AttrValue getAttrOrThrow( + java.lang.String key); + + /** + *
+   * This stores debug information associated with the node.
+   * 
+ * + * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; + */ + boolean hasExperimentalDebugInfo(); + /** + *
+   * This stores debug information associated with the node.
+   * 
+ * + * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; + */ + org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfo getExperimentalDebugInfo(); + /** + *
+   * This stores debug information associated with the node.
+   * 
+ * + * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; + */ + org.tensorflow.proto.framework.NodeDef.ExperimentalDebugInfoOrBuilder getExperimentalDebugInfoOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeExecStats.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeExecStats.java new file mode 100644 index 00000000000..93e1e3df32c --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeExecStats.java @@ -0,0 +1,2580 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/step_stats.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Time/size stats recorded for a single execution of a graph node.
+ * 
+ * + * Protobuf type {@code tensorflow.NodeExecStats} + */ +public final class NodeExecStats extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.NodeExecStats) + NodeExecStatsOrBuilder { +private static final long serialVersionUID = 0L; + // Use NodeExecStats.newBuilder() to construct. + private NodeExecStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NodeExecStats() { + nodeName_ = ""; + memory_ = java.util.Collections.emptyList(); + output_ = java.util.Collections.emptyList(); + timelineLabel_ = ""; + referencedTensor_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NodeExecStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NodeExecStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + nodeName_ = s; + break; + } + case 16: { + + allStartMicros_ = input.readInt64(); + break; + } + case 24: { + + opStartRelMicros_ = input.readInt64(); + break; + } + case 32: { + + opEndRelMicros_ = input.readInt64(); + break; + } + case 40: { + + allEndRelMicros_ = input.readInt64(); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + memory_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + memory_.add( + input.readMessage(org.tensorflow.proto.framework.AllocatorMemoryUsed.parser(), extensionRegistry)); + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + output_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + output_.add( + input.readMessage(org.tensorflow.proto.framework.NodeOutput.parser(), extensionRegistry)); + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + timelineLabel_ = s; + break; + } + case 72: { + + scheduledMicros_ = input.readInt64(); + break; + } + case 80: { + + threadId_ = input.readUInt32(); + break; + } + case 90: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + referencedTensor_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + referencedTensor_.add( + input.readMessage(org.tensorflow.proto.framework.AllocationDescription.parser(), extensionRegistry)); + break; + } + case 98: { + org.tensorflow.proto.framework.MemoryStats.Builder subBuilder = null; + if (memoryStats_ != null) { + subBuilder = memoryStats_.toBuilder(); + } + memoryStats_ = input.readMessage(org.tensorflow.proto.framework.MemoryStats.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(memoryStats_); + memoryStats_ = subBuilder.buildPartial(); + } + + break; + } + case 104: { + + allStartNanos_ = input.readInt64(); + break; + } + case 112: { + + opStartRelNanos_ = input.readInt64(); + break; + } + case 120: { + + opEndRelNanos_ = input.readInt64(); + break; + } + case 128: { + + allEndRelNanos_ = input.readInt64(); + break; + } + case 136: { + + scheduledNanos_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + memory_ = java.util.Collections.unmodifiableList(memory_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + output_ = java.util.Collections.unmodifiableList(output_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + referencedTensor_ = java.util.Collections.unmodifiableList(referencedTensor_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_NodeExecStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_NodeExecStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NodeExecStats.class, org.tensorflow.proto.framework.NodeExecStats.Builder.class); + } + + public static final int NODE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object nodeName_; + /** + *
+   * TODO(tucker): Use some more compact form of node identity than
+   * the full string name.  Either all processes should agree on a
+   * global id (cost_id?) for each node, or we should use a hash of
+   * the name.
+   * 
+ * + * string node_name = 1; + */ + public java.lang.String getNodeName() { + java.lang.Object ref = nodeName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeName_ = s; + return s; + } + } + /** + *
+   * TODO(tucker): Use some more compact form of node identity than
+   * the full string name.  Either all processes should agree on a
+   * global id (cost_id?) for each node, or we should use a hash of
+   * the name.
+   * 
+ * + * string node_name = 1; + */ + public com.google.protobuf.ByteString + getNodeNameBytes() { + java.lang.Object ref = nodeName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nodeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALL_START_MICROS_FIELD_NUMBER = 2; + private long allStartMicros_; + /** + * int64 all_start_micros = 2; + */ + public long getAllStartMicros() { + return allStartMicros_; + } + + public static final int OP_START_REL_MICROS_FIELD_NUMBER = 3; + private long opStartRelMicros_; + /** + * int64 op_start_rel_micros = 3; + */ + public long getOpStartRelMicros() { + return opStartRelMicros_; + } + + public static final int OP_END_REL_MICROS_FIELD_NUMBER = 4; + private long opEndRelMicros_; + /** + * int64 op_end_rel_micros = 4; + */ + public long getOpEndRelMicros() { + return opEndRelMicros_; + } + + public static final int ALL_END_REL_MICROS_FIELD_NUMBER = 5; + private long allEndRelMicros_; + /** + * int64 all_end_rel_micros = 5; + */ + public long getAllEndRelMicros() { + return allEndRelMicros_; + } + + public static final int MEMORY_FIELD_NUMBER = 6; + private java.util.List memory_; + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public java.util.List getMemoryList() { + return memory_; + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public java.util.List + getMemoryOrBuilderList() { + return memory_; + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public int getMemoryCount() { + return memory_.size(); + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public org.tensorflow.proto.framework.AllocatorMemoryUsed getMemory(int index) { + return memory_.get(index); + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public org.tensorflow.proto.framework.AllocatorMemoryUsedOrBuilder getMemoryOrBuilder( + int index) { + return memory_.get(index); + } + + public static final int OUTPUT_FIELD_NUMBER = 7; + private java.util.List output_; + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public java.util.List getOutputList() { + return output_; + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public java.util.List + getOutputOrBuilderList() { + return output_; + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public int getOutputCount() { + return output_.size(); + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public org.tensorflow.proto.framework.NodeOutput getOutput(int index) { + return output_.get(index); + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public org.tensorflow.proto.framework.NodeOutputOrBuilder getOutputOrBuilder( + int index) { + return output_.get(index); + } + + public static final int TIMELINE_LABEL_FIELD_NUMBER = 8; + private volatile java.lang.Object timelineLabel_; + /** + * string timeline_label = 8; + */ + public java.lang.String getTimelineLabel() { + java.lang.Object ref = timelineLabel_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timelineLabel_ = s; + return s; + } + } + /** + * string timeline_label = 8; + */ + public com.google.protobuf.ByteString + getTimelineLabelBytes() { + java.lang.Object ref = timelineLabel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + timelineLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEDULED_MICROS_FIELD_NUMBER = 9; + private long scheduledMicros_; + /** + * int64 scheduled_micros = 9; + */ + public long getScheduledMicros() { + return scheduledMicros_; + } + + public static final int THREAD_ID_FIELD_NUMBER = 10; + private int threadId_; + /** + * uint32 thread_id = 10; + */ + public int getThreadId() { + return threadId_; + } + + public static final int REFERENCED_TENSOR_FIELD_NUMBER = 11; + private java.util.List referencedTensor_; + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public java.util.List getReferencedTensorList() { + return referencedTensor_; + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public java.util.List + getReferencedTensorOrBuilderList() { + return referencedTensor_; + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public int getReferencedTensorCount() { + return referencedTensor_.size(); + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public org.tensorflow.proto.framework.AllocationDescription getReferencedTensor(int index) { + return referencedTensor_.get(index); + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public org.tensorflow.proto.framework.AllocationDescriptionOrBuilder getReferencedTensorOrBuilder( + int index) { + return referencedTensor_.get(index); + } + + public static final int MEMORY_STATS_FIELD_NUMBER = 12; + private org.tensorflow.proto.framework.MemoryStats memoryStats_; + /** + * .tensorflow.MemoryStats memory_stats = 12; + */ + public boolean hasMemoryStats() { + return memoryStats_ != null; + } + /** + * .tensorflow.MemoryStats memory_stats = 12; + */ + public org.tensorflow.proto.framework.MemoryStats getMemoryStats() { + return memoryStats_ == null ? org.tensorflow.proto.framework.MemoryStats.getDefaultInstance() : memoryStats_; + } + /** + * .tensorflow.MemoryStats memory_stats = 12; + */ + public org.tensorflow.proto.framework.MemoryStatsOrBuilder getMemoryStatsOrBuilder() { + return getMemoryStats(); + } + + public static final int ALL_START_NANOS_FIELD_NUMBER = 13; + private long allStartNanos_; + /** + * int64 all_start_nanos = 13; + */ + public long getAllStartNanos() { + return allStartNanos_; + } + + public static final int OP_START_REL_NANOS_FIELD_NUMBER = 14; + private long opStartRelNanos_; + /** + * int64 op_start_rel_nanos = 14; + */ + public long getOpStartRelNanos() { + return opStartRelNanos_; + } + + public static final int OP_END_REL_NANOS_FIELD_NUMBER = 15; + private long opEndRelNanos_; + /** + * int64 op_end_rel_nanos = 15; + */ + public long getOpEndRelNanos() { + return opEndRelNanos_; + } + + public static final int ALL_END_REL_NANOS_FIELD_NUMBER = 16; + private long allEndRelNanos_; + /** + * int64 all_end_rel_nanos = 16; + */ + public long getAllEndRelNanos() { + return allEndRelNanos_; + } + + public static final int SCHEDULED_NANOS_FIELD_NUMBER = 17; + private long scheduledNanos_; + /** + * int64 scheduled_nanos = 17; + */ + public long getScheduledNanos() { + return scheduledNanos_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNodeNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, nodeName_); + } + if (allStartMicros_ != 0L) { + output.writeInt64(2, allStartMicros_); + } + if (opStartRelMicros_ != 0L) { + output.writeInt64(3, opStartRelMicros_); + } + if (opEndRelMicros_ != 0L) { + output.writeInt64(4, opEndRelMicros_); + } + if (allEndRelMicros_ != 0L) { + output.writeInt64(5, allEndRelMicros_); + } + for (int i = 0; i < memory_.size(); i++) { + output.writeMessage(6, memory_.get(i)); + } + for (int i = 0; i < output_.size(); i++) { + output.writeMessage(7, output_.get(i)); + } + if (!getTimelineLabelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, timelineLabel_); + } + if (scheduledMicros_ != 0L) { + output.writeInt64(9, scheduledMicros_); + } + if (threadId_ != 0) { + output.writeUInt32(10, threadId_); + } + for (int i = 0; i < referencedTensor_.size(); i++) { + output.writeMessage(11, referencedTensor_.get(i)); + } + if (memoryStats_ != null) { + output.writeMessage(12, getMemoryStats()); + } + if (allStartNanos_ != 0L) { + output.writeInt64(13, allStartNanos_); + } + if (opStartRelNanos_ != 0L) { + output.writeInt64(14, opStartRelNanos_); + } + if (opEndRelNanos_ != 0L) { + output.writeInt64(15, opEndRelNanos_); + } + if (allEndRelNanos_ != 0L) { + output.writeInt64(16, allEndRelNanos_); + } + if (scheduledNanos_ != 0L) { + output.writeInt64(17, scheduledNanos_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNodeNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, nodeName_); + } + if (allStartMicros_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, allStartMicros_); + } + if (opStartRelMicros_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, opStartRelMicros_); + } + if (opEndRelMicros_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, opEndRelMicros_); + } + if (allEndRelMicros_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, allEndRelMicros_); + } + for (int i = 0; i < memory_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, memory_.get(i)); + } + for (int i = 0; i < output_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, output_.get(i)); + } + if (!getTimelineLabelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, timelineLabel_); + } + if (scheduledMicros_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(9, scheduledMicros_); + } + if (threadId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(10, threadId_); + } + for (int i = 0; i < referencedTensor_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, referencedTensor_.get(i)); + } + if (memoryStats_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getMemoryStats()); + } + if (allStartNanos_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(13, allStartNanos_); + } + if (opStartRelNanos_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(14, opStartRelNanos_); + } + if (opEndRelNanos_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(15, opEndRelNanos_); + } + if (allEndRelNanos_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(16, allEndRelNanos_); + } + if (scheduledNanos_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(17, scheduledNanos_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.NodeExecStats)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.NodeExecStats other = (org.tensorflow.proto.framework.NodeExecStats) obj; + + if (!getNodeName() + .equals(other.getNodeName())) return false; + if (getAllStartMicros() + != other.getAllStartMicros()) return false; + if (getOpStartRelMicros() + != other.getOpStartRelMicros()) return false; + if (getOpEndRelMicros() + != other.getOpEndRelMicros()) return false; + if (getAllEndRelMicros() + != other.getAllEndRelMicros()) return false; + if (!getMemoryList() + .equals(other.getMemoryList())) return false; + if (!getOutputList() + .equals(other.getOutputList())) return false; + if (!getTimelineLabel() + .equals(other.getTimelineLabel())) return false; + if (getScheduledMicros() + != other.getScheduledMicros()) return false; + if (getThreadId() + != other.getThreadId()) return false; + if (!getReferencedTensorList() + .equals(other.getReferencedTensorList())) return false; + if (hasMemoryStats() != other.hasMemoryStats()) return false; + if (hasMemoryStats()) { + if (!getMemoryStats() + .equals(other.getMemoryStats())) return false; + } + if (getAllStartNanos() + != other.getAllStartNanos()) return false; + if (getOpStartRelNanos() + != other.getOpStartRelNanos()) return false; + if (getOpEndRelNanos() + != other.getOpEndRelNanos()) return false; + if (getAllEndRelNanos() + != other.getAllEndRelNanos()) return false; + if (getScheduledNanos() + != other.getScheduledNanos()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NODE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getNodeName().hashCode(); + hash = (37 * hash) + ALL_START_MICROS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAllStartMicros()); + hash = (37 * hash) + OP_START_REL_MICROS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOpStartRelMicros()); + hash = (37 * hash) + OP_END_REL_MICROS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOpEndRelMicros()); + hash = (37 * hash) + ALL_END_REL_MICROS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAllEndRelMicros()); + if (getMemoryCount() > 0) { + hash = (37 * hash) + MEMORY_FIELD_NUMBER; + hash = (53 * hash) + getMemoryList().hashCode(); + } + if (getOutputCount() > 0) { + hash = (37 * hash) + OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getOutputList().hashCode(); + } + hash = (37 * hash) + TIMELINE_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getTimelineLabel().hashCode(); + hash = (37 * hash) + SCHEDULED_MICROS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getScheduledMicros()); + hash = (37 * hash) + THREAD_ID_FIELD_NUMBER; + hash = (53 * hash) + getThreadId(); + if (getReferencedTensorCount() > 0) { + hash = (37 * hash) + REFERENCED_TENSOR_FIELD_NUMBER; + hash = (53 * hash) + getReferencedTensorList().hashCode(); + } + if (hasMemoryStats()) { + hash = (37 * hash) + MEMORY_STATS_FIELD_NUMBER; + hash = (53 * hash) + getMemoryStats().hashCode(); + } + hash = (37 * hash) + ALL_START_NANOS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAllStartNanos()); + hash = (37 * hash) + OP_START_REL_NANOS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOpStartRelNanos()); + hash = (37 * hash) + OP_END_REL_NANOS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOpEndRelNanos()); + hash = (37 * hash) + ALL_END_REL_NANOS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAllEndRelNanos()); + hash = (37 * hash) + SCHEDULED_NANOS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getScheduledNanos()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.NodeExecStats parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NodeExecStats parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeExecStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NodeExecStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeExecStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NodeExecStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeExecStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NodeExecStats parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeExecStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NodeExecStats parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeExecStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NodeExecStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.NodeExecStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Time/size stats recorded for a single execution of a graph node.
+   * 
+ * + * Protobuf type {@code tensorflow.NodeExecStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.NodeExecStats) + org.tensorflow.proto.framework.NodeExecStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_NodeExecStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_NodeExecStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NodeExecStats.class, org.tensorflow.proto.framework.NodeExecStats.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.NodeExecStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getMemoryFieldBuilder(); + getOutputFieldBuilder(); + getReferencedTensorFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + nodeName_ = ""; + + allStartMicros_ = 0L; + + opStartRelMicros_ = 0L; + + opEndRelMicros_ = 0L; + + allEndRelMicros_ = 0L; + + if (memoryBuilder_ == null) { + memory_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + memoryBuilder_.clear(); + } + if (outputBuilder_ == null) { + output_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + outputBuilder_.clear(); + } + timelineLabel_ = ""; + + scheduledMicros_ = 0L; + + threadId_ = 0; + + if (referencedTensorBuilder_ == null) { + referencedTensor_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + referencedTensorBuilder_.clear(); + } + if (memoryStatsBuilder_ == null) { + memoryStats_ = null; + } else { + memoryStats_ = null; + memoryStatsBuilder_ = null; + } + allStartNanos_ = 0L; + + opStartRelNanos_ = 0L; + + opEndRelNanos_ = 0L; + + allEndRelNanos_ = 0L; + + scheduledNanos_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_NodeExecStats_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NodeExecStats getDefaultInstanceForType() { + return org.tensorflow.proto.framework.NodeExecStats.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.NodeExecStats build() { + org.tensorflow.proto.framework.NodeExecStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NodeExecStats buildPartial() { + org.tensorflow.proto.framework.NodeExecStats result = new org.tensorflow.proto.framework.NodeExecStats(this); + int from_bitField0_ = bitField0_; + result.nodeName_ = nodeName_; + result.allStartMicros_ = allStartMicros_; + result.opStartRelMicros_ = opStartRelMicros_; + result.opEndRelMicros_ = opEndRelMicros_; + result.allEndRelMicros_ = allEndRelMicros_; + if (memoryBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + memory_ = java.util.Collections.unmodifiableList(memory_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.memory_ = memory_; + } else { + result.memory_ = memoryBuilder_.build(); + } + if (outputBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + output_ = java.util.Collections.unmodifiableList(output_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.output_ = output_; + } else { + result.output_ = outputBuilder_.build(); + } + result.timelineLabel_ = timelineLabel_; + result.scheduledMicros_ = scheduledMicros_; + result.threadId_ = threadId_; + if (referencedTensorBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + referencedTensor_ = java.util.Collections.unmodifiableList(referencedTensor_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.referencedTensor_ = referencedTensor_; + } else { + result.referencedTensor_ = referencedTensorBuilder_.build(); + } + if (memoryStatsBuilder_ == null) { + result.memoryStats_ = memoryStats_; + } else { + result.memoryStats_ = memoryStatsBuilder_.build(); + } + result.allStartNanos_ = allStartNanos_; + result.opStartRelNanos_ = opStartRelNanos_; + result.opEndRelNanos_ = opEndRelNanos_; + result.allEndRelNanos_ = allEndRelNanos_; + result.scheduledNanos_ = scheduledNanos_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.NodeExecStats) { + return mergeFrom((org.tensorflow.proto.framework.NodeExecStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.NodeExecStats other) { + if (other == org.tensorflow.proto.framework.NodeExecStats.getDefaultInstance()) return this; + if (!other.getNodeName().isEmpty()) { + nodeName_ = other.nodeName_; + onChanged(); + } + if (other.getAllStartMicros() != 0L) { + setAllStartMicros(other.getAllStartMicros()); + } + if (other.getOpStartRelMicros() != 0L) { + setOpStartRelMicros(other.getOpStartRelMicros()); + } + if (other.getOpEndRelMicros() != 0L) { + setOpEndRelMicros(other.getOpEndRelMicros()); + } + if (other.getAllEndRelMicros() != 0L) { + setAllEndRelMicros(other.getAllEndRelMicros()); + } + if (memoryBuilder_ == null) { + if (!other.memory_.isEmpty()) { + if (memory_.isEmpty()) { + memory_ = other.memory_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMemoryIsMutable(); + memory_.addAll(other.memory_); + } + onChanged(); + } + } else { + if (!other.memory_.isEmpty()) { + if (memoryBuilder_.isEmpty()) { + memoryBuilder_.dispose(); + memoryBuilder_ = null; + memory_ = other.memory_; + bitField0_ = (bitField0_ & ~0x00000001); + memoryBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMemoryFieldBuilder() : null; + } else { + memoryBuilder_.addAllMessages(other.memory_); + } + } + } + if (outputBuilder_ == null) { + if (!other.output_.isEmpty()) { + if (output_.isEmpty()) { + output_ = other.output_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureOutputIsMutable(); + output_.addAll(other.output_); + } + onChanged(); + } + } else { + if (!other.output_.isEmpty()) { + if (outputBuilder_.isEmpty()) { + outputBuilder_.dispose(); + outputBuilder_ = null; + output_ = other.output_; + bitField0_ = (bitField0_ & ~0x00000002); + outputBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOutputFieldBuilder() : null; + } else { + outputBuilder_.addAllMessages(other.output_); + } + } + } + if (!other.getTimelineLabel().isEmpty()) { + timelineLabel_ = other.timelineLabel_; + onChanged(); + } + if (other.getScheduledMicros() != 0L) { + setScheduledMicros(other.getScheduledMicros()); + } + if (other.getThreadId() != 0) { + setThreadId(other.getThreadId()); + } + if (referencedTensorBuilder_ == null) { + if (!other.referencedTensor_.isEmpty()) { + if (referencedTensor_.isEmpty()) { + referencedTensor_ = other.referencedTensor_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureReferencedTensorIsMutable(); + referencedTensor_.addAll(other.referencedTensor_); + } + onChanged(); + } + } else { + if (!other.referencedTensor_.isEmpty()) { + if (referencedTensorBuilder_.isEmpty()) { + referencedTensorBuilder_.dispose(); + referencedTensorBuilder_ = null; + referencedTensor_ = other.referencedTensor_; + bitField0_ = (bitField0_ & ~0x00000004); + referencedTensorBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getReferencedTensorFieldBuilder() : null; + } else { + referencedTensorBuilder_.addAllMessages(other.referencedTensor_); + } + } + } + if (other.hasMemoryStats()) { + mergeMemoryStats(other.getMemoryStats()); + } + if (other.getAllStartNanos() != 0L) { + setAllStartNanos(other.getAllStartNanos()); + } + if (other.getOpStartRelNanos() != 0L) { + setOpStartRelNanos(other.getOpStartRelNanos()); + } + if (other.getOpEndRelNanos() != 0L) { + setOpEndRelNanos(other.getOpEndRelNanos()); + } + if (other.getAllEndRelNanos() != 0L) { + setAllEndRelNanos(other.getAllEndRelNanos()); + } + if (other.getScheduledNanos() != 0L) { + setScheduledNanos(other.getScheduledNanos()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.NodeExecStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.NodeExecStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object nodeName_ = ""; + /** + *
+     * TODO(tucker): Use some more compact form of node identity than
+     * the full string name.  Either all processes should agree on a
+     * global id (cost_id?) for each node, or we should use a hash of
+     * the name.
+     * 
+ * + * string node_name = 1; + */ + public java.lang.String getNodeName() { + java.lang.Object ref = nodeName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * TODO(tucker): Use some more compact form of node identity than
+     * the full string name.  Either all processes should agree on a
+     * global id (cost_id?) for each node, or we should use a hash of
+     * the name.
+     * 
+ * + * string node_name = 1; + */ + public com.google.protobuf.ByteString + getNodeNameBytes() { + java.lang.Object ref = nodeName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nodeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * TODO(tucker): Use some more compact form of node identity than
+     * the full string name.  Either all processes should agree on a
+     * global id (cost_id?) for each node, or we should use a hash of
+     * the name.
+     * 
+ * + * string node_name = 1; + */ + public Builder setNodeName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nodeName_ = value; + onChanged(); + return this; + } + /** + *
+     * TODO(tucker): Use some more compact form of node identity than
+     * the full string name.  Either all processes should agree on a
+     * global id (cost_id?) for each node, or we should use a hash of
+     * the name.
+     * 
+ * + * string node_name = 1; + */ + public Builder clearNodeName() { + + nodeName_ = getDefaultInstance().getNodeName(); + onChanged(); + return this; + } + /** + *
+     * TODO(tucker): Use some more compact form of node identity than
+     * the full string name.  Either all processes should agree on a
+     * global id (cost_id?) for each node, or we should use a hash of
+     * the name.
+     * 
+ * + * string node_name = 1; + */ + public Builder setNodeNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nodeName_ = value; + onChanged(); + return this; + } + + private long allStartMicros_ ; + /** + * int64 all_start_micros = 2; + */ + public long getAllStartMicros() { + return allStartMicros_; + } + /** + * int64 all_start_micros = 2; + */ + public Builder setAllStartMicros(long value) { + + allStartMicros_ = value; + onChanged(); + return this; + } + /** + * int64 all_start_micros = 2; + */ + public Builder clearAllStartMicros() { + + allStartMicros_ = 0L; + onChanged(); + return this; + } + + private long opStartRelMicros_ ; + /** + * int64 op_start_rel_micros = 3; + */ + public long getOpStartRelMicros() { + return opStartRelMicros_; + } + /** + * int64 op_start_rel_micros = 3; + */ + public Builder setOpStartRelMicros(long value) { + + opStartRelMicros_ = value; + onChanged(); + return this; + } + /** + * int64 op_start_rel_micros = 3; + */ + public Builder clearOpStartRelMicros() { + + opStartRelMicros_ = 0L; + onChanged(); + return this; + } + + private long opEndRelMicros_ ; + /** + * int64 op_end_rel_micros = 4; + */ + public long getOpEndRelMicros() { + return opEndRelMicros_; + } + /** + * int64 op_end_rel_micros = 4; + */ + public Builder setOpEndRelMicros(long value) { + + opEndRelMicros_ = value; + onChanged(); + return this; + } + /** + * int64 op_end_rel_micros = 4; + */ + public Builder clearOpEndRelMicros() { + + opEndRelMicros_ = 0L; + onChanged(); + return this; + } + + private long allEndRelMicros_ ; + /** + * int64 all_end_rel_micros = 5; + */ + public long getAllEndRelMicros() { + return allEndRelMicros_; + } + /** + * int64 all_end_rel_micros = 5; + */ + public Builder setAllEndRelMicros(long value) { + + allEndRelMicros_ = value; + onChanged(); + return this; + } + /** + * int64 all_end_rel_micros = 5; + */ + public Builder clearAllEndRelMicros() { + + allEndRelMicros_ = 0L; + onChanged(); + return this; + } + + private java.util.List memory_ = + java.util.Collections.emptyList(); + private void ensureMemoryIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + memory_ = new java.util.ArrayList(memory_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.AllocatorMemoryUsed, org.tensorflow.proto.framework.AllocatorMemoryUsed.Builder, org.tensorflow.proto.framework.AllocatorMemoryUsedOrBuilder> memoryBuilder_; + + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public java.util.List getMemoryList() { + if (memoryBuilder_ == null) { + return java.util.Collections.unmodifiableList(memory_); + } else { + return memoryBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public int getMemoryCount() { + if (memoryBuilder_ == null) { + return memory_.size(); + } else { + return memoryBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public org.tensorflow.proto.framework.AllocatorMemoryUsed getMemory(int index) { + if (memoryBuilder_ == null) { + return memory_.get(index); + } else { + return memoryBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public Builder setMemory( + int index, org.tensorflow.proto.framework.AllocatorMemoryUsed value) { + if (memoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMemoryIsMutable(); + memory_.set(index, value); + onChanged(); + } else { + memoryBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public Builder setMemory( + int index, org.tensorflow.proto.framework.AllocatorMemoryUsed.Builder builderForValue) { + if (memoryBuilder_ == null) { + ensureMemoryIsMutable(); + memory_.set(index, builderForValue.build()); + onChanged(); + } else { + memoryBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public Builder addMemory(org.tensorflow.proto.framework.AllocatorMemoryUsed value) { + if (memoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMemoryIsMutable(); + memory_.add(value); + onChanged(); + } else { + memoryBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public Builder addMemory( + int index, org.tensorflow.proto.framework.AllocatorMemoryUsed value) { + if (memoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMemoryIsMutable(); + memory_.add(index, value); + onChanged(); + } else { + memoryBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public Builder addMemory( + org.tensorflow.proto.framework.AllocatorMemoryUsed.Builder builderForValue) { + if (memoryBuilder_ == null) { + ensureMemoryIsMutable(); + memory_.add(builderForValue.build()); + onChanged(); + } else { + memoryBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public Builder addMemory( + int index, org.tensorflow.proto.framework.AllocatorMemoryUsed.Builder builderForValue) { + if (memoryBuilder_ == null) { + ensureMemoryIsMutable(); + memory_.add(index, builderForValue.build()); + onChanged(); + } else { + memoryBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public Builder addAllMemory( + java.lang.Iterable values) { + if (memoryBuilder_ == null) { + ensureMemoryIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, memory_); + onChanged(); + } else { + memoryBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public Builder clearMemory() { + if (memoryBuilder_ == null) { + memory_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + memoryBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public Builder removeMemory(int index) { + if (memoryBuilder_ == null) { + ensureMemoryIsMutable(); + memory_.remove(index); + onChanged(); + } else { + memoryBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public org.tensorflow.proto.framework.AllocatorMemoryUsed.Builder getMemoryBuilder( + int index) { + return getMemoryFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public org.tensorflow.proto.framework.AllocatorMemoryUsedOrBuilder getMemoryOrBuilder( + int index) { + if (memoryBuilder_ == null) { + return memory_.get(index); } else { + return memoryBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public java.util.List + getMemoryOrBuilderList() { + if (memoryBuilder_ != null) { + return memoryBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(memory_); + } + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public org.tensorflow.proto.framework.AllocatorMemoryUsed.Builder addMemoryBuilder() { + return getMemoryFieldBuilder().addBuilder( + org.tensorflow.proto.framework.AllocatorMemoryUsed.getDefaultInstance()); + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public org.tensorflow.proto.framework.AllocatorMemoryUsed.Builder addMemoryBuilder( + int index) { + return getMemoryFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.AllocatorMemoryUsed.getDefaultInstance()); + } + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + public java.util.List + getMemoryBuilderList() { + return getMemoryFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.AllocatorMemoryUsed, org.tensorflow.proto.framework.AllocatorMemoryUsed.Builder, org.tensorflow.proto.framework.AllocatorMemoryUsedOrBuilder> + getMemoryFieldBuilder() { + if (memoryBuilder_ == null) { + memoryBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.AllocatorMemoryUsed, org.tensorflow.proto.framework.AllocatorMemoryUsed.Builder, org.tensorflow.proto.framework.AllocatorMemoryUsedOrBuilder>( + memory_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + memory_ = null; + } + return memoryBuilder_; + } + + private java.util.List output_ = + java.util.Collections.emptyList(); + private void ensureOutputIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + output_ = new java.util.ArrayList(output_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.NodeOutput, org.tensorflow.proto.framework.NodeOutput.Builder, org.tensorflow.proto.framework.NodeOutputOrBuilder> outputBuilder_; + + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public java.util.List getOutputList() { + if (outputBuilder_ == null) { + return java.util.Collections.unmodifiableList(output_); + } else { + return outputBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public int getOutputCount() { + if (outputBuilder_ == null) { + return output_.size(); + } else { + return outputBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public org.tensorflow.proto.framework.NodeOutput getOutput(int index) { + if (outputBuilder_ == null) { + return output_.get(index); + } else { + return outputBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public Builder setOutput( + int index, org.tensorflow.proto.framework.NodeOutput value) { + if (outputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputIsMutable(); + output_.set(index, value); + onChanged(); + } else { + outputBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public Builder setOutput( + int index, org.tensorflow.proto.framework.NodeOutput.Builder builderForValue) { + if (outputBuilder_ == null) { + ensureOutputIsMutable(); + output_.set(index, builderForValue.build()); + onChanged(); + } else { + outputBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public Builder addOutput(org.tensorflow.proto.framework.NodeOutput value) { + if (outputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputIsMutable(); + output_.add(value); + onChanged(); + } else { + outputBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public Builder addOutput( + int index, org.tensorflow.proto.framework.NodeOutput value) { + if (outputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputIsMutable(); + output_.add(index, value); + onChanged(); + } else { + outputBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public Builder addOutput( + org.tensorflow.proto.framework.NodeOutput.Builder builderForValue) { + if (outputBuilder_ == null) { + ensureOutputIsMutable(); + output_.add(builderForValue.build()); + onChanged(); + } else { + outputBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public Builder addOutput( + int index, org.tensorflow.proto.framework.NodeOutput.Builder builderForValue) { + if (outputBuilder_ == null) { + ensureOutputIsMutable(); + output_.add(index, builderForValue.build()); + onChanged(); + } else { + outputBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public Builder addAllOutput( + java.lang.Iterable values) { + if (outputBuilder_ == null) { + ensureOutputIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, output_); + onChanged(); + } else { + outputBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public Builder clearOutput() { + if (outputBuilder_ == null) { + output_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + outputBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public Builder removeOutput(int index) { + if (outputBuilder_ == null) { + ensureOutputIsMutable(); + output_.remove(index); + onChanged(); + } else { + outputBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public org.tensorflow.proto.framework.NodeOutput.Builder getOutputBuilder( + int index) { + return getOutputFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public org.tensorflow.proto.framework.NodeOutputOrBuilder getOutputOrBuilder( + int index) { + if (outputBuilder_ == null) { + return output_.get(index); } else { + return outputBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public java.util.List + getOutputOrBuilderList() { + if (outputBuilder_ != null) { + return outputBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(output_); + } + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public org.tensorflow.proto.framework.NodeOutput.Builder addOutputBuilder() { + return getOutputFieldBuilder().addBuilder( + org.tensorflow.proto.framework.NodeOutput.getDefaultInstance()); + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public org.tensorflow.proto.framework.NodeOutput.Builder addOutputBuilder( + int index) { + return getOutputFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.NodeOutput.getDefaultInstance()); + } + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + public java.util.List + getOutputBuilderList() { + return getOutputFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.NodeOutput, org.tensorflow.proto.framework.NodeOutput.Builder, org.tensorflow.proto.framework.NodeOutputOrBuilder> + getOutputFieldBuilder() { + if (outputBuilder_ == null) { + outputBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.NodeOutput, org.tensorflow.proto.framework.NodeOutput.Builder, org.tensorflow.proto.framework.NodeOutputOrBuilder>( + output_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + output_ = null; + } + return outputBuilder_; + } + + private java.lang.Object timelineLabel_ = ""; + /** + * string timeline_label = 8; + */ + public java.lang.String getTimelineLabel() { + java.lang.Object ref = timelineLabel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timelineLabel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string timeline_label = 8; + */ + public com.google.protobuf.ByteString + getTimelineLabelBytes() { + java.lang.Object ref = timelineLabel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + timelineLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string timeline_label = 8; + */ + public Builder setTimelineLabel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + timelineLabel_ = value; + onChanged(); + return this; + } + /** + * string timeline_label = 8; + */ + public Builder clearTimelineLabel() { + + timelineLabel_ = getDefaultInstance().getTimelineLabel(); + onChanged(); + return this; + } + /** + * string timeline_label = 8; + */ + public Builder setTimelineLabelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + timelineLabel_ = value; + onChanged(); + return this; + } + + private long scheduledMicros_ ; + /** + * int64 scheduled_micros = 9; + */ + public long getScheduledMicros() { + return scheduledMicros_; + } + /** + * int64 scheduled_micros = 9; + */ + public Builder setScheduledMicros(long value) { + + scheduledMicros_ = value; + onChanged(); + return this; + } + /** + * int64 scheduled_micros = 9; + */ + public Builder clearScheduledMicros() { + + scheduledMicros_ = 0L; + onChanged(); + return this; + } + + private int threadId_ ; + /** + * uint32 thread_id = 10; + */ + public int getThreadId() { + return threadId_; + } + /** + * uint32 thread_id = 10; + */ + public Builder setThreadId(int value) { + + threadId_ = value; + onChanged(); + return this; + } + /** + * uint32 thread_id = 10; + */ + public Builder clearThreadId() { + + threadId_ = 0; + onChanged(); + return this; + } + + private java.util.List referencedTensor_ = + java.util.Collections.emptyList(); + private void ensureReferencedTensorIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + referencedTensor_ = new java.util.ArrayList(referencedTensor_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.AllocationDescription, org.tensorflow.proto.framework.AllocationDescription.Builder, org.tensorflow.proto.framework.AllocationDescriptionOrBuilder> referencedTensorBuilder_; + + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public java.util.List getReferencedTensorList() { + if (referencedTensorBuilder_ == null) { + return java.util.Collections.unmodifiableList(referencedTensor_); + } else { + return referencedTensorBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public int getReferencedTensorCount() { + if (referencedTensorBuilder_ == null) { + return referencedTensor_.size(); + } else { + return referencedTensorBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public org.tensorflow.proto.framework.AllocationDescription getReferencedTensor(int index) { + if (referencedTensorBuilder_ == null) { + return referencedTensor_.get(index); + } else { + return referencedTensorBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public Builder setReferencedTensor( + int index, org.tensorflow.proto.framework.AllocationDescription value) { + if (referencedTensorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencedTensorIsMutable(); + referencedTensor_.set(index, value); + onChanged(); + } else { + referencedTensorBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public Builder setReferencedTensor( + int index, org.tensorflow.proto.framework.AllocationDescription.Builder builderForValue) { + if (referencedTensorBuilder_ == null) { + ensureReferencedTensorIsMutable(); + referencedTensor_.set(index, builderForValue.build()); + onChanged(); + } else { + referencedTensorBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public Builder addReferencedTensor(org.tensorflow.proto.framework.AllocationDescription value) { + if (referencedTensorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencedTensorIsMutable(); + referencedTensor_.add(value); + onChanged(); + } else { + referencedTensorBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public Builder addReferencedTensor( + int index, org.tensorflow.proto.framework.AllocationDescription value) { + if (referencedTensorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencedTensorIsMutable(); + referencedTensor_.add(index, value); + onChanged(); + } else { + referencedTensorBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public Builder addReferencedTensor( + org.tensorflow.proto.framework.AllocationDescription.Builder builderForValue) { + if (referencedTensorBuilder_ == null) { + ensureReferencedTensorIsMutable(); + referencedTensor_.add(builderForValue.build()); + onChanged(); + } else { + referencedTensorBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public Builder addReferencedTensor( + int index, org.tensorflow.proto.framework.AllocationDescription.Builder builderForValue) { + if (referencedTensorBuilder_ == null) { + ensureReferencedTensorIsMutable(); + referencedTensor_.add(index, builderForValue.build()); + onChanged(); + } else { + referencedTensorBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public Builder addAllReferencedTensor( + java.lang.Iterable values) { + if (referencedTensorBuilder_ == null) { + ensureReferencedTensorIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, referencedTensor_); + onChanged(); + } else { + referencedTensorBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public Builder clearReferencedTensor() { + if (referencedTensorBuilder_ == null) { + referencedTensor_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + referencedTensorBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public Builder removeReferencedTensor(int index) { + if (referencedTensorBuilder_ == null) { + ensureReferencedTensorIsMutable(); + referencedTensor_.remove(index); + onChanged(); + } else { + referencedTensorBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public org.tensorflow.proto.framework.AllocationDescription.Builder getReferencedTensorBuilder( + int index) { + return getReferencedTensorFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public org.tensorflow.proto.framework.AllocationDescriptionOrBuilder getReferencedTensorOrBuilder( + int index) { + if (referencedTensorBuilder_ == null) { + return referencedTensor_.get(index); } else { + return referencedTensorBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public java.util.List + getReferencedTensorOrBuilderList() { + if (referencedTensorBuilder_ != null) { + return referencedTensorBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(referencedTensor_); + } + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public org.tensorflow.proto.framework.AllocationDescription.Builder addReferencedTensorBuilder() { + return getReferencedTensorFieldBuilder().addBuilder( + org.tensorflow.proto.framework.AllocationDescription.getDefaultInstance()); + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public org.tensorflow.proto.framework.AllocationDescription.Builder addReferencedTensorBuilder( + int index) { + return getReferencedTensorFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.AllocationDescription.getDefaultInstance()); + } + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + public java.util.List + getReferencedTensorBuilderList() { + return getReferencedTensorFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.AllocationDescription, org.tensorflow.proto.framework.AllocationDescription.Builder, org.tensorflow.proto.framework.AllocationDescriptionOrBuilder> + getReferencedTensorFieldBuilder() { + if (referencedTensorBuilder_ == null) { + referencedTensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.AllocationDescription, org.tensorflow.proto.framework.AllocationDescription.Builder, org.tensorflow.proto.framework.AllocationDescriptionOrBuilder>( + referencedTensor_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + referencedTensor_ = null; + } + return referencedTensorBuilder_; + } + + private org.tensorflow.proto.framework.MemoryStats memoryStats_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.MemoryStats, org.tensorflow.proto.framework.MemoryStats.Builder, org.tensorflow.proto.framework.MemoryStatsOrBuilder> memoryStatsBuilder_; + /** + * .tensorflow.MemoryStats memory_stats = 12; + */ + public boolean hasMemoryStats() { + return memoryStatsBuilder_ != null || memoryStats_ != null; + } + /** + * .tensorflow.MemoryStats memory_stats = 12; + */ + public org.tensorflow.proto.framework.MemoryStats getMemoryStats() { + if (memoryStatsBuilder_ == null) { + return memoryStats_ == null ? org.tensorflow.proto.framework.MemoryStats.getDefaultInstance() : memoryStats_; + } else { + return memoryStatsBuilder_.getMessage(); + } + } + /** + * .tensorflow.MemoryStats memory_stats = 12; + */ + public Builder setMemoryStats(org.tensorflow.proto.framework.MemoryStats value) { + if (memoryStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + memoryStats_ = value; + onChanged(); + } else { + memoryStatsBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.MemoryStats memory_stats = 12; + */ + public Builder setMemoryStats( + org.tensorflow.proto.framework.MemoryStats.Builder builderForValue) { + if (memoryStatsBuilder_ == null) { + memoryStats_ = builderForValue.build(); + onChanged(); + } else { + memoryStatsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.MemoryStats memory_stats = 12; + */ + public Builder mergeMemoryStats(org.tensorflow.proto.framework.MemoryStats value) { + if (memoryStatsBuilder_ == null) { + if (memoryStats_ != null) { + memoryStats_ = + org.tensorflow.proto.framework.MemoryStats.newBuilder(memoryStats_).mergeFrom(value).buildPartial(); + } else { + memoryStats_ = value; + } + onChanged(); + } else { + memoryStatsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.MemoryStats memory_stats = 12; + */ + public Builder clearMemoryStats() { + if (memoryStatsBuilder_ == null) { + memoryStats_ = null; + onChanged(); + } else { + memoryStats_ = null; + memoryStatsBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.MemoryStats memory_stats = 12; + */ + public org.tensorflow.proto.framework.MemoryStats.Builder getMemoryStatsBuilder() { + + onChanged(); + return getMemoryStatsFieldBuilder().getBuilder(); + } + /** + * .tensorflow.MemoryStats memory_stats = 12; + */ + public org.tensorflow.proto.framework.MemoryStatsOrBuilder getMemoryStatsOrBuilder() { + if (memoryStatsBuilder_ != null) { + return memoryStatsBuilder_.getMessageOrBuilder(); + } else { + return memoryStats_ == null ? + org.tensorflow.proto.framework.MemoryStats.getDefaultInstance() : memoryStats_; + } + } + /** + * .tensorflow.MemoryStats memory_stats = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.MemoryStats, org.tensorflow.proto.framework.MemoryStats.Builder, org.tensorflow.proto.framework.MemoryStatsOrBuilder> + getMemoryStatsFieldBuilder() { + if (memoryStatsBuilder_ == null) { + memoryStatsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.MemoryStats, org.tensorflow.proto.framework.MemoryStats.Builder, org.tensorflow.proto.framework.MemoryStatsOrBuilder>( + getMemoryStats(), + getParentForChildren(), + isClean()); + memoryStats_ = null; + } + return memoryStatsBuilder_; + } + + private long allStartNanos_ ; + /** + * int64 all_start_nanos = 13; + */ + public long getAllStartNanos() { + return allStartNanos_; + } + /** + * int64 all_start_nanos = 13; + */ + public Builder setAllStartNanos(long value) { + + allStartNanos_ = value; + onChanged(); + return this; + } + /** + * int64 all_start_nanos = 13; + */ + public Builder clearAllStartNanos() { + + allStartNanos_ = 0L; + onChanged(); + return this; + } + + private long opStartRelNanos_ ; + /** + * int64 op_start_rel_nanos = 14; + */ + public long getOpStartRelNanos() { + return opStartRelNanos_; + } + /** + * int64 op_start_rel_nanos = 14; + */ + public Builder setOpStartRelNanos(long value) { + + opStartRelNanos_ = value; + onChanged(); + return this; + } + /** + * int64 op_start_rel_nanos = 14; + */ + public Builder clearOpStartRelNanos() { + + opStartRelNanos_ = 0L; + onChanged(); + return this; + } + + private long opEndRelNanos_ ; + /** + * int64 op_end_rel_nanos = 15; + */ + public long getOpEndRelNanos() { + return opEndRelNanos_; + } + /** + * int64 op_end_rel_nanos = 15; + */ + public Builder setOpEndRelNanos(long value) { + + opEndRelNanos_ = value; + onChanged(); + return this; + } + /** + * int64 op_end_rel_nanos = 15; + */ + public Builder clearOpEndRelNanos() { + + opEndRelNanos_ = 0L; + onChanged(); + return this; + } + + private long allEndRelNanos_ ; + /** + * int64 all_end_rel_nanos = 16; + */ + public long getAllEndRelNanos() { + return allEndRelNanos_; + } + /** + * int64 all_end_rel_nanos = 16; + */ + public Builder setAllEndRelNanos(long value) { + + allEndRelNanos_ = value; + onChanged(); + return this; + } + /** + * int64 all_end_rel_nanos = 16; + */ + public Builder clearAllEndRelNanos() { + + allEndRelNanos_ = 0L; + onChanged(); + return this; + } + + private long scheduledNanos_ ; + /** + * int64 scheduled_nanos = 17; + */ + public long getScheduledNanos() { + return scheduledNanos_; + } + /** + * int64 scheduled_nanos = 17; + */ + public Builder setScheduledNanos(long value) { + + scheduledNanos_ = value; + onChanged(); + return this; + } + /** + * int64 scheduled_nanos = 17; + */ + public Builder clearScheduledNanos() { + + scheduledNanos_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.NodeExecStats) + } + + // @@protoc_insertion_point(class_scope:tensorflow.NodeExecStats) + private static final org.tensorflow.proto.framework.NodeExecStats DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.NodeExecStats(); + } + + public static org.tensorflow.proto.framework.NodeExecStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NodeExecStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NodeExecStats(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NodeExecStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeExecStatsOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeExecStatsOrBuilder.java new file mode 100644 index 00000000000..60be2e49270 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeExecStatsOrBuilder.java @@ -0,0 +1,183 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/step_stats.proto + +package org.tensorflow.proto.framework; + +public interface NodeExecStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.NodeExecStats) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * TODO(tucker): Use some more compact form of node identity than
+   * the full string name.  Either all processes should agree on a
+   * global id (cost_id?) for each node, or we should use a hash of
+   * the name.
+   * 
+ * + * string node_name = 1; + */ + java.lang.String getNodeName(); + /** + *
+   * TODO(tucker): Use some more compact form of node identity than
+   * the full string name.  Either all processes should agree on a
+   * global id (cost_id?) for each node, or we should use a hash of
+   * the name.
+   * 
+ * + * string node_name = 1; + */ + com.google.protobuf.ByteString + getNodeNameBytes(); + + /** + * int64 all_start_micros = 2; + */ + long getAllStartMicros(); + + /** + * int64 op_start_rel_micros = 3; + */ + long getOpStartRelMicros(); + + /** + * int64 op_end_rel_micros = 4; + */ + long getOpEndRelMicros(); + + /** + * int64 all_end_rel_micros = 5; + */ + long getAllEndRelMicros(); + + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + java.util.List + getMemoryList(); + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + org.tensorflow.proto.framework.AllocatorMemoryUsed getMemory(int index); + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + int getMemoryCount(); + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + java.util.List + getMemoryOrBuilderList(); + /** + * repeated .tensorflow.AllocatorMemoryUsed memory = 6; + */ + org.tensorflow.proto.framework.AllocatorMemoryUsedOrBuilder getMemoryOrBuilder( + int index); + + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + java.util.List + getOutputList(); + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + org.tensorflow.proto.framework.NodeOutput getOutput(int index); + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + int getOutputCount(); + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + java.util.List + getOutputOrBuilderList(); + /** + * repeated .tensorflow.NodeOutput output = 7; + */ + org.tensorflow.proto.framework.NodeOutputOrBuilder getOutputOrBuilder( + int index); + + /** + * string timeline_label = 8; + */ + java.lang.String getTimelineLabel(); + /** + * string timeline_label = 8; + */ + com.google.protobuf.ByteString + getTimelineLabelBytes(); + + /** + * int64 scheduled_micros = 9; + */ + long getScheduledMicros(); + + /** + * uint32 thread_id = 10; + */ + int getThreadId(); + + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + java.util.List + getReferencedTensorList(); + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + org.tensorflow.proto.framework.AllocationDescription getReferencedTensor(int index); + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + int getReferencedTensorCount(); + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + java.util.List + getReferencedTensorOrBuilderList(); + /** + * repeated .tensorflow.AllocationDescription referenced_tensor = 11; + */ + org.tensorflow.proto.framework.AllocationDescriptionOrBuilder getReferencedTensorOrBuilder( + int index); + + /** + * .tensorflow.MemoryStats memory_stats = 12; + */ + boolean hasMemoryStats(); + /** + * .tensorflow.MemoryStats memory_stats = 12; + */ + org.tensorflow.proto.framework.MemoryStats getMemoryStats(); + /** + * .tensorflow.MemoryStats memory_stats = 12; + */ + org.tensorflow.proto.framework.MemoryStatsOrBuilder getMemoryStatsOrBuilder(); + + /** + * int64 all_start_nanos = 13; + */ + long getAllStartNanos(); + + /** + * int64 op_start_rel_nanos = 14; + */ + long getOpStartRelNanos(); + + /** + * int64 op_end_rel_nanos = 15; + */ + long getOpEndRelNanos(); + + /** + * int64 all_end_rel_nanos = 16; + */ + long getAllEndRelNanos(); + + /** + * int64 scheduled_nanos = 17; + */ + long getScheduledNanos(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeOutput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeOutput.java new file mode 100644 index 00000000000..c6e38aaec46 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeOutput.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/step_stats.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Output sizes recorded for a single execution of a graph node.
+ * 
+ * + * Protobuf type {@code tensorflow.NodeOutput} + */ +public final class NodeOutput extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.NodeOutput) + NodeOutputOrBuilder { +private static final long serialVersionUID = 0L; + // Use NodeOutput.newBuilder() to construct. + private NodeOutput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NodeOutput() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NodeOutput(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NodeOutput( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + slot_ = input.readInt32(); + break; + } + case 26: { + org.tensorflow.proto.framework.TensorDescription.Builder subBuilder = null; + if (tensorDescription_ != null) { + subBuilder = tensorDescription_.toBuilder(); + } + tensorDescription_ = input.readMessage(org.tensorflow.proto.framework.TensorDescription.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tensorDescription_); + tensorDescription_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_NodeOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_NodeOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NodeOutput.class, org.tensorflow.proto.framework.NodeOutput.Builder.class); + } + + public static final int SLOT_FIELD_NUMBER = 1; + private int slot_; + /** + * int32 slot = 1; + */ + public int getSlot() { + return slot_; + } + + public static final int TENSOR_DESCRIPTION_FIELD_NUMBER = 3; + private org.tensorflow.proto.framework.TensorDescription tensorDescription_; + /** + * .tensorflow.TensorDescription tensor_description = 3; + */ + public boolean hasTensorDescription() { + return tensorDescription_ != null; + } + /** + * .tensorflow.TensorDescription tensor_description = 3; + */ + public org.tensorflow.proto.framework.TensorDescription getTensorDescription() { + return tensorDescription_ == null ? org.tensorflow.proto.framework.TensorDescription.getDefaultInstance() : tensorDescription_; + } + /** + * .tensorflow.TensorDescription tensor_description = 3; + */ + public org.tensorflow.proto.framework.TensorDescriptionOrBuilder getTensorDescriptionOrBuilder() { + return getTensorDescription(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (slot_ != 0) { + output.writeInt32(1, slot_); + } + if (tensorDescription_ != null) { + output.writeMessage(3, getTensorDescription()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (slot_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, slot_); + } + if (tensorDescription_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getTensorDescription()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.NodeOutput)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.NodeOutput other = (org.tensorflow.proto.framework.NodeOutput) obj; + + if (getSlot() + != other.getSlot()) return false; + if (hasTensorDescription() != other.hasTensorDescription()) return false; + if (hasTensorDescription()) { + if (!getTensorDescription() + .equals(other.getTensorDescription())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SLOT_FIELD_NUMBER; + hash = (53 * hash) + getSlot(); + if (hasTensorDescription()) { + hash = (37 * hash) + TENSOR_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getTensorDescription().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.NodeOutput parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NodeOutput parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeOutput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NodeOutput parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeOutput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NodeOutput parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeOutput parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NodeOutput parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeOutput parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NodeOutput parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NodeOutput parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NodeOutput parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.NodeOutput prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Output sizes recorded for a single execution of a graph node.
+   * 
+ * + * Protobuf type {@code tensorflow.NodeOutput} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.NodeOutput) + org.tensorflow.proto.framework.NodeOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_NodeOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_NodeOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NodeOutput.class, org.tensorflow.proto.framework.NodeOutput.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.NodeOutput.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + slot_ = 0; + + if (tensorDescriptionBuilder_ == null) { + tensorDescription_ = null; + } else { + tensorDescription_ = null; + tensorDescriptionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_NodeOutput_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NodeOutput getDefaultInstanceForType() { + return org.tensorflow.proto.framework.NodeOutput.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.NodeOutput build() { + org.tensorflow.proto.framework.NodeOutput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NodeOutput buildPartial() { + org.tensorflow.proto.framework.NodeOutput result = new org.tensorflow.proto.framework.NodeOutput(this); + result.slot_ = slot_; + if (tensorDescriptionBuilder_ == null) { + result.tensorDescription_ = tensorDescription_; + } else { + result.tensorDescription_ = tensorDescriptionBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.NodeOutput) { + return mergeFrom((org.tensorflow.proto.framework.NodeOutput)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.NodeOutput other) { + if (other == org.tensorflow.proto.framework.NodeOutput.getDefaultInstance()) return this; + if (other.getSlot() != 0) { + setSlot(other.getSlot()); + } + if (other.hasTensorDescription()) { + mergeTensorDescription(other.getTensorDescription()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.NodeOutput parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.NodeOutput) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int slot_ ; + /** + * int32 slot = 1; + */ + public int getSlot() { + return slot_; + } + /** + * int32 slot = 1; + */ + public Builder setSlot(int value) { + + slot_ = value; + onChanged(); + return this; + } + /** + * int32 slot = 1; + */ + public Builder clearSlot() { + + slot_ = 0; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.TensorDescription tensorDescription_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorDescription, org.tensorflow.proto.framework.TensorDescription.Builder, org.tensorflow.proto.framework.TensorDescriptionOrBuilder> tensorDescriptionBuilder_; + /** + * .tensorflow.TensorDescription tensor_description = 3; + */ + public boolean hasTensorDescription() { + return tensorDescriptionBuilder_ != null || tensorDescription_ != null; + } + /** + * .tensorflow.TensorDescription tensor_description = 3; + */ + public org.tensorflow.proto.framework.TensorDescription getTensorDescription() { + if (tensorDescriptionBuilder_ == null) { + return tensorDescription_ == null ? org.tensorflow.proto.framework.TensorDescription.getDefaultInstance() : tensorDescription_; + } else { + return tensorDescriptionBuilder_.getMessage(); + } + } + /** + * .tensorflow.TensorDescription tensor_description = 3; + */ + public Builder setTensorDescription(org.tensorflow.proto.framework.TensorDescription value) { + if (tensorDescriptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tensorDescription_ = value; + onChanged(); + } else { + tensorDescriptionBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.TensorDescription tensor_description = 3; + */ + public Builder setTensorDescription( + org.tensorflow.proto.framework.TensorDescription.Builder builderForValue) { + if (tensorDescriptionBuilder_ == null) { + tensorDescription_ = builderForValue.build(); + onChanged(); + } else { + tensorDescriptionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.TensorDescription tensor_description = 3; + */ + public Builder mergeTensorDescription(org.tensorflow.proto.framework.TensorDescription value) { + if (tensorDescriptionBuilder_ == null) { + if (tensorDescription_ != null) { + tensorDescription_ = + org.tensorflow.proto.framework.TensorDescription.newBuilder(tensorDescription_).mergeFrom(value).buildPartial(); + } else { + tensorDescription_ = value; + } + onChanged(); + } else { + tensorDescriptionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.TensorDescription tensor_description = 3; + */ + public Builder clearTensorDescription() { + if (tensorDescriptionBuilder_ == null) { + tensorDescription_ = null; + onChanged(); + } else { + tensorDescription_ = null; + tensorDescriptionBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.TensorDescription tensor_description = 3; + */ + public org.tensorflow.proto.framework.TensorDescription.Builder getTensorDescriptionBuilder() { + + onChanged(); + return getTensorDescriptionFieldBuilder().getBuilder(); + } + /** + * .tensorflow.TensorDescription tensor_description = 3; + */ + public org.tensorflow.proto.framework.TensorDescriptionOrBuilder getTensorDescriptionOrBuilder() { + if (tensorDescriptionBuilder_ != null) { + return tensorDescriptionBuilder_.getMessageOrBuilder(); + } else { + return tensorDescription_ == null ? + org.tensorflow.proto.framework.TensorDescription.getDefaultInstance() : tensorDescription_; + } + } + /** + * .tensorflow.TensorDescription tensor_description = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorDescription, org.tensorflow.proto.framework.TensorDescription.Builder, org.tensorflow.proto.framework.TensorDescriptionOrBuilder> + getTensorDescriptionFieldBuilder() { + if (tensorDescriptionBuilder_ == null) { + tensorDescriptionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorDescription, org.tensorflow.proto.framework.TensorDescription.Builder, org.tensorflow.proto.framework.TensorDescriptionOrBuilder>( + getTensorDescription(), + getParentForChildren(), + isClean()); + tensorDescription_ = null; + } + return tensorDescriptionBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.NodeOutput) + } + + // @@protoc_insertion_point(class_scope:tensorflow.NodeOutput) + private static final org.tensorflow.proto.framework.NodeOutput DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.NodeOutput(); + } + + public static org.tensorflow.proto.framework.NodeOutput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NodeOutput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NodeOutput(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NodeOutput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeOutputOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeOutputOrBuilder.java new file mode 100644 index 00000000000..940f8defed7 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeOutputOrBuilder.java @@ -0,0 +1,27 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/step_stats.proto + +package org.tensorflow.proto.framework; + +public interface NodeOutputOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.NodeOutput) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 slot = 1; + */ + int getSlot(); + + /** + * .tensorflow.TensorDescription tensor_description = 3; + */ + boolean hasTensorDescription(); + /** + * .tensorflow.TensorDescription tensor_description = 3; + */ + org.tensorflow.proto.framework.TensorDescription getTensorDescription(); + /** + * .tensorflow.TensorDescription tensor_description = 3; + */ + org.tensorflow.proto.framework.TensorDescriptionOrBuilder getTensorDescriptionOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeProto.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeProto.java new file mode 100644 index 00000000000..ef4be3729ea --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NodeProto.java @@ -0,0 +1,84 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/node_def.proto + +package org.tensorflow.proto.framework; + +public final class NodeProto { + private NodeProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_NodeDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_NodeDef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_NodeDef_AttrEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_NodeDef_AttrEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_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/node_def.pro" + + "to\022\ntensorflow\032*tensorflow/core/framewor" + + "k/attr_value.proto\"\322\002\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\006devic" + + "e\030\004 \001(\t\022+\n\004attr\030\005 \003(\0132\035.tensorflow.NodeD" + + "ef.AttrEntry\022J\n\027experimental_debug_info\030" + + "\006 \001(\0132).tensorflow.NodeDef.ExperimentalD" + + "ebugInfo\032B\n\tAttrEntry\022\013\n\003key\030\001 \001(\t\022$\n\005va" + + "lue\030\002 \001(\0132\025.tensorflow.AttrValue:\0028\001\032Q\n\025" + + "ExperimentalDebugInfo\022\033\n\023original_node_n" + + "ames\030\001 \003(\t\022\033\n\023original_func_names\030\002 \003(\tB" + + "\201\001\n\036org.tensorflow.proto.frameworkB\tNode" + + "ProtoP\001ZOgithub.com/tensorflow/tensorflo" + + "w/tensorflow/go/core/framework/node_def_" + + "go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.AttrValueProtos.getDescriptor(), + }); + internal_static_tensorflow_NodeDef_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_NodeDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_NodeDef_descriptor, + new java.lang.String[] { "Name", "Op", "Input", "Device", "Attr", "ExperimentalDebugInfo", }); + internal_static_tensorflow_NodeDef_AttrEntry_descriptor = + internal_static_tensorflow_NodeDef_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_NodeDef_AttrEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_NodeDef_AttrEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_descriptor = + internal_static_tensorflow_NodeDef_descriptor.getNestedTypes().get(1); + internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_descriptor, + new java.lang.String[] { "OriginalNodeNames", "OriginalFuncNames", }); + org.tensorflow.proto.framework.AttrValueProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NoneValue.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NoneValue.java new file mode 100644 index 00000000000..7aaba25f2d2 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NoneValue.java @@ -0,0 +1,427 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/struct.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Represents None.
+ * 
+ * + * Protobuf type {@code tensorflow.NoneValue} + */ +public final class NoneValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.NoneValue) + NoneValueOrBuilder { +private static final long serialVersionUID = 0L; + // Use NoneValue.newBuilder() to construct. + private NoneValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NoneValue() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NoneValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NoneValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_NoneValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_NoneValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NoneValue.class, org.tensorflow.proto.framework.NoneValue.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.NoneValue)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.NoneValue other = (org.tensorflow.proto.framework.NoneValue) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.NoneValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NoneValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NoneValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NoneValue 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.proto.framework.NoneValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.NoneValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.NoneValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NoneValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NoneValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NoneValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.NoneValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.NoneValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.NoneValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents None.
+   * 
+ * + * Protobuf type {@code tensorflow.NoneValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.NoneValue) + org.tensorflow.proto.framework.NoneValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_NoneValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_NoneValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.NoneValue.class, org.tensorflow.proto.framework.NoneValue.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.NoneValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_NoneValue_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NoneValue getDefaultInstanceForType() { + return org.tensorflow.proto.framework.NoneValue.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.NoneValue build() { + org.tensorflow.proto.framework.NoneValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NoneValue buildPartial() { + org.tensorflow.proto.framework.NoneValue result = new org.tensorflow.proto.framework.NoneValue(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.NoneValue) { + return mergeFrom((org.tensorflow.proto.framework.NoneValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.NoneValue other) { + if (other == org.tensorflow.proto.framework.NoneValue.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.NoneValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.NoneValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.NoneValue) + } + + // @@protoc_insertion_point(class_scope:tensorflow.NoneValue) + private static final org.tensorflow.proto.framework.NoneValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.NoneValue(); + } + + public static org.tensorflow.proto.framework.NoneValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NoneValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NoneValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.NoneValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NoneValueOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NoneValueOrBuilder.java new file mode 100644 index 00000000000..3d720d0c269 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/NoneValueOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/struct.proto + +package org.tensorflow.proto.framework; + +public interface NoneValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.NoneValue) + com.google.protobuf.MessageOrBuilder { +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpDef.java new file mode 100644 index 00000000000..80839f48dcc --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpDef.java @@ -0,0 +1,6284 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/op_def.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Defines an operation. A NodeDef in a GraphDef specifies an Op by
+ * using the "op" field which should match the name of a OpDef.
+ * LINT.IfChange
+ * 
+ * + * Protobuf type {@code tensorflow.OpDef} + */ +public final class OpDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.OpDef) + OpDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use OpDef.newBuilder() to construct. + private OpDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OpDef() { + name_ = ""; + inputArg_ = java.util.Collections.emptyList(); + outputArg_ = java.util.Collections.emptyList(); + controlOutput_ = com.google.protobuf.LazyStringArrayList.EMPTY; + attr_ = java.util.Collections.emptyList(); + summary_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OpDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OpDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + inputArg_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + inputArg_.add( + input.readMessage(org.tensorflow.proto.framework.OpDef.ArgDef.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + outputArg_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + outputArg_.add( + input.readMessage(org.tensorflow.proto.framework.OpDef.ArgDef.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + attr_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + attr_.add( + input.readMessage(org.tensorflow.proto.framework.OpDef.AttrDef.parser(), extensionRegistry)); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + summary_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 66: { + org.tensorflow.proto.framework.OpDeprecation.Builder subBuilder = null; + if (deprecation_ != null) { + subBuilder = deprecation_.toBuilder(); + } + deprecation_ = input.readMessage(org.tensorflow.proto.framework.OpDeprecation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deprecation_); + deprecation_ = subBuilder.buildPartial(); + } + + break; + } + case 128: { + + isAggregate_ = input.readBool(); + break; + } + case 136: { + + isStateful_ = input.readBool(); + break; + } + case 144: { + + isCommutative_ = input.readBool(); + break; + } + case 152: { + + allowsUninitializedInput_ = input.readBool(); + break; + } + case 162: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + controlOutput_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + controlOutput_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + inputArg_ = java.util.Collections.unmodifiableList(inputArg_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + outputArg_ = java.util.Collections.unmodifiableList(outputArg_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + attr_ = java.util.Collections.unmodifiableList(attr_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + controlOutput_ = controlOutput_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.OpDef.class, org.tensorflow.proto.framework.OpDef.Builder.class); + } + + public interface ArgDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.OpDef.ArgDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
+     * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+     * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
+     * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Human readable description.
+     * 
+ * + * string description = 2; + */ + java.lang.String getDescription(); + /** + *
+     * Human readable description.
+     * 
+ * + * string description = 2; + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+     * Describes the type of one or more tensors that are accepted/produced
+     * by this input/output arg.  The only legal combinations are:
+     * * For a single tensor: either the "type" field is set or the
+     *   "type_attr" field is set to the name of an attr with type "type".
+     * * For a sequence of tensors with the same type: the "number_attr"
+     *   field will be set to the name of an attr with type "int", and
+     *   either the "type" or "type_attr" field will be set as for
+     *   single tensors.
+     * * For a sequence of tensors, the "type_list_attr" field will be set
+     *   to the name of an attr with type "list(type)".
+     * 
+ * + * .tensorflow.DataType type = 3; + */ + int getTypeValue(); + /** + *
+     * Describes the type of one or more tensors that are accepted/produced
+     * by this input/output arg.  The only legal combinations are:
+     * * For a single tensor: either the "type" field is set or the
+     *   "type_attr" field is set to the name of an attr with type "type".
+     * * For a sequence of tensors with the same type: the "number_attr"
+     *   field will be set to the name of an attr with type "int", and
+     *   either the "type" or "type_attr" field will be set as for
+     *   single tensors.
+     * * For a sequence of tensors, the "type_list_attr" field will be set
+     *   to the name of an attr with type "list(type)".
+     * 
+ * + * .tensorflow.DataType type = 3; + */ + org.tensorflow.proto.framework.DataType getType(); + + /** + *
+     * if specified, attr must have type "type"
+     * 
+ * + * string type_attr = 4; + */ + java.lang.String getTypeAttr(); + /** + *
+     * if specified, attr must have type "type"
+     * 
+ * + * string type_attr = 4; + */ + com.google.protobuf.ByteString + getTypeAttrBytes(); + + /** + *
+     * if specified, attr must have type "int"
+     * 
+ * + * string number_attr = 5; + */ + java.lang.String getNumberAttr(); + /** + *
+     * if specified, attr must have type "int"
+     * 
+ * + * string number_attr = 5; + */ + com.google.protobuf.ByteString + getNumberAttrBytes(); + + /** + *
+     * If specified, attr must have type "list(type)", and none of
+     * type, type_attr, and number_attr may be specified.
+     * 
+ * + * string type_list_attr = 6; + */ + java.lang.String getTypeListAttr(); + /** + *
+     * If specified, attr must have type "list(type)", and none of
+     * type, type_attr, and number_attr may be specified.
+     * 
+ * + * string type_list_attr = 6; + */ + com.google.protobuf.ByteString + getTypeListAttrBytes(); + + /** + *
+     * For inputs: if true, the inputs are required to be refs.
+     *   By default, inputs can be either refs or non-refs.
+     * For outputs: if true, outputs are refs, otherwise they are not.
+     * 
+ * + * bool is_ref = 16; + */ + boolean getIsRef(); + } + /** + *
+   * For describing inputs and outputs.
+   * 
+ * + * Protobuf type {@code tensorflow.OpDef.ArgDef} + */ + public static final class ArgDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.OpDef.ArgDef) + ArgDefOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArgDef.newBuilder() to construct. + private ArgDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ArgDef() { + name_ = ""; + description_ = ""; + type_ = 0; + typeAttr_ = ""; + numberAttr_ = ""; + typeListAttr_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ArgDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ArgDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 24: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + typeAttr_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + numberAttr_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + typeListAttr_ = s; + break; + } + case 128: { + + isRef_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDef_ArgDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDef_ArgDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.OpDef.ArgDef.class, org.tensorflow.proto.framework.OpDef.ArgDef.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
+     * 
+ * + * 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; + } + } + /** + *
+     * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
+     * 
+ * + * 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 DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + *
+     * Human readable description.
+     * 
+ * + * string description = 2; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+     * Human readable description.
+     * 
+ * + * string description = 2; + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_; + /** + *
+     * Describes the type of one or more tensors that are accepted/produced
+     * by this input/output arg.  The only legal combinations are:
+     * * For a single tensor: either the "type" field is set or the
+     *   "type_attr" field is set to the name of an attr with type "type".
+     * * For a sequence of tensors with the same type: the "number_attr"
+     *   field will be set to the name of an attr with type "int", and
+     *   either the "type" or "type_attr" field will be set as for
+     *   single tensors.
+     * * For a sequence of tensors, the "type_list_attr" field will be set
+     *   to the name of an attr with type "list(type)".
+     * 
+ * + * .tensorflow.DataType type = 3; + */ + public int getTypeValue() { + return type_; + } + /** + *
+     * Describes the type of one or more tensors that are accepted/produced
+     * by this input/output arg.  The only legal combinations are:
+     * * For a single tensor: either the "type" field is set or the
+     *   "type_attr" field is set to the name of an attr with type "type".
+     * * For a sequence of tensors with the same type: the "number_attr"
+     *   field will be set to the name of an attr with type "int", and
+     *   either the "type" or "type_attr" field will be set as for
+     *   single tensors.
+     * * For a sequence of tensors, the "type_list_attr" field will be set
+     *   to the name of an attr with type "list(type)".
+     * 
+ * + * .tensorflow.DataType type = 3; + */ + public org.tensorflow.proto.framework.DataType getType() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(type_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + + public static final int TYPE_ATTR_FIELD_NUMBER = 4; + private volatile java.lang.Object typeAttr_; + /** + *
+     * if specified, attr must have type "type"
+     * 
+ * + * string type_attr = 4; + */ + public java.lang.String getTypeAttr() { + java.lang.Object ref = typeAttr_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + typeAttr_ = s; + return s; + } + } + /** + *
+     * if specified, attr must have type "type"
+     * 
+ * + * string type_attr = 4; + */ + public com.google.protobuf.ByteString + getTypeAttrBytes() { + java.lang.Object ref = typeAttr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + typeAttr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NUMBER_ATTR_FIELD_NUMBER = 5; + private volatile java.lang.Object numberAttr_; + /** + *
+     * if specified, attr must have type "int"
+     * 
+ * + * string number_attr = 5; + */ + public java.lang.String getNumberAttr() { + java.lang.Object ref = numberAttr_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + numberAttr_ = s; + return s; + } + } + /** + *
+     * if specified, attr must have type "int"
+     * 
+ * + * string number_attr = 5; + */ + public com.google.protobuf.ByteString + getNumberAttrBytes() { + java.lang.Object ref = numberAttr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + numberAttr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_LIST_ATTR_FIELD_NUMBER = 6; + private volatile java.lang.Object typeListAttr_; + /** + *
+     * If specified, attr must have type "list(type)", and none of
+     * type, type_attr, and number_attr may be specified.
+     * 
+ * + * string type_list_attr = 6; + */ + public java.lang.String getTypeListAttr() { + java.lang.Object ref = typeListAttr_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + typeListAttr_ = s; + return s; + } + } + /** + *
+     * If specified, attr must have type "list(type)", and none of
+     * type, type_attr, and number_attr may be specified.
+     * 
+ * + * string type_list_attr = 6; + */ + public com.google.protobuf.ByteString + getTypeListAttrBytes() { + java.lang.Object ref = typeListAttr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + typeListAttr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_REF_FIELD_NUMBER = 16; + private boolean isRef_; + /** + *
+     * For inputs: if true, the inputs are required to be refs.
+     *   By default, inputs can be either refs or non-refs.
+     * For outputs: if true, outputs are refs, otherwise they are not.
+     * 
+ * + * bool is_ref = 16; + */ + public boolean getIsRef() { + return isRef_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (type_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + output.writeEnum(3, type_); + } + if (!getTypeAttrBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, typeAttr_); + } + if (!getNumberAttrBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, numberAttr_); + } + if (!getTypeListAttrBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, typeListAttr_); + } + if (isRef_ != false) { + output.writeBool(16, isRef_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (type_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, type_); + } + if (!getTypeAttrBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, typeAttr_); + } + if (!getNumberAttrBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, numberAttr_); + } + if (!getTypeListAttrBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, typeListAttr_); + } + if (isRef_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(16, isRef_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.OpDef.ArgDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.OpDef.ArgDef other = (org.tensorflow.proto.framework.OpDef.ArgDef) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (type_ != other.type_) return false; + if (!getTypeAttr() + .equals(other.getTypeAttr())) return false; + if (!getNumberAttr() + .equals(other.getNumberAttr())) return false; + if (!getTypeListAttr() + .equals(other.getTypeListAttr())) return false; + if (getIsRef() + != other.getIsRef()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + TYPE_ATTR_FIELD_NUMBER; + hash = (53 * hash) + getTypeAttr().hashCode(); + hash = (37 * hash) + NUMBER_ATTR_FIELD_NUMBER; + hash = (53 * hash) + getNumberAttr().hashCode(); + hash = (37 * hash) + TYPE_LIST_ATTR_FIELD_NUMBER; + hash = (53 * hash) + getTypeListAttr().hashCode(); + hash = (37 * hash) + IS_REF_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsRef()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.OpDef.ArgDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OpDef.ArgDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDef.ArgDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OpDef.ArgDef parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDef.ArgDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OpDef.ArgDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDef.ArgDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OpDef.ArgDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDef.ArgDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OpDef.ArgDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDef.ArgDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OpDef.ArgDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.OpDef.ArgDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * For describing inputs and outputs.
+     * 
+ * + * Protobuf type {@code tensorflow.OpDef.ArgDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.OpDef.ArgDef) + org.tensorflow.proto.framework.OpDef.ArgDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDef_ArgDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDef_ArgDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.OpDef.ArgDef.class, org.tensorflow.proto.framework.OpDef.ArgDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.OpDef.ArgDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + type_ = 0; + + typeAttr_ = ""; + + numberAttr_ = ""; + + typeListAttr_ = ""; + + isRef_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDef_ArgDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpDef.ArgDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.OpDef.ArgDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpDef.ArgDef build() { + org.tensorflow.proto.framework.OpDef.ArgDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpDef.ArgDef buildPartial() { + org.tensorflow.proto.framework.OpDef.ArgDef result = new org.tensorflow.proto.framework.OpDef.ArgDef(this); + result.name_ = name_; + result.description_ = description_; + result.type_ = type_; + result.typeAttr_ = typeAttr_; + result.numberAttr_ = numberAttr_; + result.typeListAttr_ = typeListAttr_; + result.isRef_ = isRef_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.OpDef.ArgDef) { + return mergeFrom((org.tensorflow.proto.framework.OpDef.ArgDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.OpDef.ArgDef other) { + if (other == org.tensorflow.proto.framework.OpDef.ArgDef.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getTypeAttr().isEmpty()) { + typeAttr_ = other.typeAttr_; + onChanged(); + } + if (!other.getNumberAttr().isEmpty()) { + numberAttr_ = other.numberAttr_; + onChanged(); + } + if (!other.getTypeListAttr().isEmpty()) { + typeListAttr_ = other.typeListAttr_; + onChanged(); + } + if (other.getIsRef() != false) { + setIsRef(other.getIsRef()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.OpDef.ArgDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.OpDef.ArgDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
+       * 
+ * + * 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; + } + } + /** + *
+       * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
+       * 
+ * + * 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; + } + } + /** + *
+       * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
+       * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
+       * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
+       * 
+ * + * 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 description_ = ""; + /** + *
+       * Human readable description.
+       * 
+ * + * string description = 2; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Human readable description.
+       * 
+ * + * string description = 2; + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Human readable description.
+       * 
+ * + * string description = 2; + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+       * Human readable description.
+       * 
+ * + * string description = 2; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+       * Human readable description.
+       * 
+ * + * string description = 2; + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + *
+       * Describes the type of one or more tensors that are accepted/produced
+       * by this input/output arg.  The only legal combinations are:
+       * * For a single tensor: either the "type" field is set or the
+       *   "type_attr" field is set to the name of an attr with type "type".
+       * * For a sequence of tensors with the same type: the "number_attr"
+       *   field will be set to the name of an attr with type "int", and
+       *   either the "type" or "type_attr" field will be set as for
+       *   single tensors.
+       * * For a sequence of tensors, the "type_list_attr" field will be set
+       *   to the name of an attr with type "list(type)".
+       * 
+ * + * .tensorflow.DataType type = 3; + */ + public int getTypeValue() { + return type_; + } + /** + *
+       * Describes the type of one or more tensors that are accepted/produced
+       * by this input/output arg.  The only legal combinations are:
+       * * For a single tensor: either the "type" field is set or the
+       *   "type_attr" field is set to the name of an attr with type "type".
+       * * For a sequence of tensors with the same type: the "number_attr"
+       *   field will be set to the name of an attr with type "int", and
+       *   either the "type" or "type_attr" field will be set as for
+       *   single tensors.
+       * * For a sequence of tensors, the "type_list_attr" field will be set
+       *   to the name of an attr with type "list(type)".
+       * 
+ * + * .tensorflow.DataType type = 3; + */ + public Builder setTypeValue(int value) { + type_ = value; + onChanged(); + return this; + } + /** + *
+       * Describes the type of one or more tensors that are accepted/produced
+       * by this input/output arg.  The only legal combinations are:
+       * * For a single tensor: either the "type" field is set or the
+       *   "type_attr" field is set to the name of an attr with type "type".
+       * * For a sequence of tensors with the same type: the "number_attr"
+       *   field will be set to the name of an attr with type "int", and
+       *   either the "type" or "type_attr" field will be set as for
+       *   single tensors.
+       * * For a sequence of tensors, the "type_list_attr" field will be set
+       *   to the name of an attr with type "list(type)".
+       * 
+ * + * .tensorflow.DataType type = 3; + */ + public org.tensorflow.proto.framework.DataType getType() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(type_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + /** + *
+       * Describes the type of one or more tensors that are accepted/produced
+       * by this input/output arg.  The only legal combinations are:
+       * * For a single tensor: either the "type" field is set or the
+       *   "type_attr" field is set to the name of an attr with type "type".
+       * * For a sequence of tensors with the same type: the "number_attr"
+       *   field will be set to the name of an attr with type "int", and
+       *   either the "type" or "type_attr" field will be set as for
+       *   single tensors.
+       * * For a sequence of tensors, the "type_list_attr" field will be set
+       *   to the name of an attr with type "list(type)".
+       * 
+ * + * .tensorflow.DataType type = 3; + */ + public Builder setType(org.tensorflow.proto.framework.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Describes the type of one or more tensors that are accepted/produced
+       * by this input/output arg.  The only legal combinations are:
+       * * For a single tensor: either the "type" field is set or the
+       *   "type_attr" field is set to the name of an attr with type "type".
+       * * For a sequence of tensors with the same type: the "number_attr"
+       *   field will be set to the name of an attr with type "int", and
+       *   either the "type" or "type_attr" field will be set as for
+       *   single tensors.
+       * * For a sequence of tensors, the "type_list_attr" field will be set
+       *   to the name of an attr with type "list(type)".
+       * 
+ * + * .tensorflow.DataType type = 3; + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object typeAttr_ = ""; + /** + *
+       * if specified, attr must have type "type"
+       * 
+ * + * string type_attr = 4; + */ + public java.lang.String getTypeAttr() { + java.lang.Object ref = typeAttr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + typeAttr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * if specified, attr must have type "type"
+       * 
+ * + * string type_attr = 4; + */ + public com.google.protobuf.ByteString + getTypeAttrBytes() { + java.lang.Object ref = typeAttr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + typeAttr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * if specified, attr must have type "type"
+       * 
+ * + * string type_attr = 4; + */ + public Builder setTypeAttr( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + typeAttr_ = value; + onChanged(); + return this; + } + /** + *
+       * if specified, attr must have type "type"
+       * 
+ * + * string type_attr = 4; + */ + public Builder clearTypeAttr() { + + typeAttr_ = getDefaultInstance().getTypeAttr(); + onChanged(); + return this; + } + /** + *
+       * if specified, attr must have type "type"
+       * 
+ * + * string type_attr = 4; + */ + public Builder setTypeAttrBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + typeAttr_ = value; + onChanged(); + return this; + } + + private java.lang.Object numberAttr_ = ""; + /** + *
+       * if specified, attr must have type "int"
+       * 
+ * + * string number_attr = 5; + */ + public java.lang.String getNumberAttr() { + java.lang.Object ref = numberAttr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + numberAttr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * if specified, attr must have type "int"
+       * 
+ * + * string number_attr = 5; + */ + public com.google.protobuf.ByteString + getNumberAttrBytes() { + java.lang.Object ref = numberAttr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + numberAttr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * if specified, attr must have type "int"
+       * 
+ * + * string number_attr = 5; + */ + public Builder setNumberAttr( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + numberAttr_ = value; + onChanged(); + return this; + } + /** + *
+       * if specified, attr must have type "int"
+       * 
+ * + * string number_attr = 5; + */ + public Builder clearNumberAttr() { + + numberAttr_ = getDefaultInstance().getNumberAttr(); + onChanged(); + return this; + } + /** + *
+       * if specified, attr must have type "int"
+       * 
+ * + * string number_attr = 5; + */ + public Builder setNumberAttrBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + numberAttr_ = value; + onChanged(); + return this; + } + + private java.lang.Object typeListAttr_ = ""; + /** + *
+       * If specified, attr must have type "list(type)", and none of
+       * type, type_attr, and number_attr may be specified.
+       * 
+ * + * string type_list_attr = 6; + */ + public java.lang.String getTypeListAttr() { + java.lang.Object ref = typeListAttr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + typeListAttr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * If specified, attr must have type "list(type)", and none of
+       * type, type_attr, and number_attr may be specified.
+       * 
+ * + * string type_list_attr = 6; + */ + public com.google.protobuf.ByteString + getTypeListAttrBytes() { + java.lang.Object ref = typeListAttr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + typeListAttr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * If specified, attr must have type "list(type)", and none of
+       * type, type_attr, and number_attr may be specified.
+       * 
+ * + * string type_list_attr = 6; + */ + public Builder setTypeListAttr( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + typeListAttr_ = value; + onChanged(); + return this; + } + /** + *
+       * If specified, attr must have type "list(type)", and none of
+       * type, type_attr, and number_attr may be specified.
+       * 
+ * + * string type_list_attr = 6; + */ + public Builder clearTypeListAttr() { + + typeListAttr_ = getDefaultInstance().getTypeListAttr(); + onChanged(); + return this; + } + /** + *
+       * If specified, attr must have type "list(type)", and none of
+       * type, type_attr, and number_attr may be specified.
+       * 
+ * + * string type_list_attr = 6; + */ + public Builder setTypeListAttrBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + typeListAttr_ = value; + onChanged(); + return this; + } + + private boolean isRef_ ; + /** + *
+       * For inputs: if true, the inputs are required to be refs.
+       *   By default, inputs can be either refs or non-refs.
+       * For outputs: if true, outputs are refs, otherwise they are not.
+       * 
+ * + * bool is_ref = 16; + */ + public boolean getIsRef() { + return isRef_; + } + /** + *
+       * For inputs: if true, the inputs are required to be refs.
+       *   By default, inputs can be either refs or non-refs.
+       * For outputs: if true, outputs are refs, otherwise they are not.
+       * 
+ * + * bool is_ref = 16; + */ + public Builder setIsRef(boolean value) { + + isRef_ = value; + onChanged(); + return this; + } + /** + *
+       * For inputs: if true, the inputs are required to be refs.
+       *   By default, inputs can be either refs or non-refs.
+       * For outputs: if true, outputs are refs, otherwise they are not.
+       * 
+ * + * bool is_ref = 16; + */ + public Builder clearIsRef() { + + isRef_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.OpDef.ArgDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.OpDef.ArgDef) + private static final org.tensorflow.proto.framework.OpDef.ArgDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.OpDef.ArgDef(); + } + + public static org.tensorflow.proto.framework.OpDef.ArgDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArgDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ArgDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpDef.ArgDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AttrDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.OpDef.AttrDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * A descriptive name for the argument.  May be used, e.g. by the
+     * Python client, as a keyword argument name, and so should match
+     * the regexp "[a-z][a-z0-9_]+".
+     * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+     * A descriptive name for the argument.  May be used, e.g. by the
+     * Python client, as a keyword argument name, and so should match
+     * the regexp "[a-z][a-z0-9_]+".
+     * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * One of the type names from attr_value.proto ("string", "list(string)",
+     * "int", etc.).
+     * 
+ * + * string type = 2; + */ + java.lang.String getType(); + /** + *
+     * One of the type names from attr_value.proto ("string", "list(string)",
+     * "int", etc.).
+     * 
+ * + * string type = 2; + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+     * A reasonable default for this attribute if the user does not supply
+     * a value.  If not specified, the user must supply a value.
+     * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + boolean hasDefaultValue(); + /** + *
+     * A reasonable default for this attribute if the user does not supply
+     * a value.  If not specified, the user must supply a value.
+     * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + org.tensorflow.proto.framework.AttrValue getDefaultValue(); + /** + *
+     * A reasonable default for this attribute if the user does not supply
+     * a value.  If not specified, the user must supply a value.
+     * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + org.tensorflow.proto.framework.AttrValueOrBuilder getDefaultValueOrBuilder(); + + /** + *
+     * Human-readable description.
+     * 
+ * + * string description = 4; + */ + java.lang.String getDescription(); + /** + *
+     * Human-readable description.
+     * 
+ * + * string description = 4; + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+     * For type == "int", this is a minimum value.  For "list(___)"
+     * types, this is the minimum length.
+     * 
+ * + * bool has_minimum = 5; + */ + boolean getHasMinimum(); + + /** + * int64 minimum = 6; + */ + long getMinimum(); + + /** + *
+     * The set of allowed values.  Has type that is the "list" version
+     * of the "type" field above (uses the "list" field of AttrValue).
+     * If type == "type" or "list(type)" above, then the "type" field
+     * of "allowed_values.list" has the set of allowed DataTypes.
+     * If type == "string" or "list(string)", then the "s" field of
+     * "allowed_values.list" has the set of allowed strings.
+     * 
+ * + * .tensorflow.AttrValue allowed_values = 7; + */ + boolean hasAllowedValues(); + /** + *
+     * The set of allowed values.  Has type that is the "list" version
+     * of the "type" field above (uses the "list" field of AttrValue).
+     * If type == "type" or "list(type)" above, then the "type" field
+     * of "allowed_values.list" has the set of allowed DataTypes.
+     * If type == "string" or "list(string)", then the "s" field of
+     * "allowed_values.list" has the set of allowed strings.
+     * 
+ * + * .tensorflow.AttrValue allowed_values = 7; + */ + org.tensorflow.proto.framework.AttrValue getAllowedValues(); + /** + *
+     * The set of allowed values.  Has type that is the "list" version
+     * of the "type" field above (uses the "list" field of AttrValue).
+     * If type == "type" or "list(type)" above, then the "type" field
+     * of "allowed_values.list" has the set of allowed DataTypes.
+     * If type == "string" or "list(string)", then the "s" field of
+     * "allowed_values.list" has the set of allowed strings.
+     * 
+ * + * .tensorflow.AttrValue allowed_values = 7; + */ + org.tensorflow.proto.framework.AttrValueOrBuilder getAllowedValuesOrBuilder(); + } + /** + *
+   * Description of the graph-construction-time configuration of this
+   * Op.  That is to say, this describes the attr fields that will
+   * be specified in the NodeDef.
+   * 
+ * + * Protobuf type {@code tensorflow.OpDef.AttrDef} + */ + public static final class AttrDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.OpDef.AttrDef) + AttrDefOrBuilder { + private static final long serialVersionUID = 0L; + // Use AttrDef.newBuilder() to construct. + private AttrDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttrDef() { + name_ = ""; + type_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttrDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AttrDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 26: { + org.tensorflow.proto.framework.AttrValue.Builder subBuilder = null; + if (defaultValue_ != null) { + subBuilder = defaultValue_.toBuilder(); + } + defaultValue_ = input.readMessage(org.tensorflow.proto.framework.AttrValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(defaultValue_); + defaultValue_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 40: { + + hasMinimum_ = input.readBool(); + break; + } + case 48: { + + minimum_ = input.readInt64(); + break; + } + case 58: { + org.tensorflow.proto.framework.AttrValue.Builder subBuilder = null; + if (allowedValues_ != null) { + subBuilder = allowedValues_.toBuilder(); + } + allowedValues_ = input.readMessage(org.tensorflow.proto.framework.AttrValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(allowedValues_); + allowedValues_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDef_AttrDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDef_AttrDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.OpDef.AttrDef.class, org.tensorflow.proto.framework.OpDef.AttrDef.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * A descriptive name for the argument.  May be used, e.g. by the
+     * Python client, as a keyword argument name, and so should match
+     * the regexp "[a-z][a-z0-9_]+".
+     * 
+ * + * 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; + } + } + /** + *
+     * A descriptive name for the argument.  May be used, e.g. by the
+     * Python client, as a keyword argument name, and so should match
+     * the regexp "[a-z][a-z0-9_]+".
+     * 
+ * + * 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 TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object type_; + /** + *
+     * One of the type names from attr_value.proto ("string", "list(string)",
+     * "int", etc.).
+     * 
+ * + * string type = 2; + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+     * One of the type names from attr_value.proto ("string", "list(string)",
+     * "int", etc.).
+     * 
+ * + * string type = 2; + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_VALUE_FIELD_NUMBER = 3; + private org.tensorflow.proto.framework.AttrValue defaultValue_; + /** + *
+     * A reasonable default for this attribute if the user does not supply
+     * a value.  If not specified, the user must supply a value.
+     * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public boolean hasDefaultValue() { + return defaultValue_ != null; + } + /** + *
+     * A reasonable default for this attribute if the user does not supply
+     * a value.  If not specified, the user must supply a value.
+     * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public org.tensorflow.proto.framework.AttrValue getDefaultValue() { + return defaultValue_ == null ? org.tensorflow.proto.framework.AttrValue.getDefaultInstance() : defaultValue_; + } + /** + *
+     * A reasonable default for this attribute if the user does not supply
+     * a value.  If not specified, the user must supply a value.
+     * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public org.tensorflow.proto.framework.AttrValueOrBuilder getDefaultValueOrBuilder() { + return getDefaultValue(); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + private volatile java.lang.Object description_; + /** + *
+     * Human-readable description.
+     * 
+ * + * string description = 4; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+     * Human-readable description.
+     * 
+ * + * string description = 4; + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HAS_MINIMUM_FIELD_NUMBER = 5; + private boolean hasMinimum_; + /** + *
+     * For type == "int", this is a minimum value.  For "list(___)"
+     * types, this is the minimum length.
+     * 
+ * + * bool has_minimum = 5; + */ + public boolean getHasMinimum() { + return hasMinimum_; + } + + public static final int MINIMUM_FIELD_NUMBER = 6; + private long minimum_; + /** + * int64 minimum = 6; + */ + public long getMinimum() { + return minimum_; + } + + public static final int ALLOWED_VALUES_FIELD_NUMBER = 7; + private org.tensorflow.proto.framework.AttrValue allowedValues_; + /** + *
+     * The set of allowed values.  Has type that is the "list" version
+     * of the "type" field above (uses the "list" field of AttrValue).
+     * If type == "type" or "list(type)" above, then the "type" field
+     * of "allowed_values.list" has the set of allowed DataTypes.
+     * If type == "string" or "list(string)", then the "s" field of
+     * "allowed_values.list" has the set of allowed strings.
+     * 
+ * + * .tensorflow.AttrValue allowed_values = 7; + */ + public boolean hasAllowedValues() { + return allowedValues_ != null; + } + /** + *
+     * The set of allowed values.  Has type that is the "list" version
+     * of the "type" field above (uses the "list" field of AttrValue).
+     * If type == "type" or "list(type)" above, then the "type" field
+     * of "allowed_values.list" has the set of allowed DataTypes.
+     * If type == "string" or "list(string)", then the "s" field of
+     * "allowed_values.list" has the set of allowed strings.
+     * 
+ * + * .tensorflow.AttrValue allowed_values = 7; + */ + public org.tensorflow.proto.framework.AttrValue getAllowedValues() { + return allowedValues_ == null ? org.tensorflow.proto.framework.AttrValue.getDefaultInstance() : allowedValues_; + } + /** + *
+     * The set of allowed values.  Has type that is the "list" version
+     * of the "type" field above (uses the "list" field of AttrValue).
+     * If type == "type" or "list(type)" above, then the "type" field
+     * of "allowed_values.list" has the set of allowed DataTypes.
+     * If type == "string" or "list(string)", then the "s" field of
+     * "allowed_values.list" has the set of allowed strings.
+     * 
+ * + * .tensorflow.AttrValue allowed_values = 7; + */ + public org.tensorflow.proto.framework.AttrValueOrBuilder getAllowedValuesOrBuilder() { + return getAllowedValues(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + if (defaultValue_ != null) { + output.writeMessage(3, getDefaultValue()); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); + } + if (hasMinimum_ != false) { + output.writeBool(5, hasMinimum_); + } + if (minimum_ != 0L) { + output.writeInt64(6, minimum_); + } + if (allowedValues_ != null) { + output.writeMessage(7, getAllowedValues()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + } + if (defaultValue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getDefaultValue()); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); + } + if (hasMinimum_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, hasMinimum_); + } + if (minimum_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, minimum_); + } + if (allowedValues_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getAllowedValues()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.OpDef.AttrDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.OpDef.AttrDef other = (org.tensorflow.proto.framework.OpDef.AttrDef) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getType() + .equals(other.getType())) return false; + if (hasDefaultValue() != other.hasDefaultValue()) return false; + if (hasDefaultValue()) { + if (!getDefaultValue() + .equals(other.getDefaultValue())) return false; + } + if (!getDescription() + .equals(other.getDescription())) return false; + if (getHasMinimum() + != other.getHasMinimum()) return false; + if (getMinimum() + != other.getMinimum()) return false; + if (hasAllowedValues() != other.hasAllowedValues()) return false; + if (hasAllowedValues()) { + if (!getAllowedValues() + .equals(other.getAllowedValues())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + if (hasDefaultValue()) { + hash = (37 * hash) + DEFAULT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getDefaultValue().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + HAS_MINIMUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getHasMinimum()); + hash = (37 * hash) + MINIMUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMinimum()); + if (hasAllowedValues()) { + hash = (37 * hash) + ALLOWED_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedValues().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.OpDef.AttrDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OpDef.AttrDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDef.AttrDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OpDef.AttrDef parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDef.AttrDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OpDef.AttrDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDef.AttrDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OpDef.AttrDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDef.AttrDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OpDef.AttrDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDef.AttrDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OpDef.AttrDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.OpDef.AttrDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Description of the graph-construction-time configuration of this
+     * Op.  That is to say, this describes the attr fields that will
+     * be specified in the NodeDef.
+     * 
+ * + * Protobuf type {@code tensorflow.OpDef.AttrDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.OpDef.AttrDef) + org.tensorflow.proto.framework.OpDef.AttrDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDef_AttrDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDef_AttrDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.OpDef.AttrDef.class, org.tensorflow.proto.framework.OpDef.AttrDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.OpDef.AttrDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + type_ = ""; + + if (defaultValueBuilder_ == null) { + defaultValue_ = null; + } else { + defaultValue_ = null; + defaultValueBuilder_ = null; + } + description_ = ""; + + hasMinimum_ = false; + + minimum_ = 0L; + + if (allowedValuesBuilder_ == null) { + allowedValues_ = null; + } else { + allowedValues_ = null; + allowedValuesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDef_AttrDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpDef.AttrDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.OpDef.AttrDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpDef.AttrDef build() { + org.tensorflow.proto.framework.OpDef.AttrDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpDef.AttrDef buildPartial() { + org.tensorflow.proto.framework.OpDef.AttrDef result = new org.tensorflow.proto.framework.OpDef.AttrDef(this); + result.name_ = name_; + result.type_ = type_; + if (defaultValueBuilder_ == null) { + result.defaultValue_ = defaultValue_; + } else { + result.defaultValue_ = defaultValueBuilder_.build(); + } + result.description_ = description_; + result.hasMinimum_ = hasMinimum_; + result.minimum_ = minimum_; + if (allowedValuesBuilder_ == null) { + result.allowedValues_ = allowedValues_; + } else { + result.allowedValues_ = allowedValuesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.OpDef.AttrDef) { + return mergeFrom((org.tensorflow.proto.framework.OpDef.AttrDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.OpDef.AttrDef other) { + if (other == org.tensorflow.proto.framework.OpDef.AttrDef.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (other.hasDefaultValue()) { + mergeDefaultValue(other.getDefaultValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.getHasMinimum() != false) { + setHasMinimum(other.getHasMinimum()); + } + if (other.getMinimum() != 0L) { + setMinimum(other.getMinimum()); + } + if (other.hasAllowedValues()) { + mergeAllowedValues(other.getAllowedValues()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.OpDef.AttrDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.OpDef.AttrDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * A descriptive name for the argument.  May be used, e.g. by the
+       * Python client, as a keyword argument name, and so should match
+       * the regexp "[a-z][a-z0-9_]+".
+       * 
+ * + * 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; + } + } + /** + *
+       * A descriptive name for the argument.  May be used, e.g. by the
+       * Python client, as a keyword argument name, and so should match
+       * the regexp "[a-z][a-z0-9_]+".
+       * 
+ * + * 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; + } + } + /** + *
+       * A descriptive name for the argument.  May be used, e.g. by the
+       * Python client, as a keyword argument name, and so should match
+       * the regexp "[a-z][a-z0-9_]+".
+       * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * A descriptive name for the argument.  May be used, e.g. by the
+       * Python client, as a keyword argument name, and so should match
+       * the regexp "[a-z][a-z0-9_]+".
+       * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * A descriptive name for the argument.  May be used, e.g. by the
+       * Python client, as a keyword argument name, and so should match
+       * the regexp "[a-z][a-z0-9_]+".
+       * 
+ * + * 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 type_ = ""; + /** + *
+       * One of the type names from attr_value.proto ("string", "list(string)",
+       * "int", etc.).
+       * 
+ * + * string type = 2; + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * One of the type names from attr_value.proto ("string", "list(string)",
+       * "int", etc.).
+       * 
+ * + * string type = 2; + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * One of the type names from attr_value.proto ("string", "list(string)",
+       * "int", etc.).
+       * 
+ * + * string type = 2; + */ + public Builder setType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + *
+       * One of the type names from attr_value.proto ("string", "list(string)",
+       * "int", etc.).
+       * 
+ * + * string type = 2; + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + *
+       * One of the type names from attr_value.proto ("string", "list(string)",
+       * "int", etc.).
+       * 
+ * + * string type = 2; + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.AttrValue defaultValue_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AttrValue, org.tensorflow.proto.framework.AttrValue.Builder, org.tensorflow.proto.framework.AttrValueOrBuilder> defaultValueBuilder_; + /** + *
+       * A reasonable default for this attribute if the user does not supply
+       * a value.  If not specified, the user must supply a value.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public boolean hasDefaultValue() { + return defaultValueBuilder_ != null || defaultValue_ != null; + } + /** + *
+       * A reasonable default for this attribute if the user does not supply
+       * a value.  If not specified, the user must supply a value.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public org.tensorflow.proto.framework.AttrValue getDefaultValue() { + if (defaultValueBuilder_ == null) { + return defaultValue_ == null ? org.tensorflow.proto.framework.AttrValue.getDefaultInstance() : defaultValue_; + } else { + return defaultValueBuilder_.getMessage(); + } + } + /** + *
+       * A reasonable default for this attribute if the user does not supply
+       * a value.  If not specified, the user must supply a value.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public Builder setDefaultValue(org.tensorflow.proto.framework.AttrValue value) { + if (defaultValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + defaultValue_ = value; + onChanged(); + } else { + defaultValueBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * A reasonable default for this attribute if the user does not supply
+       * a value.  If not specified, the user must supply a value.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public Builder setDefaultValue( + org.tensorflow.proto.framework.AttrValue.Builder builderForValue) { + if (defaultValueBuilder_ == null) { + defaultValue_ = builderForValue.build(); + onChanged(); + } else { + defaultValueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * A reasonable default for this attribute if the user does not supply
+       * a value.  If not specified, the user must supply a value.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public Builder mergeDefaultValue(org.tensorflow.proto.framework.AttrValue value) { + if (defaultValueBuilder_ == null) { + if (defaultValue_ != null) { + defaultValue_ = + org.tensorflow.proto.framework.AttrValue.newBuilder(defaultValue_).mergeFrom(value).buildPartial(); + } else { + defaultValue_ = value; + } + onChanged(); + } else { + defaultValueBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * A reasonable default for this attribute if the user does not supply
+       * a value.  If not specified, the user must supply a value.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public Builder clearDefaultValue() { + if (defaultValueBuilder_ == null) { + defaultValue_ = null; + onChanged(); + } else { + defaultValue_ = null; + defaultValueBuilder_ = null; + } + + return this; + } + /** + *
+       * A reasonable default for this attribute if the user does not supply
+       * a value.  If not specified, the user must supply a value.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public org.tensorflow.proto.framework.AttrValue.Builder getDefaultValueBuilder() { + + onChanged(); + return getDefaultValueFieldBuilder().getBuilder(); + } + /** + *
+       * A reasonable default for this attribute if the user does not supply
+       * a value.  If not specified, the user must supply a value.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + public org.tensorflow.proto.framework.AttrValueOrBuilder getDefaultValueOrBuilder() { + if (defaultValueBuilder_ != null) { + return defaultValueBuilder_.getMessageOrBuilder(); + } else { + return defaultValue_ == null ? + org.tensorflow.proto.framework.AttrValue.getDefaultInstance() : defaultValue_; + } + } + /** + *
+       * A reasonable default for this attribute if the user does not supply
+       * a value.  If not specified, the user must supply a value.
+       * 
+ * + * .tensorflow.AttrValue default_value = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AttrValue, org.tensorflow.proto.framework.AttrValue.Builder, org.tensorflow.proto.framework.AttrValueOrBuilder> + getDefaultValueFieldBuilder() { + if (defaultValueBuilder_ == null) { + defaultValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AttrValue, org.tensorflow.proto.framework.AttrValue.Builder, org.tensorflow.proto.framework.AttrValueOrBuilder>( + getDefaultValue(), + getParentForChildren(), + isClean()); + defaultValue_ = null; + } + return defaultValueBuilder_; + } + + private java.lang.Object description_ = ""; + /** + *
+       * Human-readable description.
+       * 
+ * + * string description = 4; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Human-readable description.
+       * 
+ * + * string description = 4; + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Human-readable description.
+       * 
+ * + * string description = 4; + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+       * Human-readable description.
+       * 
+ * + * string description = 4; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+       * Human-readable description.
+       * 
+ * + * string description = 4; + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private boolean hasMinimum_ ; + /** + *
+       * For type == "int", this is a minimum value.  For "list(___)"
+       * types, this is the minimum length.
+       * 
+ * + * bool has_minimum = 5; + */ + public boolean getHasMinimum() { + return hasMinimum_; + } + /** + *
+       * For type == "int", this is a minimum value.  For "list(___)"
+       * types, this is the minimum length.
+       * 
+ * + * bool has_minimum = 5; + */ + public Builder setHasMinimum(boolean value) { + + hasMinimum_ = value; + onChanged(); + return this; + } + /** + *
+       * For type == "int", this is a minimum value.  For "list(___)"
+       * types, this is the minimum length.
+       * 
+ * + * bool has_minimum = 5; + */ + public Builder clearHasMinimum() { + + hasMinimum_ = false; + onChanged(); + return this; + } + + private long minimum_ ; + /** + * int64 minimum = 6; + */ + public long getMinimum() { + return minimum_; + } + /** + * int64 minimum = 6; + */ + public Builder setMinimum(long value) { + + minimum_ = value; + onChanged(); + return this; + } + /** + * int64 minimum = 6; + */ + public Builder clearMinimum() { + + minimum_ = 0L; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.AttrValue allowedValues_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AttrValue, org.tensorflow.proto.framework.AttrValue.Builder, org.tensorflow.proto.framework.AttrValueOrBuilder> allowedValuesBuilder_; + /** + *
+       * The set of allowed values.  Has type that is the "list" version
+       * of the "type" field above (uses the "list" field of AttrValue).
+       * If type == "type" or "list(type)" above, then the "type" field
+       * of "allowed_values.list" has the set of allowed DataTypes.
+       * If type == "string" or "list(string)", then the "s" field of
+       * "allowed_values.list" has the set of allowed strings.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 7; + */ + public boolean hasAllowedValues() { + return allowedValuesBuilder_ != null || allowedValues_ != null; + } + /** + *
+       * The set of allowed values.  Has type that is the "list" version
+       * of the "type" field above (uses the "list" field of AttrValue).
+       * If type == "type" or "list(type)" above, then the "type" field
+       * of "allowed_values.list" has the set of allowed DataTypes.
+       * If type == "string" or "list(string)", then the "s" field of
+       * "allowed_values.list" has the set of allowed strings.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 7; + */ + public org.tensorflow.proto.framework.AttrValue getAllowedValues() { + if (allowedValuesBuilder_ == null) { + return allowedValues_ == null ? org.tensorflow.proto.framework.AttrValue.getDefaultInstance() : allowedValues_; + } else { + return allowedValuesBuilder_.getMessage(); + } + } + /** + *
+       * The set of allowed values.  Has type that is the "list" version
+       * of the "type" field above (uses the "list" field of AttrValue).
+       * If type == "type" or "list(type)" above, then the "type" field
+       * of "allowed_values.list" has the set of allowed DataTypes.
+       * If type == "string" or "list(string)", then the "s" field of
+       * "allowed_values.list" has the set of allowed strings.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 7; + */ + public Builder setAllowedValues(org.tensorflow.proto.framework.AttrValue value) { + if (allowedValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + allowedValues_ = value; + onChanged(); + } else { + allowedValuesBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The set of allowed values.  Has type that is the "list" version
+       * of the "type" field above (uses the "list" field of AttrValue).
+       * If type == "type" or "list(type)" above, then the "type" field
+       * of "allowed_values.list" has the set of allowed DataTypes.
+       * If type == "string" or "list(string)", then the "s" field of
+       * "allowed_values.list" has the set of allowed strings.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 7; + */ + public Builder setAllowedValues( + org.tensorflow.proto.framework.AttrValue.Builder builderForValue) { + if (allowedValuesBuilder_ == null) { + allowedValues_ = builderForValue.build(); + onChanged(); + } else { + allowedValuesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The set of allowed values.  Has type that is the "list" version
+       * of the "type" field above (uses the "list" field of AttrValue).
+       * If type == "type" or "list(type)" above, then the "type" field
+       * of "allowed_values.list" has the set of allowed DataTypes.
+       * If type == "string" or "list(string)", then the "s" field of
+       * "allowed_values.list" has the set of allowed strings.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 7; + */ + public Builder mergeAllowedValues(org.tensorflow.proto.framework.AttrValue value) { + if (allowedValuesBuilder_ == null) { + if (allowedValues_ != null) { + allowedValues_ = + org.tensorflow.proto.framework.AttrValue.newBuilder(allowedValues_).mergeFrom(value).buildPartial(); + } else { + allowedValues_ = value; + } + onChanged(); + } else { + allowedValuesBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The set of allowed values.  Has type that is the "list" version
+       * of the "type" field above (uses the "list" field of AttrValue).
+       * If type == "type" or "list(type)" above, then the "type" field
+       * of "allowed_values.list" has the set of allowed DataTypes.
+       * If type == "string" or "list(string)", then the "s" field of
+       * "allowed_values.list" has the set of allowed strings.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 7; + */ + public Builder clearAllowedValues() { + if (allowedValuesBuilder_ == null) { + allowedValues_ = null; + onChanged(); + } else { + allowedValues_ = null; + allowedValuesBuilder_ = null; + } + + return this; + } + /** + *
+       * The set of allowed values.  Has type that is the "list" version
+       * of the "type" field above (uses the "list" field of AttrValue).
+       * If type == "type" or "list(type)" above, then the "type" field
+       * of "allowed_values.list" has the set of allowed DataTypes.
+       * If type == "string" or "list(string)", then the "s" field of
+       * "allowed_values.list" has the set of allowed strings.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 7; + */ + public org.tensorflow.proto.framework.AttrValue.Builder getAllowedValuesBuilder() { + + onChanged(); + return getAllowedValuesFieldBuilder().getBuilder(); + } + /** + *
+       * The set of allowed values.  Has type that is the "list" version
+       * of the "type" field above (uses the "list" field of AttrValue).
+       * If type == "type" or "list(type)" above, then the "type" field
+       * of "allowed_values.list" has the set of allowed DataTypes.
+       * If type == "string" or "list(string)", then the "s" field of
+       * "allowed_values.list" has the set of allowed strings.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 7; + */ + public org.tensorflow.proto.framework.AttrValueOrBuilder getAllowedValuesOrBuilder() { + if (allowedValuesBuilder_ != null) { + return allowedValuesBuilder_.getMessageOrBuilder(); + } else { + return allowedValues_ == null ? + org.tensorflow.proto.framework.AttrValue.getDefaultInstance() : allowedValues_; + } + } + /** + *
+       * The set of allowed values.  Has type that is the "list" version
+       * of the "type" field above (uses the "list" field of AttrValue).
+       * If type == "type" or "list(type)" above, then the "type" field
+       * of "allowed_values.list" has the set of allowed DataTypes.
+       * If type == "string" or "list(string)", then the "s" field of
+       * "allowed_values.list" has the set of allowed strings.
+       * 
+ * + * .tensorflow.AttrValue allowed_values = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AttrValue, org.tensorflow.proto.framework.AttrValue.Builder, org.tensorflow.proto.framework.AttrValueOrBuilder> + getAllowedValuesFieldBuilder() { + if (allowedValuesBuilder_ == null) { + allowedValuesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AttrValue, org.tensorflow.proto.framework.AttrValue.Builder, org.tensorflow.proto.framework.AttrValueOrBuilder>( + getAllowedValues(), + getParentForChildren(), + isClean()); + allowedValues_ = null; + } + return allowedValuesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.OpDef.AttrDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.OpDef.AttrDef) + private static final org.tensorflow.proto.framework.OpDef.AttrDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.OpDef.AttrDef(); + } + + public static org.tensorflow.proto.framework.OpDef.AttrDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttrDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AttrDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpDef.AttrDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Op names starting with an underscore are reserved for internal use.
+   * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*".
+   * 
+ * + * 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; + } + } + /** + *
+   * Op names starting with an underscore are reserved for internal use.
+   * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*".
+   * 
+ * + * 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 INPUT_ARG_FIELD_NUMBER = 2; + private java.util.List inputArg_; + /** + *
+   * Description of the input(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public java.util.List getInputArgList() { + return inputArg_; + } + /** + *
+   * Description of the input(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public java.util.List + getInputArgOrBuilderList() { + return inputArg_; + } + /** + *
+   * Description of the input(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public int getInputArgCount() { + return inputArg_.size(); + } + /** + *
+   * Description of the input(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public org.tensorflow.proto.framework.OpDef.ArgDef getInputArg(int index) { + return inputArg_.get(index); + } + /** + *
+   * Description of the input(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public org.tensorflow.proto.framework.OpDef.ArgDefOrBuilder getInputArgOrBuilder( + int index) { + return inputArg_.get(index); + } + + public static final int OUTPUT_ARG_FIELD_NUMBER = 3; + private java.util.List outputArg_; + /** + *
+   * Description of the output(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public java.util.List getOutputArgList() { + return outputArg_; + } + /** + *
+   * Description of the output(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public java.util.List + getOutputArgOrBuilderList() { + return outputArg_; + } + /** + *
+   * Description of the output(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public int getOutputArgCount() { + return outputArg_.size(); + } + /** + *
+   * Description of the output(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public org.tensorflow.proto.framework.OpDef.ArgDef getOutputArg(int index) { + return outputArg_.get(index); + } + /** + *
+   * Description of the output(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public org.tensorflow.proto.framework.OpDef.ArgDefOrBuilder getOutputArgOrBuilder( + int index) { + return outputArg_.get(index); + } + + public static final int CONTROL_OUTPUT_FIELD_NUMBER = 20; + private com.google.protobuf.LazyStringList controlOutput_; + /** + *
+   * Named control outputs for this operation. Useful only for composite
+   * operations (i.e. functions) which want to name different control outputs.
+   * 
+ * + * repeated string control_output = 20; + */ + public com.google.protobuf.ProtocolStringList + getControlOutputList() { + return controlOutput_; + } + /** + *
+   * Named control outputs for this operation. Useful only for composite
+   * operations (i.e. functions) which want to name different control outputs.
+   * 
+ * + * repeated string control_output = 20; + */ + public int getControlOutputCount() { + return controlOutput_.size(); + } + /** + *
+   * Named control outputs for this operation. Useful only for composite
+   * operations (i.e. functions) which want to name different control outputs.
+   * 
+ * + * repeated string control_output = 20; + */ + public java.lang.String getControlOutput(int index) { + return controlOutput_.get(index); + } + /** + *
+   * Named control outputs for this operation. Useful only for composite
+   * operations (i.e. functions) which want to name different control outputs.
+   * 
+ * + * repeated string control_output = 20; + */ + public com.google.protobuf.ByteString + getControlOutputBytes(int index) { + return controlOutput_.getByteString(index); + } + + public static final int ATTR_FIELD_NUMBER = 4; + private java.util.List attr_; + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public java.util.List getAttrList() { + return attr_; + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public java.util.List + getAttrOrBuilderList() { + return attr_; + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public int getAttrCount() { + return attr_.size(); + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public org.tensorflow.proto.framework.OpDef.AttrDef getAttr(int index) { + return attr_.get(index); + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public org.tensorflow.proto.framework.OpDef.AttrDefOrBuilder getAttrOrBuilder( + int index) { + return attr_.get(index); + } + + public static final int DEPRECATION_FIELD_NUMBER = 8; + private org.tensorflow.proto.framework.OpDeprecation deprecation_; + /** + *
+   * Optional deprecation based on GraphDef versions.
+   * 
+ * + * .tensorflow.OpDeprecation deprecation = 8; + */ + public boolean hasDeprecation() { + return deprecation_ != null; + } + /** + *
+   * Optional deprecation based on GraphDef versions.
+   * 
+ * + * .tensorflow.OpDeprecation deprecation = 8; + */ + public org.tensorflow.proto.framework.OpDeprecation getDeprecation() { + return deprecation_ == null ? org.tensorflow.proto.framework.OpDeprecation.getDefaultInstance() : deprecation_; + } + /** + *
+   * Optional deprecation based on GraphDef versions.
+   * 
+ * + * .tensorflow.OpDeprecation deprecation = 8; + */ + public org.tensorflow.proto.framework.OpDeprecationOrBuilder getDeprecationOrBuilder() { + return getDeprecation(); + } + + public static final int SUMMARY_FIELD_NUMBER = 5; + private volatile java.lang.Object summary_; + /** + *
+   * One-line human-readable description of what the Op does.
+   * 
+ * + * string summary = 5; + */ + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summary_ = s; + return s; + } + } + /** + *
+   * One-line human-readable description of what the Op does.
+   * 
+ * + * string summary = 5; + */ + public com.google.protobuf.ByteString + getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + private volatile java.lang.Object description_; + /** + *
+   * Additional, longer human-readable description of what the Op does.
+   * 
+ * + * string description = 6; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * Additional, longer human-readable description of what the Op does.
+   * 
+ * + * string description = 6; + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_COMMUTATIVE_FIELD_NUMBER = 18; + private boolean isCommutative_; + /** + *
+   * True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)
+   * 
+ * + * bool is_commutative = 18; + */ + public boolean getIsCommutative() { + return isCommutative_; + } + + public static final int IS_AGGREGATE_FIELD_NUMBER = 16; + private boolean isAggregate_; + /** + *
+   * If is_aggregate is true, then this operation accepts N >= 2
+   * inputs and produces 1 output all of the same type.  Should be
+   * associative and commutative, and produce output with the same
+   * shape as the input.  The optimizer may replace an aggregate op
+   * taking input from multiple devices with a tree of aggregate ops
+   * that aggregate locally within each device (and possibly within
+   * groups of nearby devices) before communicating.
+   * TODO(josh11b): Implement that optimization.
+   * 
+ * + * bool is_aggregate = 16; + */ + public boolean getIsAggregate() { + return isAggregate_; + } + + public static final int IS_STATEFUL_FIELD_NUMBER = 17; + private boolean isStateful_; + /** + *
+   * Ops are marked as stateful if their behavior depends on some state beyond
+   * their input tensors (e.g. variable reading op) or if they have
+   * a side-effect (e.g. printing or asserting ops). Equivalently, stateless ops
+   * must always produce the same output for the same input and have
+   * no side-effects.
+   * By default Ops may be moved between devices.  Stateful ops should
+   * either not be moved, or should only be moved if that state can also
+   * be moved (e.g. via some sort of save / restore).
+   * Stateful ops are guaranteed to never be optimized away by Common
+   * Subexpression Elimination (CSE).
+   * 
+ * + * bool is_stateful = 17; + */ + public boolean getIsStateful() { + return isStateful_; + } + + public static final int ALLOWS_UNINITIALIZED_INPUT_FIELD_NUMBER = 19; + private boolean allowsUninitializedInput_; + /** + *
+   * By default, all inputs to an Op must be initialized Tensors.  Ops
+   * that may initialize tensors for the first time should set this
+   * field to true, to allow the Op to take an uninitialized Tensor as
+   * input.
+   * 
+ * + * bool allows_uninitialized_input = 19; + */ + public boolean getAllowsUninitializedInput() { + return allowsUninitializedInput_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < inputArg_.size(); i++) { + output.writeMessage(2, inputArg_.get(i)); + } + for (int i = 0; i < outputArg_.size(); i++) { + output.writeMessage(3, outputArg_.get(i)); + } + for (int i = 0; i < attr_.size(); i++) { + output.writeMessage(4, attr_.get(i)); + } + if (!getSummaryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, summary_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); + } + if (deprecation_ != null) { + output.writeMessage(8, getDeprecation()); + } + if (isAggregate_ != false) { + output.writeBool(16, isAggregate_); + } + if (isStateful_ != false) { + output.writeBool(17, isStateful_); + } + if (isCommutative_ != false) { + output.writeBool(18, isCommutative_); + } + if (allowsUninitializedInput_ != false) { + output.writeBool(19, allowsUninitializedInput_); + } + for (int i = 0; i < controlOutput_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 20, controlOutput_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < inputArg_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, inputArg_.get(i)); + } + for (int i = 0; i < outputArg_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, outputArg_.get(i)); + } + for (int i = 0; i < attr_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, attr_.get(i)); + } + if (!getSummaryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, summary_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); + } + if (deprecation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getDeprecation()); + } + if (isAggregate_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(16, isAggregate_); + } + if (isStateful_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(17, isStateful_); + } + if (isCommutative_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(18, isCommutative_); + } + if (allowsUninitializedInput_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(19, allowsUninitializedInput_); + } + { + int dataSize = 0; + for (int i = 0; i < controlOutput_.size(); i++) { + dataSize += computeStringSizeNoTag(controlOutput_.getRaw(i)); + } + size += dataSize; + size += 2 * getControlOutputList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.OpDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.OpDef other = (org.tensorflow.proto.framework.OpDef) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getInputArgList() + .equals(other.getInputArgList())) return false; + if (!getOutputArgList() + .equals(other.getOutputArgList())) return false; + if (!getControlOutputList() + .equals(other.getControlOutputList())) return false; + if (!getAttrList() + .equals(other.getAttrList())) return false; + if (hasDeprecation() != other.hasDeprecation()) return false; + if (hasDeprecation()) { + if (!getDeprecation() + .equals(other.getDeprecation())) return false; + } + if (!getSummary() + .equals(other.getSummary())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (getIsCommutative() + != other.getIsCommutative()) return false; + if (getIsAggregate() + != other.getIsAggregate()) return false; + if (getIsStateful() + != other.getIsStateful()) return false; + if (getAllowsUninitializedInput() + != other.getAllowsUninitializedInput()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getInputArgCount() > 0) { + hash = (37 * hash) + INPUT_ARG_FIELD_NUMBER; + hash = (53 * hash) + getInputArgList().hashCode(); + } + if (getOutputArgCount() > 0) { + hash = (37 * hash) + OUTPUT_ARG_FIELD_NUMBER; + hash = (53 * hash) + getOutputArgList().hashCode(); + } + if (getControlOutputCount() > 0) { + hash = (37 * hash) + CONTROL_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getControlOutputList().hashCode(); + } + if (getAttrCount() > 0) { + hash = (37 * hash) + ATTR_FIELD_NUMBER; + hash = (53 * hash) + getAttrList().hashCode(); + } + if (hasDeprecation()) { + hash = (37 * hash) + DEPRECATION_FIELD_NUMBER; + hash = (53 * hash) + getDeprecation().hashCode(); + } + hash = (37 * hash) + SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getSummary().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + IS_COMMUTATIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsCommutative()); + hash = (37 * hash) + IS_AGGREGATE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsAggregate()); + hash = (37 * hash) + IS_STATEFUL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsStateful()); + hash = (37 * hash) + ALLOWS_UNINITIALIZED_INPUT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowsUninitializedInput()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.OpDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OpDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OpDef parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OpDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OpDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OpDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OpDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.OpDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Defines an operation. A NodeDef in a GraphDef specifies an Op by
+   * using the "op" field which should match the name of a OpDef.
+   * LINT.IfChange
+   * 
+ * + * Protobuf type {@code tensorflow.OpDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.OpDef) + org.tensorflow.proto.framework.OpDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.OpDef.class, org.tensorflow.proto.framework.OpDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.OpDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getInputArgFieldBuilder(); + getOutputArgFieldBuilder(); + getAttrFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (inputArgBuilder_ == null) { + inputArg_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + inputArgBuilder_.clear(); + } + if (outputArgBuilder_ == null) { + outputArg_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + outputArgBuilder_.clear(); + } + controlOutput_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + if (attrBuilder_ == null) { + attr_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + attrBuilder_.clear(); + } + if (deprecationBuilder_ == null) { + deprecation_ = null; + } else { + deprecation_ = null; + deprecationBuilder_ = null; + } + summary_ = ""; + + description_ = ""; + + isCommutative_ = false; + + isAggregate_ = false; + + isStateful_ = false; + + allowsUninitializedInput_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.OpDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpDef build() { + org.tensorflow.proto.framework.OpDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpDef buildPartial() { + org.tensorflow.proto.framework.OpDef result = new org.tensorflow.proto.framework.OpDef(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (inputArgBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + inputArg_ = java.util.Collections.unmodifiableList(inputArg_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.inputArg_ = inputArg_; + } else { + result.inputArg_ = inputArgBuilder_.build(); + } + if (outputArgBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + outputArg_ = java.util.Collections.unmodifiableList(outputArg_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.outputArg_ = outputArg_; + } else { + result.outputArg_ = outputArgBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + controlOutput_ = controlOutput_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.controlOutput_ = controlOutput_; + if (attrBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + attr_ = java.util.Collections.unmodifiableList(attr_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.attr_ = attr_; + } else { + result.attr_ = attrBuilder_.build(); + } + if (deprecationBuilder_ == null) { + result.deprecation_ = deprecation_; + } else { + result.deprecation_ = deprecationBuilder_.build(); + } + result.summary_ = summary_; + result.description_ = description_; + result.isCommutative_ = isCommutative_; + result.isAggregate_ = isAggregate_; + result.isStateful_ = isStateful_; + result.allowsUninitializedInput_ = allowsUninitializedInput_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.OpDef) { + return mergeFrom((org.tensorflow.proto.framework.OpDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.OpDef other) { + if (other == org.tensorflow.proto.framework.OpDef.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (inputArgBuilder_ == null) { + if (!other.inputArg_.isEmpty()) { + if (inputArg_.isEmpty()) { + inputArg_ = other.inputArg_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInputArgIsMutable(); + inputArg_.addAll(other.inputArg_); + } + onChanged(); + } + } else { + if (!other.inputArg_.isEmpty()) { + if (inputArgBuilder_.isEmpty()) { + inputArgBuilder_.dispose(); + inputArgBuilder_ = null; + inputArg_ = other.inputArg_; + bitField0_ = (bitField0_ & ~0x00000001); + inputArgBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getInputArgFieldBuilder() : null; + } else { + inputArgBuilder_.addAllMessages(other.inputArg_); + } + } + } + if (outputArgBuilder_ == null) { + if (!other.outputArg_.isEmpty()) { + if (outputArg_.isEmpty()) { + outputArg_ = other.outputArg_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureOutputArgIsMutable(); + outputArg_.addAll(other.outputArg_); + } + onChanged(); + } + } else { + if (!other.outputArg_.isEmpty()) { + if (outputArgBuilder_.isEmpty()) { + outputArgBuilder_.dispose(); + outputArgBuilder_ = null; + outputArg_ = other.outputArg_; + bitField0_ = (bitField0_ & ~0x00000002); + outputArgBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOutputArgFieldBuilder() : null; + } else { + outputArgBuilder_.addAllMessages(other.outputArg_); + } + } + } + if (!other.controlOutput_.isEmpty()) { + if (controlOutput_.isEmpty()) { + controlOutput_ = other.controlOutput_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureControlOutputIsMutable(); + controlOutput_.addAll(other.controlOutput_); + } + onChanged(); + } + if (attrBuilder_ == null) { + if (!other.attr_.isEmpty()) { + if (attr_.isEmpty()) { + attr_ = other.attr_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureAttrIsMutable(); + attr_.addAll(other.attr_); + } + onChanged(); + } + } else { + if (!other.attr_.isEmpty()) { + if (attrBuilder_.isEmpty()) { + attrBuilder_.dispose(); + attrBuilder_ = null; + attr_ = other.attr_; + bitField0_ = (bitField0_ & ~0x00000008); + attrBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAttrFieldBuilder() : null; + } else { + attrBuilder_.addAllMessages(other.attr_); + } + } + } + if (other.hasDeprecation()) { + mergeDeprecation(other.getDeprecation()); + } + if (!other.getSummary().isEmpty()) { + summary_ = other.summary_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.getIsCommutative() != false) { + setIsCommutative(other.getIsCommutative()); + } + if (other.getIsAggregate() != false) { + setIsAggregate(other.getIsAggregate()); + } + if (other.getIsStateful() != false) { + setIsStateful(other.getIsStateful()); + } + if (other.getAllowsUninitializedInput() != false) { + setAllowsUninitializedInput(other.getAllowsUninitializedInput()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.OpDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.OpDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Op names starting with an underscore are reserved for internal use.
+     * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*".
+     * 
+ * + * 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; + } + } + /** + *
+     * Op names starting with an underscore are reserved for internal use.
+     * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*".
+     * 
+ * + * 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; + } + } + /** + *
+     * Op names starting with an underscore are reserved for internal use.
+     * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*".
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Op names starting with an underscore are reserved for internal use.
+     * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*".
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Op names starting with an underscore are reserved for internal use.
+     * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*".
+     * 
+ * + * 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.util.List inputArg_ = + java.util.Collections.emptyList(); + private void ensureInputArgIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + inputArg_ = new java.util.ArrayList(inputArg_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.OpDef.ArgDef, org.tensorflow.proto.framework.OpDef.ArgDef.Builder, org.tensorflow.proto.framework.OpDef.ArgDefOrBuilder> inputArgBuilder_; + + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public java.util.List getInputArgList() { + if (inputArgBuilder_ == null) { + return java.util.Collections.unmodifiableList(inputArg_); + } else { + return inputArgBuilder_.getMessageList(); + } + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public int getInputArgCount() { + if (inputArgBuilder_ == null) { + return inputArg_.size(); + } else { + return inputArgBuilder_.getCount(); + } + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public org.tensorflow.proto.framework.OpDef.ArgDef getInputArg(int index) { + if (inputArgBuilder_ == null) { + return inputArg_.get(index); + } else { + return inputArgBuilder_.getMessage(index); + } + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public Builder setInputArg( + int index, org.tensorflow.proto.framework.OpDef.ArgDef value) { + if (inputArgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputArgIsMutable(); + inputArg_.set(index, value); + onChanged(); + } else { + inputArgBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public Builder setInputArg( + int index, org.tensorflow.proto.framework.OpDef.ArgDef.Builder builderForValue) { + if (inputArgBuilder_ == null) { + ensureInputArgIsMutable(); + inputArg_.set(index, builderForValue.build()); + onChanged(); + } else { + inputArgBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public Builder addInputArg(org.tensorflow.proto.framework.OpDef.ArgDef value) { + if (inputArgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputArgIsMutable(); + inputArg_.add(value); + onChanged(); + } else { + inputArgBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public Builder addInputArg( + int index, org.tensorflow.proto.framework.OpDef.ArgDef value) { + if (inputArgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputArgIsMutable(); + inputArg_.add(index, value); + onChanged(); + } else { + inputArgBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public Builder addInputArg( + org.tensorflow.proto.framework.OpDef.ArgDef.Builder builderForValue) { + if (inputArgBuilder_ == null) { + ensureInputArgIsMutable(); + inputArg_.add(builderForValue.build()); + onChanged(); + } else { + inputArgBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public Builder addInputArg( + int index, org.tensorflow.proto.framework.OpDef.ArgDef.Builder builderForValue) { + if (inputArgBuilder_ == null) { + ensureInputArgIsMutable(); + inputArg_.add(index, builderForValue.build()); + onChanged(); + } else { + inputArgBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public Builder addAllInputArg( + java.lang.Iterable values) { + if (inputArgBuilder_ == null) { + ensureInputArgIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, inputArg_); + onChanged(); + } else { + inputArgBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public Builder clearInputArg() { + if (inputArgBuilder_ == null) { + inputArg_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + inputArgBuilder_.clear(); + } + return this; + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public Builder removeInputArg(int index) { + if (inputArgBuilder_ == null) { + ensureInputArgIsMutable(); + inputArg_.remove(index); + onChanged(); + } else { + inputArgBuilder_.remove(index); + } + return this; + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public org.tensorflow.proto.framework.OpDef.ArgDef.Builder getInputArgBuilder( + int index) { + return getInputArgFieldBuilder().getBuilder(index); + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public org.tensorflow.proto.framework.OpDef.ArgDefOrBuilder getInputArgOrBuilder( + int index) { + if (inputArgBuilder_ == null) { + return inputArg_.get(index); } else { + return inputArgBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public java.util.List + getInputArgOrBuilderList() { + if (inputArgBuilder_ != null) { + return inputArgBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inputArg_); + } + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public org.tensorflow.proto.framework.OpDef.ArgDef.Builder addInputArgBuilder() { + return getInputArgFieldBuilder().addBuilder( + org.tensorflow.proto.framework.OpDef.ArgDef.getDefaultInstance()); + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public org.tensorflow.proto.framework.OpDef.ArgDef.Builder addInputArgBuilder( + int index) { + return getInputArgFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.OpDef.ArgDef.getDefaultInstance()); + } + /** + *
+     * Description of the input(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + public java.util.List + getInputArgBuilderList() { + return getInputArgFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.OpDef.ArgDef, org.tensorflow.proto.framework.OpDef.ArgDef.Builder, org.tensorflow.proto.framework.OpDef.ArgDefOrBuilder> + getInputArgFieldBuilder() { + if (inputArgBuilder_ == null) { + inputArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.OpDef.ArgDef, org.tensorflow.proto.framework.OpDef.ArgDef.Builder, org.tensorflow.proto.framework.OpDef.ArgDefOrBuilder>( + inputArg_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + inputArg_ = null; + } + return inputArgBuilder_; + } + + private java.util.List outputArg_ = + java.util.Collections.emptyList(); + private void ensureOutputArgIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + outputArg_ = new java.util.ArrayList(outputArg_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.OpDef.ArgDef, org.tensorflow.proto.framework.OpDef.ArgDef.Builder, org.tensorflow.proto.framework.OpDef.ArgDefOrBuilder> outputArgBuilder_; + + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public java.util.List getOutputArgList() { + if (outputArgBuilder_ == null) { + return java.util.Collections.unmodifiableList(outputArg_); + } else { + return outputArgBuilder_.getMessageList(); + } + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public int getOutputArgCount() { + if (outputArgBuilder_ == null) { + return outputArg_.size(); + } else { + return outputArgBuilder_.getCount(); + } + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public org.tensorflow.proto.framework.OpDef.ArgDef getOutputArg(int index) { + if (outputArgBuilder_ == null) { + return outputArg_.get(index); + } else { + return outputArgBuilder_.getMessage(index); + } + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public Builder setOutputArg( + int index, org.tensorflow.proto.framework.OpDef.ArgDef value) { + if (outputArgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputArgIsMutable(); + outputArg_.set(index, value); + onChanged(); + } else { + outputArgBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public Builder setOutputArg( + int index, org.tensorflow.proto.framework.OpDef.ArgDef.Builder builderForValue) { + if (outputArgBuilder_ == null) { + ensureOutputArgIsMutable(); + outputArg_.set(index, builderForValue.build()); + onChanged(); + } else { + outputArgBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public Builder addOutputArg(org.tensorflow.proto.framework.OpDef.ArgDef value) { + if (outputArgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputArgIsMutable(); + outputArg_.add(value); + onChanged(); + } else { + outputArgBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public Builder addOutputArg( + int index, org.tensorflow.proto.framework.OpDef.ArgDef value) { + if (outputArgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputArgIsMutable(); + outputArg_.add(index, value); + onChanged(); + } else { + outputArgBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public Builder addOutputArg( + org.tensorflow.proto.framework.OpDef.ArgDef.Builder builderForValue) { + if (outputArgBuilder_ == null) { + ensureOutputArgIsMutable(); + outputArg_.add(builderForValue.build()); + onChanged(); + } else { + outputArgBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public Builder addOutputArg( + int index, org.tensorflow.proto.framework.OpDef.ArgDef.Builder builderForValue) { + if (outputArgBuilder_ == null) { + ensureOutputArgIsMutable(); + outputArg_.add(index, builderForValue.build()); + onChanged(); + } else { + outputArgBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public Builder addAllOutputArg( + java.lang.Iterable values) { + if (outputArgBuilder_ == null) { + ensureOutputArgIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, outputArg_); + onChanged(); + } else { + outputArgBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public Builder clearOutputArg() { + if (outputArgBuilder_ == null) { + outputArg_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + outputArgBuilder_.clear(); + } + return this; + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public Builder removeOutputArg(int index) { + if (outputArgBuilder_ == null) { + ensureOutputArgIsMutable(); + outputArg_.remove(index); + onChanged(); + } else { + outputArgBuilder_.remove(index); + } + return this; + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public org.tensorflow.proto.framework.OpDef.ArgDef.Builder getOutputArgBuilder( + int index) { + return getOutputArgFieldBuilder().getBuilder(index); + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public org.tensorflow.proto.framework.OpDef.ArgDefOrBuilder getOutputArgOrBuilder( + int index) { + if (outputArgBuilder_ == null) { + return outputArg_.get(index); } else { + return outputArgBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public java.util.List + getOutputArgOrBuilderList() { + if (outputArgBuilder_ != null) { + return outputArgBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(outputArg_); + } + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public org.tensorflow.proto.framework.OpDef.ArgDef.Builder addOutputArgBuilder() { + return getOutputArgFieldBuilder().addBuilder( + org.tensorflow.proto.framework.OpDef.ArgDef.getDefaultInstance()); + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public org.tensorflow.proto.framework.OpDef.ArgDef.Builder addOutputArgBuilder( + int index) { + return getOutputArgFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.OpDef.ArgDef.getDefaultInstance()); + } + /** + *
+     * Description of the output(s).
+     * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + public java.util.List + getOutputArgBuilderList() { + return getOutputArgFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.OpDef.ArgDef, org.tensorflow.proto.framework.OpDef.ArgDef.Builder, org.tensorflow.proto.framework.OpDef.ArgDefOrBuilder> + getOutputArgFieldBuilder() { + if (outputArgBuilder_ == null) { + outputArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.OpDef.ArgDef, org.tensorflow.proto.framework.OpDef.ArgDef.Builder, org.tensorflow.proto.framework.OpDef.ArgDefOrBuilder>( + outputArg_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + outputArg_ = null; + } + return outputArgBuilder_; + } + + private com.google.protobuf.LazyStringList controlOutput_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureControlOutputIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + controlOutput_ = new com.google.protobuf.LazyStringArrayList(controlOutput_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Named control outputs for this operation. Useful only for composite
+     * operations (i.e. functions) which want to name different control outputs.
+     * 
+ * + * repeated string control_output = 20; + */ + public com.google.protobuf.ProtocolStringList + getControlOutputList() { + return controlOutput_.getUnmodifiableView(); + } + /** + *
+     * Named control outputs for this operation. Useful only for composite
+     * operations (i.e. functions) which want to name different control outputs.
+     * 
+ * + * repeated string control_output = 20; + */ + public int getControlOutputCount() { + return controlOutput_.size(); + } + /** + *
+     * Named control outputs for this operation. Useful only for composite
+     * operations (i.e. functions) which want to name different control outputs.
+     * 
+ * + * repeated string control_output = 20; + */ + public java.lang.String getControlOutput(int index) { + return controlOutput_.get(index); + } + /** + *
+     * Named control outputs for this operation. Useful only for composite
+     * operations (i.e. functions) which want to name different control outputs.
+     * 
+ * + * repeated string control_output = 20; + */ + public com.google.protobuf.ByteString + getControlOutputBytes(int index) { + return controlOutput_.getByteString(index); + } + /** + *
+     * Named control outputs for this operation. Useful only for composite
+     * operations (i.e. functions) which want to name different control outputs.
+     * 
+ * + * repeated string control_output = 20; + */ + public Builder setControlOutput( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureControlOutputIsMutable(); + controlOutput_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Named control outputs for this operation. Useful only for composite
+     * operations (i.e. functions) which want to name different control outputs.
+     * 
+ * + * repeated string control_output = 20; + */ + public Builder addControlOutput( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureControlOutputIsMutable(); + controlOutput_.add(value); + onChanged(); + return this; + } + /** + *
+     * Named control outputs for this operation. Useful only for composite
+     * operations (i.e. functions) which want to name different control outputs.
+     * 
+ * + * repeated string control_output = 20; + */ + public Builder addAllControlOutput( + java.lang.Iterable values) { + ensureControlOutputIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, controlOutput_); + onChanged(); + return this; + } + /** + *
+     * Named control outputs for this operation. Useful only for composite
+     * operations (i.e. functions) which want to name different control outputs.
+     * 
+ * + * repeated string control_output = 20; + */ + public Builder clearControlOutput() { + controlOutput_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Named control outputs for this operation. Useful only for composite
+     * operations (i.e. functions) which want to name different control outputs.
+     * 
+ * + * repeated string control_output = 20; + */ + public Builder addControlOutputBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureControlOutputIsMutable(); + controlOutput_.add(value); + onChanged(); + return this; + } + + private java.util.List attr_ = + java.util.Collections.emptyList(); + private void ensureAttrIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + attr_ = new java.util.ArrayList(attr_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.OpDef.AttrDef, org.tensorflow.proto.framework.OpDef.AttrDef.Builder, org.tensorflow.proto.framework.OpDef.AttrDefOrBuilder> attrBuilder_; + + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public java.util.List getAttrList() { + if (attrBuilder_ == null) { + return java.util.Collections.unmodifiableList(attr_); + } else { + return attrBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public int getAttrCount() { + if (attrBuilder_ == null) { + return attr_.size(); + } else { + return attrBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public org.tensorflow.proto.framework.OpDef.AttrDef getAttr(int index) { + if (attrBuilder_ == null) { + return attr_.get(index); + } else { + return attrBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public Builder setAttr( + int index, org.tensorflow.proto.framework.OpDef.AttrDef value) { + if (attrBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttrIsMutable(); + attr_.set(index, value); + onChanged(); + } else { + attrBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public Builder setAttr( + int index, org.tensorflow.proto.framework.OpDef.AttrDef.Builder builderForValue) { + if (attrBuilder_ == null) { + ensureAttrIsMutable(); + attr_.set(index, builderForValue.build()); + onChanged(); + } else { + attrBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public Builder addAttr(org.tensorflow.proto.framework.OpDef.AttrDef value) { + if (attrBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttrIsMutable(); + attr_.add(value); + onChanged(); + } else { + attrBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public Builder addAttr( + int index, org.tensorflow.proto.framework.OpDef.AttrDef value) { + if (attrBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttrIsMutable(); + attr_.add(index, value); + onChanged(); + } else { + attrBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public Builder addAttr( + org.tensorflow.proto.framework.OpDef.AttrDef.Builder builderForValue) { + if (attrBuilder_ == null) { + ensureAttrIsMutable(); + attr_.add(builderForValue.build()); + onChanged(); + } else { + attrBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public Builder addAttr( + int index, org.tensorflow.proto.framework.OpDef.AttrDef.Builder builderForValue) { + if (attrBuilder_ == null) { + ensureAttrIsMutable(); + attr_.add(index, builderForValue.build()); + onChanged(); + } else { + attrBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public Builder addAllAttr( + java.lang.Iterable values) { + if (attrBuilder_ == null) { + ensureAttrIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, attr_); + onChanged(); + } else { + attrBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public Builder clearAttr() { + if (attrBuilder_ == null) { + attr_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + attrBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public Builder removeAttr(int index) { + if (attrBuilder_ == null) { + ensureAttrIsMutable(); + attr_.remove(index); + onChanged(); + } else { + attrBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public org.tensorflow.proto.framework.OpDef.AttrDef.Builder getAttrBuilder( + int index) { + return getAttrFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public org.tensorflow.proto.framework.OpDef.AttrDefOrBuilder getAttrOrBuilder( + int index) { + if (attrBuilder_ == null) { + return attr_.get(index); } else { + return attrBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public java.util.List + getAttrOrBuilderList() { + if (attrBuilder_ != null) { + return attrBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attr_); + } + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public org.tensorflow.proto.framework.OpDef.AttrDef.Builder addAttrBuilder() { + return getAttrFieldBuilder().addBuilder( + org.tensorflow.proto.framework.OpDef.AttrDef.getDefaultInstance()); + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public org.tensorflow.proto.framework.OpDef.AttrDef.Builder addAttrBuilder( + int index) { + return getAttrFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.OpDef.AttrDef.getDefaultInstance()); + } + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + public java.util.List + getAttrBuilderList() { + return getAttrFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.OpDef.AttrDef, org.tensorflow.proto.framework.OpDef.AttrDef.Builder, org.tensorflow.proto.framework.OpDef.AttrDefOrBuilder> + getAttrFieldBuilder() { + if (attrBuilder_ == null) { + attrBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.OpDef.AttrDef, org.tensorflow.proto.framework.OpDef.AttrDef.Builder, org.tensorflow.proto.framework.OpDef.AttrDefOrBuilder>( + attr_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + attr_ = null; + } + return attrBuilder_; + } + + private org.tensorflow.proto.framework.OpDeprecation deprecation_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.OpDeprecation, org.tensorflow.proto.framework.OpDeprecation.Builder, org.tensorflow.proto.framework.OpDeprecationOrBuilder> deprecationBuilder_; + /** + *
+     * Optional deprecation based on GraphDef versions.
+     * 
+ * + * .tensorflow.OpDeprecation deprecation = 8; + */ + public boolean hasDeprecation() { + return deprecationBuilder_ != null || deprecation_ != null; + } + /** + *
+     * Optional deprecation based on GraphDef versions.
+     * 
+ * + * .tensorflow.OpDeprecation deprecation = 8; + */ + public org.tensorflow.proto.framework.OpDeprecation getDeprecation() { + if (deprecationBuilder_ == null) { + return deprecation_ == null ? org.tensorflow.proto.framework.OpDeprecation.getDefaultInstance() : deprecation_; + } else { + return deprecationBuilder_.getMessage(); + } + } + /** + *
+     * Optional deprecation based on GraphDef versions.
+     * 
+ * + * .tensorflow.OpDeprecation deprecation = 8; + */ + public Builder setDeprecation(org.tensorflow.proto.framework.OpDeprecation value) { + if (deprecationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deprecation_ = value; + onChanged(); + } else { + deprecationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Optional deprecation based on GraphDef versions.
+     * 
+ * + * .tensorflow.OpDeprecation deprecation = 8; + */ + public Builder setDeprecation( + org.tensorflow.proto.framework.OpDeprecation.Builder builderForValue) { + if (deprecationBuilder_ == null) { + deprecation_ = builderForValue.build(); + onChanged(); + } else { + deprecationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Optional deprecation based on GraphDef versions.
+     * 
+ * + * .tensorflow.OpDeprecation deprecation = 8; + */ + public Builder mergeDeprecation(org.tensorflow.proto.framework.OpDeprecation value) { + if (deprecationBuilder_ == null) { + if (deprecation_ != null) { + deprecation_ = + org.tensorflow.proto.framework.OpDeprecation.newBuilder(deprecation_).mergeFrom(value).buildPartial(); + } else { + deprecation_ = value; + } + onChanged(); + } else { + deprecationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Optional deprecation based on GraphDef versions.
+     * 
+ * + * .tensorflow.OpDeprecation deprecation = 8; + */ + public Builder clearDeprecation() { + if (deprecationBuilder_ == null) { + deprecation_ = null; + onChanged(); + } else { + deprecation_ = null; + deprecationBuilder_ = null; + } + + return this; + } + /** + *
+     * Optional deprecation based on GraphDef versions.
+     * 
+ * + * .tensorflow.OpDeprecation deprecation = 8; + */ + public org.tensorflow.proto.framework.OpDeprecation.Builder getDeprecationBuilder() { + + onChanged(); + return getDeprecationFieldBuilder().getBuilder(); + } + /** + *
+     * Optional deprecation based on GraphDef versions.
+     * 
+ * + * .tensorflow.OpDeprecation deprecation = 8; + */ + public org.tensorflow.proto.framework.OpDeprecationOrBuilder getDeprecationOrBuilder() { + if (deprecationBuilder_ != null) { + return deprecationBuilder_.getMessageOrBuilder(); + } else { + return deprecation_ == null ? + org.tensorflow.proto.framework.OpDeprecation.getDefaultInstance() : deprecation_; + } + } + /** + *
+     * Optional deprecation based on GraphDef versions.
+     * 
+ * + * .tensorflow.OpDeprecation deprecation = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.OpDeprecation, org.tensorflow.proto.framework.OpDeprecation.Builder, org.tensorflow.proto.framework.OpDeprecationOrBuilder> + getDeprecationFieldBuilder() { + if (deprecationBuilder_ == null) { + deprecationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.OpDeprecation, org.tensorflow.proto.framework.OpDeprecation.Builder, org.tensorflow.proto.framework.OpDeprecationOrBuilder>( + getDeprecation(), + getParentForChildren(), + isClean()); + deprecation_ = null; + } + return deprecationBuilder_; + } + + private java.lang.Object summary_ = ""; + /** + *
+     * One-line human-readable description of what the Op does.
+     * 
+ * + * string summary = 5; + */ + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summary_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * One-line human-readable description of what the Op does.
+     * 
+ * + * string summary = 5; + */ + public com.google.protobuf.ByteString + getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * One-line human-readable description of what the Op does.
+     * 
+ * + * string summary = 5; + */ + public Builder setSummary( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + summary_ = value; + onChanged(); + return this; + } + /** + *
+     * One-line human-readable description of what the Op does.
+     * 
+ * + * string summary = 5; + */ + public Builder clearSummary() { + + summary_ = getDefaultInstance().getSummary(); + onChanged(); + return this; + } + /** + *
+     * One-line human-readable description of what the Op does.
+     * 
+ * + * string summary = 5; + */ + public Builder setSummaryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + summary_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * Additional, longer human-readable description of what the Op does.
+     * 
+ * + * string description = 6; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Additional, longer human-readable description of what the Op does.
+     * 
+ * + * string description = 6; + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Additional, longer human-readable description of what the Op does.
+     * 
+ * + * string description = 6; + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * Additional, longer human-readable description of what the Op does.
+     * 
+ * + * string description = 6; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * Additional, longer human-readable description of what the Op does.
+     * 
+ * + * string description = 6; + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private boolean isCommutative_ ; + /** + *
+     * True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)
+     * 
+ * + * bool is_commutative = 18; + */ + public boolean getIsCommutative() { + return isCommutative_; + } + /** + *
+     * True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)
+     * 
+ * + * bool is_commutative = 18; + */ + public Builder setIsCommutative(boolean value) { + + isCommutative_ = value; + onChanged(); + return this; + } + /** + *
+     * True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)
+     * 
+ * + * bool is_commutative = 18; + */ + public Builder clearIsCommutative() { + + isCommutative_ = false; + onChanged(); + return this; + } + + private boolean isAggregate_ ; + /** + *
+     * If is_aggregate is true, then this operation accepts N >= 2
+     * inputs and produces 1 output all of the same type.  Should be
+     * associative and commutative, and produce output with the same
+     * shape as the input.  The optimizer may replace an aggregate op
+     * taking input from multiple devices with a tree of aggregate ops
+     * that aggregate locally within each device (and possibly within
+     * groups of nearby devices) before communicating.
+     * TODO(josh11b): Implement that optimization.
+     * 
+ * + * bool is_aggregate = 16; + */ + public boolean getIsAggregate() { + return isAggregate_; + } + /** + *
+     * If is_aggregate is true, then this operation accepts N >= 2
+     * inputs and produces 1 output all of the same type.  Should be
+     * associative and commutative, and produce output with the same
+     * shape as the input.  The optimizer may replace an aggregate op
+     * taking input from multiple devices with a tree of aggregate ops
+     * that aggregate locally within each device (and possibly within
+     * groups of nearby devices) before communicating.
+     * TODO(josh11b): Implement that optimization.
+     * 
+ * + * bool is_aggregate = 16; + */ + public Builder setIsAggregate(boolean value) { + + isAggregate_ = value; + onChanged(); + return this; + } + /** + *
+     * If is_aggregate is true, then this operation accepts N >= 2
+     * inputs and produces 1 output all of the same type.  Should be
+     * associative and commutative, and produce output with the same
+     * shape as the input.  The optimizer may replace an aggregate op
+     * taking input from multiple devices with a tree of aggregate ops
+     * that aggregate locally within each device (and possibly within
+     * groups of nearby devices) before communicating.
+     * TODO(josh11b): Implement that optimization.
+     * 
+ * + * bool is_aggregate = 16; + */ + public Builder clearIsAggregate() { + + isAggregate_ = false; + onChanged(); + return this; + } + + private boolean isStateful_ ; + /** + *
+     * Ops are marked as stateful if their behavior depends on some state beyond
+     * their input tensors (e.g. variable reading op) or if they have
+     * a side-effect (e.g. printing or asserting ops). Equivalently, stateless ops
+     * must always produce the same output for the same input and have
+     * no side-effects.
+     * By default Ops may be moved between devices.  Stateful ops should
+     * either not be moved, or should only be moved if that state can also
+     * be moved (e.g. via some sort of save / restore).
+     * Stateful ops are guaranteed to never be optimized away by Common
+     * Subexpression Elimination (CSE).
+     * 
+ * + * bool is_stateful = 17; + */ + public boolean getIsStateful() { + return isStateful_; + } + /** + *
+     * Ops are marked as stateful if their behavior depends on some state beyond
+     * their input tensors (e.g. variable reading op) or if they have
+     * a side-effect (e.g. printing or asserting ops). Equivalently, stateless ops
+     * must always produce the same output for the same input and have
+     * no side-effects.
+     * By default Ops may be moved between devices.  Stateful ops should
+     * either not be moved, or should only be moved if that state can also
+     * be moved (e.g. via some sort of save / restore).
+     * Stateful ops are guaranteed to never be optimized away by Common
+     * Subexpression Elimination (CSE).
+     * 
+ * + * bool is_stateful = 17; + */ + public Builder setIsStateful(boolean value) { + + isStateful_ = value; + onChanged(); + return this; + } + /** + *
+     * Ops are marked as stateful if their behavior depends on some state beyond
+     * their input tensors (e.g. variable reading op) or if they have
+     * a side-effect (e.g. printing or asserting ops). Equivalently, stateless ops
+     * must always produce the same output for the same input and have
+     * no side-effects.
+     * By default Ops may be moved between devices.  Stateful ops should
+     * either not be moved, or should only be moved if that state can also
+     * be moved (e.g. via some sort of save / restore).
+     * Stateful ops are guaranteed to never be optimized away by Common
+     * Subexpression Elimination (CSE).
+     * 
+ * + * bool is_stateful = 17; + */ + public Builder clearIsStateful() { + + isStateful_ = false; + onChanged(); + return this; + } + + private boolean allowsUninitializedInput_ ; + /** + *
+     * By default, all inputs to an Op must be initialized Tensors.  Ops
+     * that may initialize tensors for the first time should set this
+     * field to true, to allow the Op to take an uninitialized Tensor as
+     * input.
+     * 
+ * + * bool allows_uninitialized_input = 19; + */ + public boolean getAllowsUninitializedInput() { + return allowsUninitializedInput_; + } + /** + *
+     * By default, all inputs to an Op must be initialized Tensors.  Ops
+     * that may initialize tensors for the first time should set this
+     * field to true, to allow the Op to take an uninitialized Tensor as
+     * input.
+     * 
+ * + * bool allows_uninitialized_input = 19; + */ + public Builder setAllowsUninitializedInput(boolean value) { + + allowsUninitializedInput_ = value; + onChanged(); + return this; + } + /** + *
+     * By default, all inputs to an Op must be initialized Tensors.  Ops
+     * that may initialize tensors for the first time should set this
+     * field to true, to allow the Op to take an uninitialized Tensor as
+     * input.
+     * 
+ * + * bool allows_uninitialized_input = 19; + */ + public Builder clearAllowsUninitializedInput() { + + allowsUninitializedInput_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.OpDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.OpDef) + private static final org.tensorflow.proto.framework.OpDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.OpDef(); + } + + public static org.tensorflow.proto.framework.OpDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OpDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpDefOrBuilder.java new file mode 100644 index 00000000000..6ac64c0ed97 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpDefOrBuilder.java @@ -0,0 +1,296 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/op_def.proto + +package org.tensorflow.proto.framework; + +public interface OpDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.OpDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Op names starting with an underscore are reserved for internal use.
+   * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*".
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * Op names starting with an underscore are reserved for internal use.
+   * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*".
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Description of the input(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + java.util.List + getInputArgList(); + /** + *
+   * Description of the input(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + org.tensorflow.proto.framework.OpDef.ArgDef getInputArg(int index); + /** + *
+   * Description of the input(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + int getInputArgCount(); + /** + *
+   * Description of the input(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + java.util.List + getInputArgOrBuilderList(); + /** + *
+   * Description of the input(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef input_arg = 2; + */ + org.tensorflow.proto.framework.OpDef.ArgDefOrBuilder getInputArgOrBuilder( + int index); + + /** + *
+   * Description of the output(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + java.util.List + getOutputArgList(); + /** + *
+   * Description of the output(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + org.tensorflow.proto.framework.OpDef.ArgDef getOutputArg(int index); + /** + *
+   * Description of the output(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + int getOutputArgCount(); + /** + *
+   * Description of the output(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + java.util.List + getOutputArgOrBuilderList(); + /** + *
+   * Description of the output(s).
+   * 
+ * + * repeated .tensorflow.OpDef.ArgDef output_arg = 3; + */ + org.tensorflow.proto.framework.OpDef.ArgDefOrBuilder getOutputArgOrBuilder( + int index); + + /** + *
+   * Named control outputs for this operation. Useful only for composite
+   * operations (i.e. functions) which want to name different control outputs.
+   * 
+ * + * repeated string control_output = 20; + */ + java.util.List + getControlOutputList(); + /** + *
+   * Named control outputs for this operation. Useful only for composite
+   * operations (i.e. functions) which want to name different control outputs.
+   * 
+ * + * repeated string control_output = 20; + */ + int getControlOutputCount(); + /** + *
+   * Named control outputs for this operation. Useful only for composite
+   * operations (i.e. functions) which want to name different control outputs.
+   * 
+ * + * repeated string control_output = 20; + */ + java.lang.String getControlOutput(int index); + /** + *
+   * Named control outputs for this operation. Useful only for composite
+   * operations (i.e. functions) which want to name different control outputs.
+   * 
+ * + * repeated string control_output = 20; + */ + com.google.protobuf.ByteString + getControlOutputBytes(int index); + + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + java.util.List + getAttrList(); + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + org.tensorflow.proto.framework.OpDef.AttrDef getAttr(int index); + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + int getAttrCount(); + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + java.util.List + getAttrOrBuilderList(); + /** + * repeated .tensorflow.OpDef.AttrDef attr = 4; + */ + org.tensorflow.proto.framework.OpDef.AttrDefOrBuilder getAttrOrBuilder( + int index); + + /** + *
+   * Optional deprecation based on GraphDef versions.
+   * 
+ * + * .tensorflow.OpDeprecation deprecation = 8; + */ + boolean hasDeprecation(); + /** + *
+   * Optional deprecation based on GraphDef versions.
+   * 
+ * + * .tensorflow.OpDeprecation deprecation = 8; + */ + org.tensorflow.proto.framework.OpDeprecation getDeprecation(); + /** + *
+   * Optional deprecation based on GraphDef versions.
+   * 
+ * + * .tensorflow.OpDeprecation deprecation = 8; + */ + org.tensorflow.proto.framework.OpDeprecationOrBuilder getDeprecationOrBuilder(); + + /** + *
+   * One-line human-readable description of what the Op does.
+   * 
+ * + * string summary = 5; + */ + java.lang.String getSummary(); + /** + *
+   * One-line human-readable description of what the Op does.
+   * 
+ * + * string summary = 5; + */ + com.google.protobuf.ByteString + getSummaryBytes(); + + /** + *
+   * Additional, longer human-readable description of what the Op does.
+   * 
+ * + * string description = 6; + */ + java.lang.String getDescription(); + /** + *
+   * Additional, longer human-readable description of what the Op does.
+   * 
+ * + * string description = 6; + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)
+   * 
+ * + * bool is_commutative = 18; + */ + boolean getIsCommutative(); + + /** + *
+   * If is_aggregate is true, then this operation accepts N >= 2
+   * inputs and produces 1 output all of the same type.  Should be
+   * associative and commutative, and produce output with the same
+   * shape as the input.  The optimizer may replace an aggregate op
+   * taking input from multiple devices with a tree of aggregate ops
+   * that aggregate locally within each device (and possibly within
+   * groups of nearby devices) before communicating.
+   * TODO(josh11b): Implement that optimization.
+   * 
+ * + * bool is_aggregate = 16; + */ + boolean getIsAggregate(); + + /** + *
+   * Ops are marked as stateful if their behavior depends on some state beyond
+   * their input tensors (e.g. variable reading op) or if they have
+   * a side-effect (e.g. printing or asserting ops). Equivalently, stateless ops
+   * must always produce the same output for the same input and have
+   * no side-effects.
+   * By default Ops may be moved between devices.  Stateful ops should
+   * either not be moved, or should only be moved if that state can also
+   * be moved (e.g. via some sort of save / restore).
+   * Stateful ops are guaranteed to never be optimized away by Common
+   * Subexpression Elimination (CSE).
+   * 
+ * + * bool is_stateful = 17; + */ + boolean getIsStateful(); + + /** + *
+   * By default, all inputs to an Op must be initialized Tensors.  Ops
+   * that may initialize tensors for the first time should set this
+   * field to true, to allow the Op to take an uninitialized Tensor as
+   * input.
+   * 
+ * + * bool allows_uninitialized_input = 19; + */ + boolean getAllowsUninitializedInput(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpDefProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpDefProtos.java new file mode 100644 index 00000000000..8beef161f83 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpDefProtos.java @@ -0,0 +1,121 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/op_def.proto + +package org.tensorflow.proto.framework; + +public final class OpDefProtos { + private OpDefProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_OpDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_OpDef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_OpDef_ArgDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_OpDef_ArgDef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_OpDef_AttrDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_OpDef_AttrDef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_OpDeprecation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_OpDeprecation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_OpList_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_OpList_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n&tensorflow/core/framework/op_def.proto" + + "\022\ntensorflow\032*tensorflow/core/framework/" + + "attr_value.proto\032%tensorflow/core/framew" + + "ork/types.proto\"\320\005\n\005OpDef\022\014\n\004name\030\001 \001(\t\022" + + "+\n\tinput_arg\030\002 \003(\0132\030.tensorflow.OpDef.Ar" + + "gDef\022,\n\noutput_arg\030\003 \003(\0132\030.tensorflow.Op" + + "Def.ArgDef\022\026\n\016control_output\030\024 \003(\t\022\'\n\004at" + + "tr\030\004 \003(\0132\031.tensorflow.OpDef.AttrDef\022.\n\013d" + + "eprecation\030\010 \001(\0132\031.tensorflow.OpDeprecat" + + "ion\022\017\n\007summary\030\005 \001(\t\022\023\n\013description\030\006 \001(" + + "\t\022\026\n\016is_commutative\030\022 \001(\010\022\024\n\014is_aggregat" + + "e\030\020 \001(\010\022\023\n\013is_stateful\030\021 \001(\010\022\"\n\032allows_u" + + "ninitialized_input\030\023 \001(\010\032\237\001\n\006ArgDef\022\014\n\004n" + + "ame\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\"\n\004type\030\003" + + " \001(\0162\024.tensorflow.DataType\022\021\n\ttype_attr\030" + + "\004 \001(\t\022\023\n\013number_attr\030\005 \001(\t\022\026\n\016type_list_" + + "attr\030\006 \001(\t\022\016\n\006is_ref\030\020 \001(\010\032\275\001\n\007AttrDef\022\014" + + "\n\004name\030\001 \001(\t\022\014\n\004type\030\002 \001(\t\022,\n\rdefault_va" + + "lue\030\003 \001(\0132\025.tensorflow.AttrValue\022\023\n\013desc" + + "ription\030\004 \001(\t\022\023\n\013has_minimum\030\005 \001(\010\022\017\n\007mi" + + "nimum\030\006 \001(\003\022-\n\016allowed_values\030\007 \001(\0132\025.te" + + "nsorflow.AttrValue\"5\n\rOpDeprecation\022\017\n\007v" + + "ersion\030\001 \001(\005\022\023\n\013explanation\030\002 \001(\t\"\'\n\006OpL" + + "ist\022\035\n\002op\030\001 \003(\0132\021.tensorflow.OpDefB\201\001\n\036o" + + "rg.tensorflow.proto.frameworkB\013OpDefProt" + + "osP\001ZMgithub.com/tensorflow/tensorflow/t" + + "ensorflow/go/core/framework/op_def_go_pr" + + "oto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.AttrValueProtos.getDescriptor(), + org.tensorflow.proto.framework.TypesProtos.getDescriptor(), + }); + internal_static_tensorflow_OpDef_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_OpDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_OpDef_descriptor, + new java.lang.String[] { "Name", "InputArg", "OutputArg", "ControlOutput", "Attr", "Deprecation", "Summary", "Description", "IsCommutative", "IsAggregate", "IsStateful", "AllowsUninitializedInput", }); + internal_static_tensorflow_OpDef_ArgDef_descriptor = + internal_static_tensorflow_OpDef_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_OpDef_ArgDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_OpDef_ArgDef_descriptor, + new java.lang.String[] { "Name", "Description", "Type", "TypeAttr", "NumberAttr", "TypeListAttr", "IsRef", }); + internal_static_tensorflow_OpDef_AttrDef_descriptor = + internal_static_tensorflow_OpDef_descriptor.getNestedTypes().get(1); + internal_static_tensorflow_OpDef_AttrDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_OpDef_AttrDef_descriptor, + new java.lang.String[] { "Name", "Type", "DefaultValue", "Description", "HasMinimum", "Minimum", "AllowedValues", }); + internal_static_tensorflow_OpDeprecation_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_OpDeprecation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_OpDeprecation_descriptor, + new java.lang.String[] { "Version", "Explanation", }); + internal_static_tensorflow_OpList_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_tensorflow_OpList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_OpList_descriptor, + new java.lang.String[] { "Op", }); + org.tensorflow.proto.framework.AttrValueProtos.getDescriptor(); + org.tensorflow.proto.framework.TypesProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpDeprecation.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpDeprecation.java new file mode 100644 index 00000000000..f33a34c9052 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpDeprecation.java @@ -0,0 +1,655 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/op_def.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Information about version-dependent deprecation of an op
+ * 
+ * + * Protobuf type {@code tensorflow.OpDeprecation} + */ +public final class OpDeprecation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.OpDeprecation) + OpDeprecationOrBuilder { +private static final long serialVersionUID = 0L; + // Use OpDeprecation.newBuilder() to construct. + private OpDeprecation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OpDeprecation() { + explanation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OpDeprecation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OpDeprecation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + version_ = input.readInt32(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + explanation_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDeprecation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDeprecation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.OpDeprecation.class, org.tensorflow.proto.framework.OpDeprecation.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private int version_; + /** + *
+   * First GraphDef version at which the op is disallowed.
+   * 
+ * + * int32 version = 1; + */ + public int getVersion() { + return version_; + } + + public static final int EXPLANATION_FIELD_NUMBER = 2; + private volatile java.lang.Object explanation_; + /** + *
+   * Explanation of why it was deprecated and what to use instead.
+   * 
+ * + * string explanation = 2; + */ + public java.lang.String getExplanation() { + java.lang.Object ref = explanation_; + 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(); + explanation_ = s; + return s; + } + } + /** + *
+   * Explanation of why it was deprecated and what to use instead.
+   * 
+ * + * string explanation = 2; + */ + public com.google.protobuf.ByteString + getExplanationBytes() { + java.lang.Object ref = explanation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + explanation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (version_ != 0) { + output.writeInt32(1, version_); + } + if (!getExplanationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, explanation_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (version_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, version_); + } + if (!getExplanationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, explanation_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.OpDeprecation)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.OpDeprecation other = (org.tensorflow.proto.framework.OpDeprecation) obj; + + if (getVersion() + != other.getVersion()) return false; + if (!getExplanation() + .equals(other.getExplanation())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion(); + hash = (37 * hash) + EXPLANATION_FIELD_NUMBER; + hash = (53 * hash) + getExplanation().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.OpDeprecation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OpDeprecation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDeprecation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OpDeprecation 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.proto.framework.OpDeprecation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OpDeprecation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDeprecation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OpDeprecation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDeprecation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OpDeprecation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpDeprecation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OpDeprecation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.OpDeprecation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Information about version-dependent deprecation of an op
+   * 
+ * + * Protobuf type {@code tensorflow.OpDeprecation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.OpDeprecation) + org.tensorflow.proto.framework.OpDeprecationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDeprecation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDeprecation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.OpDeprecation.class, org.tensorflow.proto.framework.OpDeprecation.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.OpDeprecation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + version_ = 0; + + explanation_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpDeprecation_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpDeprecation getDefaultInstanceForType() { + return org.tensorflow.proto.framework.OpDeprecation.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpDeprecation build() { + org.tensorflow.proto.framework.OpDeprecation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpDeprecation buildPartial() { + org.tensorflow.proto.framework.OpDeprecation result = new org.tensorflow.proto.framework.OpDeprecation(this); + result.version_ = version_; + result.explanation_ = explanation_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.OpDeprecation) { + return mergeFrom((org.tensorflow.proto.framework.OpDeprecation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.OpDeprecation other) { + if (other == org.tensorflow.proto.framework.OpDeprecation.getDefaultInstance()) return this; + if (other.getVersion() != 0) { + setVersion(other.getVersion()); + } + if (!other.getExplanation().isEmpty()) { + explanation_ = other.explanation_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.OpDeprecation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.OpDeprecation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int version_ ; + /** + *
+     * First GraphDef version at which the op is disallowed.
+     * 
+ * + * int32 version = 1; + */ + public int getVersion() { + return version_; + } + /** + *
+     * First GraphDef version at which the op is disallowed.
+     * 
+ * + * int32 version = 1; + */ + public Builder setVersion(int value) { + + version_ = value; + onChanged(); + return this; + } + /** + *
+     * First GraphDef version at which the op is disallowed.
+     * 
+ * + * int32 version = 1; + */ + public Builder clearVersion() { + + version_ = 0; + onChanged(); + return this; + } + + private java.lang.Object explanation_ = ""; + /** + *
+     * Explanation of why it was deprecated and what to use instead.
+     * 
+ * + * string explanation = 2; + */ + public java.lang.String getExplanation() { + java.lang.Object ref = explanation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + explanation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Explanation of why it was deprecated and what to use instead.
+     * 
+ * + * string explanation = 2; + */ + public com.google.protobuf.ByteString + getExplanationBytes() { + java.lang.Object ref = explanation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + explanation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Explanation of why it was deprecated and what to use instead.
+     * 
+ * + * string explanation = 2; + */ + public Builder setExplanation( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + explanation_ = value; + onChanged(); + return this; + } + /** + *
+     * Explanation of why it was deprecated and what to use instead.
+     * 
+ * + * string explanation = 2; + */ + public Builder clearExplanation() { + + explanation_ = getDefaultInstance().getExplanation(); + onChanged(); + return this; + } + /** + *
+     * Explanation of why it was deprecated and what to use instead.
+     * 
+ * + * string explanation = 2; + */ + public Builder setExplanationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + explanation_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.OpDeprecation) + } + + // @@protoc_insertion_point(class_scope:tensorflow.OpDeprecation) + private static final org.tensorflow.proto.framework.OpDeprecation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.OpDeprecation(); + } + + public static org.tensorflow.proto.framework.OpDeprecation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpDeprecation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OpDeprecation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpDeprecation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpDeprecationOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpDeprecationOrBuilder.java new file mode 100644 index 00000000000..3248db05508 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpDeprecationOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/op_def.proto + +package org.tensorflow.proto.framework; + +public interface OpDeprecationOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.OpDeprecation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * First GraphDef version at which the op is disallowed.
+   * 
+ * + * int32 version = 1; + */ + int getVersion(); + + /** + *
+   * Explanation of why it was deprecated and what to use instead.
+   * 
+ * + * string explanation = 2; + */ + java.lang.String getExplanation(); + /** + *
+   * Explanation of why it was deprecated and what to use instead.
+   * 
+ * + * string explanation = 2; + */ + com.google.protobuf.ByteString + getExplanationBytes(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpList.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpList.java new file mode 100644 index 00000000000..1be81195b29 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpList.java @@ -0,0 +1,773 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/op_def.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * A collection of OpDefs
+ * 
+ * + * Protobuf type {@code tensorflow.OpList} + */ +public final class OpList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.OpList) + OpListOrBuilder { +private static final long serialVersionUID = 0L; + // Use OpList.newBuilder() to construct. + private OpList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OpList() { + op_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OpList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OpList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + op_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + op_.add( + input.readMessage(org.tensorflow.proto.framework.OpDef.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + op_ = java.util.Collections.unmodifiableList(op_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.OpList.class, org.tensorflow.proto.framework.OpList.Builder.class); + } + + public static final int OP_FIELD_NUMBER = 1; + private java.util.List op_; + /** + * repeated .tensorflow.OpDef op = 1; + */ + public java.util.List getOpList() { + return op_; + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public java.util.List + getOpOrBuilderList() { + return op_; + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public int getOpCount() { + return op_.size(); + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public org.tensorflow.proto.framework.OpDef getOp(int index) { + return op_.get(index); + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public org.tensorflow.proto.framework.OpDefOrBuilder getOpOrBuilder( + int index) { + return op_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < op_.size(); i++) { + output.writeMessage(1, op_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < op_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, op_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.OpList)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.OpList other = (org.tensorflow.proto.framework.OpList) obj; + + if (!getOpList() + .equals(other.getOpList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOpCount() > 0) { + hash = (37 * hash) + OP_FIELD_NUMBER; + hash = (53 * hash) + getOpList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.OpList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OpList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OpList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OpList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OpList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OpList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.OpList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OpList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.OpList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A collection of OpDefs
+   * 
+ * + * Protobuf type {@code tensorflow.OpList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.OpList) + org.tensorflow.proto.framework.OpListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.OpList.class, org.tensorflow.proto.framework.OpList.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.OpList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getOpFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (opBuilder_ == null) { + op_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + opBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.OpDefProtos.internal_static_tensorflow_OpList_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpList getDefaultInstanceForType() { + return org.tensorflow.proto.framework.OpList.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpList build() { + org.tensorflow.proto.framework.OpList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpList buildPartial() { + org.tensorflow.proto.framework.OpList result = new org.tensorflow.proto.framework.OpList(this); + int from_bitField0_ = bitField0_; + if (opBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + op_ = java.util.Collections.unmodifiableList(op_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.op_ = op_; + } else { + result.op_ = opBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.OpList) { + return mergeFrom((org.tensorflow.proto.framework.OpList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.OpList other) { + if (other == org.tensorflow.proto.framework.OpList.getDefaultInstance()) return this; + if (opBuilder_ == null) { + if (!other.op_.isEmpty()) { + if (op_.isEmpty()) { + op_ = other.op_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOpIsMutable(); + op_.addAll(other.op_); + } + onChanged(); + } + } else { + if (!other.op_.isEmpty()) { + if (opBuilder_.isEmpty()) { + opBuilder_.dispose(); + opBuilder_ = null; + op_ = other.op_; + bitField0_ = (bitField0_ & ~0x00000001); + opBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOpFieldBuilder() : null; + } else { + opBuilder_.addAllMessages(other.op_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.OpList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.OpList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List op_ = + java.util.Collections.emptyList(); + private void ensureOpIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + op_ = new java.util.ArrayList(op_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.OpDef, org.tensorflow.proto.framework.OpDef.Builder, org.tensorflow.proto.framework.OpDefOrBuilder> opBuilder_; + + /** + * repeated .tensorflow.OpDef op = 1; + */ + public java.util.List getOpList() { + if (opBuilder_ == null) { + return java.util.Collections.unmodifiableList(op_); + } else { + return opBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public int getOpCount() { + if (opBuilder_ == null) { + return op_.size(); + } else { + return opBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public org.tensorflow.proto.framework.OpDef getOp(int index) { + if (opBuilder_ == null) { + return op_.get(index); + } else { + return opBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public Builder setOp( + int index, org.tensorflow.proto.framework.OpDef value) { + if (opBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpIsMutable(); + op_.set(index, value); + onChanged(); + } else { + opBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public Builder setOp( + int index, org.tensorflow.proto.framework.OpDef.Builder builderForValue) { + if (opBuilder_ == null) { + ensureOpIsMutable(); + op_.set(index, builderForValue.build()); + onChanged(); + } else { + opBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public Builder addOp(org.tensorflow.proto.framework.OpDef value) { + if (opBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpIsMutable(); + op_.add(value); + onChanged(); + } else { + opBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public Builder addOp( + int index, org.tensorflow.proto.framework.OpDef value) { + if (opBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpIsMutable(); + op_.add(index, value); + onChanged(); + } else { + opBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public Builder addOp( + org.tensorflow.proto.framework.OpDef.Builder builderForValue) { + if (opBuilder_ == null) { + ensureOpIsMutable(); + op_.add(builderForValue.build()); + onChanged(); + } else { + opBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public Builder addOp( + int index, org.tensorflow.proto.framework.OpDef.Builder builderForValue) { + if (opBuilder_ == null) { + ensureOpIsMutable(); + op_.add(index, builderForValue.build()); + onChanged(); + } else { + opBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public Builder addAllOp( + java.lang.Iterable values) { + if (opBuilder_ == null) { + ensureOpIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, op_); + onChanged(); + } else { + opBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public Builder clearOp() { + if (opBuilder_ == null) { + op_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + opBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public Builder removeOp(int index) { + if (opBuilder_ == null) { + ensureOpIsMutable(); + op_.remove(index); + onChanged(); + } else { + opBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public org.tensorflow.proto.framework.OpDef.Builder getOpBuilder( + int index) { + return getOpFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public org.tensorflow.proto.framework.OpDefOrBuilder getOpOrBuilder( + int index) { + if (opBuilder_ == null) { + return op_.get(index); } else { + return opBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public java.util.List + getOpOrBuilderList() { + if (opBuilder_ != null) { + return opBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(op_); + } + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public org.tensorflow.proto.framework.OpDef.Builder addOpBuilder() { + return getOpFieldBuilder().addBuilder( + org.tensorflow.proto.framework.OpDef.getDefaultInstance()); + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public org.tensorflow.proto.framework.OpDef.Builder addOpBuilder( + int index) { + return getOpFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.OpDef.getDefaultInstance()); + } + /** + * repeated .tensorflow.OpDef op = 1; + */ + public java.util.List + getOpBuilderList() { + return getOpFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.OpDef, org.tensorflow.proto.framework.OpDef.Builder, org.tensorflow.proto.framework.OpDefOrBuilder> + getOpFieldBuilder() { + if (opBuilder_ == null) { + opBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.OpDef, org.tensorflow.proto.framework.OpDef.Builder, org.tensorflow.proto.framework.OpDefOrBuilder>( + op_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + op_ = null; + } + return opBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.OpList) + } + + // @@protoc_insertion_point(class_scope:tensorflow.OpList) + private static final org.tensorflow.proto.framework.OpList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.OpList(); + } + + public static org.tensorflow.proto.framework.OpList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OpList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OpList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpListOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpListOrBuilder.java new file mode 100644 index 00000000000..a3fc1fa9856 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OpListOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/op_def.proto + +package org.tensorflow.proto.framework; + +public interface OpListOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.OpList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .tensorflow.OpDef op = 1; + */ + java.util.List + getOpList(); + /** + * repeated .tensorflow.OpDef op = 1; + */ + org.tensorflow.proto.framework.OpDef getOp(int index); + /** + * repeated .tensorflow.OpDef op = 1; + */ + int getOpCount(); + /** + * repeated .tensorflow.OpDef op = 1; + */ + java.util.List + getOpOrBuilderList(); + /** + * repeated .tensorflow.OpDef op = 1; + */ + org.tensorflow.proto.framework.OpDefOrBuilder getOpOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OptimizerOptions.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OptimizerOptions.java new file mode 100644 index 00000000000..2afa5a96067 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OptimizerOptions.java @@ -0,0 +1,1210 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Options passed to the graph optimizer
+ * 
+ * + * Protobuf type {@code tensorflow.OptimizerOptions} + */ +public final class OptimizerOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.OptimizerOptions) + OptimizerOptionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use OptimizerOptions.newBuilder() to construct. + private OptimizerOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OptimizerOptions() { + optLevel_ = 0; + globalJitLevel_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OptimizerOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OptimizerOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + doCommonSubexpressionElimination_ = input.readBool(); + break; + } + case 16: { + + doConstantFolding_ = input.readBool(); + break; + } + case 24: { + int rawValue = input.readEnum(); + + optLevel_ = rawValue; + break; + } + case 32: { + + doFunctionInlining_ = input.readBool(); + break; + } + case 40: { + int rawValue = input.readEnum(); + + globalJitLevel_ = rawValue; + break; + } + case 48: { + + maxFoldedConstantInBytes_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_OptimizerOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_OptimizerOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.OptimizerOptions.class, org.tensorflow.proto.framework.OptimizerOptions.Builder.class); + } + + /** + *
+   * Optimization level
+   * 
+ * + * Protobuf enum {@code tensorflow.OptimizerOptions.Level} + */ + public enum Level + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * L1 is the default level.
+     * Optimization performed at L1 :
+     * 1. Common subexpression elimination
+     * 2. Constant folding
+     * 
+ * + * L1 = 0; + */ + L1(0), + /** + *
+     * No optimizations
+     * 
+ * + * L0 = -1; + */ + L0(-1), + UNRECOGNIZED(-1), + ; + + /** + *
+     * L1 is the default level.
+     * Optimization performed at L1 :
+     * 1. Common subexpression elimination
+     * 2. Constant folding
+     * 
+ * + * L1 = 0; + */ + public static final int L1_VALUE = 0; + /** + *
+     * No optimizations
+     * 
+ * + * L0 = -1; + */ + public static final int L0_VALUE = -1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Level valueOf(int value) { + return forNumber(value); + } + + public static Level forNumber(int value) { + switch (value) { + case 0: return L1; + case -1: return L0; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Level> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Level findValueByNumber(int number) { + return Level.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.tensorflow.proto.framework.OptimizerOptions.getDescriptor().getEnumTypes().get(0); + } + + private static final Level[] VALUES = values(); + + public static Level valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Level(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:tensorflow.OptimizerOptions.Level) + } + + /** + *
+   * Control the use of the compiler/jit.  Experimental.
+   * 
+ * + * Protobuf enum {@code tensorflow.OptimizerOptions.GlobalJitLevel} + */ + public enum GlobalJitLevel + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Default setting ("off" now, but later expected to be "on")
+     * 
+ * + * DEFAULT = 0; + */ + DEFAULT(0), + /** + * OFF = -1; + */ + OFF(-1), + /** + *
+     * The following settings turn on compilation, with higher values being
+     * more aggressive.  Higher values may reduce opportunities for parallelism
+     * and may use more memory.  (At present, there is no distinction, but this
+     * is expected to change.)
+     * 
+ * + * ON_1 = 1; + */ + ON_1(1), + /** + * ON_2 = 2; + */ + ON_2(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Default setting ("off" now, but later expected to be "on")
+     * 
+ * + * DEFAULT = 0; + */ + public static final int DEFAULT_VALUE = 0; + /** + * OFF = -1; + */ + public static final int OFF_VALUE = -1; + /** + *
+     * The following settings turn on compilation, with higher values being
+     * more aggressive.  Higher values may reduce opportunities for parallelism
+     * and may use more memory.  (At present, there is no distinction, but this
+     * is expected to change.)
+     * 
+ * + * ON_1 = 1; + */ + public static final int ON_1_VALUE = 1; + /** + * ON_2 = 2; + */ + public static final int ON_2_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static GlobalJitLevel valueOf(int value) { + return forNumber(value); + } + + public static GlobalJitLevel forNumber(int value) { + switch (value) { + case 0: return DEFAULT; + case -1: return OFF; + case 1: return ON_1; + case 2: return ON_2; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + GlobalJitLevel> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public GlobalJitLevel findValueByNumber(int number) { + return GlobalJitLevel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.tensorflow.proto.framework.OptimizerOptions.getDescriptor().getEnumTypes().get(1); + } + + private static final GlobalJitLevel[] VALUES = values(); + + public static GlobalJitLevel valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private GlobalJitLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:tensorflow.OptimizerOptions.GlobalJitLevel) + } + + public static final int DO_COMMON_SUBEXPRESSION_ELIMINATION_FIELD_NUMBER = 1; + private boolean doCommonSubexpressionElimination_; + /** + *
+   * If true, optimize the graph using common subexpression elimination.
+   * 
+ * + * bool do_common_subexpression_elimination = 1; + */ + public boolean getDoCommonSubexpressionElimination() { + return doCommonSubexpressionElimination_; + } + + public static final int DO_CONSTANT_FOLDING_FIELD_NUMBER = 2; + private boolean doConstantFolding_; + /** + *
+   * If true, perform constant folding optimization on the graph.
+   * 
+ * + * bool do_constant_folding = 2; + */ + public boolean getDoConstantFolding() { + return doConstantFolding_; + } + + public static final int MAX_FOLDED_CONSTANT_IN_BYTES_FIELD_NUMBER = 6; + private long maxFoldedConstantInBytes_; + /** + *
+   * Constant folding optimization replaces tensors whose values can be
+   * predetermined, with constant nodes. To avoid inserting too large constants,
+   * the size of each constant created can be limited. If this value is zero, a
+   * default limit of 10 MiB will be applied. If constant folding optimization
+   * is disabled, this value is ignored.
+   * 
+ * + * int64 max_folded_constant_in_bytes = 6; + */ + public long getMaxFoldedConstantInBytes() { + return maxFoldedConstantInBytes_; + } + + public static final int DO_FUNCTION_INLINING_FIELD_NUMBER = 4; + private boolean doFunctionInlining_; + /** + *
+   * If true, perform function inlining on the graph.
+   * 
+ * + * bool do_function_inlining = 4; + */ + public boolean getDoFunctionInlining() { + return doFunctionInlining_; + } + + public static final int OPT_LEVEL_FIELD_NUMBER = 3; + private int optLevel_; + /** + *
+   * Overall optimization level. The actual optimizations applied will be the
+   * logical OR of the flags that this level implies and any flags already set.
+   * 
+ * + * .tensorflow.OptimizerOptions.Level opt_level = 3; + */ + public int getOptLevelValue() { + return optLevel_; + } + /** + *
+   * Overall optimization level. The actual optimizations applied will be the
+   * logical OR of the flags that this level implies and any flags already set.
+   * 
+ * + * .tensorflow.OptimizerOptions.Level opt_level = 3; + */ + public org.tensorflow.proto.framework.OptimizerOptions.Level getOptLevel() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.OptimizerOptions.Level result = org.tensorflow.proto.framework.OptimizerOptions.Level.valueOf(optLevel_); + return result == null ? org.tensorflow.proto.framework.OptimizerOptions.Level.UNRECOGNIZED : result; + } + + public static final int GLOBAL_JIT_LEVEL_FIELD_NUMBER = 5; + private int globalJitLevel_; + /** + * .tensorflow.OptimizerOptions.GlobalJitLevel global_jit_level = 5; + */ + public int getGlobalJitLevelValue() { + return globalJitLevel_; + } + /** + * .tensorflow.OptimizerOptions.GlobalJitLevel global_jit_level = 5; + */ + public org.tensorflow.proto.framework.OptimizerOptions.GlobalJitLevel getGlobalJitLevel() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.OptimizerOptions.GlobalJitLevel result = org.tensorflow.proto.framework.OptimizerOptions.GlobalJitLevel.valueOf(globalJitLevel_); + return result == null ? org.tensorflow.proto.framework.OptimizerOptions.GlobalJitLevel.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (doCommonSubexpressionElimination_ != false) { + output.writeBool(1, doCommonSubexpressionElimination_); + } + if (doConstantFolding_ != false) { + output.writeBool(2, doConstantFolding_); + } + if (optLevel_ != org.tensorflow.proto.framework.OptimizerOptions.Level.L1.getNumber()) { + output.writeEnum(3, optLevel_); + } + if (doFunctionInlining_ != false) { + output.writeBool(4, doFunctionInlining_); + } + if (globalJitLevel_ != org.tensorflow.proto.framework.OptimizerOptions.GlobalJitLevel.DEFAULT.getNumber()) { + output.writeEnum(5, globalJitLevel_); + } + if (maxFoldedConstantInBytes_ != 0L) { + output.writeInt64(6, maxFoldedConstantInBytes_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (doCommonSubexpressionElimination_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, doCommonSubexpressionElimination_); + } + if (doConstantFolding_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, doConstantFolding_); + } + if (optLevel_ != org.tensorflow.proto.framework.OptimizerOptions.Level.L1.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, optLevel_); + } + if (doFunctionInlining_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, doFunctionInlining_); + } + if (globalJitLevel_ != org.tensorflow.proto.framework.OptimizerOptions.GlobalJitLevel.DEFAULT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, globalJitLevel_); + } + if (maxFoldedConstantInBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, maxFoldedConstantInBytes_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.OptimizerOptions)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.OptimizerOptions other = (org.tensorflow.proto.framework.OptimizerOptions) obj; + + if (getDoCommonSubexpressionElimination() + != other.getDoCommonSubexpressionElimination()) return false; + if (getDoConstantFolding() + != other.getDoConstantFolding()) return false; + if (getMaxFoldedConstantInBytes() + != other.getMaxFoldedConstantInBytes()) return false; + if (getDoFunctionInlining() + != other.getDoFunctionInlining()) return false; + if (optLevel_ != other.optLevel_) return false; + if (globalJitLevel_ != other.globalJitLevel_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DO_COMMON_SUBEXPRESSION_ELIMINATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDoCommonSubexpressionElimination()); + hash = (37 * hash) + DO_CONSTANT_FOLDING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDoConstantFolding()); + hash = (37 * hash) + MAX_FOLDED_CONSTANT_IN_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMaxFoldedConstantInBytes()); + hash = (37 * hash) + DO_FUNCTION_INLINING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDoFunctionInlining()); + hash = (37 * hash) + OPT_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + optLevel_; + hash = (37 * hash) + GLOBAL_JIT_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + globalJitLevel_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.OptimizerOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OptimizerOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OptimizerOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OptimizerOptions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OptimizerOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.OptimizerOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.OptimizerOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OptimizerOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.OptimizerOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OptimizerOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.OptimizerOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.OptimizerOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.OptimizerOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Options passed to the graph optimizer
+   * 
+ * + * Protobuf type {@code tensorflow.OptimizerOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.OptimizerOptions) + org.tensorflow.proto.framework.OptimizerOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_OptimizerOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_OptimizerOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.OptimizerOptions.class, org.tensorflow.proto.framework.OptimizerOptions.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.OptimizerOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + doCommonSubexpressionElimination_ = false; + + doConstantFolding_ = false; + + maxFoldedConstantInBytes_ = 0L; + + doFunctionInlining_ = false; + + optLevel_ = 0; + + globalJitLevel_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_OptimizerOptions_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OptimizerOptions getDefaultInstanceForType() { + return org.tensorflow.proto.framework.OptimizerOptions.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.OptimizerOptions build() { + org.tensorflow.proto.framework.OptimizerOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OptimizerOptions buildPartial() { + org.tensorflow.proto.framework.OptimizerOptions result = new org.tensorflow.proto.framework.OptimizerOptions(this); + result.doCommonSubexpressionElimination_ = doCommonSubexpressionElimination_; + result.doConstantFolding_ = doConstantFolding_; + result.maxFoldedConstantInBytes_ = maxFoldedConstantInBytes_; + result.doFunctionInlining_ = doFunctionInlining_; + result.optLevel_ = optLevel_; + result.globalJitLevel_ = globalJitLevel_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.OptimizerOptions) { + return mergeFrom((org.tensorflow.proto.framework.OptimizerOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.OptimizerOptions other) { + if (other == org.tensorflow.proto.framework.OptimizerOptions.getDefaultInstance()) return this; + if (other.getDoCommonSubexpressionElimination() != false) { + setDoCommonSubexpressionElimination(other.getDoCommonSubexpressionElimination()); + } + if (other.getDoConstantFolding() != false) { + setDoConstantFolding(other.getDoConstantFolding()); + } + if (other.getMaxFoldedConstantInBytes() != 0L) { + setMaxFoldedConstantInBytes(other.getMaxFoldedConstantInBytes()); + } + if (other.getDoFunctionInlining() != false) { + setDoFunctionInlining(other.getDoFunctionInlining()); + } + if (other.optLevel_ != 0) { + setOptLevelValue(other.getOptLevelValue()); + } + if (other.globalJitLevel_ != 0) { + setGlobalJitLevelValue(other.getGlobalJitLevelValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.OptimizerOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.OptimizerOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean doCommonSubexpressionElimination_ ; + /** + *
+     * If true, optimize the graph using common subexpression elimination.
+     * 
+ * + * bool do_common_subexpression_elimination = 1; + */ + public boolean getDoCommonSubexpressionElimination() { + return doCommonSubexpressionElimination_; + } + /** + *
+     * If true, optimize the graph using common subexpression elimination.
+     * 
+ * + * bool do_common_subexpression_elimination = 1; + */ + public Builder setDoCommonSubexpressionElimination(boolean value) { + + doCommonSubexpressionElimination_ = value; + onChanged(); + return this; + } + /** + *
+     * If true, optimize the graph using common subexpression elimination.
+     * 
+ * + * bool do_common_subexpression_elimination = 1; + */ + public Builder clearDoCommonSubexpressionElimination() { + + doCommonSubexpressionElimination_ = false; + onChanged(); + return this; + } + + private boolean doConstantFolding_ ; + /** + *
+     * If true, perform constant folding optimization on the graph.
+     * 
+ * + * bool do_constant_folding = 2; + */ + public boolean getDoConstantFolding() { + return doConstantFolding_; + } + /** + *
+     * If true, perform constant folding optimization on the graph.
+     * 
+ * + * bool do_constant_folding = 2; + */ + public Builder setDoConstantFolding(boolean value) { + + doConstantFolding_ = value; + onChanged(); + return this; + } + /** + *
+     * If true, perform constant folding optimization on the graph.
+     * 
+ * + * bool do_constant_folding = 2; + */ + public Builder clearDoConstantFolding() { + + doConstantFolding_ = false; + onChanged(); + return this; + } + + private long maxFoldedConstantInBytes_ ; + /** + *
+     * Constant folding optimization replaces tensors whose values can be
+     * predetermined, with constant nodes. To avoid inserting too large constants,
+     * the size of each constant created can be limited. If this value is zero, a
+     * default limit of 10 MiB will be applied. If constant folding optimization
+     * is disabled, this value is ignored.
+     * 
+ * + * int64 max_folded_constant_in_bytes = 6; + */ + public long getMaxFoldedConstantInBytes() { + return maxFoldedConstantInBytes_; + } + /** + *
+     * Constant folding optimization replaces tensors whose values can be
+     * predetermined, with constant nodes. To avoid inserting too large constants,
+     * the size of each constant created can be limited. If this value is zero, a
+     * default limit of 10 MiB will be applied. If constant folding optimization
+     * is disabled, this value is ignored.
+     * 
+ * + * int64 max_folded_constant_in_bytes = 6; + */ + public Builder setMaxFoldedConstantInBytes(long value) { + + maxFoldedConstantInBytes_ = value; + onChanged(); + return this; + } + /** + *
+     * Constant folding optimization replaces tensors whose values can be
+     * predetermined, with constant nodes. To avoid inserting too large constants,
+     * the size of each constant created can be limited. If this value is zero, a
+     * default limit of 10 MiB will be applied. If constant folding optimization
+     * is disabled, this value is ignored.
+     * 
+ * + * int64 max_folded_constant_in_bytes = 6; + */ + public Builder clearMaxFoldedConstantInBytes() { + + maxFoldedConstantInBytes_ = 0L; + onChanged(); + return this; + } + + private boolean doFunctionInlining_ ; + /** + *
+     * If true, perform function inlining on the graph.
+     * 
+ * + * bool do_function_inlining = 4; + */ + public boolean getDoFunctionInlining() { + return doFunctionInlining_; + } + /** + *
+     * If true, perform function inlining on the graph.
+     * 
+ * + * bool do_function_inlining = 4; + */ + public Builder setDoFunctionInlining(boolean value) { + + doFunctionInlining_ = value; + onChanged(); + return this; + } + /** + *
+     * If true, perform function inlining on the graph.
+     * 
+ * + * bool do_function_inlining = 4; + */ + public Builder clearDoFunctionInlining() { + + doFunctionInlining_ = false; + onChanged(); + return this; + } + + private int optLevel_ = 0; + /** + *
+     * Overall optimization level. The actual optimizations applied will be the
+     * logical OR of the flags that this level implies and any flags already set.
+     * 
+ * + * .tensorflow.OptimizerOptions.Level opt_level = 3; + */ + public int getOptLevelValue() { + return optLevel_; + } + /** + *
+     * Overall optimization level. The actual optimizations applied will be the
+     * logical OR of the flags that this level implies and any flags already set.
+     * 
+ * + * .tensorflow.OptimizerOptions.Level opt_level = 3; + */ + public Builder setOptLevelValue(int value) { + optLevel_ = value; + onChanged(); + return this; + } + /** + *
+     * Overall optimization level. The actual optimizations applied will be the
+     * logical OR of the flags that this level implies and any flags already set.
+     * 
+ * + * .tensorflow.OptimizerOptions.Level opt_level = 3; + */ + public org.tensorflow.proto.framework.OptimizerOptions.Level getOptLevel() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.OptimizerOptions.Level result = org.tensorflow.proto.framework.OptimizerOptions.Level.valueOf(optLevel_); + return result == null ? org.tensorflow.proto.framework.OptimizerOptions.Level.UNRECOGNIZED : result; + } + /** + *
+     * Overall optimization level. The actual optimizations applied will be the
+     * logical OR of the flags that this level implies and any flags already set.
+     * 
+ * + * .tensorflow.OptimizerOptions.Level opt_level = 3; + */ + public Builder setOptLevel(org.tensorflow.proto.framework.OptimizerOptions.Level value) { + if (value == null) { + throw new NullPointerException(); + } + + optLevel_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Overall optimization level. The actual optimizations applied will be the
+     * logical OR of the flags that this level implies and any flags already set.
+     * 
+ * + * .tensorflow.OptimizerOptions.Level opt_level = 3; + */ + public Builder clearOptLevel() { + + optLevel_ = 0; + onChanged(); + return this; + } + + private int globalJitLevel_ = 0; + /** + * .tensorflow.OptimizerOptions.GlobalJitLevel global_jit_level = 5; + */ + public int getGlobalJitLevelValue() { + return globalJitLevel_; + } + /** + * .tensorflow.OptimizerOptions.GlobalJitLevel global_jit_level = 5; + */ + public Builder setGlobalJitLevelValue(int value) { + globalJitLevel_ = value; + onChanged(); + return this; + } + /** + * .tensorflow.OptimizerOptions.GlobalJitLevel global_jit_level = 5; + */ + public org.tensorflow.proto.framework.OptimizerOptions.GlobalJitLevel getGlobalJitLevel() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.OptimizerOptions.GlobalJitLevel result = org.tensorflow.proto.framework.OptimizerOptions.GlobalJitLevel.valueOf(globalJitLevel_); + return result == null ? org.tensorflow.proto.framework.OptimizerOptions.GlobalJitLevel.UNRECOGNIZED : result; + } + /** + * .tensorflow.OptimizerOptions.GlobalJitLevel global_jit_level = 5; + */ + public Builder setGlobalJitLevel(org.tensorflow.proto.framework.OptimizerOptions.GlobalJitLevel value) { + if (value == null) { + throw new NullPointerException(); + } + + globalJitLevel_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .tensorflow.OptimizerOptions.GlobalJitLevel global_jit_level = 5; + */ + public Builder clearGlobalJitLevel() { + + globalJitLevel_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.OptimizerOptions) + } + + // @@protoc_insertion_point(class_scope:tensorflow.OptimizerOptions) + private static final org.tensorflow.proto.framework.OptimizerOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.OptimizerOptions(); + } + + public static org.tensorflow.proto.framework.OptimizerOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OptimizerOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OptimizerOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.OptimizerOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OptimizerOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OptimizerOptionsOrBuilder.java new file mode 100644 index 00000000000..255ace49e05 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/OptimizerOptionsOrBuilder.java @@ -0,0 +1,77 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +public interface OptimizerOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.OptimizerOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If true, optimize the graph using common subexpression elimination.
+   * 
+ * + * bool do_common_subexpression_elimination = 1; + */ + boolean getDoCommonSubexpressionElimination(); + + /** + *
+   * If true, perform constant folding optimization on the graph.
+   * 
+ * + * bool do_constant_folding = 2; + */ + boolean getDoConstantFolding(); + + /** + *
+   * Constant folding optimization replaces tensors whose values can be
+   * predetermined, with constant nodes. To avoid inserting too large constants,
+   * the size of each constant created can be limited. If this value is zero, a
+   * default limit of 10 MiB will be applied. If constant folding optimization
+   * is disabled, this value is ignored.
+   * 
+ * + * int64 max_folded_constant_in_bytes = 6; + */ + long getMaxFoldedConstantInBytes(); + + /** + *
+   * If true, perform function inlining on the graph.
+   * 
+ * + * bool do_function_inlining = 4; + */ + boolean getDoFunctionInlining(); + + /** + *
+   * Overall optimization level. The actual optimizations applied will be the
+   * logical OR of the flags that this level implies and any flags already set.
+   * 
+ * + * .tensorflow.OptimizerOptions.Level opt_level = 3; + */ + int getOptLevelValue(); + /** + *
+   * Overall optimization level. The actual optimizations applied will be the
+   * logical OR of the flags that this level implies and any flags already set.
+   * 
+ * + * .tensorflow.OptimizerOptions.Level opt_level = 3; + */ + org.tensorflow.proto.framework.OptimizerOptions.Level getOptLevel(); + + /** + * .tensorflow.OptimizerOptions.GlobalJitLevel global_jit_level = 5; + */ + int getGlobalJitLevelValue(); + /** + * .tensorflow.OptimizerOptions.GlobalJitLevel global_jit_level = 5; + */ + org.tensorflow.proto.framework.OptimizerOptions.GlobalJitLevel getGlobalJitLevel(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/PairValue.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/PairValue.java new file mode 100644 index 00000000000..f9972971b17 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/PairValue.java @@ -0,0 +1,735 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/struct.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Represents a (key, value) pair.
+ * 
+ * + * Protobuf type {@code tensorflow.PairValue} + */ +public final class PairValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.PairValue) + PairValueOrBuilder { +private static final long serialVersionUID = 0L; + // Use PairValue.newBuilder() to construct. + private PairValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PairValue() { + key_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PairValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PairValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + key_ = s; + break; + } + case 18: { + org.tensorflow.proto.framework.StructuredValue.Builder subBuilder = null; + if (value_ != null) { + subBuilder = value_.toBuilder(); + } + value_ = input.readMessage(org.tensorflow.proto.framework.StructuredValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(value_); + value_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_PairValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_PairValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.PairValue.class, org.tensorflow.proto.framework.PairValue.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object key_; + /** + * string key = 1; + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + 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(); + key_ = s; + return s; + } + } + /** + * string key = 1; + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private org.tensorflow.proto.framework.StructuredValue value_; + /** + * .tensorflow.StructuredValue value = 2; + */ + public boolean hasValue() { + return value_ != null; + } + /** + * .tensorflow.StructuredValue value = 2; + */ + public org.tensorflow.proto.framework.StructuredValue getValue() { + return value_ == null ? org.tensorflow.proto.framework.StructuredValue.getDefaultInstance() : value_; + } + /** + * .tensorflow.StructuredValue value = 2; + */ + public org.tensorflow.proto.framework.StructuredValueOrBuilder getValueOrBuilder() { + return getValue(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (value_ != null) { + output.writeMessage(2, getValue()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (value_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getValue()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.PairValue)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.PairValue other = (org.tensorflow.proto.framework.PairValue) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue() + .equals(other.getValue())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.PairValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.PairValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.PairValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.PairValue 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.proto.framework.PairValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.PairValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.PairValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.PairValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.PairValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.PairValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.PairValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.PairValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.PairValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a (key, value) pair.
+   * 
+ * + * Protobuf type {@code tensorflow.PairValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.PairValue) + org.tensorflow.proto.framework.PairValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_PairValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_PairValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.PairValue.class, org.tensorflow.proto.framework.PairValue.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.PairValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + key_ = ""; + + if (valueBuilder_ == null) { + value_ = null; + } else { + value_ = null; + valueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_PairValue_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.PairValue getDefaultInstanceForType() { + return org.tensorflow.proto.framework.PairValue.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.PairValue build() { + org.tensorflow.proto.framework.PairValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.PairValue buildPartial() { + org.tensorflow.proto.framework.PairValue result = new org.tensorflow.proto.framework.PairValue(this); + result.key_ = key_; + if (valueBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = valueBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.PairValue) { + return mergeFrom((org.tensorflow.proto.framework.PairValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.PairValue other) { + if (other == org.tensorflow.proto.framework.PairValue.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + onChanged(); + } + if (other.hasValue()) { + mergeValue(other.getValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.PairValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.PairValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object key_ = ""; + /** + * string key = 1; + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string key = 1; + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string key = 1; + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + * string key = 1; + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * string key = 1; + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + key_ = value; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.StructuredValue value_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder> valueBuilder_; + /** + * .tensorflow.StructuredValue value = 2; + */ + public boolean hasValue() { + return valueBuilder_ != null || value_ != null; + } + /** + * .tensorflow.StructuredValue value = 2; + */ + public org.tensorflow.proto.framework.StructuredValue getValue() { + if (valueBuilder_ == null) { + return value_ == null ? org.tensorflow.proto.framework.StructuredValue.getDefaultInstance() : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + * .tensorflow.StructuredValue value = 2; + */ + public Builder setValue(org.tensorflow.proto.framework.StructuredValue value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + valueBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.StructuredValue value = 2; + */ + public Builder setValue( + org.tensorflow.proto.framework.StructuredValue.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.StructuredValue value = 2; + */ + public Builder mergeValue(org.tensorflow.proto.framework.StructuredValue value) { + if (valueBuilder_ == null) { + if (value_ != null) { + value_ = + org.tensorflow.proto.framework.StructuredValue.newBuilder(value_).mergeFrom(value).buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + valueBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.StructuredValue value = 2; + */ + public Builder clearValue() { + if (valueBuilder_ == null) { + value_ = null; + onChanged(); + } else { + value_ = null; + valueBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.StructuredValue value = 2; + */ + public org.tensorflow.proto.framework.StructuredValue.Builder getValueBuilder() { + + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + * .tensorflow.StructuredValue value = 2; + */ + public org.tensorflow.proto.framework.StructuredValueOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null ? + org.tensorflow.proto.framework.StructuredValue.getDefaultInstance() : value_; + } + } + /** + * .tensorflow.StructuredValue value = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder>( + getValue(), + getParentForChildren(), + isClean()); + value_ = null; + } + return valueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.PairValue) + } + + // @@protoc_insertion_point(class_scope:tensorflow.PairValue) + private static final org.tensorflow.proto.framework.PairValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.PairValue(); + } + + public static org.tensorflow.proto.framework.PairValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PairValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PairValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.PairValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/PairValueOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/PairValueOrBuilder.java new file mode 100644 index 00000000000..0e35d82c1af --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/PairValueOrBuilder.java @@ -0,0 +1,32 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/struct.proto + +package org.tensorflow.proto.framework; + +public interface PairValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.PairValue) + com.google.protobuf.MessageOrBuilder { + + /** + * string key = 1; + */ + java.lang.String getKey(); + /** + * string key = 1; + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + * .tensorflow.StructuredValue value = 2; + */ + boolean hasValue(); + /** + * .tensorflow.StructuredValue value = 2; + */ + org.tensorflow.proto.framework.StructuredValue getValue(); + /** + * .tensorflow.StructuredValue value = 2; + */ + org.tensorflow.proto.framework.StructuredValueOrBuilder getValueOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/QueueRunnerDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/QueueRunnerDef.java new file mode 100644 index 00000000000..8ca69c8f7f2 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/QueueRunnerDef.java @@ -0,0 +1,1435 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/queue_runner.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Protocol buffer representing a QueueRunner.
+ * 
+ * + * Protobuf type {@code tensorflow.QueueRunnerDef} + */ +public final class QueueRunnerDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.QueueRunnerDef) + QueueRunnerDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use QueueRunnerDef.newBuilder() to construct. + private QueueRunnerDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QueueRunnerDef() { + queueName_ = ""; + enqueueOpName_ = com.google.protobuf.LazyStringArrayList.EMPTY; + closeOpName_ = ""; + cancelOpName_ = ""; + queueClosedExceptionTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QueueRunnerDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QueueRunnerDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + queueName_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + enqueueOpName_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + enqueueOpName_.add(s); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + closeOpName_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + cancelOpName_ = s; + break; + } + case 40: { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + queueClosedExceptionTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + queueClosedExceptionTypes_.add(rawValue); + break; + } + case 42: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + queueClosedExceptionTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + queueClosedExceptionTypes_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + enqueueOpName_ = enqueueOpName_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + queueClosedExceptionTypes_ = java.util.Collections.unmodifiableList(queueClosedExceptionTypes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.QueueRunnerProtos.internal_static_tensorflow_QueueRunnerDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.QueueRunnerProtos.internal_static_tensorflow_QueueRunnerDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.QueueRunnerDef.class, org.tensorflow.proto.framework.QueueRunnerDef.Builder.class); + } + + public static final int QUEUE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object queueName_; + /** + *
+   * Queue name.
+   * 
+ * + * string queue_name = 1; + */ + public java.lang.String getQueueName() { + java.lang.Object ref = queueName_; + 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(); + queueName_ = s; + return s; + } + } + /** + *
+   * Queue name.
+   * 
+ * + * string queue_name = 1; + */ + public com.google.protobuf.ByteString + getQueueNameBytes() { + java.lang.Object ref = queueName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + queueName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENQUEUE_OP_NAME_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList enqueueOpName_; + /** + *
+   * A list of enqueue operations.
+   * 
+ * + * repeated string enqueue_op_name = 2; + */ + public com.google.protobuf.ProtocolStringList + getEnqueueOpNameList() { + return enqueueOpName_; + } + /** + *
+   * A list of enqueue operations.
+   * 
+ * + * repeated string enqueue_op_name = 2; + */ + public int getEnqueueOpNameCount() { + return enqueueOpName_.size(); + } + /** + *
+   * A list of enqueue operations.
+   * 
+ * + * repeated string enqueue_op_name = 2; + */ + public java.lang.String getEnqueueOpName(int index) { + return enqueueOpName_.get(index); + } + /** + *
+   * A list of enqueue operations.
+   * 
+ * + * repeated string enqueue_op_name = 2; + */ + public com.google.protobuf.ByteString + getEnqueueOpNameBytes(int index) { + return enqueueOpName_.getByteString(index); + } + + public static final int CLOSE_OP_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object closeOpName_; + /** + *
+   * The operation to run to close the queue.
+   * 
+ * + * string close_op_name = 3; + */ + public java.lang.String getCloseOpName() { + java.lang.Object ref = closeOpName_; + 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(); + closeOpName_ = s; + return s; + } + } + /** + *
+   * The operation to run to close the queue.
+   * 
+ * + * string close_op_name = 3; + */ + public com.google.protobuf.ByteString + getCloseOpNameBytes() { + java.lang.Object ref = closeOpName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + closeOpName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CANCEL_OP_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object cancelOpName_; + /** + *
+   * The operation to run to cancel the queue.
+   * 
+ * + * string cancel_op_name = 4; + */ + public java.lang.String getCancelOpName() { + java.lang.Object ref = cancelOpName_; + 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(); + cancelOpName_ = s; + return s; + } + } + /** + *
+   * The operation to run to cancel the queue.
+   * 
+ * + * string cancel_op_name = 4; + */ + public com.google.protobuf.ByteString + getCancelOpNameBytes() { + java.lang.Object ref = cancelOpName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cancelOpName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUEUE_CLOSED_EXCEPTION_TYPES_FIELD_NUMBER = 5; + private java.util.List queueClosedExceptionTypes_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, org.tensorflow.proto.framework.Code> queueClosedExceptionTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, org.tensorflow.proto.framework.Code>() { + public org.tensorflow.proto.framework.Code convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.Code result = org.tensorflow.proto.framework.Code.valueOf(from); + return result == null ? org.tensorflow.proto.framework.Code.UNRECOGNIZED : result; + } + }; + /** + *
+   * A list of exception types considered to signal a safely closed queue
+   * if raised during enqueue operations.
+   * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public java.util.List getQueueClosedExceptionTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, org.tensorflow.proto.framework.Code>(queueClosedExceptionTypes_, queueClosedExceptionTypes_converter_); + } + /** + *
+   * A list of exception types considered to signal a safely closed queue
+   * if raised during enqueue operations.
+   * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public int getQueueClosedExceptionTypesCount() { + return queueClosedExceptionTypes_.size(); + } + /** + *
+   * A list of exception types considered to signal a safely closed queue
+   * if raised during enqueue operations.
+   * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public org.tensorflow.proto.framework.Code getQueueClosedExceptionTypes(int index) { + return queueClosedExceptionTypes_converter_.convert(queueClosedExceptionTypes_.get(index)); + } + /** + *
+   * A list of exception types considered to signal a safely closed queue
+   * if raised during enqueue operations.
+   * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public java.util.List + getQueueClosedExceptionTypesValueList() { + return queueClosedExceptionTypes_; + } + /** + *
+   * A list of exception types considered to signal a safely closed queue
+   * if raised during enqueue operations.
+   * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public int getQueueClosedExceptionTypesValue(int index) { + return queueClosedExceptionTypes_.get(index); + } + private int queueClosedExceptionTypesMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!getQueueNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queueName_); + } + for (int i = 0; i < enqueueOpName_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, enqueueOpName_.getRaw(i)); + } + if (!getCloseOpNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, closeOpName_); + } + if (!getCancelOpNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cancelOpName_); + } + if (getQueueClosedExceptionTypesList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(queueClosedExceptionTypesMemoizedSerializedSize); + } + for (int i = 0; i < queueClosedExceptionTypes_.size(); i++) { + output.writeEnumNoTag(queueClosedExceptionTypes_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getQueueNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queueName_); + } + { + int dataSize = 0; + for (int i = 0; i < enqueueOpName_.size(); i++) { + dataSize += computeStringSizeNoTag(enqueueOpName_.getRaw(i)); + } + size += dataSize; + size += 1 * getEnqueueOpNameList().size(); + } + if (!getCloseOpNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, closeOpName_); + } + if (!getCancelOpNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cancelOpName_); + } + { + int dataSize = 0; + for (int i = 0; i < queueClosedExceptionTypes_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeEnumSizeNoTag(queueClosedExceptionTypes_.get(i)); + } + size += dataSize; + if (!getQueueClosedExceptionTypesList().isEmpty()) { size += 1; + size += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(dataSize); + }queueClosedExceptionTypesMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.QueueRunnerDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.QueueRunnerDef other = (org.tensorflow.proto.framework.QueueRunnerDef) obj; + + if (!getQueueName() + .equals(other.getQueueName())) return false; + if (!getEnqueueOpNameList() + .equals(other.getEnqueueOpNameList())) return false; + if (!getCloseOpName() + .equals(other.getCloseOpName())) return false; + if (!getCancelOpName() + .equals(other.getCancelOpName())) return false; + if (!queueClosedExceptionTypes_.equals(other.queueClosedExceptionTypes_)) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + QUEUE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getQueueName().hashCode(); + if (getEnqueueOpNameCount() > 0) { + hash = (37 * hash) + ENQUEUE_OP_NAME_FIELD_NUMBER; + hash = (53 * hash) + getEnqueueOpNameList().hashCode(); + } + hash = (37 * hash) + CLOSE_OP_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCloseOpName().hashCode(); + hash = (37 * hash) + CANCEL_OP_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCancelOpName().hashCode(); + if (getQueueClosedExceptionTypesCount() > 0) { + hash = (37 * hash) + QUEUE_CLOSED_EXCEPTION_TYPES_FIELD_NUMBER; + hash = (53 * hash) + queueClosedExceptionTypes_.hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.QueueRunnerDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.QueueRunnerDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.QueueRunnerDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.QueueRunnerDef 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.proto.framework.QueueRunnerDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.QueueRunnerDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.QueueRunnerDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.QueueRunnerDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.QueueRunnerDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.QueueRunnerDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.QueueRunnerDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.QueueRunnerDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.QueueRunnerDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Protocol buffer representing a QueueRunner.
+   * 
+ * + * Protobuf type {@code tensorflow.QueueRunnerDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.QueueRunnerDef) + org.tensorflow.proto.framework.QueueRunnerDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.QueueRunnerProtos.internal_static_tensorflow_QueueRunnerDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.QueueRunnerProtos.internal_static_tensorflow_QueueRunnerDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.QueueRunnerDef.class, org.tensorflow.proto.framework.QueueRunnerDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.QueueRunnerDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + queueName_ = ""; + + enqueueOpName_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + closeOpName_ = ""; + + cancelOpName_ = ""; + + queueClosedExceptionTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.QueueRunnerProtos.internal_static_tensorflow_QueueRunnerDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.QueueRunnerDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.QueueRunnerDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.QueueRunnerDef build() { + org.tensorflow.proto.framework.QueueRunnerDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.QueueRunnerDef buildPartial() { + org.tensorflow.proto.framework.QueueRunnerDef result = new org.tensorflow.proto.framework.QueueRunnerDef(this); + int from_bitField0_ = bitField0_; + result.queueName_ = queueName_; + if (((bitField0_ & 0x00000001) != 0)) { + enqueueOpName_ = enqueueOpName_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.enqueueOpName_ = enqueueOpName_; + result.closeOpName_ = closeOpName_; + result.cancelOpName_ = cancelOpName_; + if (((bitField0_ & 0x00000002) != 0)) { + queueClosedExceptionTypes_ = java.util.Collections.unmodifiableList(queueClosedExceptionTypes_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.queueClosedExceptionTypes_ = queueClosedExceptionTypes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.QueueRunnerDef) { + return mergeFrom((org.tensorflow.proto.framework.QueueRunnerDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.QueueRunnerDef other) { + if (other == org.tensorflow.proto.framework.QueueRunnerDef.getDefaultInstance()) return this; + if (!other.getQueueName().isEmpty()) { + queueName_ = other.queueName_; + onChanged(); + } + if (!other.enqueueOpName_.isEmpty()) { + if (enqueueOpName_.isEmpty()) { + enqueueOpName_ = other.enqueueOpName_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEnqueueOpNameIsMutable(); + enqueueOpName_.addAll(other.enqueueOpName_); + } + onChanged(); + } + if (!other.getCloseOpName().isEmpty()) { + closeOpName_ = other.closeOpName_; + onChanged(); + } + if (!other.getCancelOpName().isEmpty()) { + cancelOpName_ = other.cancelOpName_; + onChanged(); + } + if (!other.queueClosedExceptionTypes_.isEmpty()) { + if (queueClosedExceptionTypes_.isEmpty()) { + queueClosedExceptionTypes_ = other.queueClosedExceptionTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureQueueClosedExceptionTypesIsMutable(); + queueClosedExceptionTypes_.addAll(other.queueClosedExceptionTypes_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.QueueRunnerDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.QueueRunnerDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object queueName_ = ""; + /** + *
+     * Queue name.
+     * 
+ * + * string queue_name = 1; + */ + public java.lang.String getQueueName() { + java.lang.Object ref = queueName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queueName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Queue name.
+     * 
+ * + * string queue_name = 1; + */ + public com.google.protobuf.ByteString + getQueueNameBytes() { + java.lang.Object ref = queueName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + queueName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Queue name.
+     * 
+ * + * string queue_name = 1; + */ + public Builder setQueueName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + queueName_ = value; + onChanged(); + return this; + } + /** + *
+     * Queue name.
+     * 
+ * + * string queue_name = 1; + */ + public Builder clearQueueName() { + + queueName_ = getDefaultInstance().getQueueName(); + onChanged(); + return this; + } + /** + *
+     * Queue name.
+     * 
+ * + * string queue_name = 1; + */ + public Builder setQueueNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + queueName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList enqueueOpName_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureEnqueueOpNameIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + enqueueOpName_ = new com.google.protobuf.LazyStringArrayList(enqueueOpName_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * A list of enqueue operations.
+     * 
+ * + * repeated string enqueue_op_name = 2; + */ + public com.google.protobuf.ProtocolStringList + getEnqueueOpNameList() { + return enqueueOpName_.getUnmodifiableView(); + } + /** + *
+     * A list of enqueue operations.
+     * 
+ * + * repeated string enqueue_op_name = 2; + */ + public int getEnqueueOpNameCount() { + return enqueueOpName_.size(); + } + /** + *
+     * A list of enqueue operations.
+     * 
+ * + * repeated string enqueue_op_name = 2; + */ + public java.lang.String getEnqueueOpName(int index) { + return enqueueOpName_.get(index); + } + /** + *
+     * A list of enqueue operations.
+     * 
+ * + * repeated string enqueue_op_name = 2; + */ + public com.google.protobuf.ByteString + getEnqueueOpNameBytes(int index) { + return enqueueOpName_.getByteString(index); + } + /** + *
+     * A list of enqueue operations.
+     * 
+ * + * repeated string enqueue_op_name = 2; + */ + public Builder setEnqueueOpName( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnqueueOpNameIsMutable(); + enqueueOpName_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of enqueue operations.
+     * 
+ * + * repeated string enqueue_op_name = 2; + */ + public Builder addEnqueueOpName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnqueueOpNameIsMutable(); + enqueueOpName_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of enqueue operations.
+     * 
+ * + * repeated string enqueue_op_name = 2; + */ + public Builder addAllEnqueueOpName( + java.lang.Iterable values) { + ensureEnqueueOpNameIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, enqueueOpName_); + onChanged(); + return this; + } + /** + *
+     * A list of enqueue operations.
+     * 
+ * + * repeated string enqueue_op_name = 2; + */ + public Builder clearEnqueueOpName() { + enqueueOpName_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A list of enqueue operations.
+     * 
+ * + * repeated string enqueue_op_name = 2; + */ + public Builder addEnqueueOpNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEnqueueOpNameIsMutable(); + enqueueOpName_.add(value); + onChanged(); + return this; + } + + private java.lang.Object closeOpName_ = ""; + /** + *
+     * The operation to run to close the queue.
+     * 
+ * + * string close_op_name = 3; + */ + public java.lang.String getCloseOpName() { + java.lang.Object ref = closeOpName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + closeOpName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The operation to run to close the queue.
+     * 
+ * + * string close_op_name = 3; + */ + public com.google.protobuf.ByteString + getCloseOpNameBytes() { + java.lang.Object ref = closeOpName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + closeOpName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The operation to run to close the queue.
+     * 
+ * + * string close_op_name = 3; + */ + public Builder setCloseOpName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + closeOpName_ = value; + onChanged(); + return this; + } + /** + *
+     * The operation to run to close the queue.
+     * 
+ * + * string close_op_name = 3; + */ + public Builder clearCloseOpName() { + + closeOpName_ = getDefaultInstance().getCloseOpName(); + onChanged(); + return this; + } + /** + *
+     * The operation to run to close the queue.
+     * 
+ * + * string close_op_name = 3; + */ + public Builder setCloseOpNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + closeOpName_ = value; + onChanged(); + return this; + } + + private java.lang.Object cancelOpName_ = ""; + /** + *
+     * The operation to run to cancel the queue.
+     * 
+ * + * string cancel_op_name = 4; + */ + public java.lang.String getCancelOpName() { + java.lang.Object ref = cancelOpName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cancelOpName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The operation to run to cancel the queue.
+     * 
+ * + * string cancel_op_name = 4; + */ + public com.google.protobuf.ByteString + getCancelOpNameBytes() { + java.lang.Object ref = cancelOpName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cancelOpName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The operation to run to cancel the queue.
+     * 
+ * + * string cancel_op_name = 4; + */ + public Builder setCancelOpName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cancelOpName_ = value; + onChanged(); + return this; + } + /** + *
+     * The operation to run to cancel the queue.
+     * 
+ * + * string cancel_op_name = 4; + */ + public Builder clearCancelOpName() { + + cancelOpName_ = getDefaultInstance().getCancelOpName(); + onChanged(); + return this; + } + /** + *
+     * The operation to run to cancel the queue.
+     * 
+ * + * string cancel_op_name = 4; + */ + public Builder setCancelOpNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cancelOpName_ = value; + onChanged(); + return this; + } + + private java.util.List queueClosedExceptionTypes_ = + java.util.Collections.emptyList(); + private void ensureQueueClosedExceptionTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + queueClosedExceptionTypes_ = new java.util.ArrayList(queueClosedExceptionTypes_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * A list of exception types considered to signal a safely closed queue
+     * if raised during enqueue operations.
+     * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public java.util.List getQueueClosedExceptionTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, org.tensorflow.proto.framework.Code>(queueClosedExceptionTypes_, queueClosedExceptionTypes_converter_); + } + /** + *
+     * A list of exception types considered to signal a safely closed queue
+     * if raised during enqueue operations.
+     * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public int getQueueClosedExceptionTypesCount() { + return queueClosedExceptionTypes_.size(); + } + /** + *
+     * A list of exception types considered to signal a safely closed queue
+     * if raised during enqueue operations.
+     * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public org.tensorflow.proto.framework.Code getQueueClosedExceptionTypes(int index) { + return queueClosedExceptionTypes_converter_.convert(queueClosedExceptionTypes_.get(index)); + } + /** + *
+     * A list of exception types considered to signal a safely closed queue
+     * if raised during enqueue operations.
+     * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public Builder setQueueClosedExceptionTypes( + int index, org.tensorflow.proto.framework.Code value) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueueClosedExceptionTypesIsMutable(); + queueClosedExceptionTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + *
+     * A list of exception types considered to signal a safely closed queue
+     * if raised during enqueue operations.
+     * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public Builder addQueueClosedExceptionTypes(org.tensorflow.proto.framework.Code value) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueueClosedExceptionTypesIsMutable(); + queueClosedExceptionTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + *
+     * A list of exception types considered to signal a safely closed queue
+     * if raised during enqueue operations.
+     * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public Builder addAllQueueClosedExceptionTypes( + java.lang.Iterable values) { + ensureQueueClosedExceptionTypesIsMutable(); + for (org.tensorflow.proto.framework.Code value : values) { + queueClosedExceptionTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + *
+     * A list of exception types considered to signal a safely closed queue
+     * if raised during enqueue operations.
+     * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public Builder clearQueueClosedExceptionTypes() { + queueClosedExceptionTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A list of exception types considered to signal a safely closed queue
+     * if raised during enqueue operations.
+     * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public java.util.List + getQueueClosedExceptionTypesValueList() { + return java.util.Collections.unmodifiableList(queueClosedExceptionTypes_); + } + /** + *
+     * A list of exception types considered to signal a safely closed queue
+     * if raised during enqueue operations.
+     * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public int getQueueClosedExceptionTypesValue(int index) { + return queueClosedExceptionTypes_.get(index); + } + /** + *
+     * A list of exception types considered to signal a safely closed queue
+     * if raised during enqueue operations.
+     * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public Builder setQueueClosedExceptionTypesValue( + int index, int value) { + ensureQueueClosedExceptionTypesIsMutable(); + queueClosedExceptionTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of exception types considered to signal a safely closed queue
+     * if raised during enqueue operations.
+     * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public Builder addQueueClosedExceptionTypesValue(int value) { + ensureQueueClosedExceptionTypesIsMutable(); + queueClosedExceptionTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of exception types considered to signal a safely closed queue
+     * if raised during enqueue operations.
+     * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + public Builder addAllQueueClosedExceptionTypesValue( + java.lang.Iterable values) { + ensureQueueClosedExceptionTypesIsMutable(); + for (int value : values) { + queueClosedExceptionTypes_.add(value); + } + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.QueueRunnerDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.QueueRunnerDef) + private static final org.tensorflow.proto.framework.QueueRunnerDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.QueueRunnerDef(); + } + + public static org.tensorflow.proto.framework.QueueRunnerDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueueRunnerDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QueueRunnerDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.QueueRunnerDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/QueueRunnerDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/QueueRunnerDefOrBuilder.java new file mode 100644 index 00000000000..61a20e767a3 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/QueueRunnerDefOrBuilder.java @@ -0,0 +1,145 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/queue_runner.proto + +package org.tensorflow.proto.framework; + +public interface QueueRunnerDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.QueueRunnerDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Queue name.
+   * 
+ * + * string queue_name = 1; + */ + java.lang.String getQueueName(); + /** + *
+   * Queue name.
+   * 
+ * + * string queue_name = 1; + */ + com.google.protobuf.ByteString + getQueueNameBytes(); + + /** + *
+   * A list of enqueue operations.
+   * 
+ * + * repeated string enqueue_op_name = 2; + */ + java.util.List + getEnqueueOpNameList(); + /** + *
+   * A list of enqueue operations.
+   * 
+ * + * repeated string enqueue_op_name = 2; + */ + int getEnqueueOpNameCount(); + /** + *
+   * A list of enqueue operations.
+   * 
+ * + * repeated string enqueue_op_name = 2; + */ + java.lang.String getEnqueueOpName(int index); + /** + *
+   * A list of enqueue operations.
+   * 
+ * + * repeated string enqueue_op_name = 2; + */ + com.google.protobuf.ByteString + getEnqueueOpNameBytes(int index); + + /** + *
+   * The operation to run to close the queue.
+   * 
+ * + * string close_op_name = 3; + */ + java.lang.String getCloseOpName(); + /** + *
+   * The operation to run to close the queue.
+   * 
+ * + * string close_op_name = 3; + */ + com.google.protobuf.ByteString + getCloseOpNameBytes(); + + /** + *
+   * The operation to run to cancel the queue.
+   * 
+ * + * string cancel_op_name = 4; + */ + java.lang.String getCancelOpName(); + /** + *
+   * The operation to run to cancel the queue.
+   * 
+ * + * string cancel_op_name = 4; + */ + com.google.protobuf.ByteString + getCancelOpNameBytes(); + + /** + *
+   * A list of exception types considered to signal a safely closed queue
+   * if raised during enqueue operations.
+   * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + java.util.List getQueueClosedExceptionTypesList(); + /** + *
+   * A list of exception types considered to signal a safely closed queue
+   * if raised during enqueue operations.
+   * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + int getQueueClosedExceptionTypesCount(); + /** + *
+   * A list of exception types considered to signal a safely closed queue
+   * if raised during enqueue operations.
+   * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + org.tensorflow.proto.framework.Code getQueueClosedExceptionTypes(int index); + /** + *
+   * A list of exception types considered to signal a safely closed queue
+   * if raised during enqueue operations.
+   * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + java.util.List + getQueueClosedExceptionTypesValueList(); + /** + *
+   * A list of exception types considered to signal a safely closed queue
+   * if raised during enqueue operations.
+   * 
+ * + * repeated .tensorflow.error.Code queue_closed_exception_types = 5; + */ + int getQueueClosedExceptionTypesValue(int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/QueueRunnerProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/QueueRunnerProtos.java new file mode 100644 index 00000000000..37a45c16673 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/QueueRunnerProtos.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/queue_runner.proto + +package org.tensorflow.proto.framework; + +public final class QueueRunnerProtos { + private QueueRunnerProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_QueueRunnerDef_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_QueueRunnerDef_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/protobuf/queue_runner." + + "proto\022\ntensorflow\032*tensorflow/core/proto" + + "buf/error_codes.proto\"\252\001\n\016QueueRunnerDef" + + "\022\022\n\nqueue_name\030\001 \001(\t\022\027\n\017enqueue_op_name\030" + + "\002 \003(\t\022\025\n\rclose_op_name\030\003 \001(\t\022\026\n\016cancel_o" + + "p_name\030\004 \001(\t\022<\n\034queue_closed_exception_t" + + "ypes\030\005 \003(\0162\026.tensorflow.error.CodeB\202\001\n\036o" + + "rg.tensorflow.proto.frameworkB\021QueueRunn" + + "erProtosP\001ZHgithub.com/tensorflow/tensor" + + "flow/tensorflow/go/core/core_protos_go_p" + + "roto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.ErrorCodesProtos.getDescriptor(), + }); + internal_static_tensorflow_QueueRunnerDef_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_QueueRunnerDef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_QueueRunnerDef_descriptor, + new java.lang.String[] { "QueueName", "EnqueueOpName", "CloseOpName", "CancelOpName", "QueueClosedExceptionTypes", }); + org.tensorflow.proto.framework.ErrorCodesProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RPCOptions.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RPCOptions.java new file mode 100644 index 00000000000..6c1a717876d --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RPCOptions.java @@ -0,0 +1,905 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.RPCOptions} + */ +public final class RPCOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.RPCOptions) + RPCOptionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use RPCOptions.newBuilder() to construct. + private RPCOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RPCOptions() { + compressionAlgorithm_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RPCOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RPCOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + useRpcForInprocessMaster_ = input.readBool(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + compressionAlgorithm_ = s; + break; + } + case 24: { + + compressionLevel_ = input.readInt32(); + break; + } + case 32: { + + cacheRpcResponse_ = input.readBool(); + break; + } + case 40: { + + disableSessionConnectionSharing_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RPCOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RPCOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RPCOptions.class, org.tensorflow.proto.framework.RPCOptions.Builder.class); + } + + public static final int USE_RPC_FOR_INPROCESS_MASTER_FIELD_NUMBER = 1; + private boolean useRpcForInprocessMaster_; + /** + *
+   * If true, always use RPC to contact the session target.
+   * If false (the default option), TensorFlow may use an optimized
+   * transport for client-master communication that avoids the RPC
+   * stack. This option is primarily for used testing the RPC stack.
+   * 
+ * + * bool use_rpc_for_inprocess_master = 1; + */ + public boolean getUseRpcForInprocessMaster() { + return useRpcForInprocessMaster_; + } + + public static final int COMPRESSION_ALGORITHM_FIELD_NUMBER = 2; + private volatile java.lang.Object compressionAlgorithm_; + /** + *
+   * The compression algorithm to be used. One of "deflate", "gzip".
+   * 
+ * + * string compression_algorithm = 2; + */ + public java.lang.String getCompressionAlgorithm() { + java.lang.Object ref = compressionAlgorithm_; + 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(); + compressionAlgorithm_ = s; + return s; + } + } + /** + *
+   * The compression algorithm to be used. One of "deflate", "gzip".
+   * 
+ * + * string compression_algorithm = 2; + */ + public com.google.protobuf.ByteString + getCompressionAlgorithmBytes() { + java.lang.Object ref = compressionAlgorithm_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + compressionAlgorithm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMPRESSION_LEVEL_FIELD_NUMBER = 3; + private int compressionLevel_; + /** + *
+   * If compression_algorithm is set, the compression level to be used.
+   * From 0 (no compression), up to 3.
+   * 
+ * + * int32 compression_level = 3; + */ + public int getCompressionLevel() { + return compressionLevel_; + } + + public static final int CACHE_RPC_RESPONSE_FIELD_NUMBER = 4; + private boolean cacheRpcResponse_; + /** + *
+   * Setting cache_rpc_response to true will enable sender side caching of
+   * response for RecvTensorAsync and RecvBufAsync to allow receiver to retry
+   * requests . This is only necessary when the network fabric is experiencing a
+   * significant error rate.  Without it we'll fail a step on an network error,
+   * while with it we'll be able to complete long steps (like complex
+   * initializations) in the face of some network errors during RecvTensor.
+   * 
+ * + * bool cache_rpc_response = 4; + */ + public boolean getCacheRpcResponse() { + return cacheRpcResponse_; + } + + public static final int DISABLE_SESSION_CONNECTION_SHARING_FIELD_NUMBER = 5; + private boolean disableSessionConnectionSharing_; + /** + *
+   * Disables TCP connection sharing when opening a new RPC channel.
+   * 
+ * + * bool disable_session_connection_sharing = 5; + */ + public boolean getDisableSessionConnectionSharing() { + return disableSessionConnectionSharing_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (useRpcForInprocessMaster_ != false) { + output.writeBool(1, useRpcForInprocessMaster_); + } + if (!getCompressionAlgorithmBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, compressionAlgorithm_); + } + if (compressionLevel_ != 0) { + output.writeInt32(3, compressionLevel_); + } + if (cacheRpcResponse_ != false) { + output.writeBool(4, cacheRpcResponse_); + } + if (disableSessionConnectionSharing_ != false) { + output.writeBool(5, disableSessionConnectionSharing_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (useRpcForInprocessMaster_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, useRpcForInprocessMaster_); + } + if (!getCompressionAlgorithmBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, compressionAlgorithm_); + } + if (compressionLevel_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, compressionLevel_); + } + if (cacheRpcResponse_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, cacheRpcResponse_); + } + if (disableSessionConnectionSharing_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, disableSessionConnectionSharing_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.RPCOptions)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.RPCOptions other = (org.tensorflow.proto.framework.RPCOptions) obj; + + if (getUseRpcForInprocessMaster() + != other.getUseRpcForInprocessMaster()) return false; + if (!getCompressionAlgorithm() + .equals(other.getCompressionAlgorithm())) return false; + if (getCompressionLevel() + != other.getCompressionLevel()) return false; + if (getCacheRpcResponse() + != other.getCacheRpcResponse()) return false; + if (getDisableSessionConnectionSharing() + != other.getDisableSessionConnectionSharing()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USE_RPC_FOR_INPROCESS_MASTER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUseRpcForInprocessMaster()); + hash = (37 * hash) + COMPRESSION_ALGORITHM_FIELD_NUMBER; + hash = (53 * hash) + getCompressionAlgorithm().hashCode(); + hash = (37 * hash) + COMPRESSION_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getCompressionLevel(); + hash = (37 * hash) + CACHE_RPC_RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCacheRpcResponse()); + hash = (37 * hash) + DISABLE_SESSION_CONNECTION_SHARING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDisableSessionConnectionSharing()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.RPCOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RPCOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RPCOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RPCOptions 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.proto.framework.RPCOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RPCOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RPCOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RPCOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RPCOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RPCOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RPCOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RPCOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.RPCOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.RPCOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.RPCOptions) + org.tensorflow.proto.framework.RPCOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RPCOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RPCOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RPCOptions.class, org.tensorflow.proto.framework.RPCOptions.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.RPCOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + useRpcForInprocessMaster_ = false; + + compressionAlgorithm_ = ""; + + compressionLevel_ = 0; + + cacheRpcResponse_ = false; + + disableSessionConnectionSharing_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RPCOptions_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RPCOptions getDefaultInstanceForType() { + return org.tensorflow.proto.framework.RPCOptions.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.RPCOptions build() { + org.tensorflow.proto.framework.RPCOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RPCOptions buildPartial() { + org.tensorflow.proto.framework.RPCOptions result = new org.tensorflow.proto.framework.RPCOptions(this); + result.useRpcForInprocessMaster_ = useRpcForInprocessMaster_; + result.compressionAlgorithm_ = compressionAlgorithm_; + result.compressionLevel_ = compressionLevel_; + result.cacheRpcResponse_ = cacheRpcResponse_; + result.disableSessionConnectionSharing_ = disableSessionConnectionSharing_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.RPCOptions) { + return mergeFrom((org.tensorflow.proto.framework.RPCOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.RPCOptions other) { + if (other == org.tensorflow.proto.framework.RPCOptions.getDefaultInstance()) return this; + if (other.getUseRpcForInprocessMaster() != false) { + setUseRpcForInprocessMaster(other.getUseRpcForInprocessMaster()); + } + if (!other.getCompressionAlgorithm().isEmpty()) { + compressionAlgorithm_ = other.compressionAlgorithm_; + onChanged(); + } + if (other.getCompressionLevel() != 0) { + setCompressionLevel(other.getCompressionLevel()); + } + if (other.getCacheRpcResponse() != false) { + setCacheRpcResponse(other.getCacheRpcResponse()); + } + if (other.getDisableSessionConnectionSharing() != false) { + setDisableSessionConnectionSharing(other.getDisableSessionConnectionSharing()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.RPCOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.RPCOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean useRpcForInprocessMaster_ ; + /** + *
+     * If true, always use RPC to contact the session target.
+     * If false (the default option), TensorFlow may use an optimized
+     * transport for client-master communication that avoids the RPC
+     * stack. This option is primarily for used testing the RPC stack.
+     * 
+ * + * bool use_rpc_for_inprocess_master = 1; + */ + public boolean getUseRpcForInprocessMaster() { + return useRpcForInprocessMaster_; + } + /** + *
+     * If true, always use RPC to contact the session target.
+     * If false (the default option), TensorFlow may use an optimized
+     * transport for client-master communication that avoids the RPC
+     * stack. This option is primarily for used testing the RPC stack.
+     * 
+ * + * bool use_rpc_for_inprocess_master = 1; + */ + public Builder setUseRpcForInprocessMaster(boolean value) { + + useRpcForInprocessMaster_ = value; + onChanged(); + return this; + } + /** + *
+     * If true, always use RPC to contact the session target.
+     * If false (the default option), TensorFlow may use an optimized
+     * transport for client-master communication that avoids the RPC
+     * stack. This option is primarily for used testing the RPC stack.
+     * 
+ * + * bool use_rpc_for_inprocess_master = 1; + */ + public Builder clearUseRpcForInprocessMaster() { + + useRpcForInprocessMaster_ = false; + onChanged(); + return this; + } + + private java.lang.Object compressionAlgorithm_ = ""; + /** + *
+     * The compression algorithm to be used. One of "deflate", "gzip".
+     * 
+ * + * string compression_algorithm = 2; + */ + public java.lang.String getCompressionAlgorithm() { + java.lang.Object ref = compressionAlgorithm_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + compressionAlgorithm_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The compression algorithm to be used. One of "deflate", "gzip".
+     * 
+ * + * string compression_algorithm = 2; + */ + public com.google.protobuf.ByteString + getCompressionAlgorithmBytes() { + java.lang.Object ref = compressionAlgorithm_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + compressionAlgorithm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The compression algorithm to be used. One of "deflate", "gzip".
+     * 
+ * + * string compression_algorithm = 2; + */ + public Builder setCompressionAlgorithm( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + compressionAlgorithm_ = value; + onChanged(); + return this; + } + /** + *
+     * The compression algorithm to be used. One of "deflate", "gzip".
+     * 
+ * + * string compression_algorithm = 2; + */ + public Builder clearCompressionAlgorithm() { + + compressionAlgorithm_ = getDefaultInstance().getCompressionAlgorithm(); + onChanged(); + return this; + } + /** + *
+     * The compression algorithm to be used. One of "deflate", "gzip".
+     * 
+ * + * string compression_algorithm = 2; + */ + public Builder setCompressionAlgorithmBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + compressionAlgorithm_ = value; + onChanged(); + return this; + } + + private int compressionLevel_ ; + /** + *
+     * If compression_algorithm is set, the compression level to be used.
+     * From 0 (no compression), up to 3.
+     * 
+ * + * int32 compression_level = 3; + */ + public int getCompressionLevel() { + return compressionLevel_; + } + /** + *
+     * If compression_algorithm is set, the compression level to be used.
+     * From 0 (no compression), up to 3.
+     * 
+ * + * int32 compression_level = 3; + */ + public Builder setCompressionLevel(int value) { + + compressionLevel_ = value; + onChanged(); + return this; + } + /** + *
+     * If compression_algorithm is set, the compression level to be used.
+     * From 0 (no compression), up to 3.
+     * 
+ * + * int32 compression_level = 3; + */ + public Builder clearCompressionLevel() { + + compressionLevel_ = 0; + onChanged(); + return this; + } + + private boolean cacheRpcResponse_ ; + /** + *
+     * Setting cache_rpc_response to true will enable sender side caching of
+     * response for RecvTensorAsync and RecvBufAsync to allow receiver to retry
+     * requests . This is only necessary when the network fabric is experiencing a
+     * significant error rate.  Without it we'll fail a step on an network error,
+     * while with it we'll be able to complete long steps (like complex
+     * initializations) in the face of some network errors during RecvTensor.
+     * 
+ * + * bool cache_rpc_response = 4; + */ + public boolean getCacheRpcResponse() { + return cacheRpcResponse_; + } + /** + *
+     * Setting cache_rpc_response to true will enable sender side caching of
+     * response for RecvTensorAsync and RecvBufAsync to allow receiver to retry
+     * requests . This is only necessary when the network fabric is experiencing a
+     * significant error rate.  Without it we'll fail a step on an network error,
+     * while with it we'll be able to complete long steps (like complex
+     * initializations) in the face of some network errors during RecvTensor.
+     * 
+ * + * bool cache_rpc_response = 4; + */ + public Builder setCacheRpcResponse(boolean value) { + + cacheRpcResponse_ = value; + onChanged(); + return this; + } + /** + *
+     * Setting cache_rpc_response to true will enable sender side caching of
+     * response for RecvTensorAsync and RecvBufAsync to allow receiver to retry
+     * requests . This is only necessary when the network fabric is experiencing a
+     * significant error rate.  Without it we'll fail a step on an network error,
+     * while with it we'll be able to complete long steps (like complex
+     * initializations) in the face of some network errors during RecvTensor.
+     * 
+ * + * bool cache_rpc_response = 4; + */ + public Builder clearCacheRpcResponse() { + + cacheRpcResponse_ = false; + onChanged(); + return this; + } + + private boolean disableSessionConnectionSharing_ ; + /** + *
+     * Disables TCP connection sharing when opening a new RPC channel.
+     * 
+ * + * bool disable_session_connection_sharing = 5; + */ + public boolean getDisableSessionConnectionSharing() { + return disableSessionConnectionSharing_; + } + /** + *
+     * Disables TCP connection sharing when opening a new RPC channel.
+     * 
+ * + * bool disable_session_connection_sharing = 5; + */ + public Builder setDisableSessionConnectionSharing(boolean value) { + + disableSessionConnectionSharing_ = value; + onChanged(); + return this; + } + /** + *
+     * Disables TCP connection sharing when opening a new RPC channel.
+     * 
+ * + * bool disable_session_connection_sharing = 5; + */ + public Builder clearDisableSessionConnectionSharing() { + + disableSessionConnectionSharing_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.RPCOptions) + } + + // @@protoc_insertion_point(class_scope:tensorflow.RPCOptions) + private static final org.tensorflow.proto.framework.RPCOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.RPCOptions(); + } + + public static org.tensorflow.proto.framework.RPCOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RPCOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RPCOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RPCOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RPCOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RPCOptionsOrBuilder.java new file mode 100644 index 00000000000..e7178532c17 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RPCOptionsOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +public interface RPCOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.RPCOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If true, always use RPC to contact the session target.
+   * If false (the default option), TensorFlow may use an optimized
+   * transport for client-master communication that avoids the RPC
+   * stack. This option is primarily for used testing the RPC stack.
+   * 
+ * + * bool use_rpc_for_inprocess_master = 1; + */ + boolean getUseRpcForInprocessMaster(); + + /** + *
+   * The compression algorithm to be used. One of "deflate", "gzip".
+   * 
+ * + * string compression_algorithm = 2; + */ + java.lang.String getCompressionAlgorithm(); + /** + *
+   * The compression algorithm to be used. One of "deflate", "gzip".
+   * 
+ * + * string compression_algorithm = 2; + */ + com.google.protobuf.ByteString + getCompressionAlgorithmBytes(); + + /** + *
+   * If compression_algorithm is set, the compression level to be used.
+   * From 0 (no compression), up to 3.
+   * 
+ * + * int32 compression_level = 3; + */ + int getCompressionLevel(); + + /** + *
+   * Setting cache_rpc_response to true will enable sender side caching of
+   * response for RecvTensorAsync and RecvBufAsync to allow receiver to retry
+   * requests . This is only necessary when the network fabric is experiencing a
+   * significant error rate.  Without it we'll fail a step on an network error,
+   * while with it we'll be able to complete long steps (like complex
+   * initializations) in the face of some network errors during RecvTensor.
+   * 
+ * + * bool cache_rpc_response = 4; + */ + boolean getCacheRpcResponse(); + + /** + *
+   * Disables TCP connection sharing when opening a new RPC channel.
+   * 
+ * + * bool disable_session_connection_sharing = 5; + */ + boolean getDisableSessionConnectionSharing(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ReaderBaseProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ReaderBaseProtos.java new file mode 100644 index 00000000000..3c4e600440b --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ReaderBaseProtos.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/reader_base.proto + +package org.tensorflow.proto.framework; + +public final class ReaderBaseProtos { + private ReaderBaseProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ReaderBaseState_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ReaderBaseState_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/reader_base." + + "proto\022\ntensorflow\"r\n\017ReaderBaseState\022\024\n\014" + + "work_started\030\001 \001(\003\022\025\n\rwork_finished\030\002 \001(" + + "\003\022\034\n\024num_records_produced\030\003 \001(\003\022\024\n\014curre" + + "nt_work\030\004 \001(\014B\213\001\n\036org.tensorflow.proto.f" + + "rameworkB\020ReaderBaseProtosP\001ZRgithub.com" + + "/tensorflow/tensorflow/tensorflow/go/cor" + + "e/framework/reader_base_go_proto\370\001\001b\006pro" + + "to3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tensorflow_ReaderBaseState_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_ReaderBaseState_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ReaderBaseState_descriptor, + new java.lang.String[] { "WorkStarted", "WorkFinished", "NumRecordsProduced", "CurrentWork", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ReaderBaseState.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ReaderBaseState.java new file mode 100644 index 00000000000..4602bd786a5 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ReaderBaseState.java @@ -0,0 +1,664 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/reader_base.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * For serializing and restoring the state of ReaderBase, see
+ * reader_base.h for details.
+ * 
+ * + * Protobuf type {@code tensorflow.ReaderBaseState} + */ +public final class ReaderBaseState extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ReaderBaseState) + ReaderBaseStateOrBuilder { +private static final long serialVersionUID = 0L; + // Use ReaderBaseState.newBuilder() to construct. + private ReaderBaseState(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReaderBaseState() { + currentWork_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReaderBaseState(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ReaderBaseState( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + workStarted_ = input.readInt64(); + break; + } + case 16: { + + workFinished_ = input.readInt64(); + break; + } + case 24: { + + numRecordsProduced_ = input.readInt64(); + break; + } + case 34: { + + currentWork_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ReaderBaseProtos.internal_static_tensorflow_ReaderBaseState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ReaderBaseProtos.internal_static_tensorflow_ReaderBaseState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ReaderBaseState.class, org.tensorflow.proto.framework.ReaderBaseState.Builder.class); + } + + public static final int WORK_STARTED_FIELD_NUMBER = 1; + private long workStarted_; + /** + * int64 work_started = 1; + */ + public long getWorkStarted() { + return workStarted_; + } + + public static final int WORK_FINISHED_FIELD_NUMBER = 2; + private long workFinished_; + /** + * int64 work_finished = 2; + */ + public long getWorkFinished() { + return workFinished_; + } + + public static final int NUM_RECORDS_PRODUCED_FIELD_NUMBER = 3; + private long numRecordsProduced_; + /** + * int64 num_records_produced = 3; + */ + public long getNumRecordsProduced() { + return numRecordsProduced_; + } + + public static final int CURRENT_WORK_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString currentWork_; + /** + * bytes current_work = 4; + */ + public com.google.protobuf.ByteString getCurrentWork() { + return currentWork_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (workStarted_ != 0L) { + output.writeInt64(1, workStarted_); + } + if (workFinished_ != 0L) { + output.writeInt64(2, workFinished_); + } + if (numRecordsProduced_ != 0L) { + output.writeInt64(3, numRecordsProduced_); + } + if (!currentWork_.isEmpty()) { + output.writeBytes(4, currentWork_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (workStarted_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, workStarted_); + } + if (workFinished_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, workFinished_); + } + if (numRecordsProduced_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, numRecordsProduced_); + } + if (!currentWork_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, currentWork_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.ReaderBaseState)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.ReaderBaseState other = (org.tensorflow.proto.framework.ReaderBaseState) obj; + + if (getWorkStarted() + != other.getWorkStarted()) return false; + if (getWorkFinished() + != other.getWorkFinished()) return false; + if (getNumRecordsProduced() + != other.getNumRecordsProduced()) return false; + if (!getCurrentWork() + .equals(other.getCurrentWork())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WORK_STARTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getWorkStarted()); + hash = (37 * hash) + WORK_FINISHED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getWorkFinished()); + hash = (37 * hash) + NUM_RECORDS_PRODUCED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNumRecordsProduced()); + hash = (37 * hash) + CURRENT_WORK_FIELD_NUMBER; + hash = (53 * hash) + getCurrentWork().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.ReaderBaseState parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ReaderBaseState parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ReaderBaseState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ReaderBaseState 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.proto.framework.ReaderBaseState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ReaderBaseState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ReaderBaseState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ReaderBaseState parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ReaderBaseState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ReaderBaseState parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ReaderBaseState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ReaderBaseState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.ReaderBaseState prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * For serializing and restoring the state of ReaderBase, see
+   * reader_base.h for details.
+   * 
+ * + * Protobuf type {@code tensorflow.ReaderBaseState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ReaderBaseState) + org.tensorflow.proto.framework.ReaderBaseStateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ReaderBaseProtos.internal_static_tensorflow_ReaderBaseState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ReaderBaseProtos.internal_static_tensorflow_ReaderBaseState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ReaderBaseState.class, org.tensorflow.proto.framework.ReaderBaseState.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.ReaderBaseState.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + workStarted_ = 0L; + + workFinished_ = 0L; + + numRecordsProduced_ = 0L; + + currentWork_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ReaderBaseProtos.internal_static_tensorflow_ReaderBaseState_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ReaderBaseState getDefaultInstanceForType() { + return org.tensorflow.proto.framework.ReaderBaseState.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.ReaderBaseState build() { + org.tensorflow.proto.framework.ReaderBaseState result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ReaderBaseState buildPartial() { + org.tensorflow.proto.framework.ReaderBaseState result = new org.tensorflow.proto.framework.ReaderBaseState(this); + result.workStarted_ = workStarted_; + result.workFinished_ = workFinished_; + result.numRecordsProduced_ = numRecordsProduced_; + result.currentWork_ = currentWork_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.ReaderBaseState) { + return mergeFrom((org.tensorflow.proto.framework.ReaderBaseState)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.ReaderBaseState other) { + if (other == org.tensorflow.proto.framework.ReaderBaseState.getDefaultInstance()) return this; + if (other.getWorkStarted() != 0L) { + setWorkStarted(other.getWorkStarted()); + } + if (other.getWorkFinished() != 0L) { + setWorkFinished(other.getWorkFinished()); + } + if (other.getNumRecordsProduced() != 0L) { + setNumRecordsProduced(other.getNumRecordsProduced()); + } + if (other.getCurrentWork() != com.google.protobuf.ByteString.EMPTY) { + setCurrentWork(other.getCurrentWork()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.ReaderBaseState parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.ReaderBaseState) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long workStarted_ ; + /** + * int64 work_started = 1; + */ + public long getWorkStarted() { + return workStarted_; + } + /** + * int64 work_started = 1; + */ + public Builder setWorkStarted(long value) { + + workStarted_ = value; + onChanged(); + return this; + } + /** + * int64 work_started = 1; + */ + public Builder clearWorkStarted() { + + workStarted_ = 0L; + onChanged(); + return this; + } + + private long workFinished_ ; + /** + * int64 work_finished = 2; + */ + public long getWorkFinished() { + return workFinished_; + } + /** + * int64 work_finished = 2; + */ + public Builder setWorkFinished(long value) { + + workFinished_ = value; + onChanged(); + return this; + } + /** + * int64 work_finished = 2; + */ + public Builder clearWorkFinished() { + + workFinished_ = 0L; + onChanged(); + return this; + } + + private long numRecordsProduced_ ; + /** + * int64 num_records_produced = 3; + */ + public long getNumRecordsProduced() { + return numRecordsProduced_; + } + /** + * int64 num_records_produced = 3; + */ + public Builder setNumRecordsProduced(long value) { + + numRecordsProduced_ = value; + onChanged(); + return this; + } + /** + * int64 num_records_produced = 3; + */ + public Builder clearNumRecordsProduced() { + + numRecordsProduced_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString currentWork_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes current_work = 4; + */ + public com.google.protobuf.ByteString getCurrentWork() { + return currentWork_; + } + /** + * bytes current_work = 4; + */ + public Builder setCurrentWork(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + currentWork_ = value; + onChanged(); + return this; + } + /** + * bytes current_work = 4; + */ + public Builder clearCurrentWork() { + + currentWork_ = getDefaultInstance().getCurrentWork(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ReaderBaseState) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ReaderBaseState) + private static final org.tensorflow.proto.framework.ReaderBaseState DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.ReaderBaseState(); + } + + public static org.tensorflow.proto.framework.ReaderBaseState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReaderBaseState parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReaderBaseState(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ReaderBaseState getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ReaderBaseStateOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ReaderBaseStateOrBuilder.java new file mode 100644 index 00000000000..72f0c6c0922 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ReaderBaseStateOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/reader_base.proto + +package org.tensorflow.proto.framework; + +public interface ReaderBaseStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ReaderBaseState) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 work_started = 1; + */ + long getWorkStarted(); + + /** + * int64 work_finished = 2; + */ + long getWorkFinished(); + + /** + * int64 num_records_produced = 3; + */ + long getNumRecordsProduced(); + + /** + * bytes current_work = 4; + */ + com.google.protobuf.ByteString getCurrentWork(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteFusedGraphExecuteInfo.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteFusedGraphExecuteInfo.java new file mode 100644 index 00000000000..bc2e6840de2 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteFusedGraphExecuteInfo.java @@ -0,0 +1,3007 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/remote_fused_graph_execute_info.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Protocol buffer representing a handle to a tensorflow resource. Handles are
+ * not valid across executions, but can be serialized back and forth from within
+ * a single run.
+ * 
+ * + * Protobuf type {@code tensorflow.RemoteFusedGraphExecuteInfo} + */ +public final class RemoteFusedGraphExecuteInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.RemoteFusedGraphExecuteInfo) + RemoteFusedGraphExecuteInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use RemoteFusedGraphExecuteInfo.newBuilder() to construct. + private RemoteFusedGraphExecuteInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RemoteFusedGraphExecuteInfo() { + graphInputNodeName_ = com.google.protobuf.LazyStringArrayList.EMPTY; + graphOutputNodeName_ = com.google.protobuf.LazyStringArrayList.EMPTY; + executorName_ = ""; + serializedExecutorParameters_ = com.google.protobuf.ByteString.EMPTY; + defaultGraphInputTensorShape_ = java.util.Collections.emptyList(); + defaultGraphOutputTensorShape_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoteFusedGraphExecuteInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RemoteFusedGraphExecuteInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.tensorflow.proto.framework.GraphDef.Builder subBuilder = null; + if (remoteGraph_ != null) { + subBuilder = remoteGraph_.toBuilder(); + } + remoteGraph_ = input.readMessage(org.tensorflow.proto.framework.GraphDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(remoteGraph_); + remoteGraph_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + graphInputNodeName_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + graphInputNodeName_.add(s); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + graphOutputNodeName_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + graphOutputNodeName_.add(s); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + executorName_ = s; + break; + } + case 42: { + + serializedExecutorParameters_ = input.readBytes(); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + defaultGraphInputTensorShape_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + defaultGraphInputTensorShape_.add( + input.readMessage(org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.parser(), extensionRegistry)); + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + defaultGraphOutputTensorShape_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + defaultGraphOutputTensorShape_.add( + input.readMessage(org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + graphInputNodeName_ = graphInputNodeName_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + graphOutputNodeName_ = graphOutputNodeName_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + defaultGraphInputTensorShape_ = java.util.Collections.unmodifiableList(defaultGraphInputTensorShape_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + defaultGraphOutputTensorShape_ = java.util.Collections.unmodifiableList(defaultGraphOutputTensorShape_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfoProto.internal_static_tensorflow_RemoteFusedGraphExecuteInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfoProto.internal_static_tensorflow_RemoteFusedGraphExecuteInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.class, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.Builder.class); + } + + public interface TensorShapeTypeProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .tensorflow.DataType dtype = 1; + */ + int getDtypeValue(); + /** + * .tensorflow.DataType dtype = 1; + */ + org.tensorflow.proto.framework.DataType getDtype(); + + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + boolean hasShape(); + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + org.tensorflow.proto.framework.TensorShapeProto getShape(); + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder(); + } + /** + * Protobuf type {@code tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto} + */ + public static final class TensorShapeTypeProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto) + TensorShapeTypeProtoOrBuilder { + private static final long serialVersionUID = 0L; + // Use TensorShapeTypeProto.newBuilder() to construct. + private TensorShapeTypeProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TensorShapeTypeProto() { + dtype_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TensorShapeTypeProto(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TensorShapeTypeProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + dtype_ = rawValue; + break; + } + case 18: { + org.tensorflow.proto.framework.TensorShapeProto.Builder subBuilder = null; + if (shape_ != null) { + subBuilder = shape_.toBuilder(); + } + shape_ = input.readMessage(org.tensorflow.proto.framework.TensorShapeProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(shape_); + shape_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfoProto.internal_static_tensorflow_RemoteFusedGraphExecuteInfo_TensorShapeTypeProto_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfoProto.internal_static_tensorflow_RemoteFusedGraphExecuteInfo_TensorShapeTypeProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.class, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder.class); + } + + public static final int DTYPE_FIELD_NUMBER = 1; + private int dtype_; + /** + * .tensorflow.DataType dtype = 1; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + + public static final int SHAPE_FIELD_NUMBER = 2; + private org.tensorflow.proto.framework.TensorShapeProto shape_; + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public boolean hasShape() { + return shape_ != null; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProto getShape() { + return shape_ == null ? org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { + return getShape(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + output.writeEnum(1, dtype_); + } + if (shape_ != null) { + output.writeMessage(2, getShape()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, dtype_); + } + if (shape_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getShape()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto other = (org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto) obj; + + if (dtype_ != other.dtype_) return false; + if (hasShape() != other.hasShape()) return false; + if (hasShape()) { + if (!getShape() + .equals(other.getShape())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DTYPE_FIELD_NUMBER; + hash = (53 * hash) + dtype_; + if (hasShape()) { + hash = (37 * hash) + SHAPE_FIELD_NUMBER; + hash = (53 * hash) + getShape().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto 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.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto) + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfoProto.internal_static_tensorflow_RemoteFusedGraphExecuteInfo_TensorShapeTypeProto_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfoProto.internal_static_tensorflow_RemoteFusedGraphExecuteInfo_TensorShapeTypeProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.class, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + dtype_ = 0; + + if (shapeBuilder_ == null) { + shape_ = null; + } else { + shape_ = null; + shapeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfoProto.internal_static_tensorflow_RemoteFusedGraphExecuteInfo_TensorShapeTypeProto_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto getDefaultInstanceForType() { + return org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto build() { + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto buildPartial() { + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto result = new org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto(this); + result.dtype_ = dtype_; + if (shapeBuilder_ == null) { + result.shape_ = shape_; + } else { + result.shape_ = shapeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto) { + return mergeFrom((org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto other) { + if (other == org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.getDefaultInstance()) return this; + if (other.dtype_ != 0) { + setDtypeValue(other.getDtypeValue()); + } + if (other.hasShape()) { + mergeShape(other.getShape()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int dtype_ = 0; + /** + * .tensorflow.DataType dtype = 1; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder setDtypeValue(int value) { + dtype_ = value; + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder setDtype(org.tensorflow.proto.framework.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + + dtype_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder clearDtype() { + + dtype_ = 0; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.TensorShapeProto shape_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> shapeBuilder_; + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public boolean hasShape() { + return shapeBuilder_ != null || shape_ != null; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProto getShape() { + if (shapeBuilder_ == null) { + return shape_ == null ? org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } else { + return shapeBuilder_.getMessage(); + } + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder setShape(org.tensorflow.proto.framework.TensorShapeProto value) { + if (shapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shape_ = value; + onChanged(); + } else { + shapeBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder setShape( + org.tensorflow.proto.framework.TensorShapeProto.Builder builderForValue) { + if (shapeBuilder_ == null) { + shape_ = builderForValue.build(); + onChanged(); + } else { + shapeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder mergeShape(org.tensorflow.proto.framework.TensorShapeProto value) { + if (shapeBuilder_ == null) { + if (shape_ != null) { + shape_ = + org.tensorflow.proto.framework.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial(); + } else { + shape_ = value; + } + onChanged(); + } else { + shapeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder clearShape() { + if (shapeBuilder_ == null) { + shape_ = null; + onChanged(); + } else { + shape_ = null; + shapeBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProto.Builder getShapeBuilder() { + + onChanged(); + return getShapeFieldBuilder().getBuilder(); + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { + if (shapeBuilder_ != null) { + return shapeBuilder_.getMessageOrBuilder(); + } else { + return shape_ == null ? + org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> + getShapeFieldBuilder() { + if (shapeBuilder_ == null) { + shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder>( + getShape(), + getParentForChildren(), + isClean()); + shape_ = null; + } + return shapeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto) + } + + // @@protoc_insertion_point(class_scope:tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto) + private static final org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto(); + } + + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TensorShapeTypeProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TensorShapeTypeProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int REMOTE_GRAPH_FIELD_NUMBER = 1; + private org.tensorflow.proto.framework.GraphDef remoteGraph_; + /** + *
+   * Definition of remote graph
+   * 
+ * + * .tensorflow.GraphDef remote_graph = 1; + */ + public boolean hasRemoteGraph() { + return remoteGraph_ != null; + } + /** + *
+   * Definition of remote graph
+   * 
+ * + * .tensorflow.GraphDef remote_graph = 1; + */ + public org.tensorflow.proto.framework.GraphDef getRemoteGraph() { + return remoteGraph_ == null ? org.tensorflow.proto.framework.GraphDef.getDefaultInstance() : remoteGraph_; + } + /** + *
+   * Definition of remote graph
+   * 
+ * + * .tensorflow.GraphDef remote_graph = 1; + */ + public org.tensorflow.proto.framework.GraphDefOrBuilder getRemoteGraphOrBuilder() { + return getRemoteGraph(); + } + + public static final int GRAPH_INPUT_NODE_NAME_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList graphInputNodeName_; + /** + *
+   * Remote fused graph input node name
+   * 
+ * + * repeated string graph_input_node_name = 2; + */ + public com.google.protobuf.ProtocolStringList + getGraphInputNodeNameList() { + return graphInputNodeName_; + } + /** + *
+   * Remote fused graph input node name
+   * 
+ * + * repeated string graph_input_node_name = 2; + */ + public int getGraphInputNodeNameCount() { + return graphInputNodeName_.size(); + } + /** + *
+   * Remote fused graph input node name
+   * 
+ * + * repeated string graph_input_node_name = 2; + */ + public java.lang.String getGraphInputNodeName(int index) { + return graphInputNodeName_.get(index); + } + /** + *
+   * Remote fused graph input node name
+   * 
+ * + * repeated string graph_input_node_name = 2; + */ + public com.google.protobuf.ByteString + getGraphInputNodeNameBytes(int index) { + return graphInputNodeName_.getByteString(index); + } + + public static final int GRAPH_OUTPUT_NODE_NAME_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList graphOutputNodeName_; + /** + *
+   * Remote fused graph output node name
+   * 
+ * + * repeated string graph_output_node_name = 3; + */ + public com.google.protobuf.ProtocolStringList + getGraphOutputNodeNameList() { + return graphOutputNodeName_; + } + /** + *
+   * Remote fused graph output node name
+   * 
+ * + * repeated string graph_output_node_name = 3; + */ + public int getGraphOutputNodeNameCount() { + return graphOutputNodeName_.size(); + } + /** + *
+   * Remote fused graph output node name
+   * 
+ * + * repeated string graph_output_node_name = 3; + */ + public java.lang.String getGraphOutputNodeName(int index) { + return graphOutputNodeName_.get(index); + } + /** + *
+   * Remote fused graph output node name
+   * 
+ * + * repeated string graph_output_node_name = 3; + */ + public com.google.protobuf.ByteString + getGraphOutputNodeNameBytes(int index) { + return graphOutputNodeName_.getByteString(index); + } + + public static final int EXECUTOR_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object executorName_; + /** + *
+   * Executor's name
+   * 
+ * + * string executor_name = 4; + */ + public java.lang.String getExecutorName() { + java.lang.Object ref = executorName_; + 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(); + executorName_ = s; + return s; + } + } + /** + *
+   * Executor's name
+   * 
+ * + * string executor_name = 4; + */ + public com.google.protobuf.ByteString + getExecutorNameBytes() { + java.lang.Object ref = executorName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + executorName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERIALIZED_EXECUTOR_PARAMETERS_FIELD_NUMBER = 5; + private com.google.protobuf.ByteString serializedExecutorParameters_; + /** + *
+   * Optional: Parameters given to the executor
+   * 
+ * + * bytes serialized_executor_parameters = 5; + */ + public com.google.protobuf.ByteString getSerializedExecutorParameters() { + return serializedExecutorParameters_; + } + + public static final int DEFAULT_GRAPH_INPUT_TENSOR_SHAPE_FIELD_NUMBER = 6; + private java.util.List defaultGraphInputTensorShape_; + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public java.util.List getDefaultGraphInputTensorShapeList() { + return defaultGraphInputTensorShape_; + } + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public java.util.List + getDefaultGraphInputTensorShapeOrBuilderList() { + return defaultGraphInputTensorShape_; + } + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public int getDefaultGraphInputTensorShapeCount() { + return defaultGraphInputTensorShape_.size(); + } + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto getDefaultGraphInputTensorShape(int index) { + return defaultGraphInputTensorShape_.get(index); + } + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProtoOrBuilder getDefaultGraphInputTensorShapeOrBuilder( + int index) { + return defaultGraphInputTensorShape_.get(index); + } + + public static final int DEFAULT_GRAPH_OUTPUT_TENSOR_SHAPE_FIELD_NUMBER = 7; + private java.util.List defaultGraphOutputTensorShape_; + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * TODO(satok): Remote output tensor shape once shape information is stored
+   * in NodeDef
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public java.util.List getDefaultGraphOutputTensorShapeList() { + return defaultGraphOutputTensorShape_; + } + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * TODO(satok): Remote output tensor shape once shape information is stored
+   * in NodeDef
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public java.util.List + getDefaultGraphOutputTensorShapeOrBuilderList() { + return defaultGraphOutputTensorShape_; + } + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * TODO(satok): Remote output tensor shape once shape information is stored
+   * in NodeDef
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public int getDefaultGraphOutputTensorShapeCount() { + return defaultGraphOutputTensorShape_.size(); + } + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * TODO(satok): Remote output tensor shape once shape information is stored
+   * in NodeDef
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto getDefaultGraphOutputTensorShape(int index) { + return defaultGraphOutputTensorShape_.get(index); + } + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * TODO(satok): Remote output tensor shape once shape information is stored
+   * in NodeDef
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProtoOrBuilder getDefaultGraphOutputTensorShapeOrBuilder( + int index) { + return defaultGraphOutputTensorShape_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (remoteGraph_ != null) { + output.writeMessage(1, getRemoteGraph()); + } + for (int i = 0; i < graphInputNodeName_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, graphInputNodeName_.getRaw(i)); + } + for (int i = 0; i < graphOutputNodeName_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, graphOutputNodeName_.getRaw(i)); + } + if (!getExecutorNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, executorName_); + } + if (!serializedExecutorParameters_.isEmpty()) { + output.writeBytes(5, serializedExecutorParameters_); + } + for (int i = 0; i < defaultGraphInputTensorShape_.size(); i++) { + output.writeMessage(6, defaultGraphInputTensorShape_.get(i)); + } + for (int i = 0; i < defaultGraphOutputTensorShape_.size(); i++) { + output.writeMessage(7, defaultGraphOutputTensorShape_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (remoteGraph_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRemoteGraph()); + } + { + int dataSize = 0; + for (int i = 0; i < graphInputNodeName_.size(); i++) { + dataSize += computeStringSizeNoTag(graphInputNodeName_.getRaw(i)); + } + size += dataSize; + size += 1 * getGraphInputNodeNameList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < graphOutputNodeName_.size(); i++) { + dataSize += computeStringSizeNoTag(graphOutputNodeName_.getRaw(i)); + } + size += dataSize; + size += 1 * getGraphOutputNodeNameList().size(); + } + if (!getExecutorNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, executorName_); + } + if (!serializedExecutorParameters_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, serializedExecutorParameters_); + } + for (int i = 0; i < defaultGraphInputTensorShape_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, defaultGraphInputTensorShape_.get(i)); + } + for (int i = 0; i < defaultGraphOutputTensorShape_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, defaultGraphOutputTensorShape_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo other = (org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo) obj; + + if (hasRemoteGraph() != other.hasRemoteGraph()) return false; + if (hasRemoteGraph()) { + if (!getRemoteGraph() + .equals(other.getRemoteGraph())) return false; + } + if (!getGraphInputNodeNameList() + .equals(other.getGraphInputNodeNameList())) return false; + if (!getGraphOutputNodeNameList() + .equals(other.getGraphOutputNodeNameList())) return false; + if (!getExecutorName() + .equals(other.getExecutorName())) return false; + if (!getSerializedExecutorParameters() + .equals(other.getSerializedExecutorParameters())) return false; + if (!getDefaultGraphInputTensorShapeList() + .equals(other.getDefaultGraphInputTensorShapeList())) return false; + if (!getDefaultGraphOutputTensorShapeList() + .equals(other.getDefaultGraphOutputTensorShapeList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRemoteGraph()) { + hash = (37 * hash) + REMOTE_GRAPH_FIELD_NUMBER; + hash = (53 * hash) + getRemoteGraph().hashCode(); + } + if (getGraphInputNodeNameCount() > 0) { + hash = (37 * hash) + GRAPH_INPUT_NODE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getGraphInputNodeNameList().hashCode(); + } + if (getGraphOutputNodeNameCount() > 0) { + hash = (37 * hash) + GRAPH_OUTPUT_NODE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getGraphOutputNodeNameList().hashCode(); + } + hash = (37 * hash) + EXECUTOR_NAME_FIELD_NUMBER; + hash = (53 * hash) + getExecutorName().hashCode(); + hash = (37 * hash) + SERIALIZED_EXECUTOR_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getSerializedExecutorParameters().hashCode(); + if (getDefaultGraphInputTensorShapeCount() > 0) { + hash = (37 * hash) + DEFAULT_GRAPH_INPUT_TENSOR_SHAPE_FIELD_NUMBER; + hash = (53 * hash) + getDefaultGraphInputTensorShapeList().hashCode(); + } + if (getDefaultGraphOutputTensorShapeCount() > 0) { + hash = (37 * hash) + DEFAULT_GRAPH_OUTPUT_TENSOR_SHAPE_FIELD_NUMBER; + hash = (53 * hash) + getDefaultGraphOutputTensorShapeList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo 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.proto.framework.RemoteFusedGraphExecuteInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Protocol buffer representing a handle to a tensorflow resource. Handles are
+   * not valid across executions, but can be serialized back and forth from within
+   * a single run.
+   * 
+ * + * Protobuf type {@code tensorflow.RemoteFusedGraphExecuteInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.RemoteFusedGraphExecuteInfo) + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfoProto.internal_static_tensorflow_RemoteFusedGraphExecuteInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfoProto.internal_static_tensorflow_RemoteFusedGraphExecuteInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.class, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDefaultGraphInputTensorShapeFieldBuilder(); + getDefaultGraphOutputTensorShapeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (remoteGraphBuilder_ == null) { + remoteGraph_ = null; + } else { + remoteGraph_ = null; + remoteGraphBuilder_ = null; + } + graphInputNodeName_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + graphOutputNodeName_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + executorName_ = ""; + + serializedExecutorParameters_ = com.google.protobuf.ByteString.EMPTY; + + if (defaultGraphInputTensorShapeBuilder_ == null) { + defaultGraphInputTensorShape_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + defaultGraphInputTensorShapeBuilder_.clear(); + } + if (defaultGraphOutputTensorShapeBuilder_ == null) { + defaultGraphOutputTensorShape_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + defaultGraphOutputTensorShapeBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfoProto.internal_static_tensorflow_RemoteFusedGraphExecuteInfo_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo getDefaultInstanceForType() { + return org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo build() { + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo buildPartial() { + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo result = new org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo(this); + int from_bitField0_ = bitField0_; + if (remoteGraphBuilder_ == null) { + result.remoteGraph_ = remoteGraph_; + } else { + result.remoteGraph_ = remoteGraphBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + graphInputNodeName_ = graphInputNodeName_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.graphInputNodeName_ = graphInputNodeName_; + if (((bitField0_ & 0x00000002) != 0)) { + graphOutputNodeName_ = graphOutputNodeName_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.graphOutputNodeName_ = graphOutputNodeName_; + result.executorName_ = executorName_; + result.serializedExecutorParameters_ = serializedExecutorParameters_; + if (defaultGraphInputTensorShapeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + defaultGraphInputTensorShape_ = java.util.Collections.unmodifiableList(defaultGraphInputTensorShape_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.defaultGraphInputTensorShape_ = defaultGraphInputTensorShape_; + } else { + result.defaultGraphInputTensorShape_ = defaultGraphInputTensorShapeBuilder_.build(); + } + if (defaultGraphOutputTensorShapeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + defaultGraphOutputTensorShape_ = java.util.Collections.unmodifiableList(defaultGraphOutputTensorShape_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.defaultGraphOutputTensorShape_ = defaultGraphOutputTensorShape_; + } else { + result.defaultGraphOutputTensorShape_ = defaultGraphOutputTensorShapeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo) { + return mergeFrom((org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo other) { + if (other == org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.getDefaultInstance()) return this; + if (other.hasRemoteGraph()) { + mergeRemoteGraph(other.getRemoteGraph()); + } + if (!other.graphInputNodeName_.isEmpty()) { + if (graphInputNodeName_.isEmpty()) { + graphInputNodeName_ = other.graphInputNodeName_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGraphInputNodeNameIsMutable(); + graphInputNodeName_.addAll(other.graphInputNodeName_); + } + onChanged(); + } + if (!other.graphOutputNodeName_.isEmpty()) { + if (graphOutputNodeName_.isEmpty()) { + graphOutputNodeName_ = other.graphOutputNodeName_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureGraphOutputNodeNameIsMutable(); + graphOutputNodeName_.addAll(other.graphOutputNodeName_); + } + onChanged(); + } + if (!other.getExecutorName().isEmpty()) { + executorName_ = other.executorName_; + onChanged(); + } + if (other.getSerializedExecutorParameters() != com.google.protobuf.ByteString.EMPTY) { + setSerializedExecutorParameters(other.getSerializedExecutorParameters()); + } + if (defaultGraphInputTensorShapeBuilder_ == null) { + if (!other.defaultGraphInputTensorShape_.isEmpty()) { + if (defaultGraphInputTensorShape_.isEmpty()) { + defaultGraphInputTensorShape_ = other.defaultGraphInputTensorShape_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureDefaultGraphInputTensorShapeIsMutable(); + defaultGraphInputTensorShape_.addAll(other.defaultGraphInputTensorShape_); + } + onChanged(); + } + } else { + if (!other.defaultGraphInputTensorShape_.isEmpty()) { + if (defaultGraphInputTensorShapeBuilder_.isEmpty()) { + defaultGraphInputTensorShapeBuilder_.dispose(); + defaultGraphInputTensorShapeBuilder_ = null; + defaultGraphInputTensorShape_ = other.defaultGraphInputTensorShape_; + bitField0_ = (bitField0_ & ~0x00000004); + defaultGraphInputTensorShapeBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDefaultGraphInputTensorShapeFieldBuilder() : null; + } else { + defaultGraphInputTensorShapeBuilder_.addAllMessages(other.defaultGraphInputTensorShape_); + } + } + } + if (defaultGraphOutputTensorShapeBuilder_ == null) { + if (!other.defaultGraphOutputTensorShape_.isEmpty()) { + if (defaultGraphOutputTensorShape_.isEmpty()) { + defaultGraphOutputTensorShape_ = other.defaultGraphOutputTensorShape_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureDefaultGraphOutputTensorShapeIsMutable(); + defaultGraphOutputTensorShape_.addAll(other.defaultGraphOutputTensorShape_); + } + onChanged(); + } + } else { + if (!other.defaultGraphOutputTensorShape_.isEmpty()) { + if (defaultGraphOutputTensorShapeBuilder_.isEmpty()) { + defaultGraphOutputTensorShapeBuilder_.dispose(); + defaultGraphOutputTensorShapeBuilder_ = null; + defaultGraphOutputTensorShape_ = other.defaultGraphOutputTensorShape_; + bitField0_ = (bitField0_ & ~0x00000008); + defaultGraphOutputTensorShapeBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDefaultGraphOutputTensorShapeFieldBuilder() : null; + } else { + defaultGraphOutputTensorShapeBuilder_.addAllMessages(other.defaultGraphOutputTensorShape_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private org.tensorflow.proto.framework.GraphDef remoteGraph_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder> remoteGraphBuilder_; + /** + *
+     * Definition of remote graph
+     * 
+ * + * .tensorflow.GraphDef remote_graph = 1; + */ + public boolean hasRemoteGraph() { + return remoteGraphBuilder_ != null || remoteGraph_ != null; + } + /** + *
+     * Definition of remote graph
+     * 
+ * + * .tensorflow.GraphDef remote_graph = 1; + */ + public org.tensorflow.proto.framework.GraphDef getRemoteGraph() { + if (remoteGraphBuilder_ == null) { + return remoteGraph_ == null ? org.tensorflow.proto.framework.GraphDef.getDefaultInstance() : remoteGraph_; + } else { + return remoteGraphBuilder_.getMessage(); + } + } + /** + *
+     * Definition of remote graph
+     * 
+ * + * .tensorflow.GraphDef remote_graph = 1; + */ + public Builder setRemoteGraph(org.tensorflow.proto.framework.GraphDef value) { + if (remoteGraphBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remoteGraph_ = value; + onChanged(); + } else { + remoteGraphBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Definition of remote graph
+     * 
+ * + * .tensorflow.GraphDef remote_graph = 1; + */ + public Builder setRemoteGraph( + org.tensorflow.proto.framework.GraphDef.Builder builderForValue) { + if (remoteGraphBuilder_ == null) { + remoteGraph_ = builderForValue.build(); + onChanged(); + } else { + remoteGraphBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Definition of remote graph
+     * 
+ * + * .tensorflow.GraphDef remote_graph = 1; + */ + public Builder mergeRemoteGraph(org.tensorflow.proto.framework.GraphDef value) { + if (remoteGraphBuilder_ == null) { + if (remoteGraph_ != null) { + remoteGraph_ = + org.tensorflow.proto.framework.GraphDef.newBuilder(remoteGraph_).mergeFrom(value).buildPartial(); + } else { + remoteGraph_ = value; + } + onChanged(); + } else { + remoteGraphBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Definition of remote graph
+     * 
+ * + * .tensorflow.GraphDef remote_graph = 1; + */ + public Builder clearRemoteGraph() { + if (remoteGraphBuilder_ == null) { + remoteGraph_ = null; + onChanged(); + } else { + remoteGraph_ = null; + remoteGraphBuilder_ = null; + } + + return this; + } + /** + *
+     * Definition of remote graph
+     * 
+ * + * .tensorflow.GraphDef remote_graph = 1; + */ + public org.tensorflow.proto.framework.GraphDef.Builder getRemoteGraphBuilder() { + + onChanged(); + return getRemoteGraphFieldBuilder().getBuilder(); + } + /** + *
+     * Definition of remote graph
+     * 
+ * + * .tensorflow.GraphDef remote_graph = 1; + */ + public org.tensorflow.proto.framework.GraphDefOrBuilder getRemoteGraphOrBuilder() { + if (remoteGraphBuilder_ != null) { + return remoteGraphBuilder_.getMessageOrBuilder(); + } else { + return remoteGraph_ == null ? + org.tensorflow.proto.framework.GraphDef.getDefaultInstance() : remoteGraph_; + } + } + /** + *
+     * Definition of remote graph
+     * 
+ * + * .tensorflow.GraphDef remote_graph = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder> + getRemoteGraphFieldBuilder() { + if (remoteGraphBuilder_ == null) { + remoteGraphBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder>( + getRemoteGraph(), + getParentForChildren(), + isClean()); + remoteGraph_ = null; + } + return remoteGraphBuilder_; + } + + private com.google.protobuf.LazyStringList graphInputNodeName_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureGraphInputNodeNameIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + graphInputNodeName_ = new com.google.protobuf.LazyStringArrayList(graphInputNodeName_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Remote fused graph input node name
+     * 
+ * + * repeated string graph_input_node_name = 2; + */ + public com.google.protobuf.ProtocolStringList + getGraphInputNodeNameList() { + return graphInputNodeName_.getUnmodifiableView(); + } + /** + *
+     * Remote fused graph input node name
+     * 
+ * + * repeated string graph_input_node_name = 2; + */ + public int getGraphInputNodeNameCount() { + return graphInputNodeName_.size(); + } + /** + *
+     * Remote fused graph input node name
+     * 
+ * + * repeated string graph_input_node_name = 2; + */ + public java.lang.String getGraphInputNodeName(int index) { + return graphInputNodeName_.get(index); + } + /** + *
+     * Remote fused graph input node name
+     * 
+ * + * repeated string graph_input_node_name = 2; + */ + public com.google.protobuf.ByteString + getGraphInputNodeNameBytes(int index) { + return graphInputNodeName_.getByteString(index); + } + /** + *
+     * Remote fused graph input node name
+     * 
+ * + * repeated string graph_input_node_name = 2; + */ + public Builder setGraphInputNodeName( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGraphInputNodeNameIsMutable(); + graphInputNodeName_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Remote fused graph input node name
+     * 
+ * + * repeated string graph_input_node_name = 2; + */ + public Builder addGraphInputNodeName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGraphInputNodeNameIsMutable(); + graphInputNodeName_.add(value); + onChanged(); + return this; + } + /** + *
+     * Remote fused graph input node name
+     * 
+ * + * repeated string graph_input_node_name = 2; + */ + public Builder addAllGraphInputNodeName( + java.lang.Iterable values) { + ensureGraphInputNodeNameIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, graphInputNodeName_); + onChanged(); + return this; + } + /** + *
+     * Remote fused graph input node name
+     * 
+ * + * repeated string graph_input_node_name = 2; + */ + public Builder clearGraphInputNodeName() { + graphInputNodeName_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Remote fused graph input node name
+     * 
+ * + * repeated string graph_input_node_name = 2; + */ + public Builder addGraphInputNodeNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureGraphInputNodeNameIsMutable(); + graphInputNodeName_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList graphOutputNodeName_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureGraphOutputNodeNameIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + graphOutputNodeName_ = new com.google.protobuf.LazyStringArrayList(graphOutputNodeName_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * Remote fused graph output node name
+     * 
+ * + * repeated string graph_output_node_name = 3; + */ + public com.google.protobuf.ProtocolStringList + getGraphOutputNodeNameList() { + return graphOutputNodeName_.getUnmodifiableView(); + } + /** + *
+     * Remote fused graph output node name
+     * 
+ * + * repeated string graph_output_node_name = 3; + */ + public int getGraphOutputNodeNameCount() { + return graphOutputNodeName_.size(); + } + /** + *
+     * Remote fused graph output node name
+     * 
+ * + * repeated string graph_output_node_name = 3; + */ + public java.lang.String getGraphOutputNodeName(int index) { + return graphOutputNodeName_.get(index); + } + /** + *
+     * Remote fused graph output node name
+     * 
+ * + * repeated string graph_output_node_name = 3; + */ + public com.google.protobuf.ByteString + getGraphOutputNodeNameBytes(int index) { + return graphOutputNodeName_.getByteString(index); + } + /** + *
+     * Remote fused graph output node name
+     * 
+ * + * repeated string graph_output_node_name = 3; + */ + public Builder setGraphOutputNodeName( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGraphOutputNodeNameIsMutable(); + graphOutputNodeName_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Remote fused graph output node name
+     * 
+ * + * repeated string graph_output_node_name = 3; + */ + public Builder addGraphOutputNodeName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGraphOutputNodeNameIsMutable(); + graphOutputNodeName_.add(value); + onChanged(); + return this; + } + /** + *
+     * Remote fused graph output node name
+     * 
+ * + * repeated string graph_output_node_name = 3; + */ + public Builder addAllGraphOutputNodeName( + java.lang.Iterable values) { + ensureGraphOutputNodeNameIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, graphOutputNodeName_); + onChanged(); + return this; + } + /** + *
+     * Remote fused graph output node name
+     * 
+ * + * repeated string graph_output_node_name = 3; + */ + public Builder clearGraphOutputNodeName() { + graphOutputNodeName_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Remote fused graph output node name
+     * 
+ * + * repeated string graph_output_node_name = 3; + */ + public Builder addGraphOutputNodeNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureGraphOutputNodeNameIsMutable(); + graphOutputNodeName_.add(value); + onChanged(); + return this; + } + + private java.lang.Object executorName_ = ""; + /** + *
+     * Executor's name
+     * 
+ * + * string executor_name = 4; + */ + public java.lang.String getExecutorName() { + java.lang.Object ref = executorName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executorName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Executor's name
+     * 
+ * + * string executor_name = 4; + */ + public com.google.protobuf.ByteString + getExecutorNameBytes() { + java.lang.Object ref = executorName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + executorName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Executor's name
+     * 
+ * + * string executor_name = 4; + */ + public Builder setExecutorName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + executorName_ = value; + onChanged(); + return this; + } + /** + *
+     * Executor's name
+     * 
+ * + * string executor_name = 4; + */ + public Builder clearExecutorName() { + + executorName_ = getDefaultInstance().getExecutorName(); + onChanged(); + return this; + } + /** + *
+     * Executor's name
+     * 
+ * + * string executor_name = 4; + */ + public Builder setExecutorNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + executorName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString serializedExecutorParameters_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Optional: Parameters given to the executor
+     * 
+ * + * bytes serialized_executor_parameters = 5; + */ + public com.google.protobuf.ByteString getSerializedExecutorParameters() { + return serializedExecutorParameters_; + } + /** + *
+     * Optional: Parameters given to the executor
+     * 
+ * + * bytes serialized_executor_parameters = 5; + */ + public Builder setSerializedExecutorParameters(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + serializedExecutorParameters_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional: Parameters given to the executor
+     * 
+ * + * bytes serialized_executor_parameters = 5; + */ + public Builder clearSerializedExecutorParameters() { + + serializedExecutorParameters_ = getDefaultInstance().getSerializedExecutorParameters(); + onChanged(); + return this; + } + + private java.util.List defaultGraphInputTensorShape_ = + java.util.Collections.emptyList(); + private void ensureDefaultGraphInputTensorShapeIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + defaultGraphInputTensorShape_ = new java.util.ArrayList(defaultGraphInputTensorShape_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProtoOrBuilder> defaultGraphInputTensorShapeBuilder_; + + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public java.util.List getDefaultGraphInputTensorShapeList() { + if (defaultGraphInputTensorShapeBuilder_ == null) { + return java.util.Collections.unmodifiableList(defaultGraphInputTensorShape_); + } else { + return defaultGraphInputTensorShapeBuilder_.getMessageList(); + } + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public int getDefaultGraphInputTensorShapeCount() { + if (defaultGraphInputTensorShapeBuilder_ == null) { + return defaultGraphInputTensorShape_.size(); + } else { + return defaultGraphInputTensorShapeBuilder_.getCount(); + } + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto getDefaultGraphInputTensorShape(int index) { + if (defaultGraphInputTensorShapeBuilder_ == null) { + return defaultGraphInputTensorShape_.get(index); + } else { + return defaultGraphInputTensorShapeBuilder_.getMessage(index); + } + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public Builder setDefaultGraphInputTensorShape( + int index, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto value) { + if (defaultGraphInputTensorShapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDefaultGraphInputTensorShapeIsMutable(); + defaultGraphInputTensorShape_.set(index, value); + onChanged(); + } else { + defaultGraphInputTensorShapeBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public Builder setDefaultGraphInputTensorShape( + int index, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder builderForValue) { + if (defaultGraphInputTensorShapeBuilder_ == null) { + ensureDefaultGraphInputTensorShapeIsMutable(); + defaultGraphInputTensorShape_.set(index, builderForValue.build()); + onChanged(); + } else { + defaultGraphInputTensorShapeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public Builder addDefaultGraphInputTensorShape(org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto value) { + if (defaultGraphInputTensorShapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDefaultGraphInputTensorShapeIsMutable(); + defaultGraphInputTensorShape_.add(value); + onChanged(); + } else { + defaultGraphInputTensorShapeBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public Builder addDefaultGraphInputTensorShape( + int index, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto value) { + if (defaultGraphInputTensorShapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDefaultGraphInputTensorShapeIsMutable(); + defaultGraphInputTensorShape_.add(index, value); + onChanged(); + } else { + defaultGraphInputTensorShapeBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public Builder addDefaultGraphInputTensorShape( + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder builderForValue) { + if (defaultGraphInputTensorShapeBuilder_ == null) { + ensureDefaultGraphInputTensorShapeIsMutable(); + defaultGraphInputTensorShape_.add(builderForValue.build()); + onChanged(); + } else { + defaultGraphInputTensorShapeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public Builder addDefaultGraphInputTensorShape( + int index, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder builderForValue) { + if (defaultGraphInputTensorShapeBuilder_ == null) { + ensureDefaultGraphInputTensorShapeIsMutable(); + defaultGraphInputTensorShape_.add(index, builderForValue.build()); + onChanged(); + } else { + defaultGraphInputTensorShapeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public Builder addAllDefaultGraphInputTensorShape( + java.lang.Iterable values) { + if (defaultGraphInputTensorShapeBuilder_ == null) { + ensureDefaultGraphInputTensorShapeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, defaultGraphInputTensorShape_); + onChanged(); + } else { + defaultGraphInputTensorShapeBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public Builder clearDefaultGraphInputTensorShape() { + if (defaultGraphInputTensorShapeBuilder_ == null) { + defaultGraphInputTensorShape_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + defaultGraphInputTensorShapeBuilder_.clear(); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public Builder removeDefaultGraphInputTensorShape(int index) { + if (defaultGraphInputTensorShapeBuilder_ == null) { + ensureDefaultGraphInputTensorShapeIsMutable(); + defaultGraphInputTensorShape_.remove(index); + onChanged(); + } else { + defaultGraphInputTensorShapeBuilder_.remove(index); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder getDefaultGraphInputTensorShapeBuilder( + int index) { + return getDefaultGraphInputTensorShapeFieldBuilder().getBuilder(index); + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProtoOrBuilder getDefaultGraphInputTensorShapeOrBuilder( + int index) { + if (defaultGraphInputTensorShapeBuilder_ == null) { + return defaultGraphInputTensorShape_.get(index); } else { + return defaultGraphInputTensorShapeBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public java.util.List + getDefaultGraphInputTensorShapeOrBuilderList() { + if (defaultGraphInputTensorShapeBuilder_ != null) { + return defaultGraphInputTensorShapeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(defaultGraphInputTensorShape_); + } + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder addDefaultGraphInputTensorShapeBuilder() { + return getDefaultGraphInputTensorShapeFieldBuilder().addBuilder( + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.getDefaultInstance()); + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder addDefaultGraphInputTensorShapeBuilder( + int index) { + return getDefaultGraphInputTensorShapeFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.getDefaultInstance()); + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + public java.util.List + getDefaultGraphInputTensorShapeBuilderList() { + return getDefaultGraphInputTensorShapeFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProtoOrBuilder> + getDefaultGraphInputTensorShapeFieldBuilder() { + if (defaultGraphInputTensorShapeBuilder_ == null) { + defaultGraphInputTensorShapeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProtoOrBuilder>( + defaultGraphInputTensorShape_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + defaultGraphInputTensorShape_ = null; + } + return defaultGraphInputTensorShapeBuilder_; + } + + private java.util.List defaultGraphOutputTensorShape_ = + java.util.Collections.emptyList(); + private void ensureDefaultGraphOutputTensorShapeIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + defaultGraphOutputTensorShape_ = new java.util.ArrayList(defaultGraphOutputTensorShape_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProtoOrBuilder> defaultGraphOutputTensorShapeBuilder_; + + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public java.util.List getDefaultGraphOutputTensorShapeList() { + if (defaultGraphOutputTensorShapeBuilder_ == null) { + return java.util.Collections.unmodifiableList(defaultGraphOutputTensorShape_); + } else { + return defaultGraphOutputTensorShapeBuilder_.getMessageList(); + } + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public int getDefaultGraphOutputTensorShapeCount() { + if (defaultGraphOutputTensorShapeBuilder_ == null) { + return defaultGraphOutputTensorShape_.size(); + } else { + return defaultGraphOutputTensorShapeBuilder_.getCount(); + } + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto getDefaultGraphOutputTensorShape(int index) { + if (defaultGraphOutputTensorShapeBuilder_ == null) { + return defaultGraphOutputTensorShape_.get(index); + } else { + return defaultGraphOutputTensorShapeBuilder_.getMessage(index); + } + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public Builder setDefaultGraphOutputTensorShape( + int index, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto value) { + if (defaultGraphOutputTensorShapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDefaultGraphOutputTensorShapeIsMutable(); + defaultGraphOutputTensorShape_.set(index, value); + onChanged(); + } else { + defaultGraphOutputTensorShapeBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public Builder setDefaultGraphOutputTensorShape( + int index, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder builderForValue) { + if (defaultGraphOutputTensorShapeBuilder_ == null) { + ensureDefaultGraphOutputTensorShapeIsMutable(); + defaultGraphOutputTensorShape_.set(index, builderForValue.build()); + onChanged(); + } else { + defaultGraphOutputTensorShapeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public Builder addDefaultGraphOutputTensorShape(org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto value) { + if (defaultGraphOutputTensorShapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDefaultGraphOutputTensorShapeIsMutable(); + defaultGraphOutputTensorShape_.add(value); + onChanged(); + } else { + defaultGraphOutputTensorShapeBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public Builder addDefaultGraphOutputTensorShape( + int index, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto value) { + if (defaultGraphOutputTensorShapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDefaultGraphOutputTensorShapeIsMutable(); + defaultGraphOutputTensorShape_.add(index, value); + onChanged(); + } else { + defaultGraphOutputTensorShapeBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public Builder addDefaultGraphOutputTensorShape( + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder builderForValue) { + if (defaultGraphOutputTensorShapeBuilder_ == null) { + ensureDefaultGraphOutputTensorShapeIsMutable(); + defaultGraphOutputTensorShape_.add(builderForValue.build()); + onChanged(); + } else { + defaultGraphOutputTensorShapeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public Builder addDefaultGraphOutputTensorShape( + int index, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder builderForValue) { + if (defaultGraphOutputTensorShapeBuilder_ == null) { + ensureDefaultGraphOutputTensorShapeIsMutable(); + defaultGraphOutputTensorShape_.add(index, builderForValue.build()); + onChanged(); + } else { + defaultGraphOutputTensorShapeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public Builder addAllDefaultGraphOutputTensorShape( + java.lang.Iterable values) { + if (defaultGraphOutputTensorShapeBuilder_ == null) { + ensureDefaultGraphOutputTensorShapeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, defaultGraphOutputTensorShape_); + onChanged(); + } else { + defaultGraphOutputTensorShapeBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public Builder clearDefaultGraphOutputTensorShape() { + if (defaultGraphOutputTensorShapeBuilder_ == null) { + defaultGraphOutputTensorShape_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + defaultGraphOutputTensorShapeBuilder_.clear(); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public Builder removeDefaultGraphOutputTensorShape(int index) { + if (defaultGraphOutputTensorShapeBuilder_ == null) { + ensureDefaultGraphOutputTensorShapeIsMutable(); + defaultGraphOutputTensorShape_.remove(index); + onChanged(); + } else { + defaultGraphOutputTensorShapeBuilder_.remove(index); + } + return this; + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder getDefaultGraphOutputTensorShapeBuilder( + int index) { + return getDefaultGraphOutputTensorShapeFieldBuilder().getBuilder(index); + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProtoOrBuilder getDefaultGraphOutputTensorShapeOrBuilder( + int index) { + if (defaultGraphOutputTensorShapeBuilder_ == null) { + return defaultGraphOutputTensorShape_.get(index); } else { + return defaultGraphOutputTensorShapeBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public java.util.List + getDefaultGraphOutputTensorShapeOrBuilderList() { + if (defaultGraphOutputTensorShapeBuilder_ != null) { + return defaultGraphOutputTensorShapeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(defaultGraphOutputTensorShape_); + } + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder addDefaultGraphOutputTensorShapeBuilder() { + return getDefaultGraphOutputTensorShapeFieldBuilder().addBuilder( + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.getDefaultInstance()); + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder addDefaultGraphOutputTensorShapeBuilder( + int index) { + return getDefaultGraphOutputTensorShapeFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.getDefaultInstance()); + } + /** + *
+     * Optional: Default graph input tensor shape used to allocate memory
+     * before executing op
+     * TODO(satok): Remote output tensor shape once shape information is stored
+     * in NodeDef
+     * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + public java.util.List + getDefaultGraphOutputTensorShapeBuilderList() { + return getDefaultGraphOutputTensorShapeFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProtoOrBuilder> + getDefaultGraphOutputTensorShapeFieldBuilder() { + if (defaultGraphOutputTensorShapeBuilder_ == null) { + defaultGraphOutputTensorShapeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto.Builder, org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProtoOrBuilder>( + defaultGraphOutputTensorShape_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + defaultGraphOutputTensorShape_ = null; + } + return defaultGraphOutputTensorShapeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.RemoteFusedGraphExecuteInfo) + } + + // @@protoc_insertion_point(class_scope:tensorflow.RemoteFusedGraphExecuteInfo) + private static final org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo(); + } + + public static org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoteFusedGraphExecuteInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RemoteFusedGraphExecuteInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteFusedGraphExecuteInfoOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteFusedGraphExecuteInfoOrBuilder.java new file mode 100644 index 00000000000..6e14ad8a2e0 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteFusedGraphExecuteInfoOrBuilder.java @@ -0,0 +1,239 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/remote_fused_graph_execute_info.proto + +package org.tensorflow.proto.framework; + +public interface RemoteFusedGraphExecuteInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.RemoteFusedGraphExecuteInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Definition of remote graph
+   * 
+ * + * .tensorflow.GraphDef remote_graph = 1; + */ + boolean hasRemoteGraph(); + /** + *
+   * Definition of remote graph
+   * 
+ * + * .tensorflow.GraphDef remote_graph = 1; + */ + org.tensorflow.proto.framework.GraphDef getRemoteGraph(); + /** + *
+   * Definition of remote graph
+   * 
+ * + * .tensorflow.GraphDef remote_graph = 1; + */ + org.tensorflow.proto.framework.GraphDefOrBuilder getRemoteGraphOrBuilder(); + + /** + *
+   * Remote fused graph input node name
+   * 
+ * + * repeated string graph_input_node_name = 2; + */ + java.util.List + getGraphInputNodeNameList(); + /** + *
+   * Remote fused graph input node name
+   * 
+ * + * repeated string graph_input_node_name = 2; + */ + int getGraphInputNodeNameCount(); + /** + *
+   * Remote fused graph input node name
+   * 
+ * + * repeated string graph_input_node_name = 2; + */ + java.lang.String getGraphInputNodeName(int index); + /** + *
+   * Remote fused graph input node name
+   * 
+ * + * repeated string graph_input_node_name = 2; + */ + com.google.protobuf.ByteString + getGraphInputNodeNameBytes(int index); + + /** + *
+   * Remote fused graph output node name
+   * 
+ * + * repeated string graph_output_node_name = 3; + */ + java.util.List + getGraphOutputNodeNameList(); + /** + *
+   * Remote fused graph output node name
+   * 
+ * + * repeated string graph_output_node_name = 3; + */ + int getGraphOutputNodeNameCount(); + /** + *
+   * Remote fused graph output node name
+   * 
+ * + * repeated string graph_output_node_name = 3; + */ + java.lang.String getGraphOutputNodeName(int index); + /** + *
+   * Remote fused graph output node name
+   * 
+ * + * repeated string graph_output_node_name = 3; + */ + com.google.protobuf.ByteString + getGraphOutputNodeNameBytes(int index); + + /** + *
+   * Executor's name
+   * 
+ * + * string executor_name = 4; + */ + java.lang.String getExecutorName(); + /** + *
+   * Executor's name
+   * 
+ * + * string executor_name = 4; + */ + com.google.protobuf.ByteString + getExecutorNameBytes(); + + /** + *
+   * Optional: Parameters given to the executor
+   * 
+ * + * bytes serialized_executor_parameters = 5; + */ + com.google.protobuf.ByteString getSerializedExecutorParameters(); + + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + java.util.List + getDefaultGraphInputTensorShapeList(); + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto getDefaultGraphInputTensorShape(int index); + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + int getDefaultGraphInputTensorShapeCount(); + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + java.util.List + getDefaultGraphInputTensorShapeOrBuilderList(); + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_input_tensor_shape = 6; + */ + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProtoOrBuilder getDefaultGraphInputTensorShapeOrBuilder( + int index); + + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * TODO(satok): Remote output tensor shape once shape information is stored
+   * in NodeDef
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + java.util.List + getDefaultGraphOutputTensorShapeList(); + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * TODO(satok): Remote output tensor shape once shape information is stored
+   * in NodeDef
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto getDefaultGraphOutputTensorShape(int index); + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * TODO(satok): Remote output tensor shape once shape information is stored
+   * in NodeDef
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + int getDefaultGraphOutputTensorShapeCount(); + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * TODO(satok): Remote output tensor shape once shape information is stored
+   * in NodeDef
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + java.util.List + getDefaultGraphOutputTensorShapeOrBuilderList(); + /** + *
+   * Optional: Default graph input tensor shape used to allocate memory
+   * before executing op
+   * TODO(satok): Remote output tensor shape once shape information is stored
+   * in NodeDef
+   * 
+ * + * repeated .tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto default_graph_output_tensor_shape = 7; + */ + org.tensorflow.proto.framework.RemoteFusedGraphExecuteInfo.TensorShapeTypeProtoOrBuilder getDefaultGraphOutputTensorShapeOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteFusedGraphExecuteInfoProto.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteFusedGraphExecuteInfoProto.java new file mode 100644 index 00000000000..95aeddaf025 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteFusedGraphExecuteInfoProto.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/remote_fused_graph_execute_info.proto + +package org.tensorflow.proto.framework; + +public final class RemoteFusedGraphExecuteInfoProto { + private RemoteFusedGraphExecuteInfoProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_RemoteFusedGraphExecuteInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_RemoteFusedGraphExecuteInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_RemoteFusedGraphExecuteInfo_TensorShapeTypeProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_RemoteFusedGraphExecuteInfo_TensorShapeTypeProto_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/remote_fused" + + "_graph_execute_info.proto\022\ntensorflow\032%t" + + "ensorflow/core/framework/graph.proto\032,te" + + "nsorflow/core/framework/tensor_shape.pro" + + "to\032%tensorflow/core/framework/types.prot" + + "o\"\202\004\n\033RemoteFusedGraphExecuteInfo\022*\n\014rem" + + "ote_graph\030\001 \001(\0132\024.tensorflow.GraphDef\022\035\n" + + "\025graph_input_node_name\030\002 \003(\t\022\036\n\026graph_ou" + + "tput_node_name\030\003 \003(\t\022\025\n\rexecutor_name\030\004 " + + "\001(\t\022&\n\036serialized_executor_parameters\030\005 " + + "\001(\014\022f\n default_graph_input_tensor_shape\030" + + "\006 \003(\0132<.tensorflow.RemoteFusedGraphExecu" + + "teInfo.TensorShapeTypeProto\022g\n!default_g" + + "raph_output_tensor_shape\030\007 \003(\0132<.tensorf" + + "low.RemoteFusedGraphExecuteInfo.TensorSh" + + "apeTypeProto\032h\n\024TensorShapeTypeProto\022#\n\005" + + "dtype\030\001 \001(\0162\024.tensorflow.DataType\022+\n\005sha" + + "pe\030\002 \001(\0132\034.tensorflow.TensorShapeProtoB\257" + + "\001\n\036org.tensorflow.proto.frameworkB Remot" + + "eFusedGraphExecuteInfoProtoP\001Zfgithub.co" + + "m/tensorflow/tensorflow/tensorflow/go/co" + + "re/framework/remote_fused_graph_execute_" + + "info_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.GraphProtos.getDescriptor(), + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(), + org.tensorflow.proto.framework.TypesProtos.getDescriptor(), + }); + internal_static_tensorflow_RemoteFusedGraphExecuteInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_RemoteFusedGraphExecuteInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_RemoteFusedGraphExecuteInfo_descriptor, + new java.lang.String[] { "RemoteGraph", "GraphInputNodeName", "GraphOutputNodeName", "ExecutorName", "SerializedExecutorParameters", "DefaultGraphInputTensorShape", "DefaultGraphOutputTensorShape", }); + internal_static_tensorflow_RemoteFusedGraphExecuteInfo_TensorShapeTypeProto_descriptor = + internal_static_tensorflow_RemoteFusedGraphExecuteInfo_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_RemoteFusedGraphExecuteInfo_TensorShapeTypeProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_RemoteFusedGraphExecuteInfo_TensorShapeTypeProto_descriptor, + new java.lang.String[] { "Dtype", "Shape", }); + org.tensorflow.proto.framework.GraphProtos.getDescriptor(); + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(); + org.tensorflow.proto.framework.TypesProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteTensorHandle.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteTensorHandle.java new file mode 100644 index 00000000000..94fb63602ec --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteTensorHandle.java @@ -0,0 +1,1441 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/remote_tensor_handle.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.eager.RemoteTensorHandle} + */ +public final class RemoteTensorHandle extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.eager.RemoteTensorHandle) + RemoteTensorHandleOrBuilder { +private static final long serialVersionUID = 0L; + // Use RemoteTensorHandle.newBuilder() to construct. + private RemoteTensorHandle(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RemoteTensorHandle() { + device_ = ""; + opDevice_ = ""; + dtype_ = 0; + resourceDtypesAndShapes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoteTensorHandle(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RemoteTensorHandle( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + opId_ = input.readInt64(); + break; + } + case 16: { + + outputNum_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + device_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + opDevice_ = s; + break; + } + case 40: { + int rawValue = input.readEnum(); + + dtype_ = rawValue; + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + resourceDtypesAndShapes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + resourceDtypesAndShapes_.add( + input.readMessage(org.tensorflow.proto.framework.ResourceDtypeAndShape.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + resourceDtypesAndShapes_ = java.util.Collections.unmodifiableList(resourceDtypesAndShapes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.RemoteTensorHandleProtos.internal_static_tensorflow_eager_RemoteTensorHandle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.RemoteTensorHandleProtos.internal_static_tensorflow_eager_RemoteTensorHandle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RemoteTensorHandle.class, org.tensorflow.proto.framework.RemoteTensorHandle.Builder.class); + } + + public static final int OP_ID_FIELD_NUMBER = 1; + private long opId_; + /** + *
+   * The ID of the operation that produced this tensor.
+   * 
+ * + * int64 op_id = 1; + */ + public long getOpId() { + return opId_; + } + + public static final int OUTPUT_NUM_FIELD_NUMBER = 2; + private int outputNum_; + /** + *
+   * The index into the outputs of the operation that produced this tensor.
+   * 
+ * + * int32 output_num = 2; + */ + public int getOutputNum() { + return outputNum_; + } + + public static final int DEVICE_FIELD_NUMBER = 3; + private volatile java.lang.Object device_; + /** + *
+   * Device of the operation that produced this tensor. Cannot be empty.
+   * For multi-device functions, it's the default device passed to placer.
+   * 
+ * + * string device = 3; + */ + 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; + } + } + /** + *
+   * Device of the operation that produced this tensor. Cannot be empty.
+   * For multi-device functions, it's the default device passed to placer.
+   * 
+ * + * string device = 3; + */ + 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 OP_DEVICE_FIELD_NUMBER = 4; + private volatile java.lang.Object opDevice_; + /** + *
+   * Device where the tensor is located. Can be empty if the operation producing
+   * this tensor is a multi-device function.
+   * 
+ * + * string op_device = 4; + */ + public java.lang.String getOpDevice() { + java.lang.Object ref = opDevice_; + 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(); + opDevice_ = s; + return s; + } + } + /** + *
+   * Device where the tensor is located. Can be empty if the operation producing
+   * this tensor is a multi-device function.
+   * 
+ * + * string op_device = 4; + */ + public com.google.protobuf.ByteString + getOpDeviceBytes() { + java.lang.Object ref = opDevice_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + opDevice_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DTYPE_FIELD_NUMBER = 5; + private int dtype_; + /** + *
+   * Tensor type.
+   * 
+ * + * .tensorflow.DataType dtype = 5; + */ + public int getDtypeValue() { + return dtype_; + } + /** + *
+   * Tensor type.
+   * 
+ * + * .tensorflow.DataType dtype = 5; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + + public static final int RESOURCE_DTYPES_AND_SHAPES_FIELD_NUMBER = 6; + private java.util.List resourceDtypesAndShapes_; + /** + *
+   * Optional data types and shapes of a remote resource variable.
+   * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public java.util.List getResourceDtypesAndShapesList() { + return resourceDtypesAndShapes_; + } + /** + *
+   * Optional data types and shapes of a remote resource variable.
+   * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public java.util.List + getResourceDtypesAndShapesOrBuilderList() { + return resourceDtypesAndShapes_; + } + /** + *
+   * Optional data types and shapes of a remote resource variable.
+   * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public int getResourceDtypesAndShapesCount() { + return resourceDtypesAndShapes_.size(); + } + /** + *
+   * Optional data types and shapes of a remote resource variable.
+   * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public org.tensorflow.proto.framework.ResourceDtypeAndShape getResourceDtypesAndShapes(int index) { + return resourceDtypesAndShapes_.get(index); + } + /** + *
+   * Optional data types and shapes of a remote resource variable.
+   * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public org.tensorflow.proto.framework.ResourceDtypeAndShapeOrBuilder getResourceDtypesAndShapesOrBuilder( + int index) { + return resourceDtypesAndShapes_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (opId_ != 0L) { + output.writeInt64(1, opId_); + } + if (outputNum_ != 0) { + output.writeInt32(2, outputNum_); + } + if (!getDeviceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, device_); + } + if (!getOpDeviceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, opDevice_); + } + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + output.writeEnum(5, dtype_); + } + for (int i = 0; i < resourceDtypesAndShapes_.size(); i++) { + output.writeMessage(6, resourceDtypesAndShapes_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (opId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, opId_); + } + if (outputNum_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, outputNum_); + } + if (!getDeviceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, device_); + } + if (!getOpDeviceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, opDevice_); + } + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, dtype_); + } + for (int i = 0; i < resourceDtypesAndShapes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, resourceDtypesAndShapes_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.RemoteTensorHandle)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.RemoteTensorHandle other = (org.tensorflow.proto.framework.RemoteTensorHandle) obj; + + if (getOpId() + != other.getOpId()) return false; + if (getOutputNum() + != other.getOutputNum()) return false; + if (!getDevice() + .equals(other.getDevice())) return false; + if (!getOpDevice() + .equals(other.getOpDevice())) return false; + if (dtype_ != other.dtype_) return false; + if (!getResourceDtypesAndShapesList() + .equals(other.getResourceDtypesAndShapesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OP_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOpId()); + hash = (37 * hash) + OUTPUT_NUM_FIELD_NUMBER; + hash = (53 * hash) + getOutputNum(); + hash = (37 * hash) + DEVICE_FIELD_NUMBER; + hash = (53 * hash) + getDevice().hashCode(); + hash = (37 * hash) + OP_DEVICE_FIELD_NUMBER; + hash = (53 * hash) + getOpDevice().hashCode(); + hash = (37 * hash) + DTYPE_FIELD_NUMBER; + hash = (53 * hash) + dtype_; + if (getResourceDtypesAndShapesCount() > 0) { + hash = (37 * hash) + RESOURCE_DTYPES_AND_SHAPES_FIELD_NUMBER; + hash = (53 * hash) + getResourceDtypesAndShapesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.RemoteTensorHandle parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RemoteTensorHandle parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RemoteTensorHandle parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RemoteTensorHandle 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.proto.framework.RemoteTensorHandle parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RemoteTensorHandle parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RemoteTensorHandle parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RemoteTensorHandle parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RemoteTensorHandle parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RemoteTensorHandle parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RemoteTensorHandle parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RemoteTensorHandle parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.RemoteTensorHandle prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.eager.RemoteTensorHandle} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.eager.RemoteTensorHandle) + org.tensorflow.proto.framework.RemoteTensorHandleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.RemoteTensorHandleProtos.internal_static_tensorflow_eager_RemoteTensorHandle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.RemoteTensorHandleProtos.internal_static_tensorflow_eager_RemoteTensorHandle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RemoteTensorHandle.class, org.tensorflow.proto.framework.RemoteTensorHandle.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.RemoteTensorHandle.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResourceDtypesAndShapesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + opId_ = 0L; + + outputNum_ = 0; + + device_ = ""; + + opDevice_ = ""; + + dtype_ = 0; + + if (resourceDtypesAndShapesBuilder_ == null) { + resourceDtypesAndShapes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resourceDtypesAndShapesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.RemoteTensorHandleProtos.internal_static_tensorflow_eager_RemoteTensorHandle_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RemoteTensorHandle getDefaultInstanceForType() { + return org.tensorflow.proto.framework.RemoteTensorHandle.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.RemoteTensorHandle build() { + org.tensorflow.proto.framework.RemoteTensorHandle result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RemoteTensorHandle buildPartial() { + org.tensorflow.proto.framework.RemoteTensorHandle result = new org.tensorflow.proto.framework.RemoteTensorHandle(this); + int from_bitField0_ = bitField0_; + result.opId_ = opId_; + result.outputNum_ = outputNum_; + result.device_ = device_; + result.opDevice_ = opDevice_; + result.dtype_ = dtype_; + if (resourceDtypesAndShapesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + resourceDtypesAndShapes_ = java.util.Collections.unmodifiableList(resourceDtypesAndShapes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resourceDtypesAndShapes_ = resourceDtypesAndShapes_; + } else { + result.resourceDtypesAndShapes_ = resourceDtypesAndShapesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.RemoteTensorHandle) { + return mergeFrom((org.tensorflow.proto.framework.RemoteTensorHandle)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.RemoteTensorHandle other) { + if (other == org.tensorflow.proto.framework.RemoteTensorHandle.getDefaultInstance()) return this; + if (other.getOpId() != 0L) { + setOpId(other.getOpId()); + } + if (other.getOutputNum() != 0) { + setOutputNum(other.getOutputNum()); + } + if (!other.getDevice().isEmpty()) { + device_ = other.device_; + onChanged(); + } + if (!other.getOpDevice().isEmpty()) { + opDevice_ = other.opDevice_; + onChanged(); + } + if (other.dtype_ != 0) { + setDtypeValue(other.getDtypeValue()); + } + if (resourceDtypesAndShapesBuilder_ == null) { + if (!other.resourceDtypesAndShapes_.isEmpty()) { + if (resourceDtypesAndShapes_.isEmpty()) { + resourceDtypesAndShapes_ = other.resourceDtypesAndShapes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourceDtypesAndShapesIsMutable(); + resourceDtypesAndShapes_.addAll(other.resourceDtypesAndShapes_); + } + onChanged(); + } + } else { + if (!other.resourceDtypesAndShapes_.isEmpty()) { + if (resourceDtypesAndShapesBuilder_.isEmpty()) { + resourceDtypesAndShapesBuilder_.dispose(); + resourceDtypesAndShapesBuilder_ = null; + resourceDtypesAndShapes_ = other.resourceDtypesAndShapes_; + bitField0_ = (bitField0_ & ~0x00000001); + resourceDtypesAndShapesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResourceDtypesAndShapesFieldBuilder() : null; + } else { + resourceDtypesAndShapesBuilder_.addAllMessages(other.resourceDtypesAndShapes_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.RemoteTensorHandle parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.RemoteTensorHandle) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long opId_ ; + /** + *
+     * The ID of the operation that produced this tensor.
+     * 
+ * + * int64 op_id = 1; + */ + public long getOpId() { + return opId_; + } + /** + *
+     * The ID of the operation that produced this tensor.
+     * 
+ * + * int64 op_id = 1; + */ + public Builder setOpId(long value) { + + opId_ = value; + onChanged(); + return this; + } + /** + *
+     * The ID of the operation that produced this tensor.
+     * 
+ * + * int64 op_id = 1; + */ + public Builder clearOpId() { + + opId_ = 0L; + onChanged(); + return this; + } + + private int outputNum_ ; + /** + *
+     * The index into the outputs of the operation that produced this tensor.
+     * 
+ * + * int32 output_num = 2; + */ + public int getOutputNum() { + return outputNum_; + } + /** + *
+     * The index into the outputs of the operation that produced this tensor.
+     * 
+ * + * int32 output_num = 2; + */ + public Builder setOutputNum(int value) { + + outputNum_ = value; + onChanged(); + return this; + } + /** + *
+     * The index into the outputs of the operation that produced this tensor.
+     * 
+ * + * int32 output_num = 2; + */ + public Builder clearOutputNum() { + + outputNum_ = 0; + onChanged(); + return this; + } + + private java.lang.Object device_ = ""; + /** + *
+     * Device of the operation that produced this tensor. Cannot be empty.
+     * For multi-device functions, it's the default device passed to placer.
+     * 
+ * + * string device = 3; + */ + 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; + } + } + /** + *
+     * Device of the operation that produced this tensor. Cannot be empty.
+     * For multi-device functions, it's the default device passed to placer.
+     * 
+ * + * string device = 3; + */ + 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; + } + } + /** + *
+     * Device of the operation that produced this tensor. Cannot be empty.
+     * For multi-device functions, it's the default device passed to placer.
+     * 
+ * + * string device = 3; + */ + public Builder setDevice( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + device_ = value; + onChanged(); + return this; + } + /** + *
+     * Device of the operation that produced this tensor. Cannot be empty.
+     * For multi-device functions, it's the default device passed to placer.
+     * 
+ * + * string device = 3; + */ + public Builder clearDevice() { + + device_ = getDefaultInstance().getDevice(); + onChanged(); + return this; + } + /** + *
+     * Device of the operation that produced this tensor. Cannot be empty.
+     * For multi-device functions, it's the default device passed to placer.
+     * 
+ * + * string device = 3; + */ + public Builder setDeviceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + device_ = value; + onChanged(); + return this; + } + + private java.lang.Object opDevice_ = ""; + /** + *
+     * Device where the tensor is located. Can be empty if the operation producing
+     * this tensor is a multi-device function.
+     * 
+ * + * string op_device = 4; + */ + public java.lang.String getOpDevice() { + java.lang.Object ref = opDevice_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + opDevice_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Device where the tensor is located. Can be empty if the operation producing
+     * this tensor is a multi-device function.
+     * 
+ * + * string op_device = 4; + */ + public com.google.protobuf.ByteString + getOpDeviceBytes() { + java.lang.Object ref = opDevice_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + opDevice_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Device where the tensor is located. Can be empty if the operation producing
+     * this tensor is a multi-device function.
+     * 
+ * + * string op_device = 4; + */ + public Builder setOpDevice( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + opDevice_ = value; + onChanged(); + return this; + } + /** + *
+     * Device where the tensor is located. Can be empty if the operation producing
+     * this tensor is a multi-device function.
+     * 
+ * + * string op_device = 4; + */ + public Builder clearOpDevice() { + + opDevice_ = getDefaultInstance().getOpDevice(); + onChanged(); + return this; + } + /** + *
+     * Device where the tensor is located. Can be empty if the operation producing
+     * this tensor is a multi-device function.
+     * 
+ * + * string op_device = 4; + */ + public Builder setOpDeviceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + opDevice_ = value; + onChanged(); + return this; + } + + private int dtype_ = 0; + /** + *
+     * Tensor type.
+     * 
+ * + * .tensorflow.DataType dtype = 5; + */ + public int getDtypeValue() { + return dtype_; + } + /** + *
+     * Tensor type.
+     * 
+ * + * .tensorflow.DataType dtype = 5; + */ + public Builder setDtypeValue(int value) { + dtype_ = value; + onChanged(); + return this; + } + /** + *
+     * Tensor type.
+     * 
+ * + * .tensorflow.DataType dtype = 5; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + /** + *
+     * Tensor type.
+     * 
+ * + * .tensorflow.DataType dtype = 5; + */ + public Builder setDtype(org.tensorflow.proto.framework.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + + dtype_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Tensor type.
+     * 
+ * + * .tensorflow.DataType dtype = 5; + */ + public Builder clearDtype() { + + dtype_ = 0; + onChanged(); + return this; + } + + private java.util.List resourceDtypesAndShapes_ = + java.util.Collections.emptyList(); + private void ensureResourceDtypesAndShapesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resourceDtypesAndShapes_ = new java.util.ArrayList(resourceDtypesAndShapes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ResourceDtypeAndShape, org.tensorflow.proto.framework.ResourceDtypeAndShape.Builder, org.tensorflow.proto.framework.ResourceDtypeAndShapeOrBuilder> resourceDtypesAndShapesBuilder_; + + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public java.util.List getResourceDtypesAndShapesList() { + if (resourceDtypesAndShapesBuilder_ == null) { + return java.util.Collections.unmodifiableList(resourceDtypesAndShapes_); + } else { + return resourceDtypesAndShapesBuilder_.getMessageList(); + } + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public int getResourceDtypesAndShapesCount() { + if (resourceDtypesAndShapesBuilder_ == null) { + return resourceDtypesAndShapes_.size(); + } else { + return resourceDtypesAndShapesBuilder_.getCount(); + } + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public org.tensorflow.proto.framework.ResourceDtypeAndShape getResourceDtypesAndShapes(int index) { + if (resourceDtypesAndShapesBuilder_ == null) { + return resourceDtypesAndShapes_.get(index); + } else { + return resourceDtypesAndShapesBuilder_.getMessage(index); + } + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public Builder setResourceDtypesAndShapes( + int index, org.tensorflow.proto.framework.ResourceDtypeAndShape value) { + if (resourceDtypesAndShapesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceDtypesAndShapesIsMutable(); + resourceDtypesAndShapes_.set(index, value); + onChanged(); + } else { + resourceDtypesAndShapesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public Builder setResourceDtypesAndShapes( + int index, org.tensorflow.proto.framework.ResourceDtypeAndShape.Builder builderForValue) { + if (resourceDtypesAndShapesBuilder_ == null) { + ensureResourceDtypesAndShapesIsMutable(); + resourceDtypesAndShapes_.set(index, builderForValue.build()); + onChanged(); + } else { + resourceDtypesAndShapesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public Builder addResourceDtypesAndShapes(org.tensorflow.proto.framework.ResourceDtypeAndShape value) { + if (resourceDtypesAndShapesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceDtypesAndShapesIsMutable(); + resourceDtypesAndShapes_.add(value); + onChanged(); + } else { + resourceDtypesAndShapesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public Builder addResourceDtypesAndShapes( + int index, org.tensorflow.proto.framework.ResourceDtypeAndShape value) { + if (resourceDtypesAndShapesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceDtypesAndShapesIsMutable(); + resourceDtypesAndShapes_.add(index, value); + onChanged(); + } else { + resourceDtypesAndShapesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public Builder addResourceDtypesAndShapes( + org.tensorflow.proto.framework.ResourceDtypeAndShape.Builder builderForValue) { + if (resourceDtypesAndShapesBuilder_ == null) { + ensureResourceDtypesAndShapesIsMutable(); + resourceDtypesAndShapes_.add(builderForValue.build()); + onChanged(); + } else { + resourceDtypesAndShapesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public Builder addResourceDtypesAndShapes( + int index, org.tensorflow.proto.framework.ResourceDtypeAndShape.Builder builderForValue) { + if (resourceDtypesAndShapesBuilder_ == null) { + ensureResourceDtypesAndShapesIsMutable(); + resourceDtypesAndShapes_.add(index, builderForValue.build()); + onChanged(); + } else { + resourceDtypesAndShapesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public Builder addAllResourceDtypesAndShapes( + java.lang.Iterable values) { + if (resourceDtypesAndShapesBuilder_ == null) { + ensureResourceDtypesAndShapesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, resourceDtypesAndShapes_); + onChanged(); + } else { + resourceDtypesAndShapesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public Builder clearResourceDtypesAndShapes() { + if (resourceDtypesAndShapesBuilder_ == null) { + resourceDtypesAndShapes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resourceDtypesAndShapesBuilder_.clear(); + } + return this; + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public Builder removeResourceDtypesAndShapes(int index) { + if (resourceDtypesAndShapesBuilder_ == null) { + ensureResourceDtypesAndShapesIsMutable(); + resourceDtypesAndShapes_.remove(index); + onChanged(); + } else { + resourceDtypesAndShapesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public org.tensorflow.proto.framework.ResourceDtypeAndShape.Builder getResourceDtypesAndShapesBuilder( + int index) { + return getResourceDtypesAndShapesFieldBuilder().getBuilder(index); + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public org.tensorflow.proto.framework.ResourceDtypeAndShapeOrBuilder getResourceDtypesAndShapesOrBuilder( + int index) { + if (resourceDtypesAndShapesBuilder_ == null) { + return resourceDtypesAndShapes_.get(index); } else { + return resourceDtypesAndShapesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public java.util.List + getResourceDtypesAndShapesOrBuilderList() { + if (resourceDtypesAndShapesBuilder_ != null) { + return resourceDtypesAndShapesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resourceDtypesAndShapes_); + } + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public org.tensorflow.proto.framework.ResourceDtypeAndShape.Builder addResourceDtypesAndShapesBuilder() { + return getResourceDtypesAndShapesFieldBuilder().addBuilder( + org.tensorflow.proto.framework.ResourceDtypeAndShape.getDefaultInstance()); + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public org.tensorflow.proto.framework.ResourceDtypeAndShape.Builder addResourceDtypesAndShapesBuilder( + int index) { + return getResourceDtypesAndShapesFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.ResourceDtypeAndShape.getDefaultInstance()); + } + /** + *
+     * Optional data types and shapes of a remote resource variable.
+     * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + public java.util.List + getResourceDtypesAndShapesBuilderList() { + return getResourceDtypesAndShapesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ResourceDtypeAndShape, org.tensorflow.proto.framework.ResourceDtypeAndShape.Builder, org.tensorflow.proto.framework.ResourceDtypeAndShapeOrBuilder> + getResourceDtypesAndShapesFieldBuilder() { + if (resourceDtypesAndShapesBuilder_ == null) { + resourceDtypesAndShapesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ResourceDtypeAndShape, org.tensorflow.proto.framework.ResourceDtypeAndShape.Builder, org.tensorflow.proto.framework.ResourceDtypeAndShapeOrBuilder>( + resourceDtypesAndShapes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + resourceDtypesAndShapes_ = null; + } + return resourceDtypesAndShapesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.eager.RemoteTensorHandle) + } + + // @@protoc_insertion_point(class_scope:tensorflow.eager.RemoteTensorHandle) + private static final org.tensorflow.proto.framework.RemoteTensorHandle DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.RemoteTensorHandle(); + } + + public static org.tensorflow.proto.framework.RemoteTensorHandle getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoteTensorHandle parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RemoteTensorHandle(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RemoteTensorHandle getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteTensorHandleOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteTensorHandleOrBuilder.java new file mode 100644 index 00000000000..7b019eca364 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteTensorHandleOrBuilder.java @@ -0,0 +1,128 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/remote_tensor_handle.proto + +package org.tensorflow.proto.framework; + +public interface RemoteTensorHandleOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.eager.RemoteTensorHandle) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the operation that produced this tensor.
+   * 
+ * + * int64 op_id = 1; + */ + long getOpId(); + + /** + *
+   * The index into the outputs of the operation that produced this tensor.
+   * 
+ * + * int32 output_num = 2; + */ + int getOutputNum(); + + /** + *
+   * Device of the operation that produced this tensor. Cannot be empty.
+   * For multi-device functions, it's the default device passed to placer.
+   * 
+ * + * string device = 3; + */ + java.lang.String getDevice(); + /** + *
+   * Device of the operation that produced this tensor. Cannot be empty.
+   * For multi-device functions, it's the default device passed to placer.
+   * 
+ * + * string device = 3; + */ + com.google.protobuf.ByteString + getDeviceBytes(); + + /** + *
+   * Device where the tensor is located. Can be empty if the operation producing
+   * this tensor is a multi-device function.
+   * 
+ * + * string op_device = 4; + */ + java.lang.String getOpDevice(); + /** + *
+   * Device where the tensor is located. Can be empty if the operation producing
+   * this tensor is a multi-device function.
+   * 
+ * + * string op_device = 4; + */ + com.google.protobuf.ByteString + getOpDeviceBytes(); + + /** + *
+   * Tensor type.
+   * 
+ * + * .tensorflow.DataType dtype = 5; + */ + int getDtypeValue(); + /** + *
+   * Tensor type.
+   * 
+ * + * .tensorflow.DataType dtype = 5; + */ + org.tensorflow.proto.framework.DataType getDtype(); + + /** + *
+   * Optional data types and shapes of a remote resource variable.
+   * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + java.util.List + getResourceDtypesAndShapesList(); + /** + *
+   * Optional data types and shapes of a remote resource variable.
+   * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + org.tensorflow.proto.framework.ResourceDtypeAndShape getResourceDtypesAndShapes(int index); + /** + *
+   * Optional data types and shapes of a remote resource variable.
+   * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + int getResourceDtypesAndShapesCount(); + /** + *
+   * Optional data types and shapes of a remote resource variable.
+   * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + java.util.List + getResourceDtypesAndShapesOrBuilderList(); + /** + *
+   * Optional data types and shapes of a remote resource variable.
+   * 
+ * + * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6; + */ + org.tensorflow.proto.framework.ResourceDtypeAndShapeOrBuilder getResourceDtypesAndShapesOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteTensorHandleProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteTensorHandleProtos.java new file mode 100644 index 00000000000..82e7ea5bc2c --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RemoteTensorHandleProtos.java @@ -0,0 +1,76 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/remote_tensor_handle.proto + +package org.tensorflow.proto.framework; + +public final class RemoteTensorHandleProtos { + private RemoteTensorHandleProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_eager_ResourceDtypeAndShape_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_eager_ResourceDtypeAndShape_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_eager_RemoteTensorHandle_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_eager_RemoteTensorHandle_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n3tensorflow/core/protobuf/remote_tensor" + + "_handle.proto\022\020tensorflow.eager\032,tensorf" + + "low/core/framework/tensor_shape.proto\032%t" + + "ensorflow/core/framework/types.proto\"i\n\025" + + "ResourceDtypeAndShape\022#\n\005dtype\030\001 \001(\0162\024.t" + + "ensorflow.DataType\022+\n\005shape\030\002 \001(\0132\034.tens" + + "orflow.TensorShapeProto\"\314\001\n\022RemoteTensor" + + "Handle\022\r\n\005op_id\030\001 \001(\003\022\022\n\noutput_num\030\002 \001(" + + "\005\022\016\n\006device\030\003 \001(\t\022\021\n\top_device\030\004 \001(\t\022#\n\005" + + "dtype\030\005 \001(\0162\024.tensorflow.DataType\022K\n\032res" + + "ource_dtypes_and_shapes\030\006 \003(\0132\'.tensorfl" + + "ow.eager.ResourceDtypeAndShapeB\211\001\n\036org.t" + + "ensorflow.proto.frameworkB\030RemoteTensorH" + + "andleProtosP\001ZHgithub.com/tensorflow/ten" + + "sorflow/tensorflow/go/core/core_protos_g" + + "o_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(), + org.tensorflow.proto.framework.TypesProtos.getDescriptor(), + }); + internal_static_tensorflow_eager_ResourceDtypeAndShape_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_eager_ResourceDtypeAndShape_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_eager_ResourceDtypeAndShape_descriptor, + new java.lang.String[] { "Dtype", "Shape", }); + internal_static_tensorflow_eager_RemoteTensorHandle_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_eager_RemoteTensorHandle_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_eager_RemoteTensorHandle_descriptor, + new java.lang.String[] { "OpId", "OutputNum", "Device", "OpDevice", "Dtype", "ResourceDtypesAndShapes", }); + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(); + org.tensorflow.proto.framework.TypesProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/Resource.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/Resource.java new file mode 100644 index 00000000000..7743aecf24e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/Resource.java @@ -0,0 +1,659 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/trace_events.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * A 'resource' generally is a specific computation component on a device. These
+ * can range from threads on CPUs to specific arithmetic units on hardware
+ * devices.
+ * 
+ * + * Protobuf type {@code tensorflow.profiler.Resource} + */ +public final class Resource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.profiler.Resource) + ResourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use Resource.newBuilder() to construct. + private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Resource() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Resource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Resource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + resourceId_ = input.readUInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.Resource.class, org.tensorflow.proto.framework.Resource.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The name of the resource.
+   * 
+ * + * 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; + } + } + /** + *
+   * The name of the resource.
+   * 
+ * + * 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 RESOURCE_ID_FIELD_NUMBER = 2; + private int resourceId_; + /** + *
+   * The id of the resource. Unique within a device.
+   * 
+ * + * uint32 resource_id = 2; + */ + public int getResourceId() { + return resourceId_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (resourceId_ != 0) { + output.writeUInt32(2, resourceId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (resourceId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, resourceId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.Resource)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.Resource other = (org.tensorflow.proto.framework.Resource) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getResourceId() + != other.getResourceId()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + RESOURCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getResourceId(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.Resource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.Resource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.Resource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.Resource 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.proto.framework.Resource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.Resource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.Resource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.Resource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.Resource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.Resource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.Resource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.Resource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.Resource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A 'resource' generally is a specific computation component on a device. These
+   * can range from threads on CPUs to specific arithmetic units on hardware
+   * devices.
+   * 
+ * + * Protobuf type {@code tensorflow.profiler.Resource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.profiler.Resource) + org.tensorflow.proto.framework.ResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.Resource.class, org.tensorflow.proto.framework.Resource.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.Resource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + resourceId_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.TraceEventsProtos.internal_static_tensorflow_profiler_Resource_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.Resource getDefaultInstanceForType() { + return org.tensorflow.proto.framework.Resource.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.Resource build() { + org.tensorflow.proto.framework.Resource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.Resource buildPartial() { + org.tensorflow.proto.framework.Resource result = new org.tensorflow.proto.framework.Resource(this); + result.name_ = name_; + result.resourceId_ = resourceId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.Resource) { + return mergeFrom((org.tensorflow.proto.framework.Resource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.Resource other) { + if (other == org.tensorflow.proto.framework.Resource.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getResourceId() != 0) { + setResourceId(other.getResourceId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.Resource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.Resource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the resource.
+     * 
+ * + * 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; + } + } + /** + *
+     * The name of the resource.
+     * 
+ * + * 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; + } + } + /** + *
+     * The name of the resource.
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The name of the resource.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The name of the resource.
+     * 
+ * + * 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 int resourceId_ ; + /** + *
+     * The id of the resource. Unique within a device.
+     * 
+ * + * uint32 resource_id = 2; + */ + public int getResourceId() { + return resourceId_; + } + /** + *
+     * The id of the resource. Unique within a device.
+     * 
+ * + * uint32 resource_id = 2; + */ + public Builder setResourceId(int value) { + + resourceId_ = value; + onChanged(); + return this; + } + /** + *
+     * The id of the resource. Unique within a device.
+     * 
+ * + * uint32 resource_id = 2; + */ + public Builder clearResourceId() { + + resourceId_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.profiler.Resource) + } + + // @@protoc_insertion_point(class_scope:tensorflow.profiler.Resource) + private static final org.tensorflow.proto.framework.Resource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.Resource(); + } + + public static org.tensorflow.proto.framework.Resource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Resource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Resource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.Resource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceDtypeAndShape.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceDtypeAndShape.java new file mode 100644 index 00000000000..2586a7e626a --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceDtypeAndShape.java @@ -0,0 +1,685 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/remote_tensor_handle.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.eager.ResourceDtypeAndShape} + */ +public final class ResourceDtypeAndShape extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.eager.ResourceDtypeAndShape) + ResourceDtypeAndShapeOrBuilder { +private static final long serialVersionUID = 0L; + // Use ResourceDtypeAndShape.newBuilder() to construct. + private ResourceDtypeAndShape(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ResourceDtypeAndShape() { + dtype_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ResourceDtypeAndShape(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ResourceDtypeAndShape( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + dtype_ = rawValue; + break; + } + case 18: { + org.tensorflow.proto.framework.TensorShapeProto.Builder subBuilder = null; + if (shape_ != null) { + subBuilder = shape_.toBuilder(); + } + shape_ = input.readMessage(org.tensorflow.proto.framework.TensorShapeProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(shape_); + shape_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.RemoteTensorHandleProtos.internal_static_tensorflow_eager_ResourceDtypeAndShape_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.RemoteTensorHandleProtos.internal_static_tensorflow_eager_ResourceDtypeAndShape_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ResourceDtypeAndShape.class, org.tensorflow.proto.framework.ResourceDtypeAndShape.Builder.class); + } + + public static final int DTYPE_FIELD_NUMBER = 1; + private int dtype_; + /** + * .tensorflow.DataType dtype = 1; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + + public static final int SHAPE_FIELD_NUMBER = 2; + private org.tensorflow.proto.framework.TensorShapeProto shape_; + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public boolean hasShape() { + return shape_ != null; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProto getShape() { + return shape_ == null ? org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { + return getShape(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + output.writeEnum(1, dtype_); + } + if (shape_ != null) { + output.writeMessage(2, getShape()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, dtype_); + } + if (shape_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getShape()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.ResourceDtypeAndShape)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.ResourceDtypeAndShape other = (org.tensorflow.proto.framework.ResourceDtypeAndShape) obj; + + if (dtype_ != other.dtype_) return false; + if (hasShape() != other.hasShape()) return false; + if (hasShape()) { + if (!getShape() + .equals(other.getShape())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DTYPE_FIELD_NUMBER; + hash = (53 * hash) + dtype_; + if (hasShape()) { + hash = (37 * hash) + SHAPE_FIELD_NUMBER; + hash = (53 * hash) + getShape().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.ResourceDtypeAndShape parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ResourceDtypeAndShape parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ResourceDtypeAndShape parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ResourceDtypeAndShape 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.proto.framework.ResourceDtypeAndShape parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ResourceDtypeAndShape parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ResourceDtypeAndShape parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ResourceDtypeAndShape parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ResourceDtypeAndShape parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ResourceDtypeAndShape parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ResourceDtypeAndShape parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ResourceDtypeAndShape parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.ResourceDtypeAndShape prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.eager.ResourceDtypeAndShape} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.eager.ResourceDtypeAndShape) + org.tensorflow.proto.framework.ResourceDtypeAndShapeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.RemoteTensorHandleProtos.internal_static_tensorflow_eager_ResourceDtypeAndShape_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.RemoteTensorHandleProtos.internal_static_tensorflow_eager_ResourceDtypeAndShape_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ResourceDtypeAndShape.class, org.tensorflow.proto.framework.ResourceDtypeAndShape.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.ResourceDtypeAndShape.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + dtype_ = 0; + + if (shapeBuilder_ == null) { + shape_ = null; + } else { + shape_ = null; + shapeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.RemoteTensorHandleProtos.internal_static_tensorflow_eager_ResourceDtypeAndShape_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ResourceDtypeAndShape getDefaultInstanceForType() { + return org.tensorflow.proto.framework.ResourceDtypeAndShape.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.ResourceDtypeAndShape build() { + org.tensorflow.proto.framework.ResourceDtypeAndShape result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ResourceDtypeAndShape buildPartial() { + org.tensorflow.proto.framework.ResourceDtypeAndShape result = new org.tensorflow.proto.framework.ResourceDtypeAndShape(this); + result.dtype_ = dtype_; + if (shapeBuilder_ == null) { + result.shape_ = shape_; + } else { + result.shape_ = shapeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.ResourceDtypeAndShape) { + return mergeFrom((org.tensorflow.proto.framework.ResourceDtypeAndShape)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.ResourceDtypeAndShape other) { + if (other == org.tensorflow.proto.framework.ResourceDtypeAndShape.getDefaultInstance()) return this; + if (other.dtype_ != 0) { + setDtypeValue(other.getDtypeValue()); + } + if (other.hasShape()) { + mergeShape(other.getShape()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.ResourceDtypeAndShape parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.ResourceDtypeAndShape) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int dtype_ = 0; + /** + * .tensorflow.DataType dtype = 1; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder setDtypeValue(int value) { + dtype_ = value; + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder setDtype(org.tensorflow.proto.framework.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + + dtype_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder clearDtype() { + + dtype_ = 0; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.TensorShapeProto shape_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> shapeBuilder_; + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public boolean hasShape() { + return shapeBuilder_ != null || shape_ != null; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProto getShape() { + if (shapeBuilder_ == null) { + return shape_ == null ? org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } else { + return shapeBuilder_.getMessage(); + } + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder setShape(org.tensorflow.proto.framework.TensorShapeProto value) { + if (shapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shape_ = value; + onChanged(); + } else { + shapeBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder setShape( + org.tensorflow.proto.framework.TensorShapeProto.Builder builderForValue) { + if (shapeBuilder_ == null) { + shape_ = builderForValue.build(); + onChanged(); + } else { + shapeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder mergeShape(org.tensorflow.proto.framework.TensorShapeProto value) { + if (shapeBuilder_ == null) { + if (shape_ != null) { + shape_ = + org.tensorflow.proto.framework.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial(); + } else { + shape_ = value; + } + onChanged(); + } else { + shapeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder clearShape() { + if (shapeBuilder_ == null) { + shape_ = null; + onChanged(); + } else { + shape_ = null; + shapeBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProto.Builder getShapeBuilder() { + + onChanged(); + return getShapeFieldBuilder().getBuilder(); + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { + if (shapeBuilder_ != null) { + return shapeBuilder_.getMessageOrBuilder(); + } else { + return shape_ == null ? + org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> + getShapeFieldBuilder() { + if (shapeBuilder_ == null) { + shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder>( + getShape(), + getParentForChildren(), + isClean()); + shape_ = null; + } + return shapeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.eager.ResourceDtypeAndShape) + } + + // @@protoc_insertion_point(class_scope:tensorflow.eager.ResourceDtypeAndShape) + private static final org.tensorflow.proto.framework.ResourceDtypeAndShape DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.ResourceDtypeAndShape(); + } + + public static org.tensorflow.proto.framework.ResourceDtypeAndShape getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceDtypeAndShape parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResourceDtypeAndShape(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ResourceDtypeAndShape getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceDtypeAndShapeOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceDtypeAndShapeOrBuilder.java new file mode 100644 index 00000000000..67ab4da1b8d --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceDtypeAndShapeOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/remote_tensor_handle.proto + +package org.tensorflow.proto.framework; + +public interface ResourceDtypeAndShapeOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.eager.ResourceDtypeAndShape) + com.google.protobuf.MessageOrBuilder { + + /** + * .tensorflow.DataType dtype = 1; + */ + int getDtypeValue(); + /** + * .tensorflow.DataType dtype = 1; + */ + org.tensorflow.proto.framework.DataType getDtype(); + + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + boolean hasShape(); + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + org.tensorflow.proto.framework.TensorShapeProto getShape(); + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceHandle.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceHandle.java new file mode 100644 index 00000000000..37d8064b0cd --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceHandle.java @@ -0,0 +1,76 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/resource_handle.proto + +package org.tensorflow.proto.framework; + +public final class ResourceHandle { + private ResourceHandle() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ResourceHandleProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ResourceHandleProto_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_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/resource_han" + + "dle.proto\022\ntensorflow\032,tensorflow/core/f" + + "ramework/tensor_shape.proto\032%tensorflow/" + + "core/framework/types.proto\"\270\002\n\023ResourceH" + + "andleProto\022\016\n\006device\030\001 \001(\t\022\021\n\tcontainer\030" + + "\002 \001(\t\022\014\n\004name\030\003 \001(\t\022\021\n\thash_code\030\004 \001(\004\022\027" + + "\n\017maybe_type_name\030\005 \001(\t\022H\n\021dtypes_and_sh" + + "apes\030\006 \003(\0132-.tensorflow.ResourceHandlePr" + + "oto.DtypeAndShape\022\027\n\017allowed_devices\030\007 \003" + + "(\t\032a\n\rDtypeAndShape\022#\n\005dtype\030\001 \001(\0162\024.ten" + + "sorflow.DataType\022+\n\005shape\030\002 \001(\0132\034.tensor" + + "flow.TensorShapeProtoB\215\001\n\036org.tensorflow" + + ".proto.frameworkB\016ResourceHandleP\001ZVgith" + + "ub.com/tensorflow/tensorflow/tensorflow/" + + "go/core/framework/resource_handle_go_pro" + + "to\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(), + org.tensorflow.proto.framework.TypesProtos.getDescriptor(), + }); + internal_static_tensorflow_ResourceHandleProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_ResourceHandleProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ResourceHandleProto_descriptor, + new java.lang.String[] { "Device", "Container", "Name", "HashCode", "MaybeTypeName", "DtypesAndShapes", "AllowedDevices", }); + internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_descriptor = + internal_static_tensorflow_ResourceHandleProto_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_descriptor, + new java.lang.String[] { "Dtype", "Shape", }); + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(); + org.tensorflow.proto.framework.TypesProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceHandleProto.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceHandleProto.java new file mode 100644 index 00000000000..a41892d36ed --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceHandleProto.java @@ -0,0 +1,2523 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/resource_handle.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Protocol buffer representing a handle to a tensorflow resource. Handles are
+ * not valid across executions, but can be serialized back and forth from within
+ * a single run.
+ * 
+ * + * Protobuf type {@code tensorflow.ResourceHandleProto} + */ +public final class ResourceHandleProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ResourceHandleProto) + ResourceHandleProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use ResourceHandleProto.newBuilder() to construct. + private ResourceHandleProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ResourceHandleProto() { + device_ = ""; + container_ = ""; + name_ = ""; + maybeTypeName_ = ""; + dtypesAndShapes_ = java.util.Collections.emptyList(); + allowedDevices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ResourceHandleProto(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ResourceHandleProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + device_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + container_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 32: { + + hashCode_ = input.readUInt64(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + maybeTypeName_ = s; + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dtypesAndShapes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dtypesAndShapes_.add( + input.readMessage(org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.parser(), extensionRegistry)); + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + allowedDevices_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + allowedDevices_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dtypesAndShapes_ = java.util.Collections.unmodifiableList(dtypesAndShapes_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + allowedDevices_ = allowedDevices_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ResourceHandle.internal_static_tensorflow_ResourceHandleProto_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ResourceHandle.internal_static_tensorflow_ResourceHandleProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ResourceHandleProto.class, org.tensorflow.proto.framework.ResourceHandleProto.Builder.class); + } + + public interface DtypeAndShapeOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ResourceHandleProto.DtypeAndShape) + com.google.protobuf.MessageOrBuilder { + + /** + * .tensorflow.DataType dtype = 1; + */ + int getDtypeValue(); + /** + * .tensorflow.DataType dtype = 1; + */ + org.tensorflow.proto.framework.DataType getDtype(); + + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + boolean hasShape(); + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + org.tensorflow.proto.framework.TensorShapeProto getShape(); + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder(); + } + /** + *
+   * Protocol buffer representing a pair of (data type, tensor shape).
+   * 
+ * + * Protobuf type {@code tensorflow.ResourceHandleProto.DtypeAndShape} + */ + public static final class DtypeAndShape extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ResourceHandleProto.DtypeAndShape) + DtypeAndShapeOrBuilder { + private static final long serialVersionUID = 0L; + // Use DtypeAndShape.newBuilder() to construct. + private DtypeAndShape(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DtypeAndShape() { + dtype_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DtypeAndShape(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DtypeAndShape( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + dtype_ = rawValue; + break; + } + case 18: { + org.tensorflow.proto.framework.TensorShapeProto.Builder subBuilder = null; + if (shape_ != null) { + subBuilder = shape_.toBuilder(); + } + shape_ = input.readMessage(org.tensorflow.proto.framework.TensorShapeProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(shape_); + shape_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ResourceHandle.internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ResourceHandle.internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.class, org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.Builder.class); + } + + public static final int DTYPE_FIELD_NUMBER = 1; + private int dtype_; + /** + * .tensorflow.DataType dtype = 1; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + + public static final int SHAPE_FIELD_NUMBER = 2; + private org.tensorflow.proto.framework.TensorShapeProto shape_; + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public boolean hasShape() { + return shape_ != null; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProto getShape() { + return shape_ == null ? org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { + return getShape(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + output.writeEnum(1, dtype_); + } + if (shape_ != null) { + output.writeMessage(2, getShape()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, dtype_); + } + if (shape_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getShape()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape other = (org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape) obj; + + if (dtype_ != other.dtype_) return false; + if (hasShape() != other.hasShape()) return false; + if (hasShape()) { + if (!getShape() + .equals(other.getShape())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DTYPE_FIELD_NUMBER; + hash = (53 * hash) + dtype_; + if (hasShape()) { + hash = (37 * hash) + SHAPE_FIELD_NUMBER; + hash = (53 * hash) + getShape().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape 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.proto.framework.ResourceHandleProto.DtypeAndShape parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Protocol buffer representing a pair of (data type, tensor shape).
+     * 
+ * + * Protobuf type {@code tensorflow.ResourceHandleProto.DtypeAndShape} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ResourceHandleProto.DtypeAndShape) + org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShapeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ResourceHandle.internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ResourceHandle.internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.class, org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + dtype_ = 0; + + if (shapeBuilder_ == null) { + shape_ = null; + } else { + shape_ = null; + shapeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ResourceHandle.internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape getDefaultInstanceForType() { + return org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape build() { + org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape buildPartial() { + org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape result = new org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape(this); + result.dtype_ = dtype_; + if (shapeBuilder_ == null) { + result.shape_ = shape_; + } else { + result.shape_ = shapeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape) { + return mergeFrom((org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape other) { + if (other == org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.getDefaultInstance()) return this; + if (other.dtype_ != 0) { + setDtypeValue(other.getDtypeValue()); + } + if (other.hasShape()) { + mergeShape(other.getShape()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int dtype_ = 0; + /** + * .tensorflow.DataType dtype = 1; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder setDtypeValue(int value) { + dtype_ = value; + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder setDtype(org.tensorflow.proto.framework.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + + dtype_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder clearDtype() { + + dtype_ = 0; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.TensorShapeProto shape_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> shapeBuilder_; + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public boolean hasShape() { + return shapeBuilder_ != null || shape_ != null; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProto getShape() { + if (shapeBuilder_ == null) { + return shape_ == null ? org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } else { + return shapeBuilder_.getMessage(); + } + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder setShape(org.tensorflow.proto.framework.TensorShapeProto value) { + if (shapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shape_ = value; + onChanged(); + } else { + shapeBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder setShape( + org.tensorflow.proto.framework.TensorShapeProto.Builder builderForValue) { + if (shapeBuilder_ == null) { + shape_ = builderForValue.build(); + onChanged(); + } else { + shapeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder mergeShape(org.tensorflow.proto.framework.TensorShapeProto value) { + if (shapeBuilder_ == null) { + if (shape_ != null) { + shape_ = + org.tensorflow.proto.framework.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial(); + } else { + shape_ = value; + } + onChanged(); + } else { + shapeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder clearShape() { + if (shapeBuilder_ == null) { + shape_ = null; + onChanged(); + } else { + shape_ = null; + shapeBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProto.Builder getShapeBuilder() { + + onChanged(); + return getShapeFieldBuilder().getBuilder(); + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { + if (shapeBuilder_ != null) { + return shapeBuilder_.getMessageOrBuilder(); + } else { + return shape_ == null ? + org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> + getShapeFieldBuilder() { + if (shapeBuilder_ == null) { + shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder>( + getShape(), + getParentForChildren(), + isClean()); + shape_ = null; + } + return shapeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ResourceHandleProto.DtypeAndShape) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ResourceHandleProto.DtypeAndShape) + private static final org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape(); + } + + public static org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DtypeAndShape parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DtypeAndShape(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int DEVICE_FIELD_NUMBER = 1; + private volatile java.lang.Object device_; + /** + *
+   * Unique name for the device containing the resource.
+   * 
+ * + * 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; + } + } + /** + *
+   * Unique name for the device containing the resource.
+   * 
+ * + * 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 CONTAINER_FIELD_NUMBER = 2; + private volatile java.lang.Object container_; + /** + *
+   * Container in which this resource is placed.
+   * 
+ * + * string container = 2; + */ + public java.lang.String getContainer() { + java.lang.Object ref = container_; + 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(); + container_ = s; + return s; + } + } + /** + *
+   * Container in which this resource is placed.
+   * 
+ * + * string container = 2; + */ + public com.google.protobuf.ByteString + getContainerBytes() { + java.lang.Object ref = container_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + container_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object name_; + /** + *
+   * Unique name of this resource.
+   * 
+ * + * string name = 3; + */ + 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; + } + } + /** + *
+   * Unique name of this resource.
+   * 
+ * + * string name = 3; + */ + 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 HASH_CODE_FIELD_NUMBER = 4; + private long hashCode_; + /** + *
+   * Hash code for the type of the resource. Is only valid in the same device
+   * and in the same execution.
+   * 
+ * + * uint64 hash_code = 4; + */ + public long getHashCode() { + return hashCode_; + } + + public static final int MAYBE_TYPE_NAME_FIELD_NUMBER = 5; + private volatile java.lang.Object maybeTypeName_; + /** + *
+   * For debug-only, the name of the type pointed to by this handle, if
+   * available.
+   * 
+ * + * string maybe_type_name = 5; + */ + public java.lang.String getMaybeTypeName() { + java.lang.Object ref = maybeTypeName_; + 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(); + maybeTypeName_ = s; + return s; + } + } + /** + *
+   * For debug-only, the name of the type pointed to by this handle, if
+   * available.
+   * 
+ * + * string maybe_type_name = 5; + */ + public com.google.protobuf.ByteString + getMaybeTypeNameBytes() { + java.lang.Object ref = maybeTypeName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maybeTypeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DTYPES_AND_SHAPES_FIELD_NUMBER = 6; + private java.util.List dtypesAndShapes_; + /** + *
+   * Data types and shapes for the underlying resource.
+   * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public java.util.List getDtypesAndShapesList() { + return dtypesAndShapes_; + } + /** + *
+   * Data types and shapes for the underlying resource.
+   * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public java.util.List + getDtypesAndShapesOrBuilderList() { + return dtypesAndShapes_; + } + /** + *
+   * Data types and shapes for the underlying resource.
+   * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public int getDtypesAndShapesCount() { + return dtypesAndShapes_.size(); + } + /** + *
+   * Data types and shapes for the underlying resource.
+   * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape getDtypesAndShapes(int index) { + return dtypesAndShapes_.get(index); + } + /** + *
+   * Data types and shapes for the underlying resource.
+   * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShapeOrBuilder getDtypesAndShapesOrBuilder( + int index) { + return dtypesAndShapes_.get(index); + } + + public static final int ALLOWED_DEVICES_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList allowedDevices_; + /** + *
+   * A set of devices containing the resource. If empty, the resource only
+   * exists on `device`.
+   * 
+ * + * repeated string allowed_devices = 7; + */ + public com.google.protobuf.ProtocolStringList + getAllowedDevicesList() { + return allowedDevices_; + } + /** + *
+   * A set of devices containing the resource. If empty, the resource only
+   * exists on `device`.
+   * 
+ * + * repeated string allowed_devices = 7; + */ + public int getAllowedDevicesCount() { + return allowedDevices_.size(); + } + /** + *
+   * A set of devices containing the resource. If empty, the resource only
+   * exists on `device`.
+   * 
+ * + * repeated string allowed_devices = 7; + */ + public java.lang.String getAllowedDevices(int index) { + return allowedDevices_.get(index); + } + /** + *
+   * A set of devices containing the resource. If empty, the resource only
+   * exists on `device`.
+   * 
+ * + * repeated string allowed_devices = 7; + */ + public com.google.protobuf.ByteString + getAllowedDevicesBytes(int index) { + return allowedDevices_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getDeviceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, device_); + } + if (!getContainerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, container_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (hashCode_ != 0L) { + output.writeUInt64(4, hashCode_); + } + if (!getMaybeTypeNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, maybeTypeName_); + } + for (int i = 0; i < dtypesAndShapes_.size(); i++) { + output.writeMessage(6, dtypesAndShapes_.get(i)); + } + for (int i = 0; i < allowedDevices_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, allowedDevices_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDeviceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, device_); + } + if (!getContainerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, container_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (hashCode_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, hashCode_); + } + if (!getMaybeTypeNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, maybeTypeName_); + } + for (int i = 0; i < dtypesAndShapes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, dtypesAndShapes_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < allowedDevices_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedDevices_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedDevicesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.ResourceHandleProto)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.ResourceHandleProto other = (org.tensorflow.proto.framework.ResourceHandleProto) obj; + + if (!getDevice() + .equals(other.getDevice())) return false; + if (!getContainer() + .equals(other.getContainer())) return false; + if (!getName() + .equals(other.getName())) return false; + if (getHashCode() + != other.getHashCode()) return false; + if (!getMaybeTypeName() + .equals(other.getMaybeTypeName())) return false; + if (!getDtypesAndShapesList() + .equals(other.getDtypesAndShapesList())) return false; + if (!getAllowedDevicesList() + .equals(other.getAllowedDevicesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DEVICE_FIELD_NUMBER; + hash = (53 * hash) + getDevice().hashCode(); + hash = (37 * hash) + CONTAINER_FIELD_NUMBER; + hash = (53 * hash) + getContainer().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + HASH_CODE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getHashCode()); + hash = (37 * hash) + MAYBE_TYPE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMaybeTypeName().hashCode(); + if (getDtypesAndShapesCount() > 0) { + hash = (37 * hash) + DTYPES_AND_SHAPES_FIELD_NUMBER; + hash = (53 * hash) + getDtypesAndShapesList().hashCode(); + } + if (getAllowedDevicesCount() > 0) { + hash = (37 * hash) + ALLOWED_DEVICES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedDevicesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.ResourceHandleProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ResourceHandleProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ResourceHandleProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ResourceHandleProto 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.proto.framework.ResourceHandleProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ResourceHandleProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ResourceHandleProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ResourceHandleProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ResourceHandleProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ResourceHandleProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ResourceHandleProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ResourceHandleProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.ResourceHandleProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Protocol buffer representing a handle to a tensorflow resource. Handles are
+   * not valid across executions, but can be serialized back and forth from within
+   * a single run.
+   * 
+ * + * Protobuf type {@code tensorflow.ResourceHandleProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ResourceHandleProto) + org.tensorflow.proto.framework.ResourceHandleProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ResourceHandle.internal_static_tensorflow_ResourceHandleProto_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ResourceHandle.internal_static_tensorflow_ResourceHandleProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ResourceHandleProto.class, org.tensorflow.proto.framework.ResourceHandleProto.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.ResourceHandleProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDtypesAndShapesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + device_ = ""; + + container_ = ""; + + name_ = ""; + + hashCode_ = 0L; + + maybeTypeName_ = ""; + + if (dtypesAndShapesBuilder_ == null) { + dtypesAndShapes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dtypesAndShapesBuilder_.clear(); + } + allowedDevices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ResourceHandle.internal_static_tensorflow_ResourceHandleProto_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ResourceHandleProto getDefaultInstanceForType() { + return org.tensorflow.proto.framework.ResourceHandleProto.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.ResourceHandleProto build() { + org.tensorflow.proto.framework.ResourceHandleProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ResourceHandleProto buildPartial() { + org.tensorflow.proto.framework.ResourceHandleProto result = new org.tensorflow.proto.framework.ResourceHandleProto(this); + int from_bitField0_ = bitField0_; + result.device_ = device_; + result.container_ = container_; + result.name_ = name_; + result.hashCode_ = hashCode_; + result.maybeTypeName_ = maybeTypeName_; + if (dtypesAndShapesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dtypesAndShapes_ = java.util.Collections.unmodifiableList(dtypesAndShapes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dtypesAndShapes_ = dtypesAndShapes_; + } else { + result.dtypesAndShapes_ = dtypesAndShapesBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + allowedDevices_ = allowedDevices_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.allowedDevices_ = allowedDevices_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.ResourceHandleProto) { + return mergeFrom((org.tensorflow.proto.framework.ResourceHandleProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.ResourceHandleProto other) { + if (other == org.tensorflow.proto.framework.ResourceHandleProto.getDefaultInstance()) return this; + if (!other.getDevice().isEmpty()) { + device_ = other.device_; + onChanged(); + } + if (!other.getContainer().isEmpty()) { + container_ = other.container_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getHashCode() != 0L) { + setHashCode(other.getHashCode()); + } + if (!other.getMaybeTypeName().isEmpty()) { + maybeTypeName_ = other.maybeTypeName_; + onChanged(); + } + if (dtypesAndShapesBuilder_ == null) { + if (!other.dtypesAndShapes_.isEmpty()) { + if (dtypesAndShapes_.isEmpty()) { + dtypesAndShapes_ = other.dtypesAndShapes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDtypesAndShapesIsMutable(); + dtypesAndShapes_.addAll(other.dtypesAndShapes_); + } + onChanged(); + } + } else { + if (!other.dtypesAndShapes_.isEmpty()) { + if (dtypesAndShapesBuilder_.isEmpty()) { + dtypesAndShapesBuilder_.dispose(); + dtypesAndShapesBuilder_ = null; + dtypesAndShapes_ = other.dtypesAndShapes_; + bitField0_ = (bitField0_ & ~0x00000001); + dtypesAndShapesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDtypesAndShapesFieldBuilder() : null; + } else { + dtypesAndShapesBuilder_.addAllMessages(other.dtypesAndShapes_); + } + } + } + if (!other.allowedDevices_.isEmpty()) { + if (allowedDevices_.isEmpty()) { + allowedDevices_ = other.allowedDevices_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAllowedDevicesIsMutable(); + allowedDevices_.addAll(other.allowedDevices_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.ResourceHandleProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.ResourceHandleProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object device_ = ""; + /** + *
+     * Unique name for the device containing the resource.
+     * 
+ * + * 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; + } + } + /** + *
+     * Unique name for the device containing the resource.
+     * 
+ * + * 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; + } + } + /** + *
+     * Unique name for the device containing the resource.
+     * 
+ * + * string device = 1; + */ + public Builder setDevice( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + device_ = value; + onChanged(); + return this; + } + /** + *
+     * Unique name for the device containing the resource.
+     * 
+ * + * string device = 1; + */ + public Builder clearDevice() { + + device_ = getDefaultInstance().getDevice(); + onChanged(); + return this; + } + /** + *
+     * Unique name for the device containing the resource.
+     * 
+ * + * 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.lang.Object container_ = ""; + /** + *
+     * Container in which this resource is placed.
+     * 
+ * + * string container = 2; + */ + public java.lang.String getContainer() { + java.lang.Object ref = container_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + container_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Container in which this resource is placed.
+     * 
+ * + * string container = 2; + */ + public com.google.protobuf.ByteString + getContainerBytes() { + java.lang.Object ref = container_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + container_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Container in which this resource is placed.
+     * 
+ * + * string container = 2; + */ + public Builder setContainer( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + container_ = value; + onChanged(); + return this; + } + /** + *
+     * Container in which this resource is placed.
+     * 
+ * + * string container = 2; + */ + public Builder clearContainer() { + + container_ = getDefaultInstance().getContainer(); + onChanged(); + return this; + } + /** + *
+     * Container in which this resource is placed.
+     * 
+ * + * string container = 2; + */ + public Builder setContainerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + container_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Unique name of this resource.
+     * 
+ * + * string name = 3; + */ + 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; + } + } + /** + *
+     * Unique name of this resource.
+     * 
+ * + * string name = 3; + */ + 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; + } + } + /** + *
+     * Unique name of this resource.
+     * 
+ * + * string name = 3; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Unique name of this resource.
+     * 
+ * + * string name = 3; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Unique name of this resource.
+     * 
+ * + * string name = 3; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private long hashCode_ ; + /** + *
+     * Hash code for the type of the resource. Is only valid in the same device
+     * and in the same execution.
+     * 
+ * + * uint64 hash_code = 4; + */ + public long getHashCode() { + return hashCode_; + } + /** + *
+     * Hash code for the type of the resource. Is only valid in the same device
+     * and in the same execution.
+     * 
+ * + * uint64 hash_code = 4; + */ + public Builder setHashCode(long value) { + + hashCode_ = value; + onChanged(); + return this; + } + /** + *
+     * Hash code for the type of the resource. Is only valid in the same device
+     * and in the same execution.
+     * 
+ * + * uint64 hash_code = 4; + */ + public Builder clearHashCode() { + + hashCode_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object maybeTypeName_ = ""; + /** + *
+     * For debug-only, the name of the type pointed to by this handle, if
+     * available.
+     * 
+ * + * string maybe_type_name = 5; + */ + public java.lang.String getMaybeTypeName() { + java.lang.Object ref = maybeTypeName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + maybeTypeName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * For debug-only, the name of the type pointed to by this handle, if
+     * available.
+     * 
+ * + * string maybe_type_name = 5; + */ + public com.google.protobuf.ByteString + getMaybeTypeNameBytes() { + java.lang.Object ref = maybeTypeName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maybeTypeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * For debug-only, the name of the type pointed to by this handle, if
+     * available.
+     * 
+ * + * string maybe_type_name = 5; + */ + public Builder setMaybeTypeName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + maybeTypeName_ = value; + onChanged(); + return this; + } + /** + *
+     * For debug-only, the name of the type pointed to by this handle, if
+     * available.
+     * 
+ * + * string maybe_type_name = 5; + */ + public Builder clearMaybeTypeName() { + + maybeTypeName_ = getDefaultInstance().getMaybeTypeName(); + onChanged(); + return this; + } + /** + *
+     * For debug-only, the name of the type pointed to by this handle, if
+     * available.
+     * 
+ * + * string maybe_type_name = 5; + */ + public Builder setMaybeTypeNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + maybeTypeName_ = value; + onChanged(); + return this; + } + + private java.util.List dtypesAndShapes_ = + java.util.Collections.emptyList(); + private void ensureDtypesAndShapesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dtypesAndShapes_ = new java.util.ArrayList(dtypesAndShapes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape, org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.Builder, org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShapeOrBuilder> dtypesAndShapesBuilder_; + + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public java.util.List getDtypesAndShapesList() { + if (dtypesAndShapesBuilder_ == null) { + return java.util.Collections.unmodifiableList(dtypesAndShapes_); + } else { + return dtypesAndShapesBuilder_.getMessageList(); + } + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public int getDtypesAndShapesCount() { + if (dtypesAndShapesBuilder_ == null) { + return dtypesAndShapes_.size(); + } else { + return dtypesAndShapesBuilder_.getCount(); + } + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape getDtypesAndShapes(int index) { + if (dtypesAndShapesBuilder_ == null) { + return dtypesAndShapes_.get(index); + } else { + return dtypesAndShapesBuilder_.getMessage(index); + } + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public Builder setDtypesAndShapes( + int index, org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape value) { + if (dtypesAndShapesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDtypesAndShapesIsMutable(); + dtypesAndShapes_.set(index, value); + onChanged(); + } else { + dtypesAndShapesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public Builder setDtypesAndShapes( + int index, org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.Builder builderForValue) { + if (dtypesAndShapesBuilder_ == null) { + ensureDtypesAndShapesIsMutable(); + dtypesAndShapes_.set(index, builderForValue.build()); + onChanged(); + } else { + dtypesAndShapesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public Builder addDtypesAndShapes(org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape value) { + if (dtypesAndShapesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDtypesAndShapesIsMutable(); + dtypesAndShapes_.add(value); + onChanged(); + } else { + dtypesAndShapesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public Builder addDtypesAndShapes( + int index, org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape value) { + if (dtypesAndShapesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDtypesAndShapesIsMutable(); + dtypesAndShapes_.add(index, value); + onChanged(); + } else { + dtypesAndShapesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public Builder addDtypesAndShapes( + org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.Builder builderForValue) { + if (dtypesAndShapesBuilder_ == null) { + ensureDtypesAndShapesIsMutable(); + dtypesAndShapes_.add(builderForValue.build()); + onChanged(); + } else { + dtypesAndShapesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public Builder addDtypesAndShapes( + int index, org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.Builder builderForValue) { + if (dtypesAndShapesBuilder_ == null) { + ensureDtypesAndShapesIsMutable(); + dtypesAndShapes_.add(index, builderForValue.build()); + onChanged(); + } else { + dtypesAndShapesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public Builder addAllDtypesAndShapes( + java.lang.Iterable values) { + if (dtypesAndShapesBuilder_ == null) { + ensureDtypesAndShapesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, dtypesAndShapes_); + onChanged(); + } else { + dtypesAndShapesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public Builder clearDtypesAndShapes() { + if (dtypesAndShapesBuilder_ == null) { + dtypesAndShapes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dtypesAndShapesBuilder_.clear(); + } + return this; + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public Builder removeDtypesAndShapes(int index) { + if (dtypesAndShapesBuilder_ == null) { + ensureDtypesAndShapesIsMutable(); + dtypesAndShapes_.remove(index); + onChanged(); + } else { + dtypesAndShapesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.Builder getDtypesAndShapesBuilder( + int index) { + return getDtypesAndShapesFieldBuilder().getBuilder(index); + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShapeOrBuilder getDtypesAndShapesOrBuilder( + int index) { + if (dtypesAndShapesBuilder_ == null) { + return dtypesAndShapes_.get(index); } else { + return dtypesAndShapesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public java.util.List + getDtypesAndShapesOrBuilderList() { + if (dtypesAndShapesBuilder_ != null) { + return dtypesAndShapesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dtypesAndShapes_); + } + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.Builder addDtypesAndShapesBuilder() { + return getDtypesAndShapesFieldBuilder().addBuilder( + org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.getDefaultInstance()); + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.Builder addDtypesAndShapesBuilder( + int index) { + return getDtypesAndShapesFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.getDefaultInstance()); + } + /** + *
+     * Data types and shapes for the underlying resource.
+     * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + public java.util.List + getDtypesAndShapesBuilderList() { + return getDtypesAndShapesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape, org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.Builder, org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShapeOrBuilder> + getDtypesAndShapesFieldBuilder() { + if (dtypesAndShapesBuilder_ == null) { + dtypesAndShapesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape, org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape.Builder, org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShapeOrBuilder>( + dtypesAndShapes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dtypesAndShapes_ = null; + } + return dtypesAndShapesBuilder_; + } + + private com.google.protobuf.LazyStringList allowedDevices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAllowedDevicesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + allowedDevices_ = new com.google.protobuf.LazyStringArrayList(allowedDevices_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * A set of devices containing the resource. If empty, the resource only
+     * exists on `device`.
+     * 
+ * + * repeated string allowed_devices = 7; + */ + public com.google.protobuf.ProtocolStringList + getAllowedDevicesList() { + return allowedDevices_.getUnmodifiableView(); + } + /** + *
+     * A set of devices containing the resource. If empty, the resource only
+     * exists on `device`.
+     * 
+ * + * repeated string allowed_devices = 7; + */ + public int getAllowedDevicesCount() { + return allowedDevices_.size(); + } + /** + *
+     * A set of devices containing the resource. If empty, the resource only
+     * exists on `device`.
+     * 
+ * + * repeated string allowed_devices = 7; + */ + public java.lang.String getAllowedDevices(int index) { + return allowedDevices_.get(index); + } + /** + *
+     * A set of devices containing the resource. If empty, the resource only
+     * exists on `device`.
+     * 
+ * + * repeated string allowed_devices = 7; + */ + public com.google.protobuf.ByteString + getAllowedDevicesBytes(int index) { + return allowedDevices_.getByteString(index); + } + /** + *
+     * A set of devices containing the resource. If empty, the resource only
+     * exists on `device`.
+     * 
+ * + * repeated string allowed_devices = 7; + */ + public Builder setAllowedDevices( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedDevicesIsMutable(); + allowedDevices_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A set of devices containing the resource. If empty, the resource only
+     * exists on `device`.
+     * 
+ * + * repeated string allowed_devices = 7; + */ + public Builder addAllowedDevices( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedDevicesIsMutable(); + allowedDevices_.add(value); + onChanged(); + return this; + } + /** + *
+     * A set of devices containing the resource. If empty, the resource only
+     * exists on `device`.
+     * 
+ * + * repeated string allowed_devices = 7; + */ + public Builder addAllAllowedDevices( + java.lang.Iterable values) { + ensureAllowedDevicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, allowedDevices_); + onChanged(); + return this; + } + /** + *
+     * A set of devices containing the resource. If empty, the resource only
+     * exists on `device`.
+     * 
+ * + * repeated string allowed_devices = 7; + */ + public Builder clearAllowedDevices() { + allowedDevices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A set of devices containing the resource. If empty, the resource only
+     * exists on `device`.
+     * 
+ * + * repeated string allowed_devices = 7; + */ + public Builder addAllowedDevicesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedDevicesIsMutable(); + allowedDevices_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ResourceHandleProto) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ResourceHandleProto) + private static final org.tensorflow.proto.framework.ResourceHandleProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.ResourceHandleProto(); + } + + public static org.tensorflow.proto.framework.ResourceHandleProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceHandleProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResourceHandleProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ResourceHandleProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceHandleProtoOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceHandleProtoOrBuilder.java new file mode 100644 index 00000000000..d9e8f47ff87 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceHandleProtoOrBuilder.java @@ -0,0 +1,176 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/resource_handle.proto + +package org.tensorflow.proto.framework; + +public interface ResourceHandleProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ResourceHandleProto) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Unique name for the device containing the resource.
+   * 
+ * + * string device = 1; + */ + java.lang.String getDevice(); + /** + *
+   * Unique name for the device containing the resource.
+   * 
+ * + * string device = 1; + */ + com.google.protobuf.ByteString + getDeviceBytes(); + + /** + *
+   * Container in which this resource is placed.
+   * 
+ * + * string container = 2; + */ + java.lang.String getContainer(); + /** + *
+   * Container in which this resource is placed.
+   * 
+ * + * string container = 2; + */ + com.google.protobuf.ByteString + getContainerBytes(); + + /** + *
+   * Unique name of this resource.
+   * 
+ * + * string name = 3; + */ + java.lang.String getName(); + /** + *
+   * Unique name of this resource.
+   * 
+ * + * string name = 3; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Hash code for the type of the resource. Is only valid in the same device
+   * and in the same execution.
+   * 
+ * + * uint64 hash_code = 4; + */ + long getHashCode(); + + /** + *
+   * For debug-only, the name of the type pointed to by this handle, if
+   * available.
+   * 
+ * + * string maybe_type_name = 5; + */ + java.lang.String getMaybeTypeName(); + /** + *
+   * For debug-only, the name of the type pointed to by this handle, if
+   * available.
+   * 
+ * + * string maybe_type_name = 5; + */ + com.google.protobuf.ByteString + getMaybeTypeNameBytes(); + + /** + *
+   * Data types and shapes for the underlying resource.
+   * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + java.util.List + getDtypesAndShapesList(); + /** + *
+   * Data types and shapes for the underlying resource.
+   * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShape getDtypesAndShapes(int index); + /** + *
+   * Data types and shapes for the underlying resource.
+   * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + int getDtypesAndShapesCount(); + /** + *
+   * Data types and shapes for the underlying resource.
+   * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + java.util.List + getDtypesAndShapesOrBuilderList(); + /** + *
+   * Data types and shapes for the underlying resource.
+   * 
+ * + * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6; + */ + org.tensorflow.proto.framework.ResourceHandleProto.DtypeAndShapeOrBuilder getDtypesAndShapesOrBuilder( + int index); + + /** + *
+   * A set of devices containing the resource. If empty, the resource only
+   * exists on `device`.
+   * 
+ * + * repeated string allowed_devices = 7; + */ + java.util.List + getAllowedDevicesList(); + /** + *
+   * A set of devices containing the resource. If empty, the resource only
+   * exists on `device`.
+   * 
+ * + * repeated string allowed_devices = 7; + */ + int getAllowedDevicesCount(); + /** + *
+   * A set of devices containing the resource. If empty, the resource only
+   * exists on `device`.
+   * 
+ * + * repeated string allowed_devices = 7; + */ + java.lang.String getAllowedDevices(int index); + /** + *
+   * A set of devices containing the resource. If empty, the resource only
+   * exists on `device`.
+   * 
+ * + * repeated string allowed_devices = 7; + */ + com.google.protobuf.ByteString + getAllowedDevicesBytes(int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceOrBuilder.java new file mode 100644 index 00000000000..f6bc0c0d190 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ResourceOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/trace_events.proto + +package org.tensorflow.proto.framework; + +public interface ResourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.profiler.Resource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the resource.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * The name of the resource.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The id of the resource. Unique within a device.
+   * 
+ * + * uint32 resource_id = 2; + */ + int getResourceId(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RewriterConfig.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RewriterConfig.java new file mode 100644 index 00000000000..f2116ec831c --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RewriterConfig.java @@ -0,0 +1,5817 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/rewriter_config.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Graph rewriting is experimental and subject to change, not covered by any
+ * API stability guarantees.
+ * 
+ * + * Protobuf type {@code tensorflow.RewriterConfig} + */ +public final class RewriterConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.RewriterConfig) + RewriterConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use RewriterConfig.newBuilder() to construct. + private RewriterConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RewriterConfig() { + layoutOptimizer_ = 0; + constantFolding_ = 0; + shapeOptimization_ = 0; + remapping_ = 0; + arithmeticOptimization_ = 0; + dependencyOptimization_ = 0; + loopOptimization_ = 0; + functionOptimization_ = 0; + debugStripper_ = 0; + scopedAllocatorOptimization_ = 0; + pinToHostOptimization_ = 0; + implementationSelector_ = 0; + autoMixedPrecision_ = 0; + metaOptimizerIterations_ = 0; + memoryOptimization_ = 0; + memoryOptimizerTargetNodeNameScope_ = ""; + optimizers_ = com.google.protobuf.LazyStringArrayList.EMPTY; + customOptimizers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RewriterConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RewriterConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + layoutOptimizer_ = rawValue; + break; + } + case 16: { + + disableModelPruning_ = input.readBool(); + break; + } + case 24: { + int rawValue = input.readEnum(); + + constantFolding_ = rawValue; + break; + } + case 32: { + int rawValue = input.readEnum(); + + memoryOptimization_ = rawValue; + break; + } + case 42: { + org.tensorflow.proto.framework.AutoParallelOptions.Builder subBuilder = null; + if (autoParallel_ != null) { + subBuilder = autoParallel_.toBuilder(); + } + autoParallel_ = input.readMessage(org.tensorflow.proto.framework.AutoParallelOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(autoParallel_); + autoParallel_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + memoryOptimizerTargetNodeNameScope_ = s; + break; + } + case 56: { + int rawValue = input.readEnum(); + + arithmeticOptimization_ = rawValue; + break; + } + case 64: { + int rawValue = input.readEnum(); + + dependencyOptimization_ = rawValue; + break; + } + case 72: { + int rawValue = input.readEnum(); + + loopOptimization_ = rawValue; + break; + } + case 80: { + int rawValue = input.readEnum(); + + functionOptimization_ = rawValue; + break; + } + case 88: { + int rawValue = input.readEnum(); + + debugStripper_ = rawValue; + break; + } + case 96: { + int rawValue = input.readEnum(); + + metaOptimizerIterations_ = rawValue; + break; + } + case 104: { + int rawValue = input.readEnum(); + + shapeOptimization_ = rawValue; + break; + } + case 112: { + int rawValue = input.readEnum(); + + remapping_ = rawValue; + break; + } + case 120: { + int rawValue = input.readEnum(); + + scopedAllocatorOptimization_ = rawValue; + break; + } + case 130: { + org.tensorflow.proto.framework.ScopedAllocatorOptions.Builder subBuilder = null; + if (scopedAllocatorOpts_ != null) { + subBuilder = scopedAllocatorOpts_.toBuilder(); + } + scopedAllocatorOpts_ = input.readMessage(org.tensorflow.proto.framework.ScopedAllocatorOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(scopedAllocatorOpts_); + scopedAllocatorOpts_ = subBuilder.buildPartial(); + } + + break; + } + case 136: { + + minGraphNodes_ = input.readInt32(); + break; + } + case 144: { + int rawValue = input.readEnum(); + + pinToHostOptimization_ = rawValue; + break; + } + case 152: { + + disableMetaOptimizer_ = input.readBool(); + break; + } + case 160: { + + metaOptimizerTimeoutMs_ = input.readInt64(); + break; + } + case 168: { + + failOnOptimizerErrors_ = input.readBool(); + break; + } + case 176: { + int rawValue = input.readEnum(); + + implementationSelector_ = rawValue; + break; + } + case 184: { + int rawValue = input.readEnum(); + + autoMixedPrecision_ = rawValue; + break; + } + case 802: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + optimizers_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + optimizers_.add(s); + break; + } + case 1602: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + customOptimizers_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + customOptimizers_.add( + input.readMessage(org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.parser(), extensionRegistry)); + break; + } + case 2402: { + org.tensorflow.proto.framework.VerifierConfig.Builder subBuilder = null; + if (interOptimizerVerifierConfig_ != null) { + subBuilder = interOptimizerVerifierConfig_.toBuilder(); + } + interOptimizerVerifierConfig_ = input.readMessage(org.tensorflow.proto.framework.VerifierConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(interOptimizerVerifierConfig_); + interOptimizerVerifierConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 2410: { + org.tensorflow.proto.framework.VerifierConfig.Builder subBuilder = null; + if (postOptimizationVerifierConfig_ != null) { + subBuilder = postOptimizationVerifierConfig_.toBuilder(); + } + postOptimizationVerifierConfig_ = input.readMessage(org.tensorflow.proto.framework.VerifierConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(postOptimizationVerifierConfig_); + postOptimizationVerifierConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + optimizers_ = optimizers_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + customOptimizers_ = java.util.Collections.unmodifiableList(customOptimizers_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RewriterConfig.class, org.tensorflow.proto.framework.RewriterConfig.Builder.class); + } + + /** + * Protobuf enum {@code tensorflow.RewriterConfig.Toggle} + */ + public enum Toggle + implements com.google.protobuf.ProtocolMessageEnum { + /** + * DEFAULT = 0; + */ + DEFAULT(0), + /** + * ON = 1; + */ + ON(1), + /** + * OFF = 2; + */ + OFF(2), + /** + *
+     * Enable some aggressive optimizations that use assumptions that TF graphs
+     * may break. For example, assume the shape of a placeholder matches its
+     * actual feed.
+     * 
+ * + * AGGRESSIVE = 3; + */ + AGGRESSIVE(3), + UNRECOGNIZED(-1), + ; + + /** + * DEFAULT = 0; + */ + public static final int DEFAULT_VALUE = 0; + /** + * ON = 1; + */ + public static final int ON_VALUE = 1; + /** + * OFF = 2; + */ + public static final int OFF_VALUE = 2; + /** + *
+     * Enable some aggressive optimizations that use assumptions that TF graphs
+     * may break. For example, assume the shape of a placeholder matches its
+     * actual feed.
+     * 
+ * + * AGGRESSIVE = 3; + */ + public static final int AGGRESSIVE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Toggle valueOf(int value) { + return forNumber(value); + } + + public static Toggle forNumber(int value) { + switch (value) { + case 0: return DEFAULT; + case 1: return ON; + case 2: return OFF; + case 3: return AGGRESSIVE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Toggle> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Toggle findValueByNumber(int number) { + return Toggle.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.tensorflow.proto.framework.RewriterConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final Toggle[] VALUES = values(); + + public static Toggle valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Toggle(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:tensorflow.RewriterConfig.Toggle) + } + + /** + *
+   * Enum controlling the number of times to run optimizers. The default is to
+   * run them twice.
+   * 
+ * + * Protobuf enum {@code tensorflow.RewriterConfig.NumIterationsType} + */ + public enum NumIterationsType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * DEFAULT_NUM_ITERS = 0; + */ + DEFAULT_NUM_ITERS(0), + /** + * ONE = 1; + */ + ONE(1), + /** + * TWO = 2; + */ + TWO(2), + UNRECOGNIZED(-1), + ; + + /** + * DEFAULT_NUM_ITERS = 0; + */ + public static final int DEFAULT_NUM_ITERS_VALUE = 0; + /** + * ONE = 1; + */ + public static final int ONE_VALUE = 1; + /** + * TWO = 2; + */ + public static final int TWO_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NumIterationsType valueOf(int value) { + return forNumber(value); + } + + public static NumIterationsType forNumber(int value) { + switch (value) { + case 0: return DEFAULT_NUM_ITERS; + case 1: return ONE; + case 2: return TWO; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + NumIterationsType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NumIterationsType findValueByNumber(int number) { + return NumIterationsType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.tensorflow.proto.framework.RewriterConfig.getDescriptor().getEnumTypes().get(1); + } + + private static final NumIterationsType[] VALUES = values(); + + public static NumIterationsType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NumIterationsType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:tensorflow.RewriterConfig.NumIterationsType) + } + + /** + * Protobuf enum {@code tensorflow.RewriterConfig.MemOptType} + */ + public enum MemOptType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The default setting (SCHEDULING and SWAPPING HEURISTICS only)
+     * 
+ * + * DEFAULT_MEM_OPT = 0; + */ + DEFAULT_MEM_OPT(0), + /** + *
+     * Disabled in the meta-optimizer.
+     * 
+ * + * NO_MEM_OPT = 1; + */ + NO_MEM_OPT(1), + /** + *
+     * Driven by manual op-level annotations.
+     * 
+ * + * MANUAL = 2; + */ + MANUAL(2), + /** + *
+     * Swapping heuristic will move a tensor from the GPU to the CPU and move
+     * it back when needed to reduce peak memory usage.
+     * 
+ * + * SWAPPING_HEURISTICS = 4; + */ + SWAPPING_HEURISTICS(4), + /** + *
+     * Recomputation heuristics will recompute ops (such as Relu activation)
+     * during backprop instead of storing them, reducing peak memory usage.
+     * 
+ * + * RECOMPUTATION_HEURISTICS = 5; + */ + RECOMPUTATION_HEURISTICS(5), + /** + *
+     * Scheduling will split big ops such as AddN and try to enforce a schedule
+     * of the new computations that decreases peak memory usage.
+     * 
+ * + * SCHEDULING_HEURISTICS = 6; + */ + SCHEDULING_HEURISTICS(6), + /** + *
+     * Use any combination of swapping and recomputation heuristics.
+     * 
+ * + * HEURISTICS = 3; + */ + HEURISTICS(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The default setting (SCHEDULING and SWAPPING HEURISTICS only)
+     * 
+ * + * DEFAULT_MEM_OPT = 0; + */ + public static final int DEFAULT_MEM_OPT_VALUE = 0; + /** + *
+     * Disabled in the meta-optimizer.
+     * 
+ * + * NO_MEM_OPT = 1; + */ + public static final int NO_MEM_OPT_VALUE = 1; + /** + *
+     * Driven by manual op-level annotations.
+     * 
+ * + * MANUAL = 2; + */ + public static final int MANUAL_VALUE = 2; + /** + *
+     * Swapping heuristic will move a tensor from the GPU to the CPU and move
+     * it back when needed to reduce peak memory usage.
+     * 
+ * + * SWAPPING_HEURISTICS = 4; + */ + public static final int SWAPPING_HEURISTICS_VALUE = 4; + /** + *
+     * Recomputation heuristics will recompute ops (such as Relu activation)
+     * during backprop instead of storing them, reducing peak memory usage.
+     * 
+ * + * RECOMPUTATION_HEURISTICS = 5; + */ + public static final int RECOMPUTATION_HEURISTICS_VALUE = 5; + /** + *
+     * Scheduling will split big ops such as AddN and try to enforce a schedule
+     * of the new computations that decreases peak memory usage.
+     * 
+ * + * SCHEDULING_HEURISTICS = 6; + */ + public static final int SCHEDULING_HEURISTICS_VALUE = 6; + /** + *
+     * Use any combination of swapping and recomputation heuristics.
+     * 
+ * + * HEURISTICS = 3; + */ + public static final int HEURISTICS_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MemOptType valueOf(int value) { + return forNumber(value); + } + + public static MemOptType forNumber(int value) { + switch (value) { + case 0: return DEFAULT_MEM_OPT; + case 1: return NO_MEM_OPT; + case 2: return MANUAL; + case 4: return SWAPPING_HEURISTICS; + case 5: return RECOMPUTATION_HEURISTICS; + case 6: return SCHEDULING_HEURISTICS; + case 3: return HEURISTICS; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + MemOptType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MemOptType findValueByNumber(int number) { + return MemOptType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.tensorflow.proto.framework.RewriterConfig.getDescriptor().getEnumTypes().get(2); + } + + private static final MemOptType[] VALUES = values(); + + public static MemOptType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MemOptType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:tensorflow.RewriterConfig.MemOptType) + } + + public interface CustomGraphOptimizerOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.RewriterConfig.CustomGraphOptimizer) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + */ + java.lang.String getName(); + /** + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * map<string, .tensorflow.AttrValue> parameter_map = 2; + */ + int getParameterMapCount(); + /** + * map<string, .tensorflow.AttrValue> parameter_map = 2; + */ + boolean containsParameterMap( + java.lang.String key); + /** + * Use {@link #getParameterMapMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getParameterMap(); + /** + * map<string, .tensorflow.AttrValue> parameter_map = 2; + */ + java.util.Map + getParameterMapMap(); + /** + * map<string, .tensorflow.AttrValue> parameter_map = 2; + */ + + org.tensorflow.proto.framework.AttrValue getParameterMapOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue defaultValue); + /** + * map<string, .tensorflow.AttrValue> parameter_map = 2; + */ + + org.tensorflow.proto.framework.AttrValue getParameterMapOrThrow( + java.lang.String key); + } + /** + *
+   * Message to describe custom graph optimizer and its parameters
+   * 
+ * + * Protobuf type {@code tensorflow.RewriterConfig.CustomGraphOptimizer} + */ + public static final class CustomGraphOptimizer extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.RewriterConfig.CustomGraphOptimizer) + CustomGraphOptimizerOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomGraphOptimizer.newBuilder() to construct. + private CustomGraphOptimizer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CustomGraphOptimizer() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CustomGraphOptimizer(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CustomGraphOptimizer( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + parameterMap_ = com.google.protobuf.MapField.newMapField( + ParameterMapDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + parameterMap__ = input.readMessage( + ParameterMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + parameterMap_.getMutableMap().put( + parameterMap__.getKey(), parameterMap__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetParameterMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.class, org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * 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; + } + } + /** + * 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 PARAMETER_MAP_FIELD_NUMBER = 2; + private static final class ParameterMapDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, org.tensorflow.proto.framework.AttrValue> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.framework.AttrValue.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.AttrValue> parameterMap_; + private com.google.protobuf.MapField + internalGetParameterMap() { + if (parameterMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ParameterMapDefaultEntryHolder.defaultEntry); + } + return parameterMap_; + } + + public int getParameterMapCount() { + return internalGetParameterMap().getMap().size(); + } + /** + * map<string, .tensorflow.AttrValue> parameter_map = 2; + */ + + public boolean containsParameterMap( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetParameterMap().getMap().containsKey(key); + } + /** + * Use {@link #getParameterMapMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getParameterMap() { + return getParameterMapMap(); + } + /** + * map<string, .tensorflow.AttrValue> parameter_map = 2; + */ + + public java.util.Map getParameterMapMap() { + return internalGetParameterMap().getMap(); + } + /** + * map<string, .tensorflow.AttrValue> parameter_map = 2; + */ + + public org.tensorflow.proto.framework.AttrValue getParameterMapOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetParameterMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .tensorflow.AttrValue> parameter_map = 2; + */ + + public org.tensorflow.proto.framework.AttrValue getParameterMapOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetParameterMap().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetParameterMap(), + ParameterMapDefaultEntryHolder.defaultEntry, + 2); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (java.util.Map.Entry entry + : internalGetParameterMap().getMap().entrySet()) { + com.google.protobuf.MapEntry + parameterMap__ = ParameterMapDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, parameterMap__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer other = (org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!internalGetParameterMap().equals( + other.internalGetParameterMap())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (!internalGetParameterMap().getMap().isEmpty()) { + hash = (37 * hash) + PARAMETER_MAP_FIELD_NUMBER; + hash = (53 * hash) + internalGetParameterMap().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer 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.proto.framework.RewriterConfig.CustomGraphOptimizer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message to describe custom graph optimizer and its parameters
+     * 
+ * + * Protobuf type {@code tensorflow.RewriterConfig.CustomGraphOptimizer} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.RewriterConfig.CustomGraphOptimizer) + org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetParameterMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableParameterMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.class, org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + internalGetMutableParameterMap().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer getDefaultInstanceForType() { + return org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer build() { + org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer buildPartial() { + org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer result = new org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.parameterMap_ = internalGetParameterMap(); + result.parameterMap_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer) { + return mergeFrom((org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer other) { + if (other == org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + internalGetMutableParameterMap().mergeFrom( + other.internalGetParameterMap()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * 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; + } + } + /** + * 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; + } + } + /** + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * 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.proto.framework.AttrValue> parameterMap_; + private com.google.protobuf.MapField + internalGetParameterMap() { + if (parameterMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ParameterMapDefaultEntryHolder.defaultEntry); + } + return parameterMap_; + } + private com.google.protobuf.MapField + internalGetMutableParameterMap() { + onChanged();; + if (parameterMap_ == null) { + parameterMap_ = com.google.protobuf.MapField.newMapField( + ParameterMapDefaultEntryHolder.defaultEntry); + } + if (!parameterMap_.isMutable()) { + parameterMap_ = parameterMap_.copy(); + } + return parameterMap_; + } + + public int getParameterMapCount() { + return internalGetParameterMap().getMap().size(); + } + /** + * map<string, .tensorflow.AttrValue> parameter_map = 2; + */ + + public boolean containsParameterMap( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetParameterMap().getMap().containsKey(key); + } + /** + * Use {@link #getParameterMapMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getParameterMap() { + return getParameterMapMap(); + } + /** + * map<string, .tensorflow.AttrValue> parameter_map = 2; + */ + + public java.util.Map getParameterMapMap() { + return internalGetParameterMap().getMap(); + } + /** + * map<string, .tensorflow.AttrValue> parameter_map = 2; + */ + + public org.tensorflow.proto.framework.AttrValue getParameterMapOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetParameterMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .tensorflow.AttrValue> parameter_map = 2; + */ + + public org.tensorflow.proto.framework.AttrValue getParameterMapOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetParameterMap().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearParameterMap() { + internalGetMutableParameterMap().getMutableMap() + .clear(); + return this; + } + /** + * map<string, .tensorflow.AttrValue> parameter_map = 2; + */ + + public Builder removeParameterMap( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableParameterMap().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableParameterMap() { + return internalGetMutableParameterMap().getMutableMap(); + } + /** + * map<string, .tensorflow.AttrValue> parameter_map = 2; + */ + public Builder putParameterMap( + java.lang.String key, + org.tensorflow.proto.framework.AttrValue value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableParameterMap().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, .tensorflow.AttrValue> parameter_map = 2; + */ + + public Builder putAllParameterMap( + java.util.Map values) { + internalGetMutableParameterMap().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.RewriterConfig.CustomGraphOptimizer) + } + + // @@protoc_insertion_point(class_scope:tensorflow.RewriterConfig.CustomGraphOptimizer) + private static final org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer(); + } + + public static org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomGraphOptimizer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CustomGraphOptimizer(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int LAYOUT_OPTIMIZER_FIELD_NUMBER = 1; + private int layoutOptimizer_; + /** + *
+   * Optimize tensor layouts (default is ON)
+   * e.g. This will try to use NCHW layout on GPU which is faster.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle layout_optimizer = 1; + */ + public int getLayoutOptimizerValue() { + return layoutOptimizer_; + } + /** + *
+   * Optimize tensor layouts (default is ON)
+   * e.g. This will try to use NCHW layout on GPU which is faster.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle layout_optimizer = 1; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getLayoutOptimizer() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(layoutOptimizer_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + + public static final int CONSTANT_FOLDING_FIELD_NUMBER = 3; + private int constantFolding_; + /** + *
+   * Fold constants (default is ON)
+   * Statically infer the value of tensors when possible, and materialize the
+   * result using constants.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle constant_folding = 3; + */ + public int getConstantFoldingValue() { + return constantFolding_; + } + /** + *
+   * Fold constants (default is ON)
+   * Statically infer the value of tensors when possible, and materialize the
+   * result using constants.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle constant_folding = 3; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getConstantFolding() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(constantFolding_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + + public static final int SHAPE_OPTIMIZATION_FIELD_NUMBER = 13; + private int shapeOptimization_; + /** + *
+   * Shape optimizations (default is ON)
+   * Simplify computations made on shapes.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle shape_optimization = 13; + */ + public int getShapeOptimizationValue() { + return shapeOptimization_; + } + /** + *
+   * Shape optimizations (default is ON)
+   * Simplify computations made on shapes.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle shape_optimization = 13; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getShapeOptimization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(shapeOptimization_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + + public static final int REMAPPING_FIELD_NUMBER = 14; + private int remapping_; + /** + *
+   * Remapping (default is ON)
+   * Remap subgraphs onto more efficient implementations.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle remapping = 14; + */ + public int getRemappingValue() { + return remapping_; + } + /** + *
+   * Remapping (default is ON)
+   * Remap subgraphs onto more efficient implementations.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle remapping = 14; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getRemapping() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(remapping_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + + public static final int ARITHMETIC_OPTIMIZATION_FIELD_NUMBER = 7; + private int arithmeticOptimization_; + /** + *
+   * Arithmetic optimizations (default is ON)
+   * e.g. Simplify arithmetic ops; merge ops with same value (like constants).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle arithmetic_optimization = 7; + */ + public int getArithmeticOptimizationValue() { + return arithmeticOptimization_; + } + /** + *
+   * Arithmetic optimizations (default is ON)
+   * e.g. Simplify arithmetic ops; merge ops with same value (like constants).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle arithmetic_optimization = 7; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getArithmeticOptimization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(arithmeticOptimization_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + + public static final int DEPENDENCY_OPTIMIZATION_FIELD_NUMBER = 8; + private int dependencyOptimization_; + /** + *
+   * Control dependency optimizations (default is ON).
+   * Remove redundant control dependencies, which may enable other optimization.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle dependency_optimization = 8; + */ + public int getDependencyOptimizationValue() { + return dependencyOptimization_; + } + /** + *
+   * Control dependency optimizations (default is ON).
+   * Remove redundant control dependencies, which may enable other optimization.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle dependency_optimization = 8; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getDependencyOptimization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(dependencyOptimization_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + + public static final int LOOP_OPTIMIZATION_FIELD_NUMBER = 9; + private int loopOptimization_; + /** + *
+   * Loop optimizations (default is ON).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle loop_optimization = 9; + */ + public int getLoopOptimizationValue() { + return loopOptimization_; + } + /** + *
+   * Loop optimizations (default is ON).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle loop_optimization = 9; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getLoopOptimization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(loopOptimization_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + + public static final int FUNCTION_OPTIMIZATION_FIELD_NUMBER = 10; + private int functionOptimization_; + /** + *
+   * Function optimizations (default is ON).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle function_optimization = 10; + */ + public int getFunctionOptimizationValue() { + return functionOptimization_; + } + /** + *
+   * Function optimizations (default is ON).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle function_optimization = 10; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getFunctionOptimization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(functionOptimization_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + + public static final int DEBUG_STRIPPER_FIELD_NUMBER = 11; + private int debugStripper_; + /** + *
+   * Strips debug-related nodes from the graph (off by default).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle debug_stripper = 11; + */ + public int getDebugStripperValue() { + return debugStripper_; + } + /** + *
+   * Strips debug-related nodes from the graph (off by default).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle debug_stripper = 11; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getDebugStripper() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(debugStripper_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + + public static final int DISABLE_MODEL_PRUNING_FIELD_NUMBER = 2; + private boolean disableModelPruning_; + /** + *
+   * If true, don't remove unnecessary ops from the graph
+   * 
+ * + * bool disable_model_pruning = 2; + */ + public boolean getDisableModelPruning() { + return disableModelPruning_; + } + + public static final int SCOPED_ALLOCATOR_OPTIMIZATION_FIELD_NUMBER = 15; + private int scopedAllocatorOptimization_; + /** + *
+   * Try to allocate some independent Op outputs contiguously in order to
+   * merge or eliminate downstream Ops (off by default).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle scoped_allocator_optimization = 15; + */ + public int getScopedAllocatorOptimizationValue() { + return scopedAllocatorOptimization_; + } + /** + *
+   * Try to allocate some independent Op outputs contiguously in order to
+   * merge or eliminate downstream Ops (off by default).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle scoped_allocator_optimization = 15; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getScopedAllocatorOptimization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(scopedAllocatorOptimization_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + + public static final int PIN_TO_HOST_OPTIMIZATION_FIELD_NUMBER = 18; + private int pinToHostOptimization_; + /** + *
+   * Force small ops onto the CPU (default is OFF).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle pin_to_host_optimization = 18; + */ + public int getPinToHostOptimizationValue() { + return pinToHostOptimization_; + } + /** + *
+   * Force small ops onto the CPU (default is OFF).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle pin_to_host_optimization = 18; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getPinToHostOptimization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(pinToHostOptimization_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + + public static final int IMPLEMENTATION_SELECTOR_FIELD_NUMBER = 22; + private int implementationSelector_; + /** + *
+   * Enable the swap of kernel implementations based on the device placement
+   * (default is ON).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle implementation_selector = 22; + */ + public int getImplementationSelectorValue() { + return implementationSelector_; + } + /** + *
+   * Enable the swap of kernel implementations based on the device placement
+   * (default is ON).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle implementation_selector = 22; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getImplementationSelector() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(implementationSelector_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + + public static final int AUTO_MIXED_PRECISION_FIELD_NUMBER = 23; + private int autoMixedPrecision_; + /** + *
+   * Optimize data types (default is OFF).
+   * e.g., This will try to use float16 on GPU which is faster.
+   * Note that this can change the numerical stability of the graph and may
+   * require the use of loss scaling to maintain model convergence.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle auto_mixed_precision = 23; + */ + public int getAutoMixedPrecisionValue() { + return autoMixedPrecision_; + } + /** + *
+   * Optimize data types (default is OFF).
+   * e.g., This will try to use float16 on GPU which is faster.
+   * Note that this can change the numerical stability of the graph and may
+   * require the use of loss scaling to maintain model convergence.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle auto_mixed_precision = 23; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getAutoMixedPrecision() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(autoMixedPrecision_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + + public static final int DISABLE_META_OPTIMIZER_FIELD_NUMBER = 19; + private boolean disableMetaOptimizer_; + /** + *
+   * Disable the entire meta optimizer (off by default).
+   * 
+ * + * bool disable_meta_optimizer = 19; + */ + public boolean getDisableMetaOptimizer() { + return disableMetaOptimizer_; + } + + public static final int META_OPTIMIZER_ITERATIONS_FIELD_NUMBER = 12; + private int metaOptimizerIterations_; + /** + *
+   * Controls how many times we run the optimizers in meta optimizer (default
+   * is once).
+   * 
+ * + * .tensorflow.RewriterConfig.NumIterationsType meta_optimizer_iterations = 12; + */ + public int getMetaOptimizerIterationsValue() { + return metaOptimizerIterations_; + } + /** + *
+   * Controls how many times we run the optimizers in meta optimizer (default
+   * is once).
+   * 
+ * + * .tensorflow.RewriterConfig.NumIterationsType meta_optimizer_iterations = 12; + */ + public org.tensorflow.proto.framework.RewriterConfig.NumIterationsType getMetaOptimizerIterations() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.NumIterationsType result = org.tensorflow.proto.framework.RewriterConfig.NumIterationsType.valueOf(metaOptimizerIterations_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.NumIterationsType.UNRECOGNIZED : result; + } + + public static final int MIN_GRAPH_NODES_FIELD_NUMBER = 17; + private int minGraphNodes_; + /** + *
+   * The minimum number of nodes in a graph to optimizer. For smaller graphs,
+   * optimization is skipped.
+   * 0 means the system picks an appropriate number.
+   * < 0 means do not skip optimization.
+   * 
+ * + * int32 min_graph_nodes = 17; + */ + public int getMinGraphNodes() { + return minGraphNodes_; + } + + public static final int MEMORY_OPTIMIZATION_FIELD_NUMBER = 4; + private int memoryOptimization_; + /** + *
+   * Configures memory optimization passes through the meta-optimizer. Has no
+   * effect on manually requested memory optimization passes in the optimizers
+   * field.
+   * 
+ * + * .tensorflow.RewriterConfig.MemOptType memory_optimization = 4; + */ + public int getMemoryOptimizationValue() { + return memoryOptimization_; + } + /** + *
+   * Configures memory optimization passes through the meta-optimizer. Has no
+   * effect on manually requested memory optimization passes in the optimizers
+   * field.
+   * 
+ * + * .tensorflow.RewriterConfig.MemOptType memory_optimization = 4; + */ + public org.tensorflow.proto.framework.RewriterConfig.MemOptType getMemoryOptimization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.MemOptType result = org.tensorflow.proto.framework.RewriterConfig.MemOptType.valueOf(memoryOptimization_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.MemOptType.UNRECOGNIZED : result; + } + + public static final int MEMORY_OPTIMIZER_TARGET_NODE_NAME_SCOPE_FIELD_NUMBER = 6; + private volatile java.lang.Object memoryOptimizerTargetNodeNameScope_; + /** + *
+   * A node name scope for node names which are valid outputs of recomputations.
+   * Inputs to nodes that match this scope may be recomputed (subject either to
+   * manual annotation of those input nodes or to manual annotation and
+   * heuristics depending on memory_optimization), but the nodes themselves will
+   * not be recomputed. This matches any sub-scopes as well, meaning the scope
+   * can appear not just as a top-level scope. For example, if the value is
+   * "gradients/", the default, it will match node name "gradients/foo",
+   * "foo/gradients/bar", but not "foo_gradients/"
+   * 
+ * + * string memory_optimizer_target_node_name_scope = 6; + */ + public java.lang.String getMemoryOptimizerTargetNodeNameScope() { + java.lang.Object ref = memoryOptimizerTargetNodeNameScope_; + 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(); + memoryOptimizerTargetNodeNameScope_ = s; + return s; + } + } + /** + *
+   * A node name scope for node names which are valid outputs of recomputations.
+   * Inputs to nodes that match this scope may be recomputed (subject either to
+   * manual annotation of those input nodes or to manual annotation and
+   * heuristics depending on memory_optimization), but the nodes themselves will
+   * not be recomputed. This matches any sub-scopes as well, meaning the scope
+   * can appear not just as a top-level scope. For example, if the value is
+   * "gradients/", the default, it will match node name "gradients/foo",
+   * "foo/gradients/bar", but not "foo_gradients/"
+   * 
+ * + * string memory_optimizer_target_node_name_scope = 6; + */ + public com.google.protobuf.ByteString + getMemoryOptimizerTargetNodeNameScopeBytes() { + java.lang.Object ref = memoryOptimizerTargetNodeNameScope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memoryOptimizerTargetNodeNameScope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int META_OPTIMIZER_TIMEOUT_MS_FIELD_NUMBER = 20; + private long metaOptimizerTimeoutMs_; + /** + *
+   * Maximum number of milliseconds to spend optimizing a single graph before
+   * timing out. If equal to 0 the system picks a default (currently 5 minutes).
+   * If less than 0 the optimizer will never time out.
+   * 
+ * + * int64 meta_optimizer_timeout_ms = 20; + */ + public long getMetaOptimizerTimeoutMs() { + return metaOptimizerTimeoutMs_; + } + + public static final int AUTO_PARALLEL_FIELD_NUMBER = 5; + private org.tensorflow.proto.framework.AutoParallelOptions autoParallel_; + /** + *
+   * Configures AutoParallel optimization passes either through the
+   * meta-optimizer or when manually specified through the optimizers field.
+   * 
+ * + * .tensorflow.AutoParallelOptions auto_parallel = 5; + */ + public boolean hasAutoParallel() { + return autoParallel_ != null; + } + /** + *
+   * Configures AutoParallel optimization passes either through the
+   * meta-optimizer or when manually specified through the optimizers field.
+   * 
+ * + * .tensorflow.AutoParallelOptions auto_parallel = 5; + */ + public org.tensorflow.proto.framework.AutoParallelOptions getAutoParallel() { + return autoParallel_ == null ? org.tensorflow.proto.framework.AutoParallelOptions.getDefaultInstance() : autoParallel_; + } + /** + *
+   * Configures AutoParallel optimization passes either through the
+   * meta-optimizer or when manually specified through the optimizers field.
+   * 
+ * + * .tensorflow.AutoParallelOptions auto_parallel = 5; + */ + public org.tensorflow.proto.framework.AutoParallelOptionsOrBuilder getAutoParallelOrBuilder() { + return getAutoParallel(); + } + + public static final int FAIL_ON_OPTIMIZER_ERRORS_FIELD_NUMBER = 21; + private boolean failOnOptimizerErrors_; + /** + *
+   * If true, any optimization pass failing will cause the MetaOptimizer to
+   * stop with an error. By default - or when set to false, failing passes are
+   * skipped silently.
+   * 
+ * + * bool fail_on_optimizer_errors = 21; + */ + public boolean getFailOnOptimizerErrors() { + return failOnOptimizerErrors_; + } + + public static final int SCOPED_ALLOCATOR_OPTS_FIELD_NUMBER = 16; + private org.tensorflow.proto.framework.ScopedAllocatorOptions scopedAllocatorOpts_; + /** + * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; + */ + public boolean hasScopedAllocatorOpts() { + return scopedAllocatorOpts_ != null; + } + /** + * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; + */ + public org.tensorflow.proto.framework.ScopedAllocatorOptions getScopedAllocatorOpts() { + return scopedAllocatorOpts_ == null ? org.tensorflow.proto.framework.ScopedAllocatorOptions.getDefaultInstance() : scopedAllocatorOpts_; + } + /** + * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; + */ + public org.tensorflow.proto.framework.ScopedAllocatorOptionsOrBuilder getScopedAllocatorOptsOrBuilder() { + return getScopedAllocatorOpts(); + } + + public static final int OPTIMIZERS_FIELD_NUMBER = 100; + private com.google.protobuf.LazyStringList optimizers_; + /** + *
+   * If non-empty, will use this as an alternative way to specify a list of
+   * optimizations to turn on and the order of the optimizations (replacing the
+   * meta-optimizer).
+   * Of the RewriterConfig options, only the AutoParallel configuration options
+   * (the auto_parallel field) apply to manually requested optimization passes
+   * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+   * not configurable (in contrast to memory optimization passes through the
+   * meta-optimizer) and act only on manual op annotations.
+   * Custom optimizers (see custom_optimizers) that are not part of this
+   * schedule will be run after - in the order that they were specified.
+   * 
+ * + * repeated string optimizers = 100; + */ + public com.google.protobuf.ProtocolStringList + getOptimizersList() { + return optimizers_; + } + /** + *
+   * If non-empty, will use this as an alternative way to specify a list of
+   * optimizations to turn on and the order of the optimizations (replacing the
+   * meta-optimizer).
+   * Of the RewriterConfig options, only the AutoParallel configuration options
+   * (the auto_parallel field) apply to manually requested optimization passes
+   * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+   * not configurable (in contrast to memory optimization passes through the
+   * meta-optimizer) and act only on manual op annotations.
+   * Custom optimizers (see custom_optimizers) that are not part of this
+   * schedule will be run after - in the order that they were specified.
+   * 
+ * + * repeated string optimizers = 100; + */ + public int getOptimizersCount() { + return optimizers_.size(); + } + /** + *
+   * If non-empty, will use this as an alternative way to specify a list of
+   * optimizations to turn on and the order of the optimizations (replacing the
+   * meta-optimizer).
+   * Of the RewriterConfig options, only the AutoParallel configuration options
+   * (the auto_parallel field) apply to manually requested optimization passes
+   * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+   * not configurable (in contrast to memory optimization passes through the
+   * meta-optimizer) and act only on manual op annotations.
+   * Custom optimizers (see custom_optimizers) that are not part of this
+   * schedule will be run after - in the order that they were specified.
+   * 
+ * + * repeated string optimizers = 100; + */ + public java.lang.String getOptimizers(int index) { + return optimizers_.get(index); + } + /** + *
+   * If non-empty, will use this as an alternative way to specify a list of
+   * optimizations to turn on and the order of the optimizations (replacing the
+   * meta-optimizer).
+   * Of the RewriterConfig options, only the AutoParallel configuration options
+   * (the auto_parallel field) apply to manually requested optimization passes
+   * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+   * not configurable (in contrast to memory optimization passes through the
+   * meta-optimizer) and act only on manual op annotations.
+   * Custom optimizers (see custom_optimizers) that are not part of this
+   * schedule will be run after - in the order that they were specified.
+   * 
+ * + * repeated string optimizers = 100; + */ + public com.google.protobuf.ByteString + getOptimizersBytes(int index) { + return optimizers_.getByteString(index); + } + + public static final int CUSTOM_OPTIMIZERS_FIELD_NUMBER = 200; + private java.util.List customOptimizers_; + /** + *
+   * list of CustomGraphOptimizers to apply.
+   * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public java.util.List getCustomOptimizersList() { + return customOptimizers_; + } + /** + *
+   * list of CustomGraphOptimizers to apply.
+   * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public java.util.List + getCustomOptimizersOrBuilderList() { + return customOptimizers_; + } + /** + *
+   * list of CustomGraphOptimizers to apply.
+   * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public int getCustomOptimizersCount() { + return customOptimizers_.size(); + } + /** + *
+   * list of CustomGraphOptimizers to apply.
+   * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer getCustomOptimizers(int index) { + return customOptimizers_.get(index); + } + /** + *
+   * list of CustomGraphOptimizers to apply.
+   * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizerOrBuilder getCustomOptimizersOrBuilder( + int index) { + return customOptimizers_.get(index); + } + + public static final int INTER_OPTIMIZER_VERIFIER_CONFIG_FIELD_NUMBER = 300; + private org.tensorflow.proto.framework.VerifierConfig interOptimizerVerifierConfig_; + /** + *
+   * VerifierConfig specifying the verifiers to be run after every optimizer.
+   * 
+ * + * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; + */ + public boolean hasInterOptimizerVerifierConfig() { + return interOptimizerVerifierConfig_ != null; + } + /** + *
+   * VerifierConfig specifying the verifiers to be run after every optimizer.
+   * 
+ * + * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; + */ + public org.tensorflow.proto.framework.VerifierConfig getInterOptimizerVerifierConfig() { + return interOptimizerVerifierConfig_ == null ? org.tensorflow.proto.framework.VerifierConfig.getDefaultInstance() : interOptimizerVerifierConfig_; + } + /** + *
+   * VerifierConfig specifying the verifiers to be run after every optimizer.
+   * 
+ * + * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; + */ + public org.tensorflow.proto.framework.VerifierConfigOrBuilder getInterOptimizerVerifierConfigOrBuilder() { + return getInterOptimizerVerifierConfig(); + } + + public static final int POST_OPTIMIZATION_VERIFIER_CONFIG_FIELD_NUMBER = 301; + private org.tensorflow.proto.framework.VerifierConfig postOptimizationVerifierConfig_; + /** + *
+   * VerifierConfig specifying the verifiers to be run at the end, after all
+   * optimizers have run.
+   * 
+ * + * .tensorflow.VerifierConfig post_optimization_verifier_config = 301; + */ + public boolean hasPostOptimizationVerifierConfig() { + return postOptimizationVerifierConfig_ != null; + } + /** + *
+   * VerifierConfig specifying the verifiers to be run at the end, after all
+   * optimizers have run.
+   * 
+ * + * .tensorflow.VerifierConfig post_optimization_verifier_config = 301; + */ + public org.tensorflow.proto.framework.VerifierConfig getPostOptimizationVerifierConfig() { + return postOptimizationVerifierConfig_ == null ? org.tensorflow.proto.framework.VerifierConfig.getDefaultInstance() : postOptimizationVerifierConfig_; + } + /** + *
+   * VerifierConfig specifying the verifiers to be run at the end, after all
+   * optimizers have run.
+   * 
+ * + * .tensorflow.VerifierConfig post_optimization_verifier_config = 301; + */ + public org.tensorflow.proto.framework.VerifierConfigOrBuilder getPostOptimizationVerifierConfigOrBuilder() { + return getPostOptimizationVerifierConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (layoutOptimizer_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + output.writeEnum(1, layoutOptimizer_); + } + if (disableModelPruning_ != false) { + output.writeBool(2, disableModelPruning_); + } + if (constantFolding_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + output.writeEnum(3, constantFolding_); + } + if (memoryOptimization_ != org.tensorflow.proto.framework.RewriterConfig.MemOptType.DEFAULT_MEM_OPT.getNumber()) { + output.writeEnum(4, memoryOptimization_); + } + if (autoParallel_ != null) { + output.writeMessage(5, getAutoParallel()); + } + if (!getMemoryOptimizerTargetNodeNameScopeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, memoryOptimizerTargetNodeNameScope_); + } + if (arithmeticOptimization_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + output.writeEnum(7, arithmeticOptimization_); + } + if (dependencyOptimization_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + output.writeEnum(8, dependencyOptimization_); + } + if (loopOptimization_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + output.writeEnum(9, loopOptimization_); + } + if (functionOptimization_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + output.writeEnum(10, functionOptimization_); + } + if (debugStripper_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + output.writeEnum(11, debugStripper_); + } + if (metaOptimizerIterations_ != org.tensorflow.proto.framework.RewriterConfig.NumIterationsType.DEFAULT_NUM_ITERS.getNumber()) { + output.writeEnum(12, metaOptimizerIterations_); + } + if (shapeOptimization_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + output.writeEnum(13, shapeOptimization_); + } + if (remapping_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + output.writeEnum(14, remapping_); + } + if (scopedAllocatorOptimization_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + output.writeEnum(15, scopedAllocatorOptimization_); + } + if (scopedAllocatorOpts_ != null) { + output.writeMessage(16, getScopedAllocatorOpts()); + } + if (minGraphNodes_ != 0) { + output.writeInt32(17, minGraphNodes_); + } + if (pinToHostOptimization_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + output.writeEnum(18, pinToHostOptimization_); + } + if (disableMetaOptimizer_ != false) { + output.writeBool(19, disableMetaOptimizer_); + } + if (metaOptimizerTimeoutMs_ != 0L) { + output.writeInt64(20, metaOptimizerTimeoutMs_); + } + if (failOnOptimizerErrors_ != false) { + output.writeBool(21, failOnOptimizerErrors_); + } + if (implementationSelector_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + output.writeEnum(22, implementationSelector_); + } + if (autoMixedPrecision_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + output.writeEnum(23, autoMixedPrecision_); + } + for (int i = 0; i < optimizers_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 100, optimizers_.getRaw(i)); + } + for (int i = 0; i < customOptimizers_.size(); i++) { + output.writeMessage(200, customOptimizers_.get(i)); + } + if (interOptimizerVerifierConfig_ != null) { + output.writeMessage(300, getInterOptimizerVerifierConfig()); + } + if (postOptimizationVerifierConfig_ != null) { + output.writeMessage(301, getPostOptimizationVerifierConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (layoutOptimizer_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, layoutOptimizer_); + } + if (disableModelPruning_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, disableModelPruning_); + } + if (constantFolding_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, constantFolding_); + } + if (memoryOptimization_ != org.tensorflow.proto.framework.RewriterConfig.MemOptType.DEFAULT_MEM_OPT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, memoryOptimization_); + } + if (autoParallel_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getAutoParallel()); + } + if (!getMemoryOptimizerTargetNodeNameScopeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, memoryOptimizerTargetNodeNameScope_); + } + if (arithmeticOptimization_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, arithmeticOptimization_); + } + if (dependencyOptimization_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, dependencyOptimization_); + } + if (loopOptimization_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, loopOptimization_); + } + if (functionOptimization_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, functionOptimization_); + } + if (debugStripper_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, debugStripper_); + } + if (metaOptimizerIterations_ != org.tensorflow.proto.framework.RewriterConfig.NumIterationsType.DEFAULT_NUM_ITERS.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(12, metaOptimizerIterations_); + } + if (shapeOptimization_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(13, shapeOptimization_); + } + if (remapping_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(14, remapping_); + } + if (scopedAllocatorOptimization_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(15, scopedAllocatorOptimization_); + } + if (scopedAllocatorOpts_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getScopedAllocatorOpts()); + } + if (minGraphNodes_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(17, minGraphNodes_); + } + if (pinToHostOptimization_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(18, pinToHostOptimization_); + } + if (disableMetaOptimizer_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(19, disableMetaOptimizer_); + } + if (metaOptimizerTimeoutMs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(20, metaOptimizerTimeoutMs_); + } + if (failOnOptimizerErrors_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(21, failOnOptimizerErrors_); + } + if (implementationSelector_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(22, implementationSelector_); + } + if (autoMixedPrecision_ != org.tensorflow.proto.framework.RewriterConfig.Toggle.DEFAULT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(23, autoMixedPrecision_); + } + { + int dataSize = 0; + for (int i = 0; i < optimizers_.size(); i++) { + dataSize += computeStringSizeNoTag(optimizers_.getRaw(i)); + } + size += dataSize; + size += 2 * getOptimizersList().size(); + } + for (int i = 0; i < customOptimizers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(200, customOptimizers_.get(i)); + } + if (interOptimizerVerifierConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(300, getInterOptimizerVerifierConfig()); + } + if (postOptimizationVerifierConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(301, getPostOptimizationVerifierConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.RewriterConfig)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.RewriterConfig other = (org.tensorflow.proto.framework.RewriterConfig) obj; + + if (layoutOptimizer_ != other.layoutOptimizer_) return false; + if (constantFolding_ != other.constantFolding_) return false; + if (shapeOptimization_ != other.shapeOptimization_) return false; + if (remapping_ != other.remapping_) return false; + if (arithmeticOptimization_ != other.arithmeticOptimization_) return false; + if (dependencyOptimization_ != other.dependencyOptimization_) return false; + if (loopOptimization_ != other.loopOptimization_) return false; + if (functionOptimization_ != other.functionOptimization_) return false; + if (debugStripper_ != other.debugStripper_) return false; + if (getDisableModelPruning() + != other.getDisableModelPruning()) return false; + if (scopedAllocatorOptimization_ != other.scopedAllocatorOptimization_) return false; + if (pinToHostOptimization_ != other.pinToHostOptimization_) return false; + if (implementationSelector_ != other.implementationSelector_) return false; + if (autoMixedPrecision_ != other.autoMixedPrecision_) return false; + if (getDisableMetaOptimizer() + != other.getDisableMetaOptimizer()) return false; + if (metaOptimizerIterations_ != other.metaOptimizerIterations_) return false; + if (getMinGraphNodes() + != other.getMinGraphNodes()) return false; + if (memoryOptimization_ != other.memoryOptimization_) return false; + if (!getMemoryOptimizerTargetNodeNameScope() + .equals(other.getMemoryOptimizerTargetNodeNameScope())) return false; + if (getMetaOptimizerTimeoutMs() + != other.getMetaOptimizerTimeoutMs()) return false; + if (hasAutoParallel() != other.hasAutoParallel()) return false; + if (hasAutoParallel()) { + if (!getAutoParallel() + .equals(other.getAutoParallel())) return false; + } + if (getFailOnOptimizerErrors() + != other.getFailOnOptimizerErrors()) return false; + if (hasScopedAllocatorOpts() != other.hasScopedAllocatorOpts()) return false; + if (hasScopedAllocatorOpts()) { + if (!getScopedAllocatorOpts() + .equals(other.getScopedAllocatorOpts())) return false; + } + if (!getOptimizersList() + .equals(other.getOptimizersList())) return false; + if (!getCustomOptimizersList() + .equals(other.getCustomOptimizersList())) return false; + if (hasInterOptimizerVerifierConfig() != other.hasInterOptimizerVerifierConfig()) return false; + if (hasInterOptimizerVerifierConfig()) { + if (!getInterOptimizerVerifierConfig() + .equals(other.getInterOptimizerVerifierConfig())) return false; + } + if (hasPostOptimizationVerifierConfig() != other.hasPostOptimizationVerifierConfig()) return false; + if (hasPostOptimizationVerifierConfig()) { + if (!getPostOptimizationVerifierConfig() + .equals(other.getPostOptimizationVerifierConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LAYOUT_OPTIMIZER_FIELD_NUMBER; + hash = (53 * hash) + layoutOptimizer_; + hash = (37 * hash) + CONSTANT_FOLDING_FIELD_NUMBER; + hash = (53 * hash) + constantFolding_; + hash = (37 * hash) + SHAPE_OPTIMIZATION_FIELD_NUMBER; + hash = (53 * hash) + shapeOptimization_; + hash = (37 * hash) + REMAPPING_FIELD_NUMBER; + hash = (53 * hash) + remapping_; + hash = (37 * hash) + ARITHMETIC_OPTIMIZATION_FIELD_NUMBER; + hash = (53 * hash) + arithmeticOptimization_; + hash = (37 * hash) + DEPENDENCY_OPTIMIZATION_FIELD_NUMBER; + hash = (53 * hash) + dependencyOptimization_; + hash = (37 * hash) + LOOP_OPTIMIZATION_FIELD_NUMBER; + hash = (53 * hash) + loopOptimization_; + hash = (37 * hash) + FUNCTION_OPTIMIZATION_FIELD_NUMBER; + hash = (53 * hash) + functionOptimization_; + hash = (37 * hash) + DEBUG_STRIPPER_FIELD_NUMBER; + hash = (53 * hash) + debugStripper_; + hash = (37 * hash) + DISABLE_MODEL_PRUNING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDisableModelPruning()); + hash = (37 * hash) + SCOPED_ALLOCATOR_OPTIMIZATION_FIELD_NUMBER; + hash = (53 * hash) + scopedAllocatorOptimization_; + hash = (37 * hash) + PIN_TO_HOST_OPTIMIZATION_FIELD_NUMBER; + hash = (53 * hash) + pinToHostOptimization_; + hash = (37 * hash) + IMPLEMENTATION_SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + implementationSelector_; + hash = (37 * hash) + AUTO_MIXED_PRECISION_FIELD_NUMBER; + hash = (53 * hash) + autoMixedPrecision_; + hash = (37 * hash) + DISABLE_META_OPTIMIZER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDisableMetaOptimizer()); + hash = (37 * hash) + META_OPTIMIZER_ITERATIONS_FIELD_NUMBER; + hash = (53 * hash) + metaOptimizerIterations_; + hash = (37 * hash) + MIN_GRAPH_NODES_FIELD_NUMBER; + hash = (53 * hash) + getMinGraphNodes(); + hash = (37 * hash) + MEMORY_OPTIMIZATION_FIELD_NUMBER; + hash = (53 * hash) + memoryOptimization_; + hash = (37 * hash) + MEMORY_OPTIMIZER_TARGET_NODE_NAME_SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getMemoryOptimizerTargetNodeNameScope().hashCode(); + hash = (37 * hash) + META_OPTIMIZER_TIMEOUT_MS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMetaOptimizerTimeoutMs()); + if (hasAutoParallel()) { + hash = (37 * hash) + AUTO_PARALLEL_FIELD_NUMBER; + hash = (53 * hash) + getAutoParallel().hashCode(); + } + hash = (37 * hash) + FAIL_ON_OPTIMIZER_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFailOnOptimizerErrors()); + if (hasScopedAllocatorOpts()) { + hash = (37 * hash) + SCOPED_ALLOCATOR_OPTS_FIELD_NUMBER; + hash = (53 * hash) + getScopedAllocatorOpts().hashCode(); + } + if (getOptimizersCount() > 0) { + hash = (37 * hash) + OPTIMIZERS_FIELD_NUMBER; + hash = (53 * hash) + getOptimizersList().hashCode(); + } + if (getCustomOptimizersCount() > 0) { + hash = (37 * hash) + CUSTOM_OPTIMIZERS_FIELD_NUMBER; + hash = (53 * hash) + getCustomOptimizersList().hashCode(); + } + if (hasInterOptimizerVerifierConfig()) { + hash = (37 * hash) + INTER_OPTIMIZER_VERIFIER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInterOptimizerVerifierConfig().hashCode(); + } + if (hasPostOptimizationVerifierConfig()) { + hash = (37 * hash) + POST_OPTIMIZATION_VERIFIER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPostOptimizationVerifierConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.RewriterConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RewriterConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RewriterConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RewriterConfig 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.proto.framework.RewriterConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RewriterConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RewriterConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RewriterConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RewriterConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RewriterConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RewriterConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RewriterConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.RewriterConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Graph rewriting is experimental and subject to change, not covered by any
+   * API stability guarantees.
+   * 
+ * + * Protobuf type {@code tensorflow.RewriterConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.RewriterConfig) + org.tensorflow.proto.framework.RewriterConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RewriterConfig.class, org.tensorflow.proto.framework.RewriterConfig.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.RewriterConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCustomOptimizersFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + layoutOptimizer_ = 0; + + constantFolding_ = 0; + + shapeOptimization_ = 0; + + remapping_ = 0; + + arithmeticOptimization_ = 0; + + dependencyOptimization_ = 0; + + loopOptimization_ = 0; + + functionOptimization_ = 0; + + debugStripper_ = 0; + + disableModelPruning_ = false; + + scopedAllocatorOptimization_ = 0; + + pinToHostOptimization_ = 0; + + implementationSelector_ = 0; + + autoMixedPrecision_ = 0; + + disableMetaOptimizer_ = false; + + metaOptimizerIterations_ = 0; + + minGraphNodes_ = 0; + + memoryOptimization_ = 0; + + memoryOptimizerTargetNodeNameScope_ = ""; + + metaOptimizerTimeoutMs_ = 0L; + + if (autoParallelBuilder_ == null) { + autoParallel_ = null; + } else { + autoParallel_ = null; + autoParallelBuilder_ = null; + } + failOnOptimizerErrors_ = false; + + if (scopedAllocatorOptsBuilder_ == null) { + scopedAllocatorOpts_ = null; + } else { + scopedAllocatorOpts_ = null; + scopedAllocatorOptsBuilder_ = null; + } + optimizers_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (customOptimizersBuilder_ == null) { + customOptimizers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + customOptimizersBuilder_.clear(); + } + if (interOptimizerVerifierConfigBuilder_ == null) { + interOptimizerVerifierConfig_ = null; + } else { + interOptimizerVerifierConfig_ = null; + interOptimizerVerifierConfigBuilder_ = null; + } + if (postOptimizationVerifierConfigBuilder_ == null) { + postOptimizationVerifierConfig_ = null; + } else { + postOptimizationVerifierConfig_ = null; + postOptimizationVerifierConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RewriterConfig getDefaultInstanceForType() { + return org.tensorflow.proto.framework.RewriterConfig.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.RewriterConfig build() { + org.tensorflow.proto.framework.RewriterConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RewriterConfig buildPartial() { + org.tensorflow.proto.framework.RewriterConfig result = new org.tensorflow.proto.framework.RewriterConfig(this); + int from_bitField0_ = bitField0_; + result.layoutOptimizer_ = layoutOptimizer_; + result.constantFolding_ = constantFolding_; + result.shapeOptimization_ = shapeOptimization_; + result.remapping_ = remapping_; + result.arithmeticOptimization_ = arithmeticOptimization_; + result.dependencyOptimization_ = dependencyOptimization_; + result.loopOptimization_ = loopOptimization_; + result.functionOptimization_ = functionOptimization_; + result.debugStripper_ = debugStripper_; + result.disableModelPruning_ = disableModelPruning_; + result.scopedAllocatorOptimization_ = scopedAllocatorOptimization_; + result.pinToHostOptimization_ = pinToHostOptimization_; + result.implementationSelector_ = implementationSelector_; + result.autoMixedPrecision_ = autoMixedPrecision_; + result.disableMetaOptimizer_ = disableMetaOptimizer_; + result.metaOptimizerIterations_ = metaOptimizerIterations_; + result.minGraphNodes_ = minGraphNodes_; + result.memoryOptimization_ = memoryOptimization_; + result.memoryOptimizerTargetNodeNameScope_ = memoryOptimizerTargetNodeNameScope_; + result.metaOptimizerTimeoutMs_ = metaOptimizerTimeoutMs_; + if (autoParallelBuilder_ == null) { + result.autoParallel_ = autoParallel_; + } else { + result.autoParallel_ = autoParallelBuilder_.build(); + } + result.failOnOptimizerErrors_ = failOnOptimizerErrors_; + if (scopedAllocatorOptsBuilder_ == null) { + result.scopedAllocatorOpts_ = scopedAllocatorOpts_; + } else { + result.scopedAllocatorOpts_ = scopedAllocatorOptsBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + optimizers_ = optimizers_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.optimizers_ = optimizers_; + if (customOptimizersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + customOptimizers_ = java.util.Collections.unmodifiableList(customOptimizers_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.customOptimizers_ = customOptimizers_; + } else { + result.customOptimizers_ = customOptimizersBuilder_.build(); + } + if (interOptimizerVerifierConfigBuilder_ == null) { + result.interOptimizerVerifierConfig_ = interOptimizerVerifierConfig_; + } else { + result.interOptimizerVerifierConfig_ = interOptimizerVerifierConfigBuilder_.build(); + } + if (postOptimizationVerifierConfigBuilder_ == null) { + result.postOptimizationVerifierConfig_ = postOptimizationVerifierConfig_; + } else { + result.postOptimizationVerifierConfig_ = postOptimizationVerifierConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.RewriterConfig) { + return mergeFrom((org.tensorflow.proto.framework.RewriterConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.RewriterConfig other) { + if (other == org.tensorflow.proto.framework.RewriterConfig.getDefaultInstance()) return this; + if (other.layoutOptimizer_ != 0) { + setLayoutOptimizerValue(other.getLayoutOptimizerValue()); + } + if (other.constantFolding_ != 0) { + setConstantFoldingValue(other.getConstantFoldingValue()); + } + if (other.shapeOptimization_ != 0) { + setShapeOptimizationValue(other.getShapeOptimizationValue()); + } + if (other.remapping_ != 0) { + setRemappingValue(other.getRemappingValue()); + } + if (other.arithmeticOptimization_ != 0) { + setArithmeticOptimizationValue(other.getArithmeticOptimizationValue()); + } + if (other.dependencyOptimization_ != 0) { + setDependencyOptimizationValue(other.getDependencyOptimizationValue()); + } + if (other.loopOptimization_ != 0) { + setLoopOptimizationValue(other.getLoopOptimizationValue()); + } + if (other.functionOptimization_ != 0) { + setFunctionOptimizationValue(other.getFunctionOptimizationValue()); + } + if (other.debugStripper_ != 0) { + setDebugStripperValue(other.getDebugStripperValue()); + } + if (other.getDisableModelPruning() != false) { + setDisableModelPruning(other.getDisableModelPruning()); + } + if (other.scopedAllocatorOptimization_ != 0) { + setScopedAllocatorOptimizationValue(other.getScopedAllocatorOptimizationValue()); + } + if (other.pinToHostOptimization_ != 0) { + setPinToHostOptimizationValue(other.getPinToHostOptimizationValue()); + } + if (other.implementationSelector_ != 0) { + setImplementationSelectorValue(other.getImplementationSelectorValue()); + } + if (other.autoMixedPrecision_ != 0) { + setAutoMixedPrecisionValue(other.getAutoMixedPrecisionValue()); + } + if (other.getDisableMetaOptimizer() != false) { + setDisableMetaOptimizer(other.getDisableMetaOptimizer()); + } + if (other.metaOptimizerIterations_ != 0) { + setMetaOptimizerIterationsValue(other.getMetaOptimizerIterationsValue()); + } + if (other.getMinGraphNodes() != 0) { + setMinGraphNodes(other.getMinGraphNodes()); + } + if (other.memoryOptimization_ != 0) { + setMemoryOptimizationValue(other.getMemoryOptimizationValue()); + } + if (!other.getMemoryOptimizerTargetNodeNameScope().isEmpty()) { + memoryOptimizerTargetNodeNameScope_ = other.memoryOptimizerTargetNodeNameScope_; + onChanged(); + } + if (other.getMetaOptimizerTimeoutMs() != 0L) { + setMetaOptimizerTimeoutMs(other.getMetaOptimizerTimeoutMs()); + } + if (other.hasAutoParallel()) { + mergeAutoParallel(other.getAutoParallel()); + } + if (other.getFailOnOptimizerErrors() != false) { + setFailOnOptimizerErrors(other.getFailOnOptimizerErrors()); + } + if (other.hasScopedAllocatorOpts()) { + mergeScopedAllocatorOpts(other.getScopedAllocatorOpts()); + } + if (!other.optimizers_.isEmpty()) { + if (optimizers_.isEmpty()) { + optimizers_ = other.optimizers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOptimizersIsMutable(); + optimizers_.addAll(other.optimizers_); + } + onChanged(); + } + if (customOptimizersBuilder_ == null) { + if (!other.customOptimizers_.isEmpty()) { + if (customOptimizers_.isEmpty()) { + customOptimizers_ = other.customOptimizers_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCustomOptimizersIsMutable(); + customOptimizers_.addAll(other.customOptimizers_); + } + onChanged(); + } + } else { + if (!other.customOptimizers_.isEmpty()) { + if (customOptimizersBuilder_.isEmpty()) { + customOptimizersBuilder_.dispose(); + customOptimizersBuilder_ = null; + customOptimizers_ = other.customOptimizers_; + bitField0_ = (bitField0_ & ~0x00000002); + customOptimizersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCustomOptimizersFieldBuilder() : null; + } else { + customOptimizersBuilder_.addAllMessages(other.customOptimizers_); + } + } + } + if (other.hasInterOptimizerVerifierConfig()) { + mergeInterOptimizerVerifierConfig(other.getInterOptimizerVerifierConfig()); + } + if (other.hasPostOptimizationVerifierConfig()) { + mergePostOptimizationVerifierConfig(other.getPostOptimizationVerifierConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.RewriterConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.RewriterConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int layoutOptimizer_ = 0; + /** + *
+     * Optimize tensor layouts (default is ON)
+     * e.g. This will try to use NCHW layout on GPU which is faster.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle layout_optimizer = 1; + */ + public int getLayoutOptimizerValue() { + return layoutOptimizer_; + } + /** + *
+     * Optimize tensor layouts (default is ON)
+     * e.g. This will try to use NCHW layout on GPU which is faster.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle layout_optimizer = 1; + */ + public Builder setLayoutOptimizerValue(int value) { + layoutOptimizer_ = value; + onChanged(); + return this; + } + /** + *
+     * Optimize tensor layouts (default is ON)
+     * e.g. This will try to use NCHW layout on GPU which is faster.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle layout_optimizer = 1; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getLayoutOptimizer() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(layoutOptimizer_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + /** + *
+     * Optimize tensor layouts (default is ON)
+     * e.g. This will try to use NCHW layout on GPU which is faster.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle layout_optimizer = 1; + */ + public Builder setLayoutOptimizer(org.tensorflow.proto.framework.RewriterConfig.Toggle value) { + if (value == null) { + throw new NullPointerException(); + } + + layoutOptimizer_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Optimize tensor layouts (default is ON)
+     * e.g. This will try to use NCHW layout on GPU which is faster.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle layout_optimizer = 1; + */ + public Builder clearLayoutOptimizer() { + + layoutOptimizer_ = 0; + onChanged(); + return this; + } + + private int constantFolding_ = 0; + /** + *
+     * Fold constants (default is ON)
+     * Statically infer the value of tensors when possible, and materialize the
+     * result using constants.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle constant_folding = 3; + */ + public int getConstantFoldingValue() { + return constantFolding_; + } + /** + *
+     * Fold constants (default is ON)
+     * Statically infer the value of tensors when possible, and materialize the
+     * result using constants.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle constant_folding = 3; + */ + public Builder setConstantFoldingValue(int value) { + constantFolding_ = value; + onChanged(); + return this; + } + /** + *
+     * Fold constants (default is ON)
+     * Statically infer the value of tensors when possible, and materialize the
+     * result using constants.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle constant_folding = 3; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getConstantFolding() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(constantFolding_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + /** + *
+     * Fold constants (default is ON)
+     * Statically infer the value of tensors when possible, and materialize the
+     * result using constants.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle constant_folding = 3; + */ + public Builder setConstantFolding(org.tensorflow.proto.framework.RewriterConfig.Toggle value) { + if (value == null) { + throw new NullPointerException(); + } + + constantFolding_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Fold constants (default is ON)
+     * Statically infer the value of tensors when possible, and materialize the
+     * result using constants.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle constant_folding = 3; + */ + public Builder clearConstantFolding() { + + constantFolding_ = 0; + onChanged(); + return this; + } + + private int shapeOptimization_ = 0; + /** + *
+     * Shape optimizations (default is ON)
+     * Simplify computations made on shapes.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle shape_optimization = 13; + */ + public int getShapeOptimizationValue() { + return shapeOptimization_; + } + /** + *
+     * Shape optimizations (default is ON)
+     * Simplify computations made on shapes.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle shape_optimization = 13; + */ + public Builder setShapeOptimizationValue(int value) { + shapeOptimization_ = value; + onChanged(); + return this; + } + /** + *
+     * Shape optimizations (default is ON)
+     * Simplify computations made on shapes.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle shape_optimization = 13; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getShapeOptimization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(shapeOptimization_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + /** + *
+     * Shape optimizations (default is ON)
+     * Simplify computations made on shapes.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle shape_optimization = 13; + */ + public Builder setShapeOptimization(org.tensorflow.proto.framework.RewriterConfig.Toggle value) { + if (value == null) { + throw new NullPointerException(); + } + + shapeOptimization_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Shape optimizations (default is ON)
+     * Simplify computations made on shapes.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle shape_optimization = 13; + */ + public Builder clearShapeOptimization() { + + shapeOptimization_ = 0; + onChanged(); + return this; + } + + private int remapping_ = 0; + /** + *
+     * Remapping (default is ON)
+     * Remap subgraphs onto more efficient implementations.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle remapping = 14; + */ + public int getRemappingValue() { + return remapping_; + } + /** + *
+     * Remapping (default is ON)
+     * Remap subgraphs onto more efficient implementations.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle remapping = 14; + */ + public Builder setRemappingValue(int value) { + remapping_ = value; + onChanged(); + return this; + } + /** + *
+     * Remapping (default is ON)
+     * Remap subgraphs onto more efficient implementations.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle remapping = 14; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getRemapping() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(remapping_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + /** + *
+     * Remapping (default is ON)
+     * Remap subgraphs onto more efficient implementations.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle remapping = 14; + */ + public Builder setRemapping(org.tensorflow.proto.framework.RewriterConfig.Toggle value) { + if (value == null) { + throw new NullPointerException(); + } + + remapping_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Remapping (default is ON)
+     * Remap subgraphs onto more efficient implementations.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle remapping = 14; + */ + public Builder clearRemapping() { + + remapping_ = 0; + onChanged(); + return this; + } + + private int arithmeticOptimization_ = 0; + /** + *
+     * Arithmetic optimizations (default is ON)
+     * e.g. Simplify arithmetic ops; merge ops with same value (like constants).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle arithmetic_optimization = 7; + */ + public int getArithmeticOptimizationValue() { + return arithmeticOptimization_; + } + /** + *
+     * Arithmetic optimizations (default is ON)
+     * e.g. Simplify arithmetic ops; merge ops with same value (like constants).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle arithmetic_optimization = 7; + */ + public Builder setArithmeticOptimizationValue(int value) { + arithmeticOptimization_ = value; + onChanged(); + return this; + } + /** + *
+     * Arithmetic optimizations (default is ON)
+     * e.g. Simplify arithmetic ops; merge ops with same value (like constants).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle arithmetic_optimization = 7; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getArithmeticOptimization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(arithmeticOptimization_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + /** + *
+     * Arithmetic optimizations (default is ON)
+     * e.g. Simplify arithmetic ops; merge ops with same value (like constants).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle arithmetic_optimization = 7; + */ + public Builder setArithmeticOptimization(org.tensorflow.proto.framework.RewriterConfig.Toggle value) { + if (value == null) { + throw new NullPointerException(); + } + + arithmeticOptimization_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Arithmetic optimizations (default is ON)
+     * e.g. Simplify arithmetic ops; merge ops with same value (like constants).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle arithmetic_optimization = 7; + */ + public Builder clearArithmeticOptimization() { + + arithmeticOptimization_ = 0; + onChanged(); + return this; + } + + private int dependencyOptimization_ = 0; + /** + *
+     * Control dependency optimizations (default is ON).
+     * Remove redundant control dependencies, which may enable other optimization.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle dependency_optimization = 8; + */ + public int getDependencyOptimizationValue() { + return dependencyOptimization_; + } + /** + *
+     * Control dependency optimizations (default is ON).
+     * Remove redundant control dependencies, which may enable other optimization.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle dependency_optimization = 8; + */ + public Builder setDependencyOptimizationValue(int value) { + dependencyOptimization_ = value; + onChanged(); + return this; + } + /** + *
+     * Control dependency optimizations (default is ON).
+     * Remove redundant control dependencies, which may enable other optimization.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle dependency_optimization = 8; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getDependencyOptimization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(dependencyOptimization_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + /** + *
+     * Control dependency optimizations (default is ON).
+     * Remove redundant control dependencies, which may enable other optimization.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle dependency_optimization = 8; + */ + public Builder setDependencyOptimization(org.tensorflow.proto.framework.RewriterConfig.Toggle value) { + if (value == null) { + throw new NullPointerException(); + } + + dependencyOptimization_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Control dependency optimizations (default is ON).
+     * Remove redundant control dependencies, which may enable other optimization.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle dependency_optimization = 8; + */ + public Builder clearDependencyOptimization() { + + dependencyOptimization_ = 0; + onChanged(); + return this; + } + + private int loopOptimization_ = 0; + /** + *
+     * Loop optimizations (default is ON).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle loop_optimization = 9; + */ + public int getLoopOptimizationValue() { + return loopOptimization_; + } + /** + *
+     * Loop optimizations (default is ON).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle loop_optimization = 9; + */ + public Builder setLoopOptimizationValue(int value) { + loopOptimization_ = value; + onChanged(); + return this; + } + /** + *
+     * Loop optimizations (default is ON).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle loop_optimization = 9; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getLoopOptimization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(loopOptimization_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + /** + *
+     * Loop optimizations (default is ON).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle loop_optimization = 9; + */ + public Builder setLoopOptimization(org.tensorflow.proto.framework.RewriterConfig.Toggle value) { + if (value == null) { + throw new NullPointerException(); + } + + loopOptimization_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Loop optimizations (default is ON).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle loop_optimization = 9; + */ + public Builder clearLoopOptimization() { + + loopOptimization_ = 0; + onChanged(); + return this; + } + + private int functionOptimization_ = 0; + /** + *
+     * Function optimizations (default is ON).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle function_optimization = 10; + */ + public int getFunctionOptimizationValue() { + return functionOptimization_; + } + /** + *
+     * Function optimizations (default is ON).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle function_optimization = 10; + */ + public Builder setFunctionOptimizationValue(int value) { + functionOptimization_ = value; + onChanged(); + return this; + } + /** + *
+     * Function optimizations (default is ON).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle function_optimization = 10; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getFunctionOptimization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(functionOptimization_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + /** + *
+     * Function optimizations (default is ON).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle function_optimization = 10; + */ + public Builder setFunctionOptimization(org.tensorflow.proto.framework.RewriterConfig.Toggle value) { + if (value == null) { + throw new NullPointerException(); + } + + functionOptimization_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Function optimizations (default is ON).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle function_optimization = 10; + */ + public Builder clearFunctionOptimization() { + + functionOptimization_ = 0; + onChanged(); + return this; + } + + private int debugStripper_ = 0; + /** + *
+     * Strips debug-related nodes from the graph (off by default).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle debug_stripper = 11; + */ + public int getDebugStripperValue() { + return debugStripper_; + } + /** + *
+     * Strips debug-related nodes from the graph (off by default).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle debug_stripper = 11; + */ + public Builder setDebugStripperValue(int value) { + debugStripper_ = value; + onChanged(); + return this; + } + /** + *
+     * Strips debug-related nodes from the graph (off by default).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle debug_stripper = 11; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getDebugStripper() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(debugStripper_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + /** + *
+     * Strips debug-related nodes from the graph (off by default).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle debug_stripper = 11; + */ + public Builder setDebugStripper(org.tensorflow.proto.framework.RewriterConfig.Toggle value) { + if (value == null) { + throw new NullPointerException(); + } + + debugStripper_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Strips debug-related nodes from the graph (off by default).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle debug_stripper = 11; + */ + public Builder clearDebugStripper() { + + debugStripper_ = 0; + onChanged(); + return this; + } + + private boolean disableModelPruning_ ; + /** + *
+     * If true, don't remove unnecessary ops from the graph
+     * 
+ * + * bool disable_model_pruning = 2; + */ + public boolean getDisableModelPruning() { + return disableModelPruning_; + } + /** + *
+     * If true, don't remove unnecessary ops from the graph
+     * 
+ * + * bool disable_model_pruning = 2; + */ + public Builder setDisableModelPruning(boolean value) { + + disableModelPruning_ = value; + onChanged(); + return this; + } + /** + *
+     * If true, don't remove unnecessary ops from the graph
+     * 
+ * + * bool disable_model_pruning = 2; + */ + public Builder clearDisableModelPruning() { + + disableModelPruning_ = false; + onChanged(); + return this; + } + + private int scopedAllocatorOptimization_ = 0; + /** + *
+     * Try to allocate some independent Op outputs contiguously in order to
+     * merge or eliminate downstream Ops (off by default).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle scoped_allocator_optimization = 15; + */ + public int getScopedAllocatorOptimizationValue() { + return scopedAllocatorOptimization_; + } + /** + *
+     * Try to allocate some independent Op outputs contiguously in order to
+     * merge or eliminate downstream Ops (off by default).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle scoped_allocator_optimization = 15; + */ + public Builder setScopedAllocatorOptimizationValue(int value) { + scopedAllocatorOptimization_ = value; + onChanged(); + return this; + } + /** + *
+     * Try to allocate some independent Op outputs contiguously in order to
+     * merge or eliminate downstream Ops (off by default).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle scoped_allocator_optimization = 15; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getScopedAllocatorOptimization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(scopedAllocatorOptimization_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + /** + *
+     * Try to allocate some independent Op outputs contiguously in order to
+     * merge or eliminate downstream Ops (off by default).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle scoped_allocator_optimization = 15; + */ + public Builder setScopedAllocatorOptimization(org.tensorflow.proto.framework.RewriterConfig.Toggle value) { + if (value == null) { + throw new NullPointerException(); + } + + scopedAllocatorOptimization_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Try to allocate some independent Op outputs contiguously in order to
+     * merge or eliminate downstream Ops (off by default).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle scoped_allocator_optimization = 15; + */ + public Builder clearScopedAllocatorOptimization() { + + scopedAllocatorOptimization_ = 0; + onChanged(); + return this; + } + + private int pinToHostOptimization_ = 0; + /** + *
+     * Force small ops onto the CPU (default is OFF).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle pin_to_host_optimization = 18; + */ + public int getPinToHostOptimizationValue() { + return pinToHostOptimization_; + } + /** + *
+     * Force small ops onto the CPU (default is OFF).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle pin_to_host_optimization = 18; + */ + public Builder setPinToHostOptimizationValue(int value) { + pinToHostOptimization_ = value; + onChanged(); + return this; + } + /** + *
+     * Force small ops onto the CPU (default is OFF).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle pin_to_host_optimization = 18; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getPinToHostOptimization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(pinToHostOptimization_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + /** + *
+     * Force small ops onto the CPU (default is OFF).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle pin_to_host_optimization = 18; + */ + public Builder setPinToHostOptimization(org.tensorflow.proto.framework.RewriterConfig.Toggle value) { + if (value == null) { + throw new NullPointerException(); + } + + pinToHostOptimization_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Force small ops onto the CPU (default is OFF).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle pin_to_host_optimization = 18; + */ + public Builder clearPinToHostOptimization() { + + pinToHostOptimization_ = 0; + onChanged(); + return this; + } + + private int implementationSelector_ = 0; + /** + *
+     * Enable the swap of kernel implementations based on the device placement
+     * (default is ON).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle implementation_selector = 22; + */ + public int getImplementationSelectorValue() { + return implementationSelector_; + } + /** + *
+     * Enable the swap of kernel implementations based on the device placement
+     * (default is ON).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle implementation_selector = 22; + */ + public Builder setImplementationSelectorValue(int value) { + implementationSelector_ = value; + onChanged(); + return this; + } + /** + *
+     * Enable the swap of kernel implementations based on the device placement
+     * (default is ON).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle implementation_selector = 22; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getImplementationSelector() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(implementationSelector_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + /** + *
+     * Enable the swap of kernel implementations based on the device placement
+     * (default is ON).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle implementation_selector = 22; + */ + public Builder setImplementationSelector(org.tensorflow.proto.framework.RewriterConfig.Toggle value) { + if (value == null) { + throw new NullPointerException(); + } + + implementationSelector_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Enable the swap of kernel implementations based on the device placement
+     * (default is ON).
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle implementation_selector = 22; + */ + public Builder clearImplementationSelector() { + + implementationSelector_ = 0; + onChanged(); + return this; + } + + private int autoMixedPrecision_ = 0; + /** + *
+     * Optimize data types (default is OFF).
+     * e.g., This will try to use float16 on GPU which is faster.
+     * Note that this can change the numerical stability of the graph and may
+     * require the use of loss scaling to maintain model convergence.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle auto_mixed_precision = 23; + */ + public int getAutoMixedPrecisionValue() { + return autoMixedPrecision_; + } + /** + *
+     * Optimize data types (default is OFF).
+     * e.g., This will try to use float16 on GPU which is faster.
+     * Note that this can change the numerical stability of the graph and may
+     * require the use of loss scaling to maintain model convergence.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle auto_mixed_precision = 23; + */ + public Builder setAutoMixedPrecisionValue(int value) { + autoMixedPrecision_ = value; + onChanged(); + return this; + } + /** + *
+     * Optimize data types (default is OFF).
+     * e.g., This will try to use float16 on GPU which is faster.
+     * Note that this can change the numerical stability of the graph and may
+     * require the use of loss scaling to maintain model convergence.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle auto_mixed_precision = 23; + */ + public org.tensorflow.proto.framework.RewriterConfig.Toggle getAutoMixedPrecision() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.Toggle result = org.tensorflow.proto.framework.RewriterConfig.Toggle.valueOf(autoMixedPrecision_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.Toggle.UNRECOGNIZED : result; + } + /** + *
+     * Optimize data types (default is OFF).
+     * e.g., This will try to use float16 on GPU which is faster.
+     * Note that this can change the numerical stability of the graph and may
+     * require the use of loss scaling to maintain model convergence.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle auto_mixed_precision = 23; + */ + public Builder setAutoMixedPrecision(org.tensorflow.proto.framework.RewriterConfig.Toggle value) { + if (value == null) { + throw new NullPointerException(); + } + + autoMixedPrecision_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Optimize data types (default is OFF).
+     * e.g., This will try to use float16 on GPU which is faster.
+     * Note that this can change the numerical stability of the graph and may
+     * require the use of loss scaling to maintain model convergence.
+     * 
+ * + * .tensorflow.RewriterConfig.Toggle auto_mixed_precision = 23; + */ + public Builder clearAutoMixedPrecision() { + + autoMixedPrecision_ = 0; + onChanged(); + return this; + } + + private boolean disableMetaOptimizer_ ; + /** + *
+     * Disable the entire meta optimizer (off by default).
+     * 
+ * + * bool disable_meta_optimizer = 19; + */ + public boolean getDisableMetaOptimizer() { + return disableMetaOptimizer_; + } + /** + *
+     * Disable the entire meta optimizer (off by default).
+     * 
+ * + * bool disable_meta_optimizer = 19; + */ + public Builder setDisableMetaOptimizer(boolean value) { + + disableMetaOptimizer_ = value; + onChanged(); + return this; + } + /** + *
+     * Disable the entire meta optimizer (off by default).
+     * 
+ * + * bool disable_meta_optimizer = 19; + */ + public Builder clearDisableMetaOptimizer() { + + disableMetaOptimizer_ = false; + onChanged(); + return this; + } + + private int metaOptimizerIterations_ = 0; + /** + *
+     * Controls how many times we run the optimizers in meta optimizer (default
+     * is once).
+     * 
+ * + * .tensorflow.RewriterConfig.NumIterationsType meta_optimizer_iterations = 12; + */ + public int getMetaOptimizerIterationsValue() { + return metaOptimizerIterations_; + } + /** + *
+     * Controls how many times we run the optimizers in meta optimizer (default
+     * is once).
+     * 
+ * + * .tensorflow.RewriterConfig.NumIterationsType meta_optimizer_iterations = 12; + */ + public Builder setMetaOptimizerIterationsValue(int value) { + metaOptimizerIterations_ = value; + onChanged(); + return this; + } + /** + *
+     * Controls how many times we run the optimizers in meta optimizer (default
+     * is once).
+     * 
+ * + * .tensorflow.RewriterConfig.NumIterationsType meta_optimizer_iterations = 12; + */ + public org.tensorflow.proto.framework.RewriterConfig.NumIterationsType getMetaOptimizerIterations() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.NumIterationsType result = org.tensorflow.proto.framework.RewriterConfig.NumIterationsType.valueOf(metaOptimizerIterations_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.NumIterationsType.UNRECOGNIZED : result; + } + /** + *
+     * Controls how many times we run the optimizers in meta optimizer (default
+     * is once).
+     * 
+ * + * .tensorflow.RewriterConfig.NumIterationsType meta_optimizer_iterations = 12; + */ + public Builder setMetaOptimizerIterations(org.tensorflow.proto.framework.RewriterConfig.NumIterationsType value) { + if (value == null) { + throw new NullPointerException(); + } + + metaOptimizerIterations_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Controls how many times we run the optimizers in meta optimizer (default
+     * is once).
+     * 
+ * + * .tensorflow.RewriterConfig.NumIterationsType meta_optimizer_iterations = 12; + */ + public Builder clearMetaOptimizerIterations() { + + metaOptimizerIterations_ = 0; + onChanged(); + return this; + } + + private int minGraphNodes_ ; + /** + *
+     * The minimum number of nodes in a graph to optimizer. For smaller graphs,
+     * optimization is skipped.
+     * 0 means the system picks an appropriate number.
+     * < 0 means do not skip optimization.
+     * 
+ * + * int32 min_graph_nodes = 17; + */ + public int getMinGraphNodes() { + return minGraphNodes_; + } + /** + *
+     * The minimum number of nodes in a graph to optimizer. For smaller graphs,
+     * optimization is skipped.
+     * 0 means the system picks an appropriate number.
+     * < 0 means do not skip optimization.
+     * 
+ * + * int32 min_graph_nodes = 17; + */ + public Builder setMinGraphNodes(int value) { + + minGraphNodes_ = value; + onChanged(); + return this; + } + /** + *
+     * The minimum number of nodes in a graph to optimizer. For smaller graphs,
+     * optimization is skipped.
+     * 0 means the system picks an appropriate number.
+     * < 0 means do not skip optimization.
+     * 
+ * + * int32 min_graph_nodes = 17; + */ + public Builder clearMinGraphNodes() { + + minGraphNodes_ = 0; + onChanged(); + return this; + } + + private int memoryOptimization_ = 0; + /** + *
+     * Configures memory optimization passes through the meta-optimizer. Has no
+     * effect on manually requested memory optimization passes in the optimizers
+     * field.
+     * 
+ * + * .tensorflow.RewriterConfig.MemOptType memory_optimization = 4; + */ + public int getMemoryOptimizationValue() { + return memoryOptimization_; + } + /** + *
+     * Configures memory optimization passes through the meta-optimizer. Has no
+     * effect on manually requested memory optimization passes in the optimizers
+     * field.
+     * 
+ * + * .tensorflow.RewriterConfig.MemOptType memory_optimization = 4; + */ + public Builder setMemoryOptimizationValue(int value) { + memoryOptimization_ = value; + onChanged(); + return this; + } + /** + *
+     * Configures memory optimization passes through the meta-optimizer. Has no
+     * effect on manually requested memory optimization passes in the optimizers
+     * field.
+     * 
+ * + * .tensorflow.RewriterConfig.MemOptType memory_optimization = 4; + */ + public org.tensorflow.proto.framework.RewriterConfig.MemOptType getMemoryOptimization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RewriterConfig.MemOptType result = org.tensorflow.proto.framework.RewriterConfig.MemOptType.valueOf(memoryOptimization_); + return result == null ? org.tensorflow.proto.framework.RewriterConfig.MemOptType.UNRECOGNIZED : result; + } + /** + *
+     * Configures memory optimization passes through the meta-optimizer. Has no
+     * effect on manually requested memory optimization passes in the optimizers
+     * field.
+     * 
+ * + * .tensorflow.RewriterConfig.MemOptType memory_optimization = 4; + */ + public Builder setMemoryOptimization(org.tensorflow.proto.framework.RewriterConfig.MemOptType value) { + if (value == null) { + throw new NullPointerException(); + } + + memoryOptimization_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Configures memory optimization passes through the meta-optimizer. Has no
+     * effect on manually requested memory optimization passes in the optimizers
+     * field.
+     * 
+ * + * .tensorflow.RewriterConfig.MemOptType memory_optimization = 4; + */ + public Builder clearMemoryOptimization() { + + memoryOptimization_ = 0; + onChanged(); + return this; + } + + private java.lang.Object memoryOptimizerTargetNodeNameScope_ = ""; + /** + *
+     * A node name scope for node names which are valid outputs of recomputations.
+     * Inputs to nodes that match this scope may be recomputed (subject either to
+     * manual annotation of those input nodes or to manual annotation and
+     * heuristics depending on memory_optimization), but the nodes themselves will
+     * not be recomputed. This matches any sub-scopes as well, meaning the scope
+     * can appear not just as a top-level scope. For example, if the value is
+     * "gradients/", the default, it will match node name "gradients/foo",
+     * "foo/gradients/bar", but not "foo_gradients/"
+     * 
+ * + * string memory_optimizer_target_node_name_scope = 6; + */ + public java.lang.String getMemoryOptimizerTargetNodeNameScope() { + java.lang.Object ref = memoryOptimizerTargetNodeNameScope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memoryOptimizerTargetNodeNameScope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A node name scope for node names which are valid outputs of recomputations.
+     * Inputs to nodes that match this scope may be recomputed (subject either to
+     * manual annotation of those input nodes or to manual annotation and
+     * heuristics depending on memory_optimization), but the nodes themselves will
+     * not be recomputed. This matches any sub-scopes as well, meaning the scope
+     * can appear not just as a top-level scope. For example, if the value is
+     * "gradients/", the default, it will match node name "gradients/foo",
+     * "foo/gradients/bar", but not "foo_gradients/"
+     * 
+ * + * string memory_optimizer_target_node_name_scope = 6; + */ + public com.google.protobuf.ByteString + getMemoryOptimizerTargetNodeNameScopeBytes() { + java.lang.Object ref = memoryOptimizerTargetNodeNameScope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memoryOptimizerTargetNodeNameScope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A node name scope for node names which are valid outputs of recomputations.
+     * Inputs to nodes that match this scope may be recomputed (subject either to
+     * manual annotation of those input nodes or to manual annotation and
+     * heuristics depending on memory_optimization), but the nodes themselves will
+     * not be recomputed. This matches any sub-scopes as well, meaning the scope
+     * can appear not just as a top-level scope. For example, if the value is
+     * "gradients/", the default, it will match node name "gradients/foo",
+     * "foo/gradients/bar", but not "foo_gradients/"
+     * 
+ * + * string memory_optimizer_target_node_name_scope = 6; + */ + public Builder setMemoryOptimizerTargetNodeNameScope( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + memoryOptimizerTargetNodeNameScope_ = value; + onChanged(); + return this; + } + /** + *
+     * A node name scope for node names which are valid outputs of recomputations.
+     * Inputs to nodes that match this scope may be recomputed (subject either to
+     * manual annotation of those input nodes or to manual annotation and
+     * heuristics depending on memory_optimization), but the nodes themselves will
+     * not be recomputed. This matches any sub-scopes as well, meaning the scope
+     * can appear not just as a top-level scope. For example, if the value is
+     * "gradients/", the default, it will match node name "gradients/foo",
+     * "foo/gradients/bar", but not "foo_gradients/"
+     * 
+ * + * string memory_optimizer_target_node_name_scope = 6; + */ + public Builder clearMemoryOptimizerTargetNodeNameScope() { + + memoryOptimizerTargetNodeNameScope_ = getDefaultInstance().getMemoryOptimizerTargetNodeNameScope(); + onChanged(); + return this; + } + /** + *
+     * A node name scope for node names which are valid outputs of recomputations.
+     * Inputs to nodes that match this scope may be recomputed (subject either to
+     * manual annotation of those input nodes or to manual annotation and
+     * heuristics depending on memory_optimization), but the nodes themselves will
+     * not be recomputed. This matches any sub-scopes as well, meaning the scope
+     * can appear not just as a top-level scope. For example, if the value is
+     * "gradients/", the default, it will match node name "gradients/foo",
+     * "foo/gradients/bar", but not "foo_gradients/"
+     * 
+ * + * string memory_optimizer_target_node_name_scope = 6; + */ + public Builder setMemoryOptimizerTargetNodeNameScopeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + memoryOptimizerTargetNodeNameScope_ = value; + onChanged(); + return this; + } + + private long metaOptimizerTimeoutMs_ ; + /** + *
+     * Maximum number of milliseconds to spend optimizing a single graph before
+     * timing out. If equal to 0 the system picks a default (currently 5 minutes).
+     * If less than 0 the optimizer will never time out.
+     * 
+ * + * int64 meta_optimizer_timeout_ms = 20; + */ + public long getMetaOptimizerTimeoutMs() { + return metaOptimizerTimeoutMs_; + } + /** + *
+     * Maximum number of milliseconds to spend optimizing a single graph before
+     * timing out. If equal to 0 the system picks a default (currently 5 minutes).
+     * If less than 0 the optimizer will never time out.
+     * 
+ * + * int64 meta_optimizer_timeout_ms = 20; + */ + public Builder setMetaOptimizerTimeoutMs(long value) { + + metaOptimizerTimeoutMs_ = value; + onChanged(); + return this; + } + /** + *
+     * Maximum number of milliseconds to spend optimizing a single graph before
+     * timing out. If equal to 0 the system picks a default (currently 5 minutes).
+     * If less than 0 the optimizer will never time out.
+     * 
+ * + * int64 meta_optimizer_timeout_ms = 20; + */ + public Builder clearMetaOptimizerTimeoutMs() { + + metaOptimizerTimeoutMs_ = 0L; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.AutoParallelOptions autoParallel_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AutoParallelOptions, org.tensorflow.proto.framework.AutoParallelOptions.Builder, org.tensorflow.proto.framework.AutoParallelOptionsOrBuilder> autoParallelBuilder_; + /** + *
+     * Configures AutoParallel optimization passes either through the
+     * meta-optimizer or when manually specified through the optimizers field.
+     * 
+ * + * .tensorflow.AutoParallelOptions auto_parallel = 5; + */ + public boolean hasAutoParallel() { + return autoParallelBuilder_ != null || autoParallel_ != null; + } + /** + *
+     * Configures AutoParallel optimization passes either through the
+     * meta-optimizer or when manually specified through the optimizers field.
+     * 
+ * + * .tensorflow.AutoParallelOptions auto_parallel = 5; + */ + public org.tensorflow.proto.framework.AutoParallelOptions getAutoParallel() { + if (autoParallelBuilder_ == null) { + return autoParallel_ == null ? org.tensorflow.proto.framework.AutoParallelOptions.getDefaultInstance() : autoParallel_; + } else { + return autoParallelBuilder_.getMessage(); + } + } + /** + *
+     * Configures AutoParallel optimization passes either through the
+     * meta-optimizer or when manually specified through the optimizers field.
+     * 
+ * + * .tensorflow.AutoParallelOptions auto_parallel = 5; + */ + public Builder setAutoParallel(org.tensorflow.proto.framework.AutoParallelOptions value) { + if (autoParallelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + autoParallel_ = value; + onChanged(); + } else { + autoParallelBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Configures AutoParallel optimization passes either through the
+     * meta-optimizer or when manually specified through the optimizers field.
+     * 
+ * + * .tensorflow.AutoParallelOptions auto_parallel = 5; + */ + public Builder setAutoParallel( + org.tensorflow.proto.framework.AutoParallelOptions.Builder builderForValue) { + if (autoParallelBuilder_ == null) { + autoParallel_ = builderForValue.build(); + onChanged(); + } else { + autoParallelBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Configures AutoParallel optimization passes either through the
+     * meta-optimizer or when manually specified through the optimizers field.
+     * 
+ * + * .tensorflow.AutoParallelOptions auto_parallel = 5; + */ + public Builder mergeAutoParallel(org.tensorflow.proto.framework.AutoParallelOptions value) { + if (autoParallelBuilder_ == null) { + if (autoParallel_ != null) { + autoParallel_ = + org.tensorflow.proto.framework.AutoParallelOptions.newBuilder(autoParallel_).mergeFrom(value).buildPartial(); + } else { + autoParallel_ = value; + } + onChanged(); + } else { + autoParallelBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Configures AutoParallel optimization passes either through the
+     * meta-optimizer or when manually specified through the optimizers field.
+     * 
+ * + * .tensorflow.AutoParallelOptions auto_parallel = 5; + */ + public Builder clearAutoParallel() { + if (autoParallelBuilder_ == null) { + autoParallel_ = null; + onChanged(); + } else { + autoParallel_ = null; + autoParallelBuilder_ = null; + } + + return this; + } + /** + *
+     * Configures AutoParallel optimization passes either through the
+     * meta-optimizer or when manually specified through the optimizers field.
+     * 
+ * + * .tensorflow.AutoParallelOptions auto_parallel = 5; + */ + public org.tensorflow.proto.framework.AutoParallelOptions.Builder getAutoParallelBuilder() { + + onChanged(); + return getAutoParallelFieldBuilder().getBuilder(); + } + /** + *
+     * Configures AutoParallel optimization passes either through the
+     * meta-optimizer or when manually specified through the optimizers field.
+     * 
+ * + * .tensorflow.AutoParallelOptions auto_parallel = 5; + */ + public org.tensorflow.proto.framework.AutoParallelOptionsOrBuilder getAutoParallelOrBuilder() { + if (autoParallelBuilder_ != null) { + return autoParallelBuilder_.getMessageOrBuilder(); + } else { + return autoParallel_ == null ? + org.tensorflow.proto.framework.AutoParallelOptions.getDefaultInstance() : autoParallel_; + } + } + /** + *
+     * Configures AutoParallel optimization passes either through the
+     * meta-optimizer or when manually specified through the optimizers field.
+     * 
+ * + * .tensorflow.AutoParallelOptions auto_parallel = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AutoParallelOptions, org.tensorflow.proto.framework.AutoParallelOptions.Builder, org.tensorflow.proto.framework.AutoParallelOptionsOrBuilder> + getAutoParallelFieldBuilder() { + if (autoParallelBuilder_ == null) { + autoParallelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.AutoParallelOptions, org.tensorflow.proto.framework.AutoParallelOptions.Builder, org.tensorflow.proto.framework.AutoParallelOptionsOrBuilder>( + getAutoParallel(), + getParentForChildren(), + isClean()); + autoParallel_ = null; + } + return autoParallelBuilder_; + } + + private boolean failOnOptimizerErrors_ ; + /** + *
+     * If true, any optimization pass failing will cause the MetaOptimizer to
+     * stop with an error. By default - or when set to false, failing passes are
+     * skipped silently.
+     * 
+ * + * bool fail_on_optimizer_errors = 21; + */ + public boolean getFailOnOptimizerErrors() { + return failOnOptimizerErrors_; + } + /** + *
+     * If true, any optimization pass failing will cause the MetaOptimizer to
+     * stop with an error. By default - or when set to false, failing passes are
+     * skipped silently.
+     * 
+ * + * bool fail_on_optimizer_errors = 21; + */ + public Builder setFailOnOptimizerErrors(boolean value) { + + failOnOptimizerErrors_ = value; + onChanged(); + return this; + } + /** + *
+     * If true, any optimization pass failing will cause the MetaOptimizer to
+     * stop with an error. By default - or when set to false, failing passes are
+     * skipped silently.
+     * 
+ * + * bool fail_on_optimizer_errors = 21; + */ + public Builder clearFailOnOptimizerErrors() { + + failOnOptimizerErrors_ = false; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.ScopedAllocatorOptions scopedAllocatorOpts_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.ScopedAllocatorOptions, org.tensorflow.proto.framework.ScopedAllocatorOptions.Builder, org.tensorflow.proto.framework.ScopedAllocatorOptionsOrBuilder> scopedAllocatorOptsBuilder_; + /** + * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; + */ + public boolean hasScopedAllocatorOpts() { + return scopedAllocatorOptsBuilder_ != null || scopedAllocatorOpts_ != null; + } + /** + * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; + */ + public org.tensorflow.proto.framework.ScopedAllocatorOptions getScopedAllocatorOpts() { + if (scopedAllocatorOptsBuilder_ == null) { + return scopedAllocatorOpts_ == null ? org.tensorflow.proto.framework.ScopedAllocatorOptions.getDefaultInstance() : scopedAllocatorOpts_; + } else { + return scopedAllocatorOptsBuilder_.getMessage(); + } + } + /** + * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; + */ + public Builder setScopedAllocatorOpts(org.tensorflow.proto.framework.ScopedAllocatorOptions value) { + if (scopedAllocatorOptsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scopedAllocatorOpts_ = value; + onChanged(); + } else { + scopedAllocatorOptsBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; + */ + public Builder setScopedAllocatorOpts( + org.tensorflow.proto.framework.ScopedAllocatorOptions.Builder builderForValue) { + if (scopedAllocatorOptsBuilder_ == null) { + scopedAllocatorOpts_ = builderForValue.build(); + onChanged(); + } else { + scopedAllocatorOptsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; + */ + public Builder mergeScopedAllocatorOpts(org.tensorflow.proto.framework.ScopedAllocatorOptions value) { + if (scopedAllocatorOptsBuilder_ == null) { + if (scopedAllocatorOpts_ != null) { + scopedAllocatorOpts_ = + org.tensorflow.proto.framework.ScopedAllocatorOptions.newBuilder(scopedAllocatorOpts_).mergeFrom(value).buildPartial(); + } else { + scopedAllocatorOpts_ = value; + } + onChanged(); + } else { + scopedAllocatorOptsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; + */ + public Builder clearScopedAllocatorOpts() { + if (scopedAllocatorOptsBuilder_ == null) { + scopedAllocatorOpts_ = null; + onChanged(); + } else { + scopedAllocatorOpts_ = null; + scopedAllocatorOptsBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; + */ + public org.tensorflow.proto.framework.ScopedAllocatorOptions.Builder getScopedAllocatorOptsBuilder() { + + onChanged(); + return getScopedAllocatorOptsFieldBuilder().getBuilder(); + } + /** + * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; + */ + public org.tensorflow.proto.framework.ScopedAllocatorOptionsOrBuilder getScopedAllocatorOptsOrBuilder() { + if (scopedAllocatorOptsBuilder_ != null) { + return scopedAllocatorOptsBuilder_.getMessageOrBuilder(); + } else { + return scopedAllocatorOpts_ == null ? + org.tensorflow.proto.framework.ScopedAllocatorOptions.getDefaultInstance() : scopedAllocatorOpts_; + } + } + /** + * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.ScopedAllocatorOptions, org.tensorflow.proto.framework.ScopedAllocatorOptions.Builder, org.tensorflow.proto.framework.ScopedAllocatorOptionsOrBuilder> + getScopedAllocatorOptsFieldBuilder() { + if (scopedAllocatorOptsBuilder_ == null) { + scopedAllocatorOptsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.ScopedAllocatorOptions, org.tensorflow.proto.framework.ScopedAllocatorOptions.Builder, org.tensorflow.proto.framework.ScopedAllocatorOptionsOrBuilder>( + getScopedAllocatorOpts(), + getParentForChildren(), + isClean()); + scopedAllocatorOpts_ = null; + } + return scopedAllocatorOptsBuilder_; + } + + private com.google.protobuf.LazyStringList optimizers_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureOptimizersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + optimizers_ = new com.google.protobuf.LazyStringArrayList(optimizers_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * If non-empty, will use this as an alternative way to specify a list of
+     * optimizations to turn on and the order of the optimizations (replacing the
+     * meta-optimizer).
+     * Of the RewriterConfig options, only the AutoParallel configuration options
+     * (the auto_parallel field) apply to manually requested optimization passes
+     * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+     * not configurable (in contrast to memory optimization passes through the
+     * meta-optimizer) and act only on manual op annotations.
+     * Custom optimizers (see custom_optimizers) that are not part of this
+     * schedule will be run after - in the order that they were specified.
+     * 
+ * + * repeated string optimizers = 100; + */ + public com.google.protobuf.ProtocolStringList + getOptimizersList() { + return optimizers_.getUnmodifiableView(); + } + /** + *
+     * If non-empty, will use this as an alternative way to specify a list of
+     * optimizations to turn on and the order of the optimizations (replacing the
+     * meta-optimizer).
+     * Of the RewriterConfig options, only the AutoParallel configuration options
+     * (the auto_parallel field) apply to manually requested optimization passes
+     * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+     * not configurable (in contrast to memory optimization passes through the
+     * meta-optimizer) and act only on manual op annotations.
+     * Custom optimizers (see custom_optimizers) that are not part of this
+     * schedule will be run after - in the order that they were specified.
+     * 
+ * + * repeated string optimizers = 100; + */ + public int getOptimizersCount() { + return optimizers_.size(); + } + /** + *
+     * If non-empty, will use this as an alternative way to specify a list of
+     * optimizations to turn on and the order of the optimizations (replacing the
+     * meta-optimizer).
+     * Of the RewriterConfig options, only the AutoParallel configuration options
+     * (the auto_parallel field) apply to manually requested optimization passes
+     * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+     * not configurable (in contrast to memory optimization passes through the
+     * meta-optimizer) and act only on manual op annotations.
+     * Custom optimizers (see custom_optimizers) that are not part of this
+     * schedule will be run after - in the order that they were specified.
+     * 
+ * + * repeated string optimizers = 100; + */ + public java.lang.String getOptimizers(int index) { + return optimizers_.get(index); + } + /** + *
+     * If non-empty, will use this as an alternative way to specify a list of
+     * optimizations to turn on and the order of the optimizations (replacing the
+     * meta-optimizer).
+     * Of the RewriterConfig options, only the AutoParallel configuration options
+     * (the auto_parallel field) apply to manually requested optimization passes
+     * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+     * not configurable (in contrast to memory optimization passes through the
+     * meta-optimizer) and act only on manual op annotations.
+     * Custom optimizers (see custom_optimizers) that are not part of this
+     * schedule will be run after - in the order that they were specified.
+     * 
+ * + * repeated string optimizers = 100; + */ + public com.google.protobuf.ByteString + getOptimizersBytes(int index) { + return optimizers_.getByteString(index); + } + /** + *
+     * If non-empty, will use this as an alternative way to specify a list of
+     * optimizations to turn on and the order of the optimizations (replacing the
+     * meta-optimizer).
+     * Of the RewriterConfig options, only the AutoParallel configuration options
+     * (the auto_parallel field) apply to manually requested optimization passes
+     * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+     * not configurable (in contrast to memory optimization passes through the
+     * meta-optimizer) and act only on manual op annotations.
+     * Custom optimizers (see custom_optimizers) that are not part of this
+     * schedule will be run after - in the order that they were specified.
+     * 
+ * + * repeated string optimizers = 100; + */ + public Builder setOptimizers( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptimizersIsMutable(); + optimizers_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * If non-empty, will use this as an alternative way to specify a list of
+     * optimizations to turn on and the order of the optimizations (replacing the
+     * meta-optimizer).
+     * Of the RewriterConfig options, only the AutoParallel configuration options
+     * (the auto_parallel field) apply to manually requested optimization passes
+     * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+     * not configurable (in contrast to memory optimization passes through the
+     * meta-optimizer) and act only on manual op annotations.
+     * Custom optimizers (see custom_optimizers) that are not part of this
+     * schedule will be run after - in the order that they were specified.
+     * 
+ * + * repeated string optimizers = 100; + */ + public Builder addOptimizers( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOptimizersIsMutable(); + optimizers_.add(value); + onChanged(); + return this; + } + /** + *
+     * If non-empty, will use this as an alternative way to specify a list of
+     * optimizations to turn on and the order of the optimizations (replacing the
+     * meta-optimizer).
+     * Of the RewriterConfig options, only the AutoParallel configuration options
+     * (the auto_parallel field) apply to manually requested optimization passes
+     * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+     * not configurable (in contrast to memory optimization passes through the
+     * meta-optimizer) and act only on manual op annotations.
+     * Custom optimizers (see custom_optimizers) that are not part of this
+     * schedule will be run after - in the order that they were specified.
+     * 
+ * + * repeated string optimizers = 100; + */ + public Builder addAllOptimizers( + java.lang.Iterable values) { + ensureOptimizersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, optimizers_); + onChanged(); + return this; + } + /** + *
+     * If non-empty, will use this as an alternative way to specify a list of
+     * optimizations to turn on and the order of the optimizations (replacing the
+     * meta-optimizer).
+     * Of the RewriterConfig options, only the AutoParallel configuration options
+     * (the auto_parallel field) apply to manually requested optimization passes
+     * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+     * not configurable (in contrast to memory optimization passes through the
+     * meta-optimizer) and act only on manual op annotations.
+     * Custom optimizers (see custom_optimizers) that are not part of this
+     * schedule will be run after - in the order that they were specified.
+     * 
+ * + * repeated string optimizers = 100; + */ + public Builder clearOptimizers() { + optimizers_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * If non-empty, will use this as an alternative way to specify a list of
+     * optimizations to turn on and the order of the optimizations (replacing the
+     * meta-optimizer).
+     * Of the RewriterConfig options, only the AutoParallel configuration options
+     * (the auto_parallel field) apply to manually requested optimization passes
+     * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+     * not configurable (in contrast to memory optimization passes through the
+     * meta-optimizer) and act only on manual op annotations.
+     * Custom optimizers (see custom_optimizers) that are not part of this
+     * schedule will be run after - in the order that they were specified.
+     * 
+ * + * repeated string optimizers = 100; + */ + public Builder addOptimizersBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureOptimizersIsMutable(); + optimizers_.add(value); + onChanged(); + return this; + } + + private java.util.List customOptimizers_ = + java.util.Collections.emptyList(); + private void ensureCustomOptimizersIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + customOptimizers_ = new java.util.ArrayList(customOptimizers_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer, org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.Builder, org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizerOrBuilder> customOptimizersBuilder_; + + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public java.util.List getCustomOptimizersList() { + if (customOptimizersBuilder_ == null) { + return java.util.Collections.unmodifiableList(customOptimizers_); + } else { + return customOptimizersBuilder_.getMessageList(); + } + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public int getCustomOptimizersCount() { + if (customOptimizersBuilder_ == null) { + return customOptimizers_.size(); + } else { + return customOptimizersBuilder_.getCount(); + } + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer getCustomOptimizers(int index) { + if (customOptimizersBuilder_ == null) { + return customOptimizers_.get(index); + } else { + return customOptimizersBuilder_.getMessage(index); + } + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public Builder setCustomOptimizers( + int index, org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer value) { + if (customOptimizersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomOptimizersIsMutable(); + customOptimizers_.set(index, value); + onChanged(); + } else { + customOptimizersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public Builder setCustomOptimizers( + int index, org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.Builder builderForValue) { + if (customOptimizersBuilder_ == null) { + ensureCustomOptimizersIsMutable(); + customOptimizers_.set(index, builderForValue.build()); + onChanged(); + } else { + customOptimizersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public Builder addCustomOptimizers(org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer value) { + if (customOptimizersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomOptimizersIsMutable(); + customOptimizers_.add(value); + onChanged(); + } else { + customOptimizersBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public Builder addCustomOptimizers( + int index, org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer value) { + if (customOptimizersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomOptimizersIsMutable(); + customOptimizers_.add(index, value); + onChanged(); + } else { + customOptimizersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public Builder addCustomOptimizers( + org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.Builder builderForValue) { + if (customOptimizersBuilder_ == null) { + ensureCustomOptimizersIsMutable(); + customOptimizers_.add(builderForValue.build()); + onChanged(); + } else { + customOptimizersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public Builder addCustomOptimizers( + int index, org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.Builder builderForValue) { + if (customOptimizersBuilder_ == null) { + ensureCustomOptimizersIsMutable(); + customOptimizers_.add(index, builderForValue.build()); + onChanged(); + } else { + customOptimizersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public Builder addAllCustomOptimizers( + java.lang.Iterable values) { + if (customOptimizersBuilder_ == null) { + ensureCustomOptimizersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, customOptimizers_); + onChanged(); + } else { + customOptimizersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public Builder clearCustomOptimizers() { + if (customOptimizersBuilder_ == null) { + customOptimizers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + customOptimizersBuilder_.clear(); + } + return this; + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public Builder removeCustomOptimizers(int index) { + if (customOptimizersBuilder_ == null) { + ensureCustomOptimizersIsMutable(); + customOptimizers_.remove(index); + onChanged(); + } else { + customOptimizersBuilder_.remove(index); + } + return this; + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.Builder getCustomOptimizersBuilder( + int index) { + return getCustomOptimizersFieldBuilder().getBuilder(index); + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizerOrBuilder getCustomOptimizersOrBuilder( + int index) { + if (customOptimizersBuilder_ == null) { + return customOptimizers_.get(index); } else { + return customOptimizersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public java.util.List + getCustomOptimizersOrBuilderList() { + if (customOptimizersBuilder_ != null) { + return customOptimizersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(customOptimizers_); + } + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.Builder addCustomOptimizersBuilder() { + return getCustomOptimizersFieldBuilder().addBuilder( + org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.getDefaultInstance()); + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.Builder addCustomOptimizersBuilder( + int index) { + return getCustomOptimizersFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.getDefaultInstance()); + } + /** + *
+     * list of CustomGraphOptimizers to apply.
+     * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + public java.util.List + getCustomOptimizersBuilderList() { + return getCustomOptimizersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer, org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.Builder, org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizerOrBuilder> + getCustomOptimizersFieldBuilder() { + if (customOptimizersBuilder_ == null) { + customOptimizersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer, org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer.Builder, org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizerOrBuilder>( + customOptimizers_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + customOptimizers_ = null; + } + return customOptimizersBuilder_; + } + + private org.tensorflow.proto.framework.VerifierConfig interOptimizerVerifierConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.VerifierConfig, org.tensorflow.proto.framework.VerifierConfig.Builder, org.tensorflow.proto.framework.VerifierConfigOrBuilder> interOptimizerVerifierConfigBuilder_; + /** + *
+     * VerifierConfig specifying the verifiers to be run after every optimizer.
+     * 
+ * + * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; + */ + public boolean hasInterOptimizerVerifierConfig() { + return interOptimizerVerifierConfigBuilder_ != null || interOptimizerVerifierConfig_ != null; + } + /** + *
+     * VerifierConfig specifying the verifiers to be run after every optimizer.
+     * 
+ * + * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; + */ + public org.tensorflow.proto.framework.VerifierConfig getInterOptimizerVerifierConfig() { + if (interOptimizerVerifierConfigBuilder_ == null) { + return interOptimizerVerifierConfig_ == null ? org.tensorflow.proto.framework.VerifierConfig.getDefaultInstance() : interOptimizerVerifierConfig_; + } else { + return interOptimizerVerifierConfigBuilder_.getMessage(); + } + } + /** + *
+     * VerifierConfig specifying the verifiers to be run after every optimizer.
+     * 
+ * + * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; + */ + public Builder setInterOptimizerVerifierConfig(org.tensorflow.proto.framework.VerifierConfig value) { + if (interOptimizerVerifierConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interOptimizerVerifierConfig_ = value; + onChanged(); + } else { + interOptimizerVerifierConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * VerifierConfig specifying the verifiers to be run after every optimizer.
+     * 
+ * + * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; + */ + public Builder setInterOptimizerVerifierConfig( + org.tensorflow.proto.framework.VerifierConfig.Builder builderForValue) { + if (interOptimizerVerifierConfigBuilder_ == null) { + interOptimizerVerifierConfig_ = builderForValue.build(); + onChanged(); + } else { + interOptimizerVerifierConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * VerifierConfig specifying the verifiers to be run after every optimizer.
+     * 
+ * + * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; + */ + public Builder mergeInterOptimizerVerifierConfig(org.tensorflow.proto.framework.VerifierConfig value) { + if (interOptimizerVerifierConfigBuilder_ == null) { + if (interOptimizerVerifierConfig_ != null) { + interOptimizerVerifierConfig_ = + org.tensorflow.proto.framework.VerifierConfig.newBuilder(interOptimizerVerifierConfig_).mergeFrom(value).buildPartial(); + } else { + interOptimizerVerifierConfig_ = value; + } + onChanged(); + } else { + interOptimizerVerifierConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * VerifierConfig specifying the verifiers to be run after every optimizer.
+     * 
+ * + * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; + */ + public Builder clearInterOptimizerVerifierConfig() { + if (interOptimizerVerifierConfigBuilder_ == null) { + interOptimizerVerifierConfig_ = null; + onChanged(); + } else { + interOptimizerVerifierConfig_ = null; + interOptimizerVerifierConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * VerifierConfig specifying the verifiers to be run after every optimizer.
+     * 
+ * + * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; + */ + public org.tensorflow.proto.framework.VerifierConfig.Builder getInterOptimizerVerifierConfigBuilder() { + + onChanged(); + return getInterOptimizerVerifierConfigFieldBuilder().getBuilder(); + } + /** + *
+     * VerifierConfig specifying the verifiers to be run after every optimizer.
+     * 
+ * + * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; + */ + public org.tensorflow.proto.framework.VerifierConfigOrBuilder getInterOptimizerVerifierConfigOrBuilder() { + if (interOptimizerVerifierConfigBuilder_ != null) { + return interOptimizerVerifierConfigBuilder_.getMessageOrBuilder(); + } else { + return interOptimizerVerifierConfig_ == null ? + org.tensorflow.proto.framework.VerifierConfig.getDefaultInstance() : interOptimizerVerifierConfig_; + } + } + /** + *
+     * VerifierConfig specifying the verifiers to be run after every optimizer.
+     * 
+ * + * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.VerifierConfig, org.tensorflow.proto.framework.VerifierConfig.Builder, org.tensorflow.proto.framework.VerifierConfigOrBuilder> + getInterOptimizerVerifierConfigFieldBuilder() { + if (interOptimizerVerifierConfigBuilder_ == null) { + interOptimizerVerifierConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.VerifierConfig, org.tensorflow.proto.framework.VerifierConfig.Builder, org.tensorflow.proto.framework.VerifierConfigOrBuilder>( + getInterOptimizerVerifierConfig(), + getParentForChildren(), + isClean()); + interOptimizerVerifierConfig_ = null; + } + return interOptimizerVerifierConfigBuilder_; + } + + private org.tensorflow.proto.framework.VerifierConfig postOptimizationVerifierConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.VerifierConfig, org.tensorflow.proto.framework.VerifierConfig.Builder, org.tensorflow.proto.framework.VerifierConfigOrBuilder> postOptimizationVerifierConfigBuilder_; + /** + *
+     * VerifierConfig specifying the verifiers to be run at the end, after all
+     * optimizers have run.
+     * 
+ * + * .tensorflow.VerifierConfig post_optimization_verifier_config = 301; + */ + public boolean hasPostOptimizationVerifierConfig() { + return postOptimizationVerifierConfigBuilder_ != null || postOptimizationVerifierConfig_ != null; + } + /** + *
+     * VerifierConfig specifying the verifiers to be run at the end, after all
+     * optimizers have run.
+     * 
+ * + * .tensorflow.VerifierConfig post_optimization_verifier_config = 301; + */ + public org.tensorflow.proto.framework.VerifierConfig getPostOptimizationVerifierConfig() { + if (postOptimizationVerifierConfigBuilder_ == null) { + return postOptimizationVerifierConfig_ == null ? org.tensorflow.proto.framework.VerifierConfig.getDefaultInstance() : postOptimizationVerifierConfig_; + } else { + return postOptimizationVerifierConfigBuilder_.getMessage(); + } + } + /** + *
+     * VerifierConfig specifying the verifiers to be run at the end, after all
+     * optimizers have run.
+     * 
+ * + * .tensorflow.VerifierConfig post_optimization_verifier_config = 301; + */ + public Builder setPostOptimizationVerifierConfig(org.tensorflow.proto.framework.VerifierConfig value) { + if (postOptimizationVerifierConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + postOptimizationVerifierConfig_ = value; + onChanged(); + } else { + postOptimizationVerifierConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * VerifierConfig specifying the verifiers to be run at the end, after all
+     * optimizers have run.
+     * 
+ * + * .tensorflow.VerifierConfig post_optimization_verifier_config = 301; + */ + public Builder setPostOptimizationVerifierConfig( + org.tensorflow.proto.framework.VerifierConfig.Builder builderForValue) { + if (postOptimizationVerifierConfigBuilder_ == null) { + postOptimizationVerifierConfig_ = builderForValue.build(); + onChanged(); + } else { + postOptimizationVerifierConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * VerifierConfig specifying the verifiers to be run at the end, after all
+     * optimizers have run.
+     * 
+ * + * .tensorflow.VerifierConfig post_optimization_verifier_config = 301; + */ + public Builder mergePostOptimizationVerifierConfig(org.tensorflow.proto.framework.VerifierConfig value) { + if (postOptimizationVerifierConfigBuilder_ == null) { + if (postOptimizationVerifierConfig_ != null) { + postOptimizationVerifierConfig_ = + org.tensorflow.proto.framework.VerifierConfig.newBuilder(postOptimizationVerifierConfig_).mergeFrom(value).buildPartial(); + } else { + postOptimizationVerifierConfig_ = value; + } + onChanged(); + } else { + postOptimizationVerifierConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * VerifierConfig specifying the verifiers to be run at the end, after all
+     * optimizers have run.
+     * 
+ * + * .tensorflow.VerifierConfig post_optimization_verifier_config = 301; + */ + public Builder clearPostOptimizationVerifierConfig() { + if (postOptimizationVerifierConfigBuilder_ == null) { + postOptimizationVerifierConfig_ = null; + onChanged(); + } else { + postOptimizationVerifierConfig_ = null; + postOptimizationVerifierConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * VerifierConfig specifying the verifiers to be run at the end, after all
+     * optimizers have run.
+     * 
+ * + * .tensorflow.VerifierConfig post_optimization_verifier_config = 301; + */ + public org.tensorflow.proto.framework.VerifierConfig.Builder getPostOptimizationVerifierConfigBuilder() { + + onChanged(); + return getPostOptimizationVerifierConfigFieldBuilder().getBuilder(); + } + /** + *
+     * VerifierConfig specifying the verifiers to be run at the end, after all
+     * optimizers have run.
+     * 
+ * + * .tensorflow.VerifierConfig post_optimization_verifier_config = 301; + */ + public org.tensorflow.proto.framework.VerifierConfigOrBuilder getPostOptimizationVerifierConfigOrBuilder() { + if (postOptimizationVerifierConfigBuilder_ != null) { + return postOptimizationVerifierConfigBuilder_.getMessageOrBuilder(); + } else { + return postOptimizationVerifierConfig_ == null ? + org.tensorflow.proto.framework.VerifierConfig.getDefaultInstance() : postOptimizationVerifierConfig_; + } + } + /** + *
+     * VerifierConfig specifying the verifiers to be run at the end, after all
+     * optimizers have run.
+     * 
+ * + * .tensorflow.VerifierConfig post_optimization_verifier_config = 301; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.VerifierConfig, org.tensorflow.proto.framework.VerifierConfig.Builder, org.tensorflow.proto.framework.VerifierConfigOrBuilder> + getPostOptimizationVerifierConfigFieldBuilder() { + if (postOptimizationVerifierConfigBuilder_ == null) { + postOptimizationVerifierConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.VerifierConfig, org.tensorflow.proto.framework.VerifierConfig.Builder, org.tensorflow.proto.framework.VerifierConfigOrBuilder>( + getPostOptimizationVerifierConfig(), + getParentForChildren(), + isClean()); + postOptimizationVerifierConfig_ = null; + } + return postOptimizationVerifierConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.RewriterConfig) + } + + // @@protoc_insertion_point(class_scope:tensorflow.RewriterConfig) + private static final org.tensorflow.proto.framework.RewriterConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.RewriterConfig(); + } + + public static org.tensorflow.proto.framework.RewriterConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RewriterConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RewriterConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RewriterConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RewriterConfigOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RewriterConfigOrBuilder.java new file mode 100644 index 00000000000..598034dc276 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RewriterConfigOrBuilder.java @@ -0,0 +1,587 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/rewriter_config.proto + +package org.tensorflow.proto.framework; + +public interface RewriterConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.RewriterConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Optimize tensor layouts (default is ON)
+   * e.g. This will try to use NCHW layout on GPU which is faster.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle layout_optimizer = 1; + */ + int getLayoutOptimizerValue(); + /** + *
+   * Optimize tensor layouts (default is ON)
+   * e.g. This will try to use NCHW layout on GPU which is faster.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle layout_optimizer = 1; + */ + org.tensorflow.proto.framework.RewriterConfig.Toggle getLayoutOptimizer(); + + /** + *
+   * Fold constants (default is ON)
+   * Statically infer the value of tensors when possible, and materialize the
+   * result using constants.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle constant_folding = 3; + */ + int getConstantFoldingValue(); + /** + *
+   * Fold constants (default is ON)
+   * Statically infer the value of tensors when possible, and materialize the
+   * result using constants.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle constant_folding = 3; + */ + org.tensorflow.proto.framework.RewriterConfig.Toggle getConstantFolding(); + + /** + *
+   * Shape optimizations (default is ON)
+   * Simplify computations made on shapes.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle shape_optimization = 13; + */ + int getShapeOptimizationValue(); + /** + *
+   * Shape optimizations (default is ON)
+   * Simplify computations made on shapes.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle shape_optimization = 13; + */ + org.tensorflow.proto.framework.RewriterConfig.Toggle getShapeOptimization(); + + /** + *
+   * Remapping (default is ON)
+   * Remap subgraphs onto more efficient implementations.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle remapping = 14; + */ + int getRemappingValue(); + /** + *
+   * Remapping (default is ON)
+   * Remap subgraphs onto more efficient implementations.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle remapping = 14; + */ + org.tensorflow.proto.framework.RewriterConfig.Toggle getRemapping(); + + /** + *
+   * Arithmetic optimizations (default is ON)
+   * e.g. Simplify arithmetic ops; merge ops with same value (like constants).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle arithmetic_optimization = 7; + */ + int getArithmeticOptimizationValue(); + /** + *
+   * Arithmetic optimizations (default is ON)
+   * e.g. Simplify arithmetic ops; merge ops with same value (like constants).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle arithmetic_optimization = 7; + */ + org.tensorflow.proto.framework.RewriterConfig.Toggle getArithmeticOptimization(); + + /** + *
+   * Control dependency optimizations (default is ON).
+   * Remove redundant control dependencies, which may enable other optimization.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle dependency_optimization = 8; + */ + int getDependencyOptimizationValue(); + /** + *
+   * Control dependency optimizations (default is ON).
+   * Remove redundant control dependencies, which may enable other optimization.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle dependency_optimization = 8; + */ + org.tensorflow.proto.framework.RewriterConfig.Toggle getDependencyOptimization(); + + /** + *
+   * Loop optimizations (default is ON).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle loop_optimization = 9; + */ + int getLoopOptimizationValue(); + /** + *
+   * Loop optimizations (default is ON).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle loop_optimization = 9; + */ + org.tensorflow.proto.framework.RewriterConfig.Toggle getLoopOptimization(); + + /** + *
+   * Function optimizations (default is ON).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle function_optimization = 10; + */ + int getFunctionOptimizationValue(); + /** + *
+   * Function optimizations (default is ON).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle function_optimization = 10; + */ + org.tensorflow.proto.framework.RewriterConfig.Toggle getFunctionOptimization(); + + /** + *
+   * Strips debug-related nodes from the graph (off by default).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle debug_stripper = 11; + */ + int getDebugStripperValue(); + /** + *
+   * Strips debug-related nodes from the graph (off by default).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle debug_stripper = 11; + */ + org.tensorflow.proto.framework.RewriterConfig.Toggle getDebugStripper(); + + /** + *
+   * If true, don't remove unnecessary ops from the graph
+   * 
+ * + * bool disable_model_pruning = 2; + */ + boolean getDisableModelPruning(); + + /** + *
+   * Try to allocate some independent Op outputs contiguously in order to
+   * merge or eliminate downstream Ops (off by default).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle scoped_allocator_optimization = 15; + */ + int getScopedAllocatorOptimizationValue(); + /** + *
+   * Try to allocate some independent Op outputs contiguously in order to
+   * merge or eliminate downstream Ops (off by default).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle scoped_allocator_optimization = 15; + */ + org.tensorflow.proto.framework.RewriterConfig.Toggle getScopedAllocatorOptimization(); + + /** + *
+   * Force small ops onto the CPU (default is OFF).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle pin_to_host_optimization = 18; + */ + int getPinToHostOptimizationValue(); + /** + *
+   * Force small ops onto the CPU (default is OFF).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle pin_to_host_optimization = 18; + */ + org.tensorflow.proto.framework.RewriterConfig.Toggle getPinToHostOptimization(); + + /** + *
+   * Enable the swap of kernel implementations based on the device placement
+   * (default is ON).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle implementation_selector = 22; + */ + int getImplementationSelectorValue(); + /** + *
+   * Enable the swap of kernel implementations based on the device placement
+   * (default is ON).
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle implementation_selector = 22; + */ + org.tensorflow.proto.framework.RewriterConfig.Toggle getImplementationSelector(); + + /** + *
+   * Optimize data types (default is OFF).
+   * e.g., This will try to use float16 on GPU which is faster.
+   * Note that this can change the numerical stability of the graph and may
+   * require the use of loss scaling to maintain model convergence.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle auto_mixed_precision = 23; + */ + int getAutoMixedPrecisionValue(); + /** + *
+   * Optimize data types (default is OFF).
+   * e.g., This will try to use float16 on GPU which is faster.
+   * Note that this can change the numerical stability of the graph and may
+   * require the use of loss scaling to maintain model convergence.
+   * 
+ * + * .tensorflow.RewriterConfig.Toggle auto_mixed_precision = 23; + */ + org.tensorflow.proto.framework.RewriterConfig.Toggle getAutoMixedPrecision(); + + /** + *
+   * Disable the entire meta optimizer (off by default).
+   * 
+ * + * bool disable_meta_optimizer = 19; + */ + boolean getDisableMetaOptimizer(); + + /** + *
+   * Controls how many times we run the optimizers in meta optimizer (default
+   * is once).
+   * 
+ * + * .tensorflow.RewriterConfig.NumIterationsType meta_optimizer_iterations = 12; + */ + int getMetaOptimizerIterationsValue(); + /** + *
+   * Controls how many times we run the optimizers in meta optimizer (default
+   * is once).
+   * 
+ * + * .tensorflow.RewriterConfig.NumIterationsType meta_optimizer_iterations = 12; + */ + org.tensorflow.proto.framework.RewriterConfig.NumIterationsType getMetaOptimizerIterations(); + + /** + *
+   * The minimum number of nodes in a graph to optimizer. For smaller graphs,
+   * optimization is skipped.
+   * 0 means the system picks an appropriate number.
+   * < 0 means do not skip optimization.
+   * 
+ * + * int32 min_graph_nodes = 17; + */ + int getMinGraphNodes(); + + /** + *
+   * Configures memory optimization passes through the meta-optimizer. Has no
+   * effect on manually requested memory optimization passes in the optimizers
+   * field.
+   * 
+ * + * .tensorflow.RewriterConfig.MemOptType memory_optimization = 4; + */ + int getMemoryOptimizationValue(); + /** + *
+   * Configures memory optimization passes through the meta-optimizer. Has no
+   * effect on manually requested memory optimization passes in the optimizers
+   * field.
+   * 
+ * + * .tensorflow.RewriterConfig.MemOptType memory_optimization = 4; + */ + org.tensorflow.proto.framework.RewriterConfig.MemOptType getMemoryOptimization(); + + /** + *
+   * A node name scope for node names which are valid outputs of recomputations.
+   * Inputs to nodes that match this scope may be recomputed (subject either to
+   * manual annotation of those input nodes or to manual annotation and
+   * heuristics depending on memory_optimization), but the nodes themselves will
+   * not be recomputed. This matches any sub-scopes as well, meaning the scope
+   * can appear not just as a top-level scope. For example, if the value is
+   * "gradients/", the default, it will match node name "gradients/foo",
+   * "foo/gradients/bar", but not "foo_gradients/"
+   * 
+ * + * string memory_optimizer_target_node_name_scope = 6; + */ + java.lang.String getMemoryOptimizerTargetNodeNameScope(); + /** + *
+   * A node name scope for node names which are valid outputs of recomputations.
+   * Inputs to nodes that match this scope may be recomputed (subject either to
+   * manual annotation of those input nodes or to manual annotation and
+   * heuristics depending on memory_optimization), but the nodes themselves will
+   * not be recomputed. This matches any sub-scopes as well, meaning the scope
+   * can appear not just as a top-level scope. For example, if the value is
+   * "gradients/", the default, it will match node name "gradients/foo",
+   * "foo/gradients/bar", but not "foo_gradients/"
+   * 
+ * + * string memory_optimizer_target_node_name_scope = 6; + */ + com.google.protobuf.ByteString + getMemoryOptimizerTargetNodeNameScopeBytes(); + + /** + *
+   * Maximum number of milliseconds to spend optimizing a single graph before
+   * timing out. If equal to 0 the system picks a default (currently 5 minutes).
+   * If less than 0 the optimizer will never time out.
+   * 
+ * + * int64 meta_optimizer_timeout_ms = 20; + */ + long getMetaOptimizerTimeoutMs(); + + /** + *
+   * Configures AutoParallel optimization passes either through the
+   * meta-optimizer or when manually specified through the optimizers field.
+   * 
+ * + * .tensorflow.AutoParallelOptions auto_parallel = 5; + */ + boolean hasAutoParallel(); + /** + *
+   * Configures AutoParallel optimization passes either through the
+   * meta-optimizer or when manually specified through the optimizers field.
+   * 
+ * + * .tensorflow.AutoParallelOptions auto_parallel = 5; + */ + org.tensorflow.proto.framework.AutoParallelOptions getAutoParallel(); + /** + *
+   * Configures AutoParallel optimization passes either through the
+   * meta-optimizer or when manually specified through the optimizers field.
+   * 
+ * + * .tensorflow.AutoParallelOptions auto_parallel = 5; + */ + org.tensorflow.proto.framework.AutoParallelOptionsOrBuilder getAutoParallelOrBuilder(); + + /** + *
+   * If true, any optimization pass failing will cause the MetaOptimizer to
+   * stop with an error. By default - or when set to false, failing passes are
+   * skipped silently.
+   * 
+ * + * bool fail_on_optimizer_errors = 21; + */ + boolean getFailOnOptimizerErrors(); + + /** + * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; + */ + boolean hasScopedAllocatorOpts(); + /** + * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; + */ + org.tensorflow.proto.framework.ScopedAllocatorOptions getScopedAllocatorOpts(); + /** + * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16; + */ + org.tensorflow.proto.framework.ScopedAllocatorOptionsOrBuilder getScopedAllocatorOptsOrBuilder(); + + /** + *
+   * If non-empty, will use this as an alternative way to specify a list of
+   * optimizations to turn on and the order of the optimizations (replacing the
+   * meta-optimizer).
+   * Of the RewriterConfig options, only the AutoParallel configuration options
+   * (the auto_parallel field) apply to manually requested optimization passes
+   * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+   * not configurable (in contrast to memory optimization passes through the
+   * meta-optimizer) and act only on manual op annotations.
+   * Custom optimizers (see custom_optimizers) that are not part of this
+   * schedule will be run after - in the order that they were specified.
+   * 
+ * + * repeated string optimizers = 100; + */ + java.util.List + getOptimizersList(); + /** + *
+   * If non-empty, will use this as an alternative way to specify a list of
+   * optimizations to turn on and the order of the optimizations (replacing the
+   * meta-optimizer).
+   * Of the RewriterConfig options, only the AutoParallel configuration options
+   * (the auto_parallel field) apply to manually requested optimization passes
+   * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+   * not configurable (in contrast to memory optimization passes through the
+   * meta-optimizer) and act only on manual op annotations.
+   * Custom optimizers (see custom_optimizers) that are not part of this
+   * schedule will be run after - in the order that they were specified.
+   * 
+ * + * repeated string optimizers = 100; + */ + int getOptimizersCount(); + /** + *
+   * If non-empty, will use this as an alternative way to specify a list of
+   * optimizations to turn on and the order of the optimizations (replacing the
+   * meta-optimizer).
+   * Of the RewriterConfig options, only the AutoParallel configuration options
+   * (the auto_parallel field) apply to manually requested optimization passes
+   * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+   * not configurable (in contrast to memory optimization passes through the
+   * meta-optimizer) and act only on manual op annotations.
+   * Custom optimizers (see custom_optimizers) that are not part of this
+   * schedule will be run after - in the order that they were specified.
+   * 
+ * + * repeated string optimizers = 100; + */ + java.lang.String getOptimizers(int index); + /** + *
+   * If non-empty, will use this as an alternative way to specify a list of
+   * optimizations to turn on and the order of the optimizations (replacing the
+   * meta-optimizer).
+   * Of the RewriterConfig options, only the AutoParallel configuration options
+   * (the auto_parallel field) apply to manually requested optimization passes
+   * ("autoparallel"). Memory optimization passes ("memory") invoked here are
+   * not configurable (in contrast to memory optimization passes through the
+   * meta-optimizer) and act only on manual op annotations.
+   * Custom optimizers (see custom_optimizers) that are not part of this
+   * schedule will be run after - in the order that they were specified.
+   * 
+ * + * repeated string optimizers = 100; + */ + com.google.protobuf.ByteString + getOptimizersBytes(int index); + + /** + *
+   * list of CustomGraphOptimizers to apply.
+   * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + java.util.List + getCustomOptimizersList(); + /** + *
+   * list of CustomGraphOptimizers to apply.
+   * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizer getCustomOptimizers(int index); + /** + *
+   * list of CustomGraphOptimizers to apply.
+   * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + int getCustomOptimizersCount(); + /** + *
+   * list of CustomGraphOptimizers to apply.
+   * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + java.util.List + getCustomOptimizersOrBuilderList(); + /** + *
+   * list of CustomGraphOptimizers to apply.
+   * 
+ * + * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200; + */ + org.tensorflow.proto.framework.RewriterConfig.CustomGraphOptimizerOrBuilder getCustomOptimizersOrBuilder( + int index); + + /** + *
+   * VerifierConfig specifying the verifiers to be run after every optimizer.
+   * 
+ * + * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; + */ + boolean hasInterOptimizerVerifierConfig(); + /** + *
+   * VerifierConfig specifying the verifiers to be run after every optimizer.
+   * 
+ * + * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; + */ + org.tensorflow.proto.framework.VerifierConfig getInterOptimizerVerifierConfig(); + /** + *
+   * VerifierConfig specifying the verifiers to be run after every optimizer.
+   * 
+ * + * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300; + */ + org.tensorflow.proto.framework.VerifierConfigOrBuilder getInterOptimizerVerifierConfigOrBuilder(); + + /** + *
+   * VerifierConfig specifying the verifiers to be run at the end, after all
+   * optimizers have run.
+   * 
+ * + * .tensorflow.VerifierConfig post_optimization_verifier_config = 301; + */ + boolean hasPostOptimizationVerifierConfig(); + /** + *
+   * VerifierConfig specifying the verifiers to be run at the end, after all
+   * optimizers have run.
+   * 
+ * + * .tensorflow.VerifierConfig post_optimization_verifier_config = 301; + */ + org.tensorflow.proto.framework.VerifierConfig getPostOptimizationVerifierConfig(); + /** + *
+   * VerifierConfig specifying the verifiers to be run at the end, after all
+   * optimizers have run.
+   * 
+ * + * .tensorflow.VerifierConfig post_optimization_verifier_config = 301; + */ + org.tensorflow.proto.framework.VerifierConfigOrBuilder getPostOptimizationVerifierConfigOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RewriterConfigProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RewriterConfigProtos.java new file mode 100644 index 00000000000..fe13c5d0193 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RewriterConfigProtos.java @@ -0,0 +1,155 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/rewriter_config.proto + +package org.tensorflow.proto.framework; + +public final class RewriterConfigProtos { + private RewriterConfigProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_AutoParallelOptions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_AutoParallelOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ScopedAllocatorOptions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ScopedAllocatorOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_RewriterConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_RewriterConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_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/protobuf/rewriter_conf" + + "ig.proto\022\ntensorflow\032*tensorflow/core/fr" + + "amework/attr_value.proto\032.tensorflow/cor" + + "e/protobuf/verifier_config.proto\";\n\023Auto" + + "ParallelOptions\022\016\n\006enable\030\001 \001(\010\022\024\n\014num_r" + + "eplicas\030\002 \001(\005\"+\n\026ScopedAllocatorOptions\022" + + "\021\n\tenable_op\030\001 \003(\t\"\210\020\n\016RewriterConfig\022;\n" + + "\020layout_optimizer\030\001 \001(\0162!.tensorflow.Rew" + + "riterConfig.Toggle\022;\n\020constant_folding\030\003" + + " \001(\0162!.tensorflow.RewriterConfig.Toggle\022" + + "=\n\022shape_optimization\030\r \001(\0162!.tensorflow" + + ".RewriterConfig.Toggle\0224\n\tremapping\030\016 \001(" + + "\0162!.tensorflow.RewriterConfig.Toggle\022B\n\027" + + "arithmetic_optimization\030\007 \001(\0162!.tensorfl" + + "ow.RewriterConfig.Toggle\022B\n\027dependency_o" + + "ptimization\030\010 \001(\0162!.tensorflow.RewriterC" + + "onfig.Toggle\022<\n\021loop_optimization\030\t \001(\0162" + + "!.tensorflow.RewriterConfig.Toggle\022@\n\025fu" + + "nction_optimization\030\n \001(\0162!.tensorflow.R" + + "ewriterConfig.Toggle\0229\n\016debug_stripper\030\013" + + " \001(\0162!.tensorflow.RewriterConfig.Toggle\022" + + "\035\n\025disable_model_pruning\030\002 \001(\010\022H\n\035scoped" + + "_allocator_optimization\030\017 \001(\0162!.tensorfl" + + "ow.RewriterConfig.Toggle\022C\n\030pin_to_host_" + + "optimization\030\022 \001(\0162!.tensorflow.Rewriter" + + "Config.Toggle\022B\n\027implementation_selector" + + "\030\026 \001(\0162!.tensorflow.RewriterConfig.Toggl" + + "e\022?\n\024auto_mixed_precision\030\027 \001(\0162!.tensor" + + "flow.RewriterConfig.Toggle\022\036\n\026disable_me" + + "ta_optimizer\030\023 \001(\010\022O\n\031meta_optimizer_ite" + + "rations\030\014 \001(\0162,.tensorflow.RewriterConfi" + + "g.NumIterationsType\022\027\n\017min_graph_nodes\030\021" + + " \001(\005\022B\n\023memory_optimization\030\004 \001(\0162%.tens" + + "orflow.RewriterConfig.MemOptType\022/\n\'memo" + + "ry_optimizer_target_node_name_scope\030\006 \001(" + + "\t\022!\n\031meta_optimizer_timeout_ms\030\024 \001(\003\0226\n\r" + + "auto_parallel\030\005 \001(\0132\037.tensorflow.AutoPar" + + "allelOptions\022 \n\030fail_on_optimizer_errors" + + "\030\025 \001(\010\022A\n\025scoped_allocator_opts\030\020 \001(\0132\"." + + "tensorflow.ScopedAllocatorOptions\022\022\n\nopt" + + "imizers\030d \003(\t\022K\n\021custom_optimizers\030\310\001 \003(" + + "\0132/.tensorflow.RewriterConfig.CustomGrap" + + "hOptimizer\022D\n\037inter_optimizer_verifier_c" + + "onfig\030\254\002 \001(\0132\032.tensorflow.VerifierConfig" + + "\022F\n!post_optimization_verifier_config\030\255\002" + + " \001(\0132\032.tensorflow.VerifierConfig\032\312\001\n\024Cus" + + "tomGraphOptimizer\022\014\n\004name\030\001 \001(\t\022X\n\rparam" + + "eter_map\030\002 \003(\0132A.tensorflow.RewriterConf" + + "ig.CustomGraphOptimizer.ParameterMapEntr" + + "y\032J\n\021ParameterMapEntry\022\013\n\003key\030\001 \001(\t\022$\n\005v" + + "alue\030\002 \001(\0132\025.tensorflow.AttrValue:\0028\001\"6\n" + + "\006Toggle\022\013\n\007DEFAULT\020\000\022\006\n\002ON\020\001\022\007\n\003OFF\020\002\022\016\n" + + "\nAGGRESSIVE\020\003\"<\n\021NumIterationsType\022\025\n\021DE" + + "FAULT_NUM_ITERS\020\000\022\007\n\003ONE\020\001\022\007\n\003TWO\020\002\"\237\001\n\n" + + "MemOptType\022\023\n\017DEFAULT_MEM_OPT\020\000\022\016\n\nNO_ME" + + "M_OPT\020\001\022\n\n\006MANUAL\020\002\022\027\n\023SWAPPING_HEURISTI" + + "CS\020\004\022\034\n\030RECOMPUTATION_HEURISTICS\020\005\022\031\n\025SC" + + "HEDULING_HEURISTICS\020\006\022\016\n\nHEURISTICS\020\003B\205\001" + + "\n\036org.tensorflow.proto.frameworkB\024Rewrit" + + "erConfigProtosP\001ZHgithub.com/tensorflow/" + + "tensorflow/tensorflow/go/core/core_proto" + + "s_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.AttrValueProtos.getDescriptor(), + org.tensorflow.proto.framework.VerifierConfigProtos.getDescriptor(), + }); + internal_static_tensorflow_AutoParallelOptions_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_AutoParallelOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_AutoParallelOptions_descriptor, + new java.lang.String[] { "Enable", "NumReplicas", }); + internal_static_tensorflow_ScopedAllocatorOptions_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_ScopedAllocatorOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ScopedAllocatorOptions_descriptor, + new java.lang.String[] { "EnableOp", }); + internal_static_tensorflow_RewriterConfig_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_tensorflow_RewriterConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_RewriterConfig_descriptor, + new java.lang.String[] { "LayoutOptimizer", "ConstantFolding", "ShapeOptimization", "Remapping", "ArithmeticOptimization", "DependencyOptimization", "LoopOptimization", "FunctionOptimization", "DebugStripper", "DisableModelPruning", "ScopedAllocatorOptimization", "PinToHostOptimization", "ImplementationSelector", "AutoMixedPrecision", "DisableMetaOptimizer", "MetaOptimizerIterations", "MinGraphNodes", "MemoryOptimization", "MemoryOptimizerTargetNodeNameScope", "MetaOptimizerTimeoutMs", "AutoParallel", "FailOnOptimizerErrors", "ScopedAllocatorOpts", "Optimizers", "CustomOptimizers", "InterOptimizerVerifierConfig", "PostOptimizationVerifierConfig", }); + internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_descriptor = + internal_static_tensorflow_RewriterConfig_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_descriptor, + new java.lang.String[] { "Name", "ParameterMap", }); + internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_descriptor = + internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + org.tensorflow.proto.framework.AttrValueProtos.getDescriptor(); + org.tensorflow.proto.framework.VerifierConfigProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RunMetadata.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RunMetadata.java new file mode 100644 index 00000000000..47f4aa27082 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RunMetadata.java @@ -0,0 +1,3277 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Metadata output (i.e., non-Tensor) for a single Run() call.
+ * 
+ * + * Protobuf type {@code tensorflow.RunMetadata} + */ +public final class RunMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.RunMetadata) + RunMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use RunMetadata.newBuilder() to construct. + private RunMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RunMetadata() { + partitionGraphs_ = java.util.Collections.emptyList(); + functionGraphs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RunMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RunMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.tensorflow.proto.framework.StepStats.Builder subBuilder = null; + if (stepStats_ != null) { + subBuilder = stepStats_.toBuilder(); + } + stepStats_ = input.readMessage(org.tensorflow.proto.framework.StepStats.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(stepStats_); + stepStats_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + org.tensorflow.proto.framework.CostGraphDef.Builder subBuilder = null; + if (costGraph_ != null) { + subBuilder = costGraph_.toBuilder(); + } + costGraph_ = input.readMessage(org.tensorflow.proto.framework.CostGraphDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(costGraph_); + costGraph_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + partitionGraphs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + partitionGraphs_.add( + input.readMessage(org.tensorflow.proto.framework.GraphDef.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + functionGraphs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + functionGraphs_.add( + input.readMessage(org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + partitionGraphs_ = java.util.Collections.unmodifiableList(partitionGraphs_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + functionGraphs_ = java.util.Collections.unmodifiableList(functionGraphs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RunMetadata.class, org.tensorflow.proto.framework.RunMetadata.Builder.class); + } + + public interface FunctionGraphsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.RunMetadata.FunctionGraphs) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + java.util.List + getPartitionGraphsList(); + /** + *
+     * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + org.tensorflow.proto.framework.GraphDef getPartitionGraphs(int index); + /** + *
+     * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + int getPartitionGraphsCount(); + /** + *
+     * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + java.util.List + getPartitionGraphsOrBuilderList(); + /** + *
+     * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + org.tensorflow.proto.framework.GraphDefOrBuilder getPartitionGraphsOrBuilder( + int index); + + /** + * .tensorflow.GraphDef pre_optimization_graph = 2; + */ + boolean hasPreOptimizationGraph(); + /** + * .tensorflow.GraphDef pre_optimization_graph = 2; + */ + org.tensorflow.proto.framework.GraphDef getPreOptimizationGraph(); + /** + * .tensorflow.GraphDef pre_optimization_graph = 2; + */ + org.tensorflow.proto.framework.GraphDefOrBuilder getPreOptimizationGraphOrBuilder(); + + /** + * .tensorflow.GraphDef post_optimization_graph = 3; + */ + boolean hasPostOptimizationGraph(); + /** + * .tensorflow.GraphDef post_optimization_graph = 3; + */ + org.tensorflow.proto.framework.GraphDef getPostOptimizationGraph(); + /** + * .tensorflow.GraphDef post_optimization_graph = 3; + */ + org.tensorflow.proto.framework.GraphDefOrBuilder getPostOptimizationGraphOrBuilder(); + } + /** + * Protobuf type {@code tensorflow.RunMetadata.FunctionGraphs} + */ + public static final class FunctionGraphs extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.RunMetadata.FunctionGraphs) + FunctionGraphsOrBuilder { + private static final long serialVersionUID = 0L; + // Use FunctionGraphs.newBuilder() to construct. + private FunctionGraphs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FunctionGraphs() { + partitionGraphs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FunctionGraphs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FunctionGraphs( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + partitionGraphs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + partitionGraphs_.add( + input.readMessage(org.tensorflow.proto.framework.GraphDef.parser(), extensionRegistry)); + break; + } + case 18: { + org.tensorflow.proto.framework.GraphDef.Builder subBuilder = null; + if (preOptimizationGraph_ != null) { + subBuilder = preOptimizationGraph_.toBuilder(); + } + preOptimizationGraph_ = input.readMessage(org.tensorflow.proto.framework.GraphDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(preOptimizationGraph_); + preOptimizationGraph_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + org.tensorflow.proto.framework.GraphDef.Builder subBuilder = null; + if (postOptimizationGraph_ != null) { + subBuilder = postOptimizationGraph_.toBuilder(); + } + postOptimizationGraph_ = input.readMessage(org.tensorflow.proto.framework.GraphDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(postOptimizationGraph_); + postOptimizationGraph_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + partitionGraphs_ = java.util.Collections.unmodifiableList(partitionGraphs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunMetadata_FunctionGraphs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunMetadata_FunctionGraphs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.class, org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.Builder.class); + } + + public static final int PARTITION_GRAPHS_FIELD_NUMBER = 1; + private java.util.List partitionGraphs_; + /** + *
+     * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public java.util.List getPartitionGraphsList() { + return partitionGraphs_; + } + /** + *
+     * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public java.util.List + getPartitionGraphsOrBuilderList() { + return partitionGraphs_; + } + /** + *
+     * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public int getPartitionGraphsCount() { + return partitionGraphs_.size(); + } + /** + *
+     * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public org.tensorflow.proto.framework.GraphDef getPartitionGraphs(int index) { + return partitionGraphs_.get(index); + } + /** + *
+     * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public org.tensorflow.proto.framework.GraphDefOrBuilder getPartitionGraphsOrBuilder( + int index) { + return partitionGraphs_.get(index); + } + + public static final int PRE_OPTIMIZATION_GRAPH_FIELD_NUMBER = 2; + private org.tensorflow.proto.framework.GraphDef preOptimizationGraph_; + /** + * .tensorflow.GraphDef pre_optimization_graph = 2; + */ + public boolean hasPreOptimizationGraph() { + return preOptimizationGraph_ != null; + } + /** + * .tensorflow.GraphDef pre_optimization_graph = 2; + */ + public org.tensorflow.proto.framework.GraphDef getPreOptimizationGraph() { + return preOptimizationGraph_ == null ? org.tensorflow.proto.framework.GraphDef.getDefaultInstance() : preOptimizationGraph_; + } + /** + * .tensorflow.GraphDef pre_optimization_graph = 2; + */ + public org.tensorflow.proto.framework.GraphDefOrBuilder getPreOptimizationGraphOrBuilder() { + return getPreOptimizationGraph(); + } + + public static final int POST_OPTIMIZATION_GRAPH_FIELD_NUMBER = 3; + private org.tensorflow.proto.framework.GraphDef postOptimizationGraph_; + /** + * .tensorflow.GraphDef post_optimization_graph = 3; + */ + public boolean hasPostOptimizationGraph() { + return postOptimizationGraph_ != null; + } + /** + * .tensorflow.GraphDef post_optimization_graph = 3; + */ + public org.tensorflow.proto.framework.GraphDef getPostOptimizationGraph() { + return postOptimizationGraph_ == null ? org.tensorflow.proto.framework.GraphDef.getDefaultInstance() : postOptimizationGraph_; + } + /** + * .tensorflow.GraphDef post_optimization_graph = 3; + */ + public org.tensorflow.proto.framework.GraphDefOrBuilder getPostOptimizationGraphOrBuilder() { + return getPostOptimizationGraph(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < partitionGraphs_.size(); i++) { + output.writeMessage(1, partitionGraphs_.get(i)); + } + if (preOptimizationGraph_ != null) { + output.writeMessage(2, getPreOptimizationGraph()); + } + if (postOptimizationGraph_ != null) { + output.writeMessage(3, getPostOptimizationGraph()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < partitionGraphs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, partitionGraphs_.get(i)); + } + if (preOptimizationGraph_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPreOptimizationGraph()); + } + if (postOptimizationGraph_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getPostOptimizationGraph()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.RunMetadata.FunctionGraphs)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.RunMetadata.FunctionGraphs other = (org.tensorflow.proto.framework.RunMetadata.FunctionGraphs) obj; + + if (!getPartitionGraphsList() + .equals(other.getPartitionGraphsList())) return false; + if (hasPreOptimizationGraph() != other.hasPreOptimizationGraph()) return false; + if (hasPreOptimizationGraph()) { + if (!getPreOptimizationGraph() + .equals(other.getPreOptimizationGraph())) return false; + } + if (hasPostOptimizationGraph() != other.hasPostOptimizationGraph()) return false; + if (hasPostOptimizationGraph()) { + if (!getPostOptimizationGraph() + .equals(other.getPostOptimizationGraph())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPartitionGraphsCount() > 0) { + hash = (37 * hash) + PARTITION_GRAPHS_FIELD_NUMBER; + hash = (53 * hash) + getPartitionGraphsList().hashCode(); + } + if (hasPreOptimizationGraph()) { + hash = (37 * hash) + PRE_OPTIMIZATION_GRAPH_FIELD_NUMBER; + hash = (53 * hash) + getPreOptimizationGraph().hashCode(); + } + if (hasPostOptimizationGraph()) { + hash = (37 * hash) + POST_OPTIMIZATION_GRAPH_FIELD_NUMBER; + hash = (53 * hash) + getPostOptimizationGraph().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.RunMetadata.FunctionGraphs parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RunMetadata.FunctionGraphs parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RunMetadata.FunctionGraphs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RunMetadata.FunctionGraphs 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.proto.framework.RunMetadata.FunctionGraphs parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RunMetadata.FunctionGraphs parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RunMetadata.FunctionGraphs parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RunMetadata.FunctionGraphs parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RunMetadata.FunctionGraphs parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RunMetadata.FunctionGraphs parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RunMetadata.FunctionGraphs parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RunMetadata.FunctionGraphs parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.RunMetadata.FunctionGraphs prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.RunMetadata.FunctionGraphs} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.RunMetadata.FunctionGraphs) + org.tensorflow.proto.framework.RunMetadata.FunctionGraphsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunMetadata_FunctionGraphs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunMetadata_FunctionGraphs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.class, org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPartitionGraphsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (partitionGraphsBuilder_ == null) { + partitionGraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + partitionGraphsBuilder_.clear(); + } + if (preOptimizationGraphBuilder_ == null) { + preOptimizationGraph_ = null; + } else { + preOptimizationGraph_ = null; + preOptimizationGraphBuilder_ = null; + } + if (postOptimizationGraphBuilder_ == null) { + postOptimizationGraph_ = null; + } else { + postOptimizationGraph_ = null; + postOptimizationGraphBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunMetadata_FunctionGraphs_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RunMetadata.FunctionGraphs getDefaultInstanceForType() { + return org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.RunMetadata.FunctionGraphs build() { + org.tensorflow.proto.framework.RunMetadata.FunctionGraphs result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RunMetadata.FunctionGraphs buildPartial() { + org.tensorflow.proto.framework.RunMetadata.FunctionGraphs result = new org.tensorflow.proto.framework.RunMetadata.FunctionGraphs(this); + int from_bitField0_ = bitField0_; + if (partitionGraphsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + partitionGraphs_ = java.util.Collections.unmodifiableList(partitionGraphs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.partitionGraphs_ = partitionGraphs_; + } else { + result.partitionGraphs_ = partitionGraphsBuilder_.build(); + } + if (preOptimizationGraphBuilder_ == null) { + result.preOptimizationGraph_ = preOptimizationGraph_; + } else { + result.preOptimizationGraph_ = preOptimizationGraphBuilder_.build(); + } + if (postOptimizationGraphBuilder_ == null) { + result.postOptimizationGraph_ = postOptimizationGraph_; + } else { + result.postOptimizationGraph_ = postOptimizationGraphBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.RunMetadata.FunctionGraphs) { + return mergeFrom((org.tensorflow.proto.framework.RunMetadata.FunctionGraphs)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.RunMetadata.FunctionGraphs other) { + if (other == org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.getDefaultInstance()) return this; + if (partitionGraphsBuilder_ == null) { + if (!other.partitionGraphs_.isEmpty()) { + if (partitionGraphs_.isEmpty()) { + partitionGraphs_ = other.partitionGraphs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePartitionGraphsIsMutable(); + partitionGraphs_.addAll(other.partitionGraphs_); + } + onChanged(); + } + } else { + if (!other.partitionGraphs_.isEmpty()) { + if (partitionGraphsBuilder_.isEmpty()) { + partitionGraphsBuilder_.dispose(); + partitionGraphsBuilder_ = null; + partitionGraphs_ = other.partitionGraphs_; + bitField0_ = (bitField0_ & ~0x00000001); + partitionGraphsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPartitionGraphsFieldBuilder() : null; + } else { + partitionGraphsBuilder_.addAllMessages(other.partitionGraphs_); + } + } + } + if (other.hasPreOptimizationGraph()) { + mergePreOptimizationGraph(other.getPreOptimizationGraph()); + } + if (other.hasPostOptimizationGraph()) { + mergePostOptimizationGraph(other.getPostOptimizationGraph()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.RunMetadata.FunctionGraphs parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.RunMetadata.FunctionGraphs) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List partitionGraphs_ = + java.util.Collections.emptyList(); + private void ensurePartitionGraphsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + partitionGraphs_ = new java.util.ArrayList(partitionGraphs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder> partitionGraphsBuilder_; + + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public java.util.List getPartitionGraphsList() { + if (partitionGraphsBuilder_ == null) { + return java.util.Collections.unmodifiableList(partitionGraphs_); + } else { + return partitionGraphsBuilder_.getMessageList(); + } + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public int getPartitionGraphsCount() { + if (partitionGraphsBuilder_ == null) { + return partitionGraphs_.size(); + } else { + return partitionGraphsBuilder_.getCount(); + } + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public org.tensorflow.proto.framework.GraphDef getPartitionGraphs(int index) { + if (partitionGraphsBuilder_ == null) { + return partitionGraphs_.get(index); + } else { + return partitionGraphsBuilder_.getMessage(index); + } + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public Builder setPartitionGraphs( + int index, org.tensorflow.proto.framework.GraphDef value) { + if (partitionGraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartitionGraphsIsMutable(); + partitionGraphs_.set(index, value); + onChanged(); + } else { + partitionGraphsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public Builder setPartitionGraphs( + int index, org.tensorflow.proto.framework.GraphDef.Builder builderForValue) { + if (partitionGraphsBuilder_ == null) { + ensurePartitionGraphsIsMutable(); + partitionGraphs_.set(index, builderForValue.build()); + onChanged(); + } else { + partitionGraphsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public Builder addPartitionGraphs(org.tensorflow.proto.framework.GraphDef value) { + if (partitionGraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartitionGraphsIsMutable(); + partitionGraphs_.add(value); + onChanged(); + } else { + partitionGraphsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public Builder addPartitionGraphs( + int index, org.tensorflow.proto.framework.GraphDef value) { + if (partitionGraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartitionGraphsIsMutable(); + partitionGraphs_.add(index, value); + onChanged(); + } else { + partitionGraphsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public Builder addPartitionGraphs( + org.tensorflow.proto.framework.GraphDef.Builder builderForValue) { + if (partitionGraphsBuilder_ == null) { + ensurePartitionGraphsIsMutable(); + partitionGraphs_.add(builderForValue.build()); + onChanged(); + } else { + partitionGraphsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public Builder addPartitionGraphs( + int index, org.tensorflow.proto.framework.GraphDef.Builder builderForValue) { + if (partitionGraphsBuilder_ == null) { + ensurePartitionGraphsIsMutable(); + partitionGraphs_.add(index, builderForValue.build()); + onChanged(); + } else { + partitionGraphsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public Builder addAllPartitionGraphs( + java.lang.Iterable values) { + if (partitionGraphsBuilder_ == null) { + ensurePartitionGraphsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, partitionGraphs_); + onChanged(); + } else { + partitionGraphsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public Builder clearPartitionGraphs() { + if (partitionGraphsBuilder_ == null) { + partitionGraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + partitionGraphsBuilder_.clear(); + } + return this; + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public Builder removePartitionGraphs(int index) { + if (partitionGraphsBuilder_ == null) { + ensurePartitionGraphsIsMutable(); + partitionGraphs_.remove(index); + onChanged(); + } else { + partitionGraphsBuilder_.remove(index); + } + return this; + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public org.tensorflow.proto.framework.GraphDef.Builder getPartitionGraphsBuilder( + int index) { + return getPartitionGraphsFieldBuilder().getBuilder(index); + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public org.tensorflow.proto.framework.GraphDefOrBuilder getPartitionGraphsOrBuilder( + int index) { + if (partitionGraphsBuilder_ == null) { + return partitionGraphs_.get(index); } else { + return partitionGraphsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public java.util.List + getPartitionGraphsOrBuilderList() { + if (partitionGraphsBuilder_ != null) { + return partitionGraphsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partitionGraphs_); + } + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public org.tensorflow.proto.framework.GraphDef.Builder addPartitionGraphsBuilder() { + return getPartitionGraphsFieldBuilder().addBuilder( + org.tensorflow.proto.framework.GraphDef.getDefaultInstance()); + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public org.tensorflow.proto.framework.GraphDef.Builder addPartitionGraphsBuilder( + int index) { + return getPartitionGraphsFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.GraphDef.getDefaultInstance()); + } + /** + *
+       * TODO(nareshmodi): Include some sort of function/cache-key identifier?
+       * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 1; + */ + public java.util.List + getPartitionGraphsBuilderList() { + return getPartitionGraphsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder> + getPartitionGraphsFieldBuilder() { + if (partitionGraphsBuilder_ == null) { + partitionGraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder>( + partitionGraphs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + partitionGraphs_ = null; + } + return partitionGraphsBuilder_; + } + + private org.tensorflow.proto.framework.GraphDef preOptimizationGraph_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder> preOptimizationGraphBuilder_; + /** + * .tensorflow.GraphDef pre_optimization_graph = 2; + */ + public boolean hasPreOptimizationGraph() { + return preOptimizationGraphBuilder_ != null || preOptimizationGraph_ != null; + } + /** + * .tensorflow.GraphDef pre_optimization_graph = 2; + */ + public org.tensorflow.proto.framework.GraphDef getPreOptimizationGraph() { + if (preOptimizationGraphBuilder_ == null) { + return preOptimizationGraph_ == null ? org.tensorflow.proto.framework.GraphDef.getDefaultInstance() : preOptimizationGraph_; + } else { + return preOptimizationGraphBuilder_.getMessage(); + } + } + /** + * .tensorflow.GraphDef pre_optimization_graph = 2; + */ + public Builder setPreOptimizationGraph(org.tensorflow.proto.framework.GraphDef value) { + if (preOptimizationGraphBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + preOptimizationGraph_ = value; + onChanged(); + } else { + preOptimizationGraphBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.GraphDef pre_optimization_graph = 2; + */ + public Builder setPreOptimizationGraph( + org.tensorflow.proto.framework.GraphDef.Builder builderForValue) { + if (preOptimizationGraphBuilder_ == null) { + preOptimizationGraph_ = builderForValue.build(); + onChanged(); + } else { + preOptimizationGraphBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.GraphDef pre_optimization_graph = 2; + */ + public Builder mergePreOptimizationGraph(org.tensorflow.proto.framework.GraphDef value) { + if (preOptimizationGraphBuilder_ == null) { + if (preOptimizationGraph_ != null) { + preOptimizationGraph_ = + org.tensorflow.proto.framework.GraphDef.newBuilder(preOptimizationGraph_).mergeFrom(value).buildPartial(); + } else { + preOptimizationGraph_ = value; + } + onChanged(); + } else { + preOptimizationGraphBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.GraphDef pre_optimization_graph = 2; + */ + public Builder clearPreOptimizationGraph() { + if (preOptimizationGraphBuilder_ == null) { + preOptimizationGraph_ = null; + onChanged(); + } else { + preOptimizationGraph_ = null; + preOptimizationGraphBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.GraphDef pre_optimization_graph = 2; + */ + public org.tensorflow.proto.framework.GraphDef.Builder getPreOptimizationGraphBuilder() { + + onChanged(); + return getPreOptimizationGraphFieldBuilder().getBuilder(); + } + /** + * .tensorflow.GraphDef pre_optimization_graph = 2; + */ + public org.tensorflow.proto.framework.GraphDefOrBuilder getPreOptimizationGraphOrBuilder() { + if (preOptimizationGraphBuilder_ != null) { + return preOptimizationGraphBuilder_.getMessageOrBuilder(); + } else { + return preOptimizationGraph_ == null ? + org.tensorflow.proto.framework.GraphDef.getDefaultInstance() : preOptimizationGraph_; + } + } + /** + * .tensorflow.GraphDef pre_optimization_graph = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder> + getPreOptimizationGraphFieldBuilder() { + if (preOptimizationGraphBuilder_ == null) { + preOptimizationGraphBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder>( + getPreOptimizationGraph(), + getParentForChildren(), + isClean()); + preOptimizationGraph_ = null; + } + return preOptimizationGraphBuilder_; + } + + private org.tensorflow.proto.framework.GraphDef postOptimizationGraph_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder> postOptimizationGraphBuilder_; + /** + * .tensorflow.GraphDef post_optimization_graph = 3; + */ + public boolean hasPostOptimizationGraph() { + return postOptimizationGraphBuilder_ != null || postOptimizationGraph_ != null; + } + /** + * .tensorflow.GraphDef post_optimization_graph = 3; + */ + public org.tensorflow.proto.framework.GraphDef getPostOptimizationGraph() { + if (postOptimizationGraphBuilder_ == null) { + return postOptimizationGraph_ == null ? org.tensorflow.proto.framework.GraphDef.getDefaultInstance() : postOptimizationGraph_; + } else { + return postOptimizationGraphBuilder_.getMessage(); + } + } + /** + * .tensorflow.GraphDef post_optimization_graph = 3; + */ + public Builder setPostOptimizationGraph(org.tensorflow.proto.framework.GraphDef value) { + if (postOptimizationGraphBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + postOptimizationGraph_ = value; + onChanged(); + } else { + postOptimizationGraphBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.GraphDef post_optimization_graph = 3; + */ + public Builder setPostOptimizationGraph( + org.tensorflow.proto.framework.GraphDef.Builder builderForValue) { + if (postOptimizationGraphBuilder_ == null) { + postOptimizationGraph_ = builderForValue.build(); + onChanged(); + } else { + postOptimizationGraphBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.GraphDef post_optimization_graph = 3; + */ + public Builder mergePostOptimizationGraph(org.tensorflow.proto.framework.GraphDef value) { + if (postOptimizationGraphBuilder_ == null) { + if (postOptimizationGraph_ != null) { + postOptimizationGraph_ = + org.tensorflow.proto.framework.GraphDef.newBuilder(postOptimizationGraph_).mergeFrom(value).buildPartial(); + } else { + postOptimizationGraph_ = value; + } + onChanged(); + } else { + postOptimizationGraphBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.GraphDef post_optimization_graph = 3; + */ + public Builder clearPostOptimizationGraph() { + if (postOptimizationGraphBuilder_ == null) { + postOptimizationGraph_ = null; + onChanged(); + } else { + postOptimizationGraph_ = null; + postOptimizationGraphBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.GraphDef post_optimization_graph = 3; + */ + public org.tensorflow.proto.framework.GraphDef.Builder getPostOptimizationGraphBuilder() { + + onChanged(); + return getPostOptimizationGraphFieldBuilder().getBuilder(); + } + /** + * .tensorflow.GraphDef post_optimization_graph = 3; + */ + public org.tensorflow.proto.framework.GraphDefOrBuilder getPostOptimizationGraphOrBuilder() { + if (postOptimizationGraphBuilder_ != null) { + return postOptimizationGraphBuilder_.getMessageOrBuilder(); + } else { + return postOptimizationGraph_ == null ? + org.tensorflow.proto.framework.GraphDef.getDefaultInstance() : postOptimizationGraph_; + } + } + /** + * .tensorflow.GraphDef post_optimization_graph = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder> + getPostOptimizationGraphFieldBuilder() { + if (postOptimizationGraphBuilder_ == null) { + postOptimizationGraphBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder>( + getPostOptimizationGraph(), + getParentForChildren(), + isClean()); + postOptimizationGraph_ = null; + } + return postOptimizationGraphBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.RunMetadata.FunctionGraphs) + } + + // @@protoc_insertion_point(class_scope:tensorflow.RunMetadata.FunctionGraphs) + private static final org.tensorflow.proto.framework.RunMetadata.FunctionGraphs DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.RunMetadata.FunctionGraphs(); + } + + public static org.tensorflow.proto.framework.RunMetadata.FunctionGraphs getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FunctionGraphs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FunctionGraphs(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RunMetadata.FunctionGraphs getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int STEP_STATS_FIELD_NUMBER = 1; + private org.tensorflow.proto.framework.StepStats stepStats_; + /** + *
+   * Statistics traced for this step. Populated if tracing is turned on via the
+   * "RunOptions" proto.
+   * EXPERIMENTAL: The format and set of events may change in future versions.
+   * 
+ * + * .tensorflow.StepStats step_stats = 1; + */ + public boolean hasStepStats() { + return stepStats_ != null; + } + /** + *
+   * Statistics traced for this step. Populated if tracing is turned on via the
+   * "RunOptions" proto.
+   * EXPERIMENTAL: The format and set of events may change in future versions.
+   * 
+ * + * .tensorflow.StepStats step_stats = 1; + */ + public org.tensorflow.proto.framework.StepStats getStepStats() { + return stepStats_ == null ? org.tensorflow.proto.framework.StepStats.getDefaultInstance() : stepStats_; + } + /** + *
+   * Statistics traced for this step. Populated if tracing is turned on via the
+   * "RunOptions" proto.
+   * EXPERIMENTAL: The format and set of events may change in future versions.
+   * 
+ * + * .tensorflow.StepStats step_stats = 1; + */ + public org.tensorflow.proto.framework.StepStatsOrBuilder getStepStatsOrBuilder() { + return getStepStats(); + } + + public static final int COST_GRAPH_FIELD_NUMBER = 2; + private org.tensorflow.proto.framework.CostGraphDef costGraph_; + /** + *
+   * The cost graph for the computation defined by the run call.
+   * 
+ * + * .tensorflow.CostGraphDef cost_graph = 2; + */ + public boolean hasCostGraph() { + return costGraph_ != null; + } + /** + *
+   * The cost graph for the computation defined by the run call.
+   * 
+ * + * .tensorflow.CostGraphDef cost_graph = 2; + */ + public org.tensorflow.proto.framework.CostGraphDef getCostGraph() { + return costGraph_ == null ? org.tensorflow.proto.framework.CostGraphDef.getDefaultInstance() : costGraph_; + } + /** + *
+   * The cost graph for the computation defined by the run call.
+   * 
+ * + * .tensorflow.CostGraphDef cost_graph = 2; + */ + public org.tensorflow.proto.framework.CostGraphDefOrBuilder getCostGraphOrBuilder() { + return getCostGraph(); + } + + public static final int PARTITION_GRAPHS_FIELD_NUMBER = 3; + private java.util.List partitionGraphs_; + /** + *
+   * Graphs of the partitions executed by executors.
+   * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public java.util.List getPartitionGraphsList() { + return partitionGraphs_; + } + /** + *
+   * Graphs of the partitions executed by executors.
+   * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public java.util.List + getPartitionGraphsOrBuilderList() { + return partitionGraphs_; + } + /** + *
+   * Graphs of the partitions executed by executors.
+   * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public int getPartitionGraphsCount() { + return partitionGraphs_.size(); + } + /** + *
+   * Graphs of the partitions executed by executors.
+   * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public org.tensorflow.proto.framework.GraphDef getPartitionGraphs(int index) { + return partitionGraphs_.get(index); + } + /** + *
+   * Graphs of the partitions executed by executors.
+   * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public org.tensorflow.proto.framework.GraphDefOrBuilder getPartitionGraphsOrBuilder( + int index) { + return partitionGraphs_.get(index); + } + + public static final int FUNCTION_GRAPHS_FIELD_NUMBER = 4; + private java.util.List functionGraphs_; + /** + *
+   * This is only populated for graphs that are run as functions in TensorFlow
+   * V2. There will be an entry below for each function that is traced.
+   * The main use cases of the post_optimization_graph and the partition_graphs
+   * is to give the caller insight into the graphs that were actually run by the
+   * runtime. Additional information (such as those in step_stats) will match
+   * these graphs.
+   * We also include the pre_optimization_graph since it is usually easier to
+   * read, and is helpful in situations where the caller wants to get a high
+   * level idea of what the built graph looks like (since the various graph
+   * optimization passes might change the structure of the graph significantly).
+   * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public java.util.List getFunctionGraphsList() { + return functionGraphs_; + } + /** + *
+   * This is only populated for graphs that are run as functions in TensorFlow
+   * V2. There will be an entry below for each function that is traced.
+   * The main use cases of the post_optimization_graph and the partition_graphs
+   * is to give the caller insight into the graphs that were actually run by the
+   * runtime. Additional information (such as those in step_stats) will match
+   * these graphs.
+   * We also include the pre_optimization_graph since it is usually easier to
+   * read, and is helpful in situations where the caller wants to get a high
+   * level idea of what the built graph looks like (since the various graph
+   * optimization passes might change the structure of the graph significantly).
+   * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public java.util.List + getFunctionGraphsOrBuilderList() { + return functionGraphs_; + } + /** + *
+   * This is only populated for graphs that are run as functions in TensorFlow
+   * V2. There will be an entry below for each function that is traced.
+   * The main use cases of the post_optimization_graph and the partition_graphs
+   * is to give the caller insight into the graphs that were actually run by the
+   * runtime. Additional information (such as those in step_stats) will match
+   * these graphs.
+   * We also include the pre_optimization_graph since it is usually easier to
+   * read, and is helpful in situations where the caller wants to get a high
+   * level idea of what the built graph looks like (since the various graph
+   * optimization passes might change the structure of the graph significantly).
+   * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public int getFunctionGraphsCount() { + return functionGraphs_.size(); + } + /** + *
+   * This is only populated for graphs that are run as functions in TensorFlow
+   * V2. There will be an entry below for each function that is traced.
+   * The main use cases of the post_optimization_graph and the partition_graphs
+   * is to give the caller insight into the graphs that were actually run by the
+   * runtime. Additional information (such as those in step_stats) will match
+   * these graphs.
+   * We also include the pre_optimization_graph since it is usually easier to
+   * read, and is helpful in situations where the caller wants to get a high
+   * level idea of what the built graph looks like (since the various graph
+   * optimization passes might change the structure of the graph significantly).
+   * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public org.tensorflow.proto.framework.RunMetadata.FunctionGraphs getFunctionGraphs(int index) { + return functionGraphs_.get(index); + } + /** + *
+   * This is only populated for graphs that are run as functions in TensorFlow
+   * V2. There will be an entry below for each function that is traced.
+   * The main use cases of the post_optimization_graph and the partition_graphs
+   * is to give the caller insight into the graphs that were actually run by the
+   * runtime. Additional information (such as those in step_stats) will match
+   * these graphs.
+   * We also include the pre_optimization_graph since it is usually easier to
+   * read, and is helpful in situations where the caller wants to get a high
+   * level idea of what the built graph looks like (since the various graph
+   * optimization passes might change the structure of the graph significantly).
+   * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public org.tensorflow.proto.framework.RunMetadata.FunctionGraphsOrBuilder getFunctionGraphsOrBuilder( + int index) { + return functionGraphs_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (stepStats_ != null) { + output.writeMessage(1, getStepStats()); + } + if (costGraph_ != null) { + output.writeMessage(2, getCostGraph()); + } + for (int i = 0; i < partitionGraphs_.size(); i++) { + output.writeMessage(3, partitionGraphs_.get(i)); + } + for (int i = 0; i < functionGraphs_.size(); i++) { + output.writeMessage(4, functionGraphs_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (stepStats_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStepStats()); + } + if (costGraph_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCostGraph()); + } + for (int i = 0; i < partitionGraphs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, partitionGraphs_.get(i)); + } + for (int i = 0; i < functionGraphs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, functionGraphs_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.RunMetadata)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.RunMetadata other = (org.tensorflow.proto.framework.RunMetadata) obj; + + if (hasStepStats() != other.hasStepStats()) return false; + if (hasStepStats()) { + if (!getStepStats() + .equals(other.getStepStats())) return false; + } + if (hasCostGraph() != other.hasCostGraph()) return false; + if (hasCostGraph()) { + if (!getCostGraph() + .equals(other.getCostGraph())) return false; + } + if (!getPartitionGraphsList() + .equals(other.getPartitionGraphsList())) return false; + if (!getFunctionGraphsList() + .equals(other.getFunctionGraphsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStepStats()) { + hash = (37 * hash) + STEP_STATS_FIELD_NUMBER; + hash = (53 * hash) + getStepStats().hashCode(); + } + if (hasCostGraph()) { + hash = (37 * hash) + COST_GRAPH_FIELD_NUMBER; + hash = (53 * hash) + getCostGraph().hashCode(); + } + if (getPartitionGraphsCount() > 0) { + hash = (37 * hash) + PARTITION_GRAPHS_FIELD_NUMBER; + hash = (53 * hash) + getPartitionGraphsList().hashCode(); + } + if (getFunctionGraphsCount() > 0) { + hash = (37 * hash) + FUNCTION_GRAPHS_FIELD_NUMBER; + hash = (53 * hash) + getFunctionGraphsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.RunMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RunMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RunMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RunMetadata 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.proto.framework.RunMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RunMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RunMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RunMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RunMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RunMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RunMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RunMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.RunMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Metadata output (i.e., non-Tensor) for a single Run() call.
+   * 
+ * + * Protobuf type {@code tensorflow.RunMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.RunMetadata) + org.tensorflow.proto.framework.RunMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RunMetadata.class, org.tensorflow.proto.framework.RunMetadata.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.RunMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPartitionGraphsFieldBuilder(); + getFunctionGraphsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (stepStatsBuilder_ == null) { + stepStats_ = null; + } else { + stepStats_ = null; + stepStatsBuilder_ = null; + } + if (costGraphBuilder_ == null) { + costGraph_ = null; + } else { + costGraph_ = null; + costGraphBuilder_ = null; + } + if (partitionGraphsBuilder_ == null) { + partitionGraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + partitionGraphsBuilder_.clear(); + } + if (functionGraphsBuilder_ == null) { + functionGraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + functionGraphsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunMetadata_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RunMetadata getDefaultInstanceForType() { + return org.tensorflow.proto.framework.RunMetadata.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.RunMetadata build() { + org.tensorflow.proto.framework.RunMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RunMetadata buildPartial() { + org.tensorflow.proto.framework.RunMetadata result = new org.tensorflow.proto.framework.RunMetadata(this); + int from_bitField0_ = bitField0_; + if (stepStatsBuilder_ == null) { + result.stepStats_ = stepStats_; + } else { + result.stepStats_ = stepStatsBuilder_.build(); + } + if (costGraphBuilder_ == null) { + result.costGraph_ = costGraph_; + } else { + result.costGraph_ = costGraphBuilder_.build(); + } + if (partitionGraphsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + partitionGraphs_ = java.util.Collections.unmodifiableList(partitionGraphs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.partitionGraphs_ = partitionGraphs_; + } else { + result.partitionGraphs_ = partitionGraphsBuilder_.build(); + } + if (functionGraphsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + functionGraphs_ = java.util.Collections.unmodifiableList(functionGraphs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.functionGraphs_ = functionGraphs_; + } else { + result.functionGraphs_ = functionGraphsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.RunMetadata) { + return mergeFrom((org.tensorflow.proto.framework.RunMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.RunMetadata other) { + if (other == org.tensorflow.proto.framework.RunMetadata.getDefaultInstance()) return this; + if (other.hasStepStats()) { + mergeStepStats(other.getStepStats()); + } + if (other.hasCostGraph()) { + mergeCostGraph(other.getCostGraph()); + } + if (partitionGraphsBuilder_ == null) { + if (!other.partitionGraphs_.isEmpty()) { + if (partitionGraphs_.isEmpty()) { + partitionGraphs_ = other.partitionGraphs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePartitionGraphsIsMutable(); + partitionGraphs_.addAll(other.partitionGraphs_); + } + onChanged(); + } + } else { + if (!other.partitionGraphs_.isEmpty()) { + if (partitionGraphsBuilder_.isEmpty()) { + partitionGraphsBuilder_.dispose(); + partitionGraphsBuilder_ = null; + partitionGraphs_ = other.partitionGraphs_; + bitField0_ = (bitField0_ & ~0x00000001); + partitionGraphsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPartitionGraphsFieldBuilder() : null; + } else { + partitionGraphsBuilder_.addAllMessages(other.partitionGraphs_); + } + } + } + if (functionGraphsBuilder_ == null) { + if (!other.functionGraphs_.isEmpty()) { + if (functionGraphs_.isEmpty()) { + functionGraphs_ = other.functionGraphs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFunctionGraphsIsMutable(); + functionGraphs_.addAll(other.functionGraphs_); + } + onChanged(); + } + } else { + if (!other.functionGraphs_.isEmpty()) { + if (functionGraphsBuilder_.isEmpty()) { + functionGraphsBuilder_.dispose(); + functionGraphsBuilder_ = null; + functionGraphs_ = other.functionGraphs_; + bitField0_ = (bitField0_ & ~0x00000002); + functionGraphsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFunctionGraphsFieldBuilder() : null; + } else { + functionGraphsBuilder_.addAllMessages(other.functionGraphs_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.RunMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.RunMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private org.tensorflow.proto.framework.StepStats stepStats_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StepStats, org.tensorflow.proto.framework.StepStats.Builder, org.tensorflow.proto.framework.StepStatsOrBuilder> stepStatsBuilder_; + /** + *
+     * Statistics traced for this step. Populated if tracing is turned on via the
+     * "RunOptions" proto.
+     * EXPERIMENTAL: The format and set of events may change in future versions.
+     * 
+ * + * .tensorflow.StepStats step_stats = 1; + */ + public boolean hasStepStats() { + return stepStatsBuilder_ != null || stepStats_ != null; + } + /** + *
+     * Statistics traced for this step. Populated if tracing is turned on via the
+     * "RunOptions" proto.
+     * EXPERIMENTAL: The format and set of events may change in future versions.
+     * 
+ * + * .tensorflow.StepStats step_stats = 1; + */ + public org.tensorflow.proto.framework.StepStats getStepStats() { + if (stepStatsBuilder_ == null) { + return stepStats_ == null ? org.tensorflow.proto.framework.StepStats.getDefaultInstance() : stepStats_; + } else { + return stepStatsBuilder_.getMessage(); + } + } + /** + *
+     * Statistics traced for this step. Populated if tracing is turned on via the
+     * "RunOptions" proto.
+     * EXPERIMENTAL: The format and set of events may change in future versions.
+     * 
+ * + * .tensorflow.StepStats step_stats = 1; + */ + public Builder setStepStats(org.tensorflow.proto.framework.StepStats value) { + if (stepStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepStats_ = value; + onChanged(); + } else { + stepStatsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Statistics traced for this step. Populated if tracing is turned on via the
+     * "RunOptions" proto.
+     * EXPERIMENTAL: The format and set of events may change in future versions.
+     * 
+ * + * .tensorflow.StepStats step_stats = 1; + */ + public Builder setStepStats( + org.tensorflow.proto.framework.StepStats.Builder builderForValue) { + if (stepStatsBuilder_ == null) { + stepStats_ = builderForValue.build(); + onChanged(); + } else { + stepStatsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Statistics traced for this step. Populated if tracing is turned on via the
+     * "RunOptions" proto.
+     * EXPERIMENTAL: The format and set of events may change in future versions.
+     * 
+ * + * .tensorflow.StepStats step_stats = 1; + */ + public Builder mergeStepStats(org.tensorflow.proto.framework.StepStats value) { + if (stepStatsBuilder_ == null) { + if (stepStats_ != null) { + stepStats_ = + org.tensorflow.proto.framework.StepStats.newBuilder(stepStats_).mergeFrom(value).buildPartial(); + } else { + stepStats_ = value; + } + onChanged(); + } else { + stepStatsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Statistics traced for this step. Populated if tracing is turned on via the
+     * "RunOptions" proto.
+     * EXPERIMENTAL: The format and set of events may change in future versions.
+     * 
+ * + * .tensorflow.StepStats step_stats = 1; + */ + public Builder clearStepStats() { + if (stepStatsBuilder_ == null) { + stepStats_ = null; + onChanged(); + } else { + stepStats_ = null; + stepStatsBuilder_ = null; + } + + return this; + } + /** + *
+     * Statistics traced for this step. Populated if tracing is turned on via the
+     * "RunOptions" proto.
+     * EXPERIMENTAL: The format and set of events may change in future versions.
+     * 
+ * + * .tensorflow.StepStats step_stats = 1; + */ + public org.tensorflow.proto.framework.StepStats.Builder getStepStatsBuilder() { + + onChanged(); + return getStepStatsFieldBuilder().getBuilder(); + } + /** + *
+     * Statistics traced for this step. Populated if tracing is turned on via the
+     * "RunOptions" proto.
+     * EXPERIMENTAL: The format and set of events may change in future versions.
+     * 
+ * + * .tensorflow.StepStats step_stats = 1; + */ + public org.tensorflow.proto.framework.StepStatsOrBuilder getStepStatsOrBuilder() { + if (stepStatsBuilder_ != null) { + return stepStatsBuilder_.getMessageOrBuilder(); + } else { + return stepStats_ == null ? + org.tensorflow.proto.framework.StepStats.getDefaultInstance() : stepStats_; + } + } + /** + *
+     * Statistics traced for this step. Populated if tracing is turned on via the
+     * "RunOptions" proto.
+     * EXPERIMENTAL: The format and set of events may change in future versions.
+     * 
+ * + * .tensorflow.StepStats step_stats = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StepStats, org.tensorflow.proto.framework.StepStats.Builder, org.tensorflow.proto.framework.StepStatsOrBuilder> + getStepStatsFieldBuilder() { + if (stepStatsBuilder_ == null) { + stepStatsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StepStats, org.tensorflow.proto.framework.StepStats.Builder, org.tensorflow.proto.framework.StepStatsOrBuilder>( + getStepStats(), + getParentForChildren(), + isClean()); + stepStats_ = null; + } + return stepStatsBuilder_; + } + + private org.tensorflow.proto.framework.CostGraphDef costGraph_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CostGraphDef, org.tensorflow.proto.framework.CostGraphDef.Builder, org.tensorflow.proto.framework.CostGraphDefOrBuilder> costGraphBuilder_; + /** + *
+     * The cost graph for the computation defined by the run call.
+     * 
+ * + * .tensorflow.CostGraphDef cost_graph = 2; + */ + public boolean hasCostGraph() { + return costGraphBuilder_ != null || costGraph_ != null; + } + /** + *
+     * The cost graph for the computation defined by the run call.
+     * 
+ * + * .tensorflow.CostGraphDef cost_graph = 2; + */ + public org.tensorflow.proto.framework.CostGraphDef getCostGraph() { + if (costGraphBuilder_ == null) { + return costGraph_ == null ? org.tensorflow.proto.framework.CostGraphDef.getDefaultInstance() : costGraph_; + } else { + return costGraphBuilder_.getMessage(); + } + } + /** + *
+     * The cost graph for the computation defined by the run call.
+     * 
+ * + * .tensorflow.CostGraphDef cost_graph = 2; + */ + public Builder setCostGraph(org.tensorflow.proto.framework.CostGraphDef value) { + if (costGraphBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + costGraph_ = value; + onChanged(); + } else { + costGraphBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The cost graph for the computation defined by the run call.
+     * 
+ * + * .tensorflow.CostGraphDef cost_graph = 2; + */ + public Builder setCostGraph( + org.tensorflow.proto.framework.CostGraphDef.Builder builderForValue) { + if (costGraphBuilder_ == null) { + costGraph_ = builderForValue.build(); + onChanged(); + } else { + costGraphBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The cost graph for the computation defined by the run call.
+     * 
+ * + * .tensorflow.CostGraphDef cost_graph = 2; + */ + public Builder mergeCostGraph(org.tensorflow.proto.framework.CostGraphDef value) { + if (costGraphBuilder_ == null) { + if (costGraph_ != null) { + costGraph_ = + org.tensorflow.proto.framework.CostGraphDef.newBuilder(costGraph_).mergeFrom(value).buildPartial(); + } else { + costGraph_ = value; + } + onChanged(); + } else { + costGraphBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The cost graph for the computation defined by the run call.
+     * 
+ * + * .tensorflow.CostGraphDef cost_graph = 2; + */ + public Builder clearCostGraph() { + if (costGraphBuilder_ == null) { + costGraph_ = null; + onChanged(); + } else { + costGraph_ = null; + costGraphBuilder_ = null; + } + + return this; + } + /** + *
+     * The cost graph for the computation defined by the run call.
+     * 
+ * + * .tensorflow.CostGraphDef cost_graph = 2; + */ + public org.tensorflow.proto.framework.CostGraphDef.Builder getCostGraphBuilder() { + + onChanged(); + return getCostGraphFieldBuilder().getBuilder(); + } + /** + *
+     * The cost graph for the computation defined by the run call.
+     * 
+ * + * .tensorflow.CostGraphDef cost_graph = 2; + */ + public org.tensorflow.proto.framework.CostGraphDefOrBuilder getCostGraphOrBuilder() { + if (costGraphBuilder_ != null) { + return costGraphBuilder_.getMessageOrBuilder(); + } else { + return costGraph_ == null ? + org.tensorflow.proto.framework.CostGraphDef.getDefaultInstance() : costGraph_; + } + } + /** + *
+     * The cost graph for the computation defined by the run call.
+     * 
+ * + * .tensorflow.CostGraphDef cost_graph = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CostGraphDef, org.tensorflow.proto.framework.CostGraphDef.Builder, org.tensorflow.proto.framework.CostGraphDefOrBuilder> + getCostGraphFieldBuilder() { + if (costGraphBuilder_ == null) { + costGraphBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.CostGraphDef, org.tensorflow.proto.framework.CostGraphDef.Builder, org.tensorflow.proto.framework.CostGraphDefOrBuilder>( + getCostGraph(), + getParentForChildren(), + isClean()); + costGraph_ = null; + } + return costGraphBuilder_; + } + + private java.util.List partitionGraphs_ = + java.util.Collections.emptyList(); + private void ensurePartitionGraphsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + partitionGraphs_ = new java.util.ArrayList(partitionGraphs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder> partitionGraphsBuilder_; + + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public java.util.List getPartitionGraphsList() { + if (partitionGraphsBuilder_ == null) { + return java.util.Collections.unmodifiableList(partitionGraphs_); + } else { + return partitionGraphsBuilder_.getMessageList(); + } + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public int getPartitionGraphsCount() { + if (partitionGraphsBuilder_ == null) { + return partitionGraphs_.size(); + } else { + return partitionGraphsBuilder_.getCount(); + } + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public org.tensorflow.proto.framework.GraphDef getPartitionGraphs(int index) { + if (partitionGraphsBuilder_ == null) { + return partitionGraphs_.get(index); + } else { + return partitionGraphsBuilder_.getMessage(index); + } + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public Builder setPartitionGraphs( + int index, org.tensorflow.proto.framework.GraphDef value) { + if (partitionGraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartitionGraphsIsMutable(); + partitionGraphs_.set(index, value); + onChanged(); + } else { + partitionGraphsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public Builder setPartitionGraphs( + int index, org.tensorflow.proto.framework.GraphDef.Builder builderForValue) { + if (partitionGraphsBuilder_ == null) { + ensurePartitionGraphsIsMutable(); + partitionGraphs_.set(index, builderForValue.build()); + onChanged(); + } else { + partitionGraphsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public Builder addPartitionGraphs(org.tensorflow.proto.framework.GraphDef value) { + if (partitionGraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartitionGraphsIsMutable(); + partitionGraphs_.add(value); + onChanged(); + } else { + partitionGraphsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public Builder addPartitionGraphs( + int index, org.tensorflow.proto.framework.GraphDef value) { + if (partitionGraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartitionGraphsIsMutable(); + partitionGraphs_.add(index, value); + onChanged(); + } else { + partitionGraphsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public Builder addPartitionGraphs( + org.tensorflow.proto.framework.GraphDef.Builder builderForValue) { + if (partitionGraphsBuilder_ == null) { + ensurePartitionGraphsIsMutable(); + partitionGraphs_.add(builderForValue.build()); + onChanged(); + } else { + partitionGraphsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public Builder addPartitionGraphs( + int index, org.tensorflow.proto.framework.GraphDef.Builder builderForValue) { + if (partitionGraphsBuilder_ == null) { + ensurePartitionGraphsIsMutable(); + partitionGraphs_.add(index, builderForValue.build()); + onChanged(); + } else { + partitionGraphsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public Builder addAllPartitionGraphs( + java.lang.Iterable values) { + if (partitionGraphsBuilder_ == null) { + ensurePartitionGraphsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, partitionGraphs_); + onChanged(); + } else { + partitionGraphsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public Builder clearPartitionGraphs() { + if (partitionGraphsBuilder_ == null) { + partitionGraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + partitionGraphsBuilder_.clear(); + } + return this; + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public Builder removePartitionGraphs(int index) { + if (partitionGraphsBuilder_ == null) { + ensurePartitionGraphsIsMutable(); + partitionGraphs_.remove(index); + onChanged(); + } else { + partitionGraphsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public org.tensorflow.proto.framework.GraphDef.Builder getPartitionGraphsBuilder( + int index) { + return getPartitionGraphsFieldBuilder().getBuilder(index); + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public org.tensorflow.proto.framework.GraphDefOrBuilder getPartitionGraphsOrBuilder( + int index) { + if (partitionGraphsBuilder_ == null) { + return partitionGraphs_.get(index); } else { + return partitionGraphsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public java.util.List + getPartitionGraphsOrBuilderList() { + if (partitionGraphsBuilder_ != null) { + return partitionGraphsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partitionGraphs_); + } + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public org.tensorflow.proto.framework.GraphDef.Builder addPartitionGraphsBuilder() { + return getPartitionGraphsFieldBuilder().addBuilder( + org.tensorflow.proto.framework.GraphDef.getDefaultInstance()); + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public org.tensorflow.proto.framework.GraphDef.Builder addPartitionGraphsBuilder( + int index) { + return getPartitionGraphsFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.GraphDef.getDefaultInstance()); + } + /** + *
+     * Graphs of the partitions executed by executors.
+     * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + public java.util.List + getPartitionGraphsBuilderList() { + return getPartitionGraphsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder> + getPartitionGraphsFieldBuilder() { + if (partitionGraphsBuilder_ == null) { + partitionGraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.GraphDef, org.tensorflow.proto.framework.GraphDef.Builder, org.tensorflow.proto.framework.GraphDefOrBuilder>( + partitionGraphs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + partitionGraphs_ = null; + } + return partitionGraphsBuilder_; + } + + private java.util.List functionGraphs_ = + java.util.Collections.emptyList(); + private void ensureFunctionGraphsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + functionGraphs_ = new java.util.ArrayList(functionGraphs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.RunMetadata.FunctionGraphs, org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.Builder, org.tensorflow.proto.framework.RunMetadata.FunctionGraphsOrBuilder> functionGraphsBuilder_; + + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public java.util.List getFunctionGraphsList() { + if (functionGraphsBuilder_ == null) { + return java.util.Collections.unmodifiableList(functionGraphs_); + } else { + return functionGraphsBuilder_.getMessageList(); + } + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public int getFunctionGraphsCount() { + if (functionGraphsBuilder_ == null) { + return functionGraphs_.size(); + } else { + return functionGraphsBuilder_.getCount(); + } + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public org.tensorflow.proto.framework.RunMetadata.FunctionGraphs getFunctionGraphs(int index) { + if (functionGraphsBuilder_ == null) { + return functionGraphs_.get(index); + } else { + return functionGraphsBuilder_.getMessage(index); + } + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public Builder setFunctionGraphs( + int index, org.tensorflow.proto.framework.RunMetadata.FunctionGraphs value) { + if (functionGraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFunctionGraphsIsMutable(); + functionGraphs_.set(index, value); + onChanged(); + } else { + functionGraphsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public Builder setFunctionGraphs( + int index, org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.Builder builderForValue) { + if (functionGraphsBuilder_ == null) { + ensureFunctionGraphsIsMutable(); + functionGraphs_.set(index, builderForValue.build()); + onChanged(); + } else { + functionGraphsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public Builder addFunctionGraphs(org.tensorflow.proto.framework.RunMetadata.FunctionGraphs value) { + if (functionGraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFunctionGraphsIsMutable(); + functionGraphs_.add(value); + onChanged(); + } else { + functionGraphsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public Builder addFunctionGraphs( + int index, org.tensorflow.proto.framework.RunMetadata.FunctionGraphs value) { + if (functionGraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFunctionGraphsIsMutable(); + functionGraphs_.add(index, value); + onChanged(); + } else { + functionGraphsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public Builder addFunctionGraphs( + org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.Builder builderForValue) { + if (functionGraphsBuilder_ == null) { + ensureFunctionGraphsIsMutable(); + functionGraphs_.add(builderForValue.build()); + onChanged(); + } else { + functionGraphsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public Builder addFunctionGraphs( + int index, org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.Builder builderForValue) { + if (functionGraphsBuilder_ == null) { + ensureFunctionGraphsIsMutable(); + functionGraphs_.add(index, builderForValue.build()); + onChanged(); + } else { + functionGraphsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public Builder addAllFunctionGraphs( + java.lang.Iterable values) { + if (functionGraphsBuilder_ == null) { + ensureFunctionGraphsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, functionGraphs_); + onChanged(); + } else { + functionGraphsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public Builder clearFunctionGraphs() { + if (functionGraphsBuilder_ == null) { + functionGraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + functionGraphsBuilder_.clear(); + } + return this; + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public Builder removeFunctionGraphs(int index) { + if (functionGraphsBuilder_ == null) { + ensureFunctionGraphsIsMutable(); + functionGraphs_.remove(index); + onChanged(); + } else { + functionGraphsBuilder_.remove(index); + } + return this; + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.Builder getFunctionGraphsBuilder( + int index) { + return getFunctionGraphsFieldBuilder().getBuilder(index); + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public org.tensorflow.proto.framework.RunMetadata.FunctionGraphsOrBuilder getFunctionGraphsOrBuilder( + int index) { + if (functionGraphsBuilder_ == null) { + return functionGraphs_.get(index); } else { + return functionGraphsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public java.util.List + getFunctionGraphsOrBuilderList() { + if (functionGraphsBuilder_ != null) { + return functionGraphsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(functionGraphs_); + } + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.Builder addFunctionGraphsBuilder() { + return getFunctionGraphsFieldBuilder().addBuilder( + org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.getDefaultInstance()); + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.Builder addFunctionGraphsBuilder( + int index) { + return getFunctionGraphsFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.getDefaultInstance()); + } + /** + *
+     * This is only populated for graphs that are run as functions in TensorFlow
+     * V2. There will be an entry below for each function that is traced.
+     * The main use cases of the post_optimization_graph and the partition_graphs
+     * is to give the caller insight into the graphs that were actually run by the
+     * runtime. Additional information (such as those in step_stats) will match
+     * these graphs.
+     * We also include the pre_optimization_graph since it is usually easier to
+     * read, and is helpful in situations where the caller wants to get a high
+     * level idea of what the built graph looks like (since the various graph
+     * optimization passes might change the structure of the graph significantly).
+     * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + public java.util.List + getFunctionGraphsBuilderList() { + return getFunctionGraphsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.RunMetadata.FunctionGraphs, org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.Builder, org.tensorflow.proto.framework.RunMetadata.FunctionGraphsOrBuilder> + getFunctionGraphsFieldBuilder() { + if (functionGraphsBuilder_ == null) { + functionGraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.RunMetadata.FunctionGraphs, org.tensorflow.proto.framework.RunMetadata.FunctionGraphs.Builder, org.tensorflow.proto.framework.RunMetadata.FunctionGraphsOrBuilder>( + functionGraphs_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + functionGraphs_ = null; + } + return functionGraphsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.RunMetadata) + } + + // @@protoc_insertion_point(class_scope:tensorflow.RunMetadata) + private static final org.tensorflow.proto.framework.RunMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.RunMetadata(); + } + + public static org.tensorflow.proto.framework.RunMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RunMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RunMetadataOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RunMetadataOrBuilder.java new file mode 100644 index 00000000000..21e15741316 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RunMetadataOrBuilder.java @@ -0,0 +1,198 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +public interface RunMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.RunMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Statistics traced for this step. Populated if tracing is turned on via the
+   * "RunOptions" proto.
+   * EXPERIMENTAL: The format and set of events may change in future versions.
+   * 
+ * + * .tensorflow.StepStats step_stats = 1; + */ + boolean hasStepStats(); + /** + *
+   * Statistics traced for this step. Populated if tracing is turned on via the
+   * "RunOptions" proto.
+   * EXPERIMENTAL: The format and set of events may change in future versions.
+   * 
+ * + * .tensorflow.StepStats step_stats = 1; + */ + org.tensorflow.proto.framework.StepStats getStepStats(); + /** + *
+   * Statistics traced for this step. Populated if tracing is turned on via the
+   * "RunOptions" proto.
+   * EXPERIMENTAL: The format and set of events may change in future versions.
+   * 
+ * + * .tensorflow.StepStats step_stats = 1; + */ + org.tensorflow.proto.framework.StepStatsOrBuilder getStepStatsOrBuilder(); + + /** + *
+   * The cost graph for the computation defined by the run call.
+   * 
+ * + * .tensorflow.CostGraphDef cost_graph = 2; + */ + boolean hasCostGraph(); + /** + *
+   * The cost graph for the computation defined by the run call.
+   * 
+ * + * .tensorflow.CostGraphDef cost_graph = 2; + */ + org.tensorflow.proto.framework.CostGraphDef getCostGraph(); + /** + *
+   * The cost graph for the computation defined by the run call.
+   * 
+ * + * .tensorflow.CostGraphDef cost_graph = 2; + */ + org.tensorflow.proto.framework.CostGraphDefOrBuilder getCostGraphOrBuilder(); + + /** + *
+   * Graphs of the partitions executed by executors.
+   * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + java.util.List + getPartitionGraphsList(); + /** + *
+   * Graphs of the partitions executed by executors.
+   * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + org.tensorflow.proto.framework.GraphDef getPartitionGraphs(int index); + /** + *
+   * Graphs of the partitions executed by executors.
+   * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + int getPartitionGraphsCount(); + /** + *
+   * Graphs of the partitions executed by executors.
+   * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + java.util.List + getPartitionGraphsOrBuilderList(); + /** + *
+   * Graphs of the partitions executed by executors.
+   * 
+ * + * repeated .tensorflow.GraphDef partition_graphs = 3; + */ + org.tensorflow.proto.framework.GraphDefOrBuilder getPartitionGraphsOrBuilder( + int index); + + /** + *
+   * This is only populated for graphs that are run as functions in TensorFlow
+   * V2. There will be an entry below for each function that is traced.
+   * The main use cases of the post_optimization_graph and the partition_graphs
+   * is to give the caller insight into the graphs that were actually run by the
+   * runtime. Additional information (such as those in step_stats) will match
+   * these graphs.
+   * We also include the pre_optimization_graph since it is usually easier to
+   * read, and is helpful in situations where the caller wants to get a high
+   * level idea of what the built graph looks like (since the various graph
+   * optimization passes might change the structure of the graph significantly).
+   * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + java.util.List + getFunctionGraphsList(); + /** + *
+   * This is only populated for graphs that are run as functions in TensorFlow
+   * V2. There will be an entry below for each function that is traced.
+   * The main use cases of the post_optimization_graph and the partition_graphs
+   * is to give the caller insight into the graphs that were actually run by the
+   * runtime. Additional information (such as those in step_stats) will match
+   * these graphs.
+   * We also include the pre_optimization_graph since it is usually easier to
+   * read, and is helpful in situations where the caller wants to get a high
+   * level idea of what the built graph looks like (since the various graph
+   * optimization passes might change the structure of the graph significantly).
+   * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + org.tensorflow.proto.framework.RunMetadata.FunctionGraphs getFunctionGraphs(int index); + /** + *
+   * This is only populated for graphs that are run as functions in TensorFlow
+   * V2. There will be an entry below for each function that is traced.
+   * The main use cases of the post_optimization_graph and the partition_graphs
+   * is to give the caller insight into the graphs that were actually run by the
+   * runtime. Additional information (such as those in step_stats) will match
+   * these graphs.
+   * We also include the pre_optimization_graph since it is usually easier to
+   * read, and is helpful in situations where the caller wants to get a high
+   * level idea of what the built graph looks like (since the various graph
+   * optimization passes might change the structure of the graph significantly).
+   * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + int getFunctionGraphsCount(); + /** + *
+   * This is only populated for graphs that are run as functions in TensorFlow
+   * V2. There will be an entry below for each function that is traced.
+   * The main use cases of the post_optimization_graph and the partition_graphs
+   * is to give the caller insight into the graphs that were actually run by the
+   * runtime. Additional information (such as those in step_stats) will match
+   * these graphs.
+   * We also include the pre_optimization_graph since it is usually easier to
+   * read, and is helpful in situations where the caller wants to get a high
+   * level idea of what the built graph looks like (since the various graph
+   * optimization passes might change the structure of the graph significantly).
+   * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + java.util.List + getFunctionGraphsOrBuilderList(); + /** + *
+   * This is only populated for graphs that are run as functions in TensorFlow
+   * V2. There will be an entry below for each function that is traced.
+   * The main use cases of the post_optimization_graph and the partition_graphs
+   * is to give the caller insight into the graphs that were actually run by the
+   * runtime. Additional information (such as those in step_stats) will match
+   * these graphs.
+   * We also include the pre_optimization_graph since it is usually easier to
+   * read, and is helpful in situations where the caller wants to get a high
+   * level idea of what the built graph looks like (since the various graph
+   * optimization passes might change the structure of the graph significantly).
+   * 
+ * + * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4; + */ + org.tensorflow.proto.framework.RunMetadata.FunctionGraphsOrBuilder getFunctionGraphsOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RunOptions.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RunOptions.java new file mode 100644 index 00000000000..ec8bbb08293 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RunOptions.java @@ -0,0 +1,2000 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Options for a single Run() call.
+ * 
+ * + * Protobuf type {@code tensorflow.RunOptions} + */ +public final class RunOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.RunOptions) + RunOptionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use RunOptions.newBuilder() to construct. + private RunOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RunOptions() { + traceLevel_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RunOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RunOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + traceLevel_ = rawValue; + break; + } + case 16: { + + timeoutInMs_ = input.readInt64(); + break; + } + case 24: { + + interOpThreadPool_ = input.readInt32(); + break; + } + case 40: { + + outputPartitionGraphs_ = input.readBool(); + break; + } + case 50: { + org.tensorflow.proto.framework.DebugOptions.Builder subBuilder = null; + if (debugOptions_ != null) { + subBuilder = debugOptions_.toBuilder(); + } + debugOptions_ = input.readMessage(org.tensorflow.proto.framework.DebugOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(debugOptions_); + debugOptions_ = subBuilder.buildPartial(); + } + + break; + } + case 56: { + + reportTensorAllocationsUponOom_ = input.readBool(); + break; + } + case 66: { + org.tensorflow.proto.framework.RunOptions.Experimental.Builder subBuilder = null; + if (experimental_ != null) { + subBuilder = experimental_.toBuilder(); + } + experimental_ = input.readMessage(org.tensorflow.proto.framework.RunOptions.Experimental.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(experimental_); + experimental_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RunOptions.class, org.tensorflow.proto.framework.RunOptions.Builder.class); + } + + /** + *
+   * TODO(pbar) Turn this into a TraceOptions proto which allows
+   * tracing to be controlled in a more orthogonal manner?
+   * 
+ * + * Protobuf enum {@code tensorflow.RunOptions.TraceLevel} + */ + public enum TraceLevel + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NO_TRACE = 0; + */ + NO_TRACE(0), + /** + * SOFTWARE_TRACE = 1; + */ + SOFTWARE_TRACE(1), + /** + * HARDWARE_TRACE = 2; + */ + HARDWARE_TRACE(2), + /** + * FULL_TRACE = 3; + */ + FULL_TRACE(3), + UNRECOGNIZED(-1), + ; + + /** + * NO_TRACE = 0; + */ + public static final int NO_TRACE_VALUE = 0; + /** + * SOFTWARE_TRACE = 1; + */ + public static final int SOFTWARE_TRACE_VALUE = 1; + /** + * HARDWARE_TRACE = 2; + */ + public static final int HARDWARE_TRACE_VALUE = 2; + /** + * FULL_TRACE = 3; + */ + public static final int FULL_TRACE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TraceLevel valueOf(int value) { + return forNumber(value); + } + + public static TraceLevel forNumber(int value) { + switch (value) { + case 0: return NO_TRACE; + case 1: return SOFTWARE_TRACE; + case 2: return HARDWARE_TRACE; + case 3: return FULL_TRACE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + TraceLevel> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TraceLevel findValueByNumber(int number) { + return TraceLevel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.tensorflow.proto.framework.RunOptions.getDescriptor().getEnumTypes().get(0); + } + + private static final TraceLevel[] VALUES = values(); + + public static TraceLevel valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TraceLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:tensorflow.RunOptions.TraceLevel) + } + + public interface ExperimentalOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.RunOptions.Experimental) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * If non-zero, declares that this graph is going to use collective
+     * ops and must synchronize step_ids with any other graph with this
+     * same group_key value (in a distributed computation where tasks
+     * run disjoint graphs).
+     * 
+ * + * int64 collective_graph_key = 1; + */ + long getCollectiveGraphKey(); + + /** + *
+     * If true, then operations (using the inter-op pool) across all
+     * session::run() calls will be centrally scheduled, optimizing for (median
+     * and tail) latency.
+     * Consider using this option for CPU-bound workloads like inference.
+     * 
+ * + * bool use_run_handler_pool = 2; + */ + boolean getUseRunHandlerPool(); + } + /** + *
+   * Everything inside Experimental is subject to change and is not subject
+   * to API stability guarantees in
+   * https://www.tensorflow.org/guide/version_compat.
+   * 
+ * + * Protobuf type {@code tensorflow.RunOptions.Experimental} + */ + public static final class Experimental extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.RunOptions.Experimental) + ExperimentalOrBuilder { + private static final long serialVersionUID = 0L; + // Use Experimental.newBuilder() to construct. + private Experimental(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Experimental() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Experimental(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Experimental( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + collectiveGraphKey_ = input.readInt64(); + break; + } + case 16: { + + useRunHandlerPool_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunOptions_Experimental_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunOptions_Experimental_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RunOptions.Experimental.class, org.tensorflow.proto.framework.RunOptions.Experimental.Builder.class); + } + + public static final int COLLECTIVE_GRAPH_KEY_FIELD_NUMBER = 1; + private long collectiveGraphKey_; + /** + *
+     * If non-zero, declares that this graph is going to use collective
+     * ops and must synchronize step_ids with any other graph with this
+     * same group_key value (in a distributed computation where tasks
+     * run disjoint graphs).
+     * 
+ * + * int64 collective_graph_key = 1; + */ + public long getCollectiveGraphKey() { + return collectiveGraphKey_; + } + + public static final int USE_RUN_HANDLER_POOL_FIELD_NUMBER = 2; + private boolean useRunHandlerPool_; + /** + *
+     * If true, then operations (using the inter-op pool) across all
+     * session::run() calls will be centrally scheduled, optimizing for (median
+     * and tail) latency.
+     * Consider using this option for CPU-bound workloads like inference.
+     * 
+ * + * bool use_run_handler_pool = 2; + */ + public boolean getUseRunHandlerPool() { + return useRunHandlerPool_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (collectiveGraphKey_ != 0L) { + output.writeInt64(1, collectiveGraphKey_); + } + if (useRunHandlerPool_ != false) { + output.writeBool(2, useRunHandlerPool_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (collectiveGraphKey_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, collectiveGraphKey_); + } + if (useRunHandlerPool_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, useRunHandlerPool_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.RunOptions.Experimental)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.RunOptions.Experimental other = (org.tensorflow.proto.framework.RunOptions.Experimental) obj; + + if (getCollectiveGraphKey() + != other.getCollectiveGraphKey()) return false; + if (getUseRunHandlerPool() + != other.getUseRunHandlerPool()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLLECTIVE_GRAPH_KEY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCollectiveGraphKey()); + hash = (37 * hash) + USE_RUN_HANDLER_POOL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUseRunHandlerPool()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.RunOptions.Experimental parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RunOptions.Experimental parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RunOptions.Experimental parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RunOptions.Experimental 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.proto.framework.RunOptions.Experimental parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RunOptions.Experimental parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RunOptions.Experimental parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RunOptions.Experimental parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RunOptions.Experimental parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RunOptions.Experimental parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RunOptions.Experimental parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RunOptions.Experimental parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.RunOptions.Experimental prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Everything inside Experimental is subject to change and is not subject
+     * to API stability guarantees in
+     * https://www.tensorflow.org/guide/version_compat.
+     * 
+ * + * Protobuf type {@code tensorflow.RunOptions.Experimental} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.RunOptions.Experimental) + org.tensorflow.proto.framework.RunOptions.ExperimentalOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunOptions_Experimental_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunOptions_Experimental_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RunOptions.Experimental.class, org.tensorflow.proto.framework.RunOptions.Experimental.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.RunOptions.Experimental.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + collectiveGraphKey_ = 0L; + + useRunHandlerPool_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunOptions_Experimental_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RunOptions.Experimental getDefaultInstanceForType() { + return org.tensorflow.proto.framework.RunOptions.Experimental.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.RunOptions.Experimental build() { + org.tensorflow.proto.framework.RunOptions.Experimental result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RunOptions.Experimental buildPartial() { + org.tensorflow.proto.framework.RunOptions.Experimental result = new org.tensorflow.proto.framework.RunOptions.Experimental(this); + result.collectiveGraphKey_ = collectiveGraphKey_; + result.useRunHandlerPool_ = useRunHandlerPool_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.RunOptions.Experimental) { + return mergeFrom((org.tensorflow.proto.framework.RunOptions.Experimental)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.RunOptions.Experimental other) { + if (other == org.tensorflow.proto.framework.RunOptions.Experimental.getDefaultInstance()) return this; + if (other.getCollectiveGraphKey() != 0L) { + setCollectiveGraphKey(other.getCollectiveGraphKey()); + } + if (other.getUseRunHandlerPool() != false) { + setUseRunHandlerPool(other.getUseRunHandlerPool()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.RunOptions.Experimental parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.RunOptions.Experimental) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long collectiveGraphKey_ ; + /** + *
+       * If non-zero, declares that this graph is going to use collective
+       * ops and must synchronize step_ids with any other graph with this
+       * same group_key value (in a distributed computation where tasks
+       * run disjoint graphs).
+       * 
+ * + * int64 collective_graph_key = 1; + */ + public long getCollectiveGraphKey() { + return collectiveGraphKey_; + } + /** + *
+       * If non-zero, declares that this graph is going to use collective
+       * ops and must synchronize step_ids with any other graph with this
+       * same group_key value (in a distributed computation where tasks
+       * run disjoint graphs).
+       * 
+ * + * int64 collective_graph_key = 1; + */ + public Builder setCollectiveGraphKey(long value) { + + collectiveGraphKey_ = value; + onChanged(); + return this; + } + /** + *
+       * If non-zero, declares that this graph is going to use collective
+       * ops and must synchronize step_ids with any other graph with this
+       * same group_key value (in a distributed computation where tasks
+       * run disjoint graphs).
+       * 
+ * + * int64 collective_graph_key = 1; + */ + public Builder clearCollectiveGraphKey() { + + collectiveGraphKey_ = 0L; + onChanged(); + return this; + } + + private boolean useRunHandlerPool_ ; + /** + *
+       * If true, then operations (using the inter-op pool) across all
+       * session::run() calls will be centrally scheduled, optimizing for (median
+       * and tail) latency.
+       * Consider using this option for CPU-bound workloads like inference.
+       * 
+ * + * bool use_run_handler_pool = 2; + */ + public boolean getUseRunHandlerPool() { + return useRunHandlerPool_; + } + /** + *
+       * If true, then operations (using the inter-op pool) across all
+       * session::run() calls will be centrally scheduled, optimizing for (median
+       * and tail) latency.
+       * Consider using this option for CPU-bound workloads like inference.
+       * 
+ * + * bool use_run_handler_pool = 2; + */ + public Builder setUseRunHandlerPool(boolean value) { + + useRunHandlerPool_ = value; + onChanged(); + return this; + } + /** + *
+       * If true, then operations (using the inter-op pool) across all
+       * session::run() calls will be centrally scheduled, optimizing for (median
+       * and tail) latency.
+       * Consider using this option for CPU-bound workloads like inference.
+       * 
+ * + * bool use_run_handler_pool = 2; + */ + public Builder clearUseRunHandlerPool() { + + useRunHandlerPool_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.RunOptions.Experimental) + } + + // @@protoc_insertion_point(class_scope:tensorflow.RunOptions.Experimental) + private static final org.tensorflow.proto.framework.RunOptions.Experimental DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.RunOptions.Experimental(); + } + + public static org.tensorflow.proto.framework.RunOptions.Experimental getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Experimental parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Experimental(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RunOptions.Experimental getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int TRACE_LEVEL_FIELD_NUMBER = 1; + private int traceLevel_; + /** + * .tensorflow.RunOptions.TraceLevel trace_level = 1; + */ + public int getTraceLevelValue() { + return traceLevel_; + } + /** + * .tensorflow.RunOptions.TraceLevel trace_level = 1; + */ + public org.tensorflow.proto.framework.RunOptions.TraceLevel getTraceLevel() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RunOptions.TraceLevel result = org.tensorflow.proto.framework.RunOptions.TraceLevel.valueOf(traceLevel_); + return result == null ? org.tensorflow.proto.framework.RunOptions.TraceLevel.UNRECOGNIZED : result; + } + + public static final int TIMEOUT_IN_MS_FIELD_NUMBER = 2; + private long timeoutInMs_; + /** + *
+   * Time to wait for operation to complete in milliseconds.
+   * 
+ * + * int64 timeout_in_ms = 2; + */ + public long getTimeoutInMs() { + return timeoutInMs_; + } + + public static final int INTER_OP_THREAD_POOL_FIELD_NUMBER = 3; + private int interOpThreadPool_; + /** + *
+   * The thread pool to use, if session_inter_op_thread_pool is configured.
+   * To use the caller thread set this to -1 - this uses the caller thread
+   * to execute Session::Run() and thus avoids a context switch. Using the
+   * caller thread to execute Session::Run() should be done ONLY for simple
+   * graphs, where the overhead of an additional context switch is
+   * comparable with the overhead of Session::Run().
+   * 
+ * + * int32 inter_op_thread_pool = 3; + */ + public int getInterOpThreadPool() { + return interOpThreadPool_; + } + + public static final int OUTPUT_PARTITION_GRAPHS_FIELD_NUMBER = 5; + private boolean outputPartitionGraphs_; + /** + *
+   * Whether the partition graph(s) executed by the executor(s) should be
+   * outputted via RunMetadata.
+   * 
+ * + * bool output_partition_graphs = 5; + */ + public boolean getOutputPartitionGraphs() { + return outputPartitionGraphs_; + } + + public static final int DEBUG_OPTIONS_FIELD_NUMBER = 6; + private org.tensorflow.proto.framework.DebugOptions debugOptions_; + /** + *
+   * EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
+   * 
+ * + * .tensorflow.DebugOptions debug_options = 6; + */ + public boolean hasDebugOptions() { + return debugOptions_ != null; + } + /** + *
+   * EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
+   * 
+ * + * .tensorflow.DebugOptions debug_options = 6; + */ + public org.tensorflow.proto.framework.DebugOptions getDebugOptions() { + return debugOptions_ == null ? org.tensorflow.proto.framework.DebugOptions.getDefaultInstance() : debugOptions_; + } + /** + *
+   * EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
+   * 
+ * + * .tensorflow.DebugOptions debug_options = 6; + */ + public org.tensorflow.proto.framework.DebugOptionsOrBuilder getDebugOptionsOrBuilder() { + return getDebugOptions(); + } + + public static final int REPORT_TENSOR_ALLOCATIONS_UPON_OOM_FIELD_NUMBER = 7; + private boolean reportTensorAllocationsUponOom_; + /** + *
+   * When enabled, causes tensor allocation information to be included in
+   * the error message when the Run() call fails because the allocator ran
+   * out of memory (OOM).
+   * Enabling this option can slow down the Run() call.
+   * 
+ * + * bool report_tensor_allocations_upon_oom = 7; + */ + public boolean getReportTensorAllocationsUponOom() { + return reportTensorAllocationsUponOom_; + } + + public static final int EXPERIMENTAL_FIELD_NUMBER = 8; + private org.tensorflow.proto.framework.RunOptions.Experimental experimental_; + /** + * .tensorflow.RunOptions.Experimental experimental = 8; + */ + public boolean hasExperimental() { + return experimental_ != null; + } + /** + * .tensorflow.RunOptions.Experimental experimental = 8; + */ + public org.tensorflow.proto.framework.RunOptions.Experimental getExperimental() { + return experimental_ == null ? org.tensorflow.proto.framework.RunOptions.Experimental.getDefaultInstance() : experimental_; + } + /** + * .tensorflow.RunOptions.Experimental experimental = 8; + */ + public org.tensorflow.proto.framework.RunOptions.ExperimentalOrBuilder getExperimentalOrBuilder() { + return getExperimental(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (traceLevel_ != org.tensorflow.proto.framework.RunOptions.TraceLevel.NO_TRACE.getNumber()) { + output.writeEnum(1, traceLevel_); + } + if (timeoutInMs_ != 0L) { + output.writeInt64(2, timeoutInMs_); + } + if (interOpThreadPool_ != 0) { + output.writeInt32(3, interOpThreadPool_); + } + if (outputPartitionGraphs_ != false) { + output.writeBool(5, outputPartitionGraphs_); + } + if (debugOptions_ != null) { + output.writeMessage(6, getDebugOptions()); + } + if (reportTensorAllocationsUponOom_ != false) { + output.writeBool(7, reportTensorAllocationsUponOom_); + } + if (experimental_ != null) { + output.writeMessage(8, getExperimental()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (traceLevel_ != org.tensorflow.proto.framework.RunOptions.TraceLevel.NO_TRACE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, traceLevel_); + } + if (timeoutInMs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, timeoutInMs_); + } + if (interOpThreadPool_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, interOpThreadPool_); + } + if (outputPartitionGraphs_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, outputPartitionGraphs_); + } + if (debugOptions_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getDebugOptions()); + } + if (reportTensorAllocationsUponOom_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, reportTensorAllocationsUponOom_); + } + if (experimental_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getExperimental()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.RunOptions)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.RunOptions other = (org.tensorflow.proto.framework.RunOptions) obj; + + if (traceLevel_ != other.traceLevel_) return false; + if (getTimeoutInMs() + != other.getTimeoutInMs()) return false; + if (getInterOpThreadPool() + != other.getInterOpThreadPool()) return false; + if (getOutputPartitionGraphs() + != other.getOutputPartitionGraphs()) return false; + if (hasDebugOptions() != other.hasDebugOptions()) return false; + if (hasDebugOptions()) { + if (!getDebugOptions() + .equals(other.getDebugOptions())) return false; + } + if (getReportTensorAllocationsUponOom() + != other.getReportTensorAllocationsUponOom()) return false; + if (hasExperimental() != other.hasExperimental()) return false; + if (hasExperimental()) { + if (!getExperimental() + .equals(other.getExperimental())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRACE_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + traceLevel_; + hash = (37 * hash) + TIMEOUT_IN_MS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTimeoutInMs()); + hash = (37 * hash) + INTER_OP_THREAD_POOL_FIELD_NUMBER; + hash = (53 * hash) + getInterOpThreadPool(); + hash = (37 * hash) + OUTPUT_PARTITION_GRAPHS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getOutputPartitionGraphs()); + if (hasDebugOptions()) { + hash = (37 * hash) + DEBUG_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getDebugOptions().hashCode(); + } + hash = (37 * hash) + REPORT_TENSOR_ALLOCATIONS_UPON_OOM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReportTensorAllocationsUponOom()); + if (hasExperimental()) { + hash = (37 * hash) + EXPERIMENTAL_FIELD_NUMBER; + hash = (53 * hash) + getExperimental().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.RunOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RunOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RunOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RunOptions 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.proto.framework.RunOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.RunOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.RunOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RunOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RunOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RunOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.RunOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.RunOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.RunOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Options for a single Run() call.
+   * 
+ * + * Protobuf type {@code tensorflow.RunOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.RunOptions) + org.tensorflow.proto.framework.RunOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.RunOptions.class, org.tensorflow.proto.framework.RunOptions.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.RunOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + traceLevel_ = 0; + + timeoutInMs_ = 0L; + + interOpThreadPool_ = 0; + + outputPartitionGraphs_ = false; + + if (debugOptionsBuilder_ == null) { + debugOptions_ = null; + } else { + debugOptions_ = null; + debugOptionsBuilder_ = null; + } + reportTensorAllocationsUponOom_ = false; + + if (experimentalBuilder_ == null) { + experimental_ = null; + } else { + experimental_ = null; + experimentalBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_RunOptions_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RunOptions getDefaultInstanceForType() { + return org.tensorflow.proto.framework.RunOptions.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.RunOptions build() { + org.tensorflow.proto.framework.RunOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RunOptions buildPartial() { + org.tensorflow.proto.framework.RunOptions result = new org.tensorflow.proto.framework.RunOptions(this); + result.traceLevel_ = traceLevel_; + result.timeoutInMs_ = timeoutInMs_; + result.interOpThreadPool_ = interOpThreadPool_; + result.outputPartitionGraphs_ = outputPartitionGraphs_; + if (debugOptionsBuilder_ == null) { + result.debugOptions_ = debugOptions_; + } else { + result.debugOptions_ = debugOptionsBuilder_.build(); + } + result.reportTensorAllocationsUponOom_ = reportTensorAllocationsUponOom_; + if (experimentalBuilder_ == null) { + result.experimental_ = experimental_; + } else { + result.experimental_ = experimentalBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.RunOptions) { + return mergeFrom((org.tensorflow.proto.framework.RunOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.RunOptions other) { + if (other == org.tensorflow.proto.framework.RunOptions.getDefaultInstance()) return this; + if (other.traceLevel_ != 0) { + setTraceLevelValue(other.getTraceLevelValue()); + } + if (other.getTimeoutInMs() != 0L) { + setTimeoutInMs(other.getTimeoutInMs()); + } + if (other.getInterOpThreadPool() != 0) { + setInterOpThreadPool(other.getInterOpThreadPool()); + } + if (other.getOutputPartitionGraphs() != false) { + setOutputPartitionGraphs(other.getOutputPartitionGraphs()); + } + if (other.hasDebugOptions()) { + mergeDebugOptions(other.getDebugOptions()); + } + if (other.getReportTensorAllocationsUponOom() != false) { + setReportTensorAllocationsUponOom(other.getReportTensorAllocationsUponOom()); + } + if (other.hasExperimental()) { + mergeExperimental(other.getExperimental()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.RunOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.RunOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int traceLevel_ = 0; + /** + * .tensorflow.RunOptions.TraceLevel trace_level = 1; + */ + public int getTraceLevelValue() { + return traceLevel_; + } + /** + * .tensorflow.RunOptions.TraceLevel trace_level = 1; + */ + public Builder setTraceLevelValue(int value) { + traceLevel_ = value; + onChanged(); + return this; + } + /** + * .tensorflow.RunOptions.TraceLevel trace_level = 1; + */ + public org.tensorflow.proto.framework.RunOptions.TraceLevel getTraceLevel() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.RunOptions.TraceLevel result = org.tensorflow.proto.framework.RunOptions.TraceLevel.valueOf(traceLevel_); + return result == null ? org.tensorflow.proto.framework.RunOptions.TraceLevel.UNRECOGNIZED : result; + } + /** + * .tensorflow.RunOptions.TraceLevel trace_level = 1; + */ + public Builder setTraceLevel(org.tensorflow.proto.framework.RunOptions.TraceLevel value) { + if (value == null) { + throw new NullPointerException(); + } + + traceLevel_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .tensorflow.RunOptions.TraceLevel trace_level = 1; + */ + public Builder clearTraceLevel() { + + traceLevel_ = 0; + onChanged(); + return this; + } + + private long timeoutInMs_ ; + /** + *
+     * Time to wait for operation to complete in milliseconds.
+     * 
+ * + * int64 timeout_in_ms = 2; + */ + public long getTimeoutInMs() { + return timeoutInMs_; + } + /** + *
+     * Time to wait for operation to complete in milliseconds.
+     * 
+ * + * int64 timeout_in_ms = 2; + */ + public Builder setTimeoutInMs(long value) { + + timeoutInMs_ = value; + onChanged(); + return this; + } + /** + *
+     * Time to wait for operation to complete in milliseconds.
+     * 
+ * + * int64 timeout_in_ms = 2; + */ + public Builder clearTimeoutInMs() { + + timeoutInMs_ = 0L; + onChanged(); + return this; + } + + private int interOpThreadPool_ ; + /** + *
+     * The thread pool to use, if session_inter_op_thread_pool is configured.
+     * To use the caller thread set this to -1 - this uses the caller thread
+     * to execute Session::Run() and thus avoids a context switch. Using the
+     * caller thread to execute Session::Run() should be done ONLY for simple
+     * graphs, where the overhead of an additional context switch is
+     * comparable with the overhead of Session::Run().
+     * 
+ * + * int32 inter_op_thread_pool = 3; + */ + public int getInterOpThreadPool() { + return interOpThreadPool_; + } + /** + *
+     * The thread pool to use, if session_inter_op_thread_pool is configured.
+     * To use the caller thread set this to -1 - this uses the caller thread
+     * to execute Session::Run() and thus avoids a context switch. Using the
+     * caller thread to execute Session::Run() should be done ONLY for simple
+     * graphs, where the overhead of an additional context switch is
+     * comparable with the overhead of Session::Run().
+     * 
+ * + * int32 inter_op_thread_pool = 3; + */ + public Builder setInterOpThreadPool(int value) { + + interOpThreadPool_ = value; + onChanged(); + return this; + } + /** + *
+     * The thread pool to use, if session_inter_op_thread_pool is configured.
+     * To use the caller thread set this to -1 - this uses the caller thread
+     * to execute Session::Run() and thus avoids a context switch. Using the
+     * caller thread to execute Session::Run() should be done ONLY for simple
+     * graphs, where the overhead of an additional context switch is
+     * comparable with the overhead of Session::Run().
+     * 
+ * + * int32 inter_op_thread_pool = 3; + */ + public Builder clearInterOpThreadPool() { + + interOpThreadPool_ = 0; + onChanged(); + return this; + } + + private boolean outputPartitionGraphs_ ; + /** + *
+     * Whether the partition graph(s) executed by the executor(s) should be
+     * outputted via RunMetadata.
+     * 
+ * + * bool output_partition_graphs = 5; + */ + public boolean getOutputPartitionGraphs() { + return outputPartitionGraphs_; + } + /** + *
+     * Whether the partition graph(s) executed by the executor(s) should be
+     * outputted via RunMetadata.
+     * 
+ * + * bool output_partition_graphs = 5; + */ + public Builder setOutputPartitionGraphs(boolean value) { + + outputPartitionGraphs_ = value; + onChanged(); + return this; + } + /** + *
+     * Whether the partition graph(s) executed by the executor(s) should be
+     * outputted via RunMetadata.
+     * 
+ * + * bool output_partition_graphs = 5; + */ + public Builder clearOutputPartitionGraphs() { + + outputPartitionGraphs_ = false; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.DebugOptions debugOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.DebugOptions, org.tensorflow.proto.framework.DebugOptions.Builder, org.tensorflow.proto.framework.DebugOptionsOrBuilder> debugOptionsBuilder_; + /** + *
+     * EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
+     * 
+ * + * .tensorflow.DebugOptions debug_options = 6; + */ + public boolean hasDebugOptions() { + return debugOptionsBuilder_ != null || debugOptions_ != null; + } + /** + *
+     * EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
+     * 
+ * + * .tensorflow.DebugOptions debug_options = 6; + */ + public org.tensorflow.proto.framework.DebugOptions getDebugOptions() { + if (debugOptionsBuilder_ == null) { + return debugOptions_ == null ? org.tensorflow.proto.framework.DebugOptions.getDefaultInstance() : debugOptions_; + } else { + return debugOptionsBuilder_.getMessage(); + } + } + /** + *
+     * EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
+     * 
+ * + * .tensorflow.DebugOptions debug_options = 6; + */ + public Builder setDebugOptions(org.tensorflow.proto.framework.DebugOptions value) { + if (debugOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + debugOptions_ = value; + onChanged(); + } else { + debugOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
+     * 
+ * + * .tensorflow.DebugOptions debug_options = 6; + */ + public Builder setDebugOptions( + org.tensorflow.proto.framework.DebugOptions.Builder builderForValue) { + if (debugOptionsBuilder_ == null) { + debugOptions_ = builderForValue.build(); + onChanged(); + } else { + debugOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
+     * 
+ * + * .tensorflow.DebugOptions debug_options = 6; + */ + public Builder mergeDebugOptions(org.tensorflow.proto.framework.DebugOptions value) { + if (debugOptionsBuilder_ == null) { + if (debugOptions_ != null) { + debugOptions_ = + org.tensorflow.proto.framework.DebugOptions.newBuilder(debugOptions_).mergeFrom(value).buildPartial(); + } else { + debugOptions_ = value; + } + onChanged(); + } else { + debugOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
+     * 
+ * + * .tensorflow.DebugOptions debug_options = 6; + */ + public Builder clearDebugOptions() { + if (debugOptionsBuilder_ == null) { + debugOptions_ = null; + onChanged(); + } else { + debugOptions_ = null; + debugOptionsBuilder_ = null; + } + + return this; + } + /** + *
+     * EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
+     * 
+ * + * .tensorflow.DebugOptions debug_options = 6; + */ + public org.tensorflow.proto.framework.DebugOptions.Builder getDebugOptionsBuilder() { + + onChanged(); + return getDebugOptionsFieldBuilder().getBuilder(); + } + /** + *
+     * EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
+     * 
+ * + * .tensorflow.DebugOptions debug_options = 6; + */ + public org.tensorflow.proto.framework.DebugOptionsOrBuilder getDebugOptionsOrBuilder() { + if (debugOptionsBuilder_ != null) { + return debugOptionsBuilder_.getMessageOrBuilder(); + } else { + return debugOptions_ == null ? + org.tensorflow.proto.framework.DebugOptions.getDefaultInstance() : debugOptions_; + } + } + /** + *
+     * EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
+     * 
+ * + * .tensorflow.DebugOptions debug_options = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.DebugOptions, org.tensorflow.proto.framework.DebugOptions.Builder, org.tensorflow.proto.framework.DebugOptionsOrBuilder> + getDebugOptionsFieldBuilder() { + if (debugOptionsBuilder_ == null) { + debugOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.DebugOptions, org.tensorflow.proto.framework.DebugOptions.Builder, org.tensorflow.proto.framework.DebugOptionsOrBuilder>( + getDebugOptions(), + getParentForChildren(), + isClean()); + debugOptions_ = null; + } + return debugOptionsBuilder_; + } + + private boolean reportTensorAllocationsUponOom_ ; + /** + *
+     * When enabled, causes tensor allocation information to be included in
+     * the error message when the Run() call fails because the allocator ran
+     * out of memory (OOM).
+     * Enabling this option can slow down the Run() call.
+     * 
+ * + * bool report_tensor_allocations_upon_oom = 7; + */ + public boolean getReportTensorAllocationsUponOom() { + return reportTensorAllocationsUponOom_; + } + /** + *
+     * When enabled, causes tensor allocation information to be included in
+     * the error message when the Run() call fails because the allocator ran
+     * out of memory (OOM).
+     * Enabling this option can slow down the Run() call.
+     * 
+ * + * bool report_tensor_allocations_upon_oom = 7; + */ + public Builder setReportTensorAllocationsUponOom(boolean value) { + + reportTensorAllocationsUponOom_ = value; + onChanged(); + return this; + } + /** + *
+     * When enabled, causes tensor allocation information to be included in
+     * the error message when the Run() call fails because the allocator ran
+     * out of memory (OOM).
+     * Enabling this option can slow down the Run() call.
+     * 
+ * + * bool report_tensor_allocations_upon_oom = 7; + */ + public Builder clearReportTensorAllocationsUponOom() { + + reportTensorAllocationsUponOom_ = false; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.RunOptions.Experimental experimental_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.RunOptions.Experimental, org.tensorflow.proto.framework.RunOptions.Experimental.Builder, org.tensorflow.proto.framework.RunOptions.ExperimentalOrBuilder> experimentalBuilder_; + /** + * .tensorflow.RunOptions.Experimental experimental = 8; + */ + public boolean hasExperimental() { + return experimentalBuilder_ != null || experimental_ != null; + } + /** + * .tensorflow.RunOptions.Experimental experimental = 8; + */ + public org.tensorflow.proto.framework.RunOptions.Experimental getExperimental() { + if (experimentalBuilder_ == null) { + return experimental_ == null ? org.tensorflow.proto.framework.RunOptions.Experimental.getDefaultInstance() : experimental_; + } else { + return experimentalBuilder_.getMessage(); + } + } + /** + * .tensorflow.RunOptions.Experimental experimental = 8; + */ + public Builder setExperimental(org.tensorflow.proto.framework.RunOptions.Experimental value) { + if (experimentalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + experimental_ = value; + onChanged(); + } else { + experimentalBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.RunOptions.Experimental experimental = 8; + */ + public Builder setExperimental( + org.tensorflow.proto.framework.RunOptions.Experimental.Builder builderForValue) { + if (experimentalBuilder_ == null) { + experimental_ = builderForValue.build(); + onChanged(); + } else { + experimentalBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.RunOptions.Experimental experimental = 8; + */ + public Builder mergeExperimental(org.tensorflow.proto.framework.RunOptions.Experimental value) { + if (experimentalBuilder_ == null) { + if (experimental_ != null) { + experimental_ = + org.tensorflow.proto.framework.RunOptions.Experimental.newBuilder(experimental_).mergeFrom(value).buildPartial(); + } else { + experimental_ = value; + } + onChanged(); + } else { + experimentalBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.RunOptions.Experimental experimental = 8; + */ + public Builder clearExperimental() { + if (experimentalBuilder_ == null) { + experimental_ = null; + onChanged(); + } else { + experimental_ = null; + experimentalBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.RunOptions.Experimental experimental = 8; + */ + public org.tensorflow.proto.framework.RunOptions.Experimental.Builder getExperimentalBuilder() { + + onChanged(); + return getExperimentalFieldBuilder().getBuilder(); + } + /** + * .tensorflow.RunOptions.Experimental experimental = 8; + */ + public org.tensorflow.proto.framework.RunOptions.ExperimentalOrBuilder getExperimentalOrBuilder() { + if (experimentalBuilder_ != null) { + return experimentalBuilder_.getMessageOrBuilder(); + } else { + return experimental_ == null ? + org.tensorflow.proto.framework.RunOptions.Experimental.getDefaultInstance() : experimental_; + } + } + /** + * .tensorflow.RunOptions.Experimental experimental = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.RunOptions.Experimental, org.tensorflow.proto.framework.RunOptions.Experimental.Builder, org.tensorflow.proto.framework.RunOptions.ExperimentalOrBuilder> + getExperimentalFieldBuilder() { + if (experimentalBuilder_ == null) { + experimentalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.RunOptions.Experimental, org.tensorflow.proto.framework.RunOptions.Experimental.Builder, org.tensorflow.proto.framework.RunOptions.ExperimentalOrBuilder>( + getExperimental(), + getParentForChildren(), + isClean()); + experimental_ = null; + } + return experimentalBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.RunOptions) + } + + // @@protoc_insertion_point(class_scope:tensorflow.RunOptions) + private static final org.tensorflow.proto.framework.RunOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.RunOptions(); + } + + public static org.tensorflow.proto.framework.RunOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.RunOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RunOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RunOptionsOrBuilder.java new file mode 100644 index 00000000000..c3f4a9d7205 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/RunOptionsOrBuilder.java @@ -0,0 +1,101 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +public interface RunOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.RunOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * .tensorflow.RunOptions.TraceLevel trace_level = 1; + */ + int getTraceLevelValue(); + /** + * .tensorflow.RunOptions.TraceLevel trace_level = 1; + */ + org.tensorflow.proto.framework.RunOptions.TraceLevel getTraceLevel(); + + /** + *
+   * Time to wait for operation to complete in milliseconds.
+   * 
+ * + * int64 timeout_in_ms = 2; + */ + long getTimeoutInMs(); + + /** + *
+   * The thread pool to use, if session_inter_op_thread_pool is configured.
+   * To use the caller thread set this to -1 - this uses the caller thread
+   * to execute Session::Run() and thus avoids a context switch. Using the
+   * caller thread to execute Session::Run() should be done ONLY for simple
+   * graphs, where the overhead of an additional context switch is
+   * comparable with the overhead of Session::Run().
+   * 
+ * + * int32 inter_op_thread_pool = 3; + */ + int getInterOpThreadPool(); + + /** + *
+   * Whether the partition graph(s) executed by the executor(s) should be
+   * outputted via RunMetadata.
+   * 
+ * + * bool output_partition_graphs = 5; + */ + boolean getOutputPartitionGraphs(); + + /** + *
+   * EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
+   * 
+ * + * .tensorflow.DebugOptions debug_options = 6; + */ + boolean hasDebugOptions(); + /** + *
+   * EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
+   * 
+ * + * .tensorflow.DebugOptions debug_options = 6; + */ + org.tensorflow.proto.framework.DebugOptions getDebugOptions(); + /** + *
+   * EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
+   * 
+ * + * .tensorflow.DebugOptions debug_options = 6; + */ + org.tensorflow.proto.framework.DebugOptionsOrBuilder getDebugOptionsOrBuilder(); + + /** + *
+   * When enabled, causes tensor allocation information to be included in
+   * the error message when the Run() call fails because the allocator ran
+   * out of memory (OOM).
+   * Enabling this option can slow down the Run() call.
+   * 
+ * + * bool report_tensor_allocations_upon_oom = 7; + */ + boolean getReportTensorAllocationsUponOom(); + + /** + * .tensorflow.RunOptions.Experimental experimental = 8; + */ + boolean hasExperimental(); + /** + * .tensorflow.RunOptions.Experimental experimental = 8; + */ + org.tensorflow.proto.framework.RunOptions.Experimental getExperimental(); + /** + * .tensorflow.RunOptions.Experimental experimental = 8; + */ + org.tensorflow.proto.framework.RunOptions.ExperimentalOrBuilder getExperimentalOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SaveSliceInfoDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SaveSliceInfoDef.java new file mode 100644 index 00000000000..3cf8b1b4b12 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SaveSliceInfoDef.java @@ -0,0 +1,1175 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/variable.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.SaveSliceInfoDef} + */ +public final class SaveSliceInfoDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.SaveSliceInfoDef) + SaveSliceInfoDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use SaveSliceInfoDef.newBuilder() to construct. + private SaveSliceInfoDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SaveSliceInfoDef() { + fullName_ = ""; + fullShape_ = emptyLongList(); + varOffset_ = emptyLongList(); + varShape_ = emptyLongList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SaveSliceInfoDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SaveSliceInfoDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + fullName_ = s; + break; + } + case 16: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fullShape_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + fullShape_.addLong(input.readInt64()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + fullShape_ = newLongList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + fullShape_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 24: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + varOffset_ = newLongList(); + mutable_bitField0_ |= 0x00000002; + } + varOffset_.addLong(input.readInt64()); + break; + } + case 26: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { + varOffset_ = newLongList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + varOffset_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 32: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + varShape_ = newLongList(); + mutable_bitField0_ |= 0x00000004; + } + varShape_.addLong(input.readInt64()); + break; + } + case 34: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { + varShape_ = newLongList(); + mutable_bitField0_ |= 0x00000004; + } + while (input.getBytesUntilLimit() > 0) { + varShape_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fullShape_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + varOffset_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + varShape_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SaveSliceInfoDef.class, org.tensorflow.proto.framework.SaveSliceInfoDef.Builder.class); + } + + public static final int FULL_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object fullName_; + /** + *
+   * Name of the full variable of which this is a slice.
+   * 
+ * + * string full_name = 1; + */ + public java.lang.String getFullName() { + java.lang.Object ref = fullName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullName_ = s; + return s; + } + } + /** + *
+   * Name of the full variable of which this is a slice.
+   * 
+ * + * string full_name = 1; + */ + public com.google.protobuf.ByteString + getFullNameBytes() { + java.lang.Object ref = fullName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULL_SHAPE_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.LongList fullShape_; + /** + *
+   * Shape of the full variable.
+   * 
+ * + * repeated int64 full_shape = 2; + */ + public java.util.List + getFullShapeList() { + return fullShape_; + } + /** + *
+   * Shape of the full variable.
+   * 
+ * + * repeated int64 full_shape = 2; + */ + public int getFullShapeCount() { + return fullShape_.size(); + } + /** + *
+   * Shape of the full variable.
+   * 
+ * + * repeated int64 full_shape = 2; + */ + public long getFullShape(int index) { + return fullShape_.getLong(index); + } + private int fullShapeMemoizedSerializedSize = -1; + + public static final int VAR_OFFSET_FIELD_NUMBER = 3; + private com.google.protobuf.Internal.LongList varOffset_; + /** + *
+   * Offset of this variable into the full variable.
+   * 
+ * + * repeated int64 var_offset = 3; + */ + public java.util.List + getVarOffsetList() { + return varOffset_; + } + /** + *
+   * Offset of this variable into the full variable.
+   * 
+ * + * repeated int64 var_offset = 3; + */ + public int getVarOffsetCount() { + return varOffset_.size(); + } + /** + *
+   * Offset of this variable into the full variable.
+   * 
+ * + * repeated int64 var_offset = 3; + */ + public long getVarOffset(int index) { + return varOffset_.getLong(index); + } + private int varOffsetMemoizedSerializedSize = -1; + + public static final int VAR_SHAPE_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.LongList varShape_; + /** + *
+   * Shape of this variable.
+   * 
+ * + * repeated int64 var_shape = 4; + */ + public java.util.List + getVarShapeList() { + return varShape_; + } + /** + *
+   * Shape of this variable.
+   * 
+ * + * repeated int64 var_shape = 4; + */ + public int getVarShapeCount() { + return varShape_.size(); + } + /** + *
+   * Shape of this variable.
+   * 
+ * + * repeated int64 var_shape = 4; + */ + public long getVarShape(int index) { + return varShape_.getLong(index); + } + private int varShapeMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!getFullNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fullName_); + } + if (getFullShapeList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(fullShapeMemoizedSerializedSize); + } + for (int i = 0; i < fullShape_.size(); i++) { + output.writeInt64NoTag(fullShape_.getLong(i)); + } + if (getVarOffsetList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(varOffsetMemoizedSerializedSize); + } + for (int i = 0; i < varOffset_.size(); i++) { + output.writeInt64NoTag(varOffset_.getLong(i)); + } + if (getVarShapeList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(varShapeMemoizedSerializedSize); + } + for (int i = 0; i < varShape_.size(); i++) { + output.writeInt64NoTag(varShape_.getLong(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFullNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fullName_); + } + { + int dataSize = 0; + for (int i = 0; i < fullShape_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(fullShape_.getLong(i)); + } + size += dataSize; + if (!getFullShapeList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + fullShapeMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < varOffset_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(varOffset_.getLong(i)); + } + size += dataSize; + if (!getVarOffsetList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + varOffsetMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < varShape_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(varShape_.getLong(i)); + } + size += dataSize; + if (!getVarShapeList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + varShapeMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.SaveSliceInfoDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.SaveSliceInfoDef other = (org.tensorflow.proto.framework.SaveSliceInfoDef) obj; + + if (!getFullName() + .equals(other.getFullName())) return false; + if (!getFullShapeList() + .equals(other.getFullShapeList())) return false; + if (!getVarOffsetList() + .equals(other.getVarOffsetList())) return false; + if (!getVarShapeList() + .equals(other.getVarShapeList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FULL_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFullName().hashCode(); + if (getFullShapeCount() > 0) { + hash = (37 * hash) + FULL_SHAPE_FIELD_NUMBER; + hash = (53 * hash) + getFullShapeList().hashCode(); + } + if (getVarOffsetCount() > 0) { + hash = (37 * hash) + VAR_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getVarOffsetList().hashCode(); + } + if (getVarShapeCount() > 0) { + hash = (37 * hash) + VAR_SHAPE_FIELD_NUMBER; + hash = (53 * hash) + getVarShapeList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.SaveSliceInfoDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SaveSliceInfoDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SaveSliceInfoDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SaveSliceInfoDef parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SaveSliceInfoDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SaveSliceInfoDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SaveSliceInfoDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SaveSliceInfoDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SaveSliceInfoDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SaveSliceInfoDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SaveSliceInfoDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SaveSliceInfoDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.SaveSliceInfoDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.SaveSliceInfoDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.SaveSliceInfoDef) + org.tensorflow.proto.framework.SaveSliceInfoDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SaveSliceInfoDef.class, org.tensorflow.proto.framework.SaveSliceInfoDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.SaveSliceInfoDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + fullName_ = ""; + + fullShape_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + varOffset_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000002); + varShape_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SaveSliceInfoDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.SaveSliceInfoDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.SaveSliceInfoDef build() { + org.tensorflow.proto.framework.SaveSliceInfoDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SaveSliceInfoDef buildPartial() { + org.tensorflow.proto.framework.SaveSliceInfoDef result = new org.tensorflow.proto.framework.SaveSliceInfoDef(this); + int from_bitField0_ = bitField0_; + result.fullName_ = fullName_; + if (((bitField0_ & 0x00000001) != 0)) { + fullShape_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fullShape_ = fullShape_; + if (((bitField0_ & 0x00000002) != 0)) { + varOffset_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.varOffset_ = varOffset_; + if (((bitField0_ & 0x00000004) != 0)) { + varShape_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.varShape_ = varShape_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.SaveSliceInfoDef) { + return mergeFrom((org.tensorflow.proto.framework.SaveSliceInfoDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.SaveSliceInfoDef other) { + if (other == org.tensorflow.proto.framework.SaveSliceInfoDef.getDefaultInstance()) return this; + if (!other.getFullName().isEmpty()) { + fullName_ = other.fullName_; + onChanged(); + } + if (!other.fullShape_.isEmpty()) { + if (fullShape_.isEmpty()) { + fullShape_ = other.fullShape_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFullShapeIsMutable(); + fullShape_.addAll(other.fullShape_); + } + onChanged(); + } + if (!other.varOffset_.isEmpty()) { + if (varOffset_.isEmpty()) { + varOffset_ = other.varOffset_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureVarOffsetIsMutable(); + varOffset_.addAll(other.varOffset_); + } + onChanged(); + } + if (!other.varShape_.isEmpty()) { + if (varShape_.isEmpty()) { + varShape_ = other.varShape_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureVarShapeIsMutable(); + varShape_.addAll(other.varShape_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.SaveSliceInfoDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.SaveSliceInfoDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object fullName_ = ""; + /** + *
+     * Name of the full variable of which this is a slice.
+     * 
+ * + * string full_name = 1; + */ + public java.lang.String getFullName() { + java.lang.Object ref = fullName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the full variable of which this is a slice.
+     * 
+ * + * string full_name = 1; + */ + public com.google.protobuf.ByteString + getFullNameBytes() { + java.lang.Object ref = fullName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the full variable of which this is a slice.
+     * 
+ * + * string full_name = 1; + */ + public Builder setFullName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fullName_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the full variable of which this is a slice.
+     * 
+ * + * string full_name = 1; + */ + public Builder clearFullName() { + + fullName_ = getDefaultInstance().getFullName(); + onChanged(); + return this; + } + /** + *
+     * Name of the full variable of which this is a slice.
+     * 
+ * + * string full_name = 1; + */ + public Builder setFullNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fullName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList fullShape_ = emptyLongList(); + private void ensureFullShapeIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fullShape_ = mutableCopy(fullShape_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Shape of the full variable.
+     * 
+ * + * repeated int64 full_shape = 2; + */ + public java.util.List + getFullShapeList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(fullShape_) : fullShape_; + } + /** + *
+     * Shape of the full variable.
+     * 
+ * + * repeated int64 full_shape = 2; + */ + public int getFullShapeCount() { + return fullShape_.size(); + } + /** + *
+     * Shape of the full variable.
+     * 
+ * + * repeated int64 full_shape = 2; + */ + public long getFullShape(int index) { + return fullShape_.getLong(index); + } + /** + *
+     * Shape of the full variable.
+     * 
+ * + * repeated int64 full_shape = 2; + */ + public Builder setFullShape( + int index, long value) { + ensureFullShapeIsMutable(); + fullShape_.setLong(index, value); + onChanged(); + return this; + } + /** + *
+     * Shape of the full variable.
+     * 
+ * + * repeated int64 full_shape = 2; + */ + public Builder addFullShape(long value) { + ensureFullShapeIsMutable(); + fullShape_.addLong(value); + onChanged(); + return this; + } + /** + *
+     * Shape of the full variable.
+     * 
+ * + * repeated int64 full_shape = 2; + */ + public Builder addAllFullShape( + java.lang.Iterable values) { + ensureFullShapeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fullShape_); + onChanged(); + return this; + } + /** + *
+     * Shape of the full variable.
+     * 
+ * + * repeated int64 full_shape = 2; + */ + public Builder clearFullShape() { + fullShape_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList varOffset_ = emptyLongList(); + private void ensureVarOffsetIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + varOffset_ = mutableCopy(varOffset_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * Offset of this variable into the full variable.
+     * 
+ * + * repeated int64 var_offset = 3; + */ + public java.util.List + getVarOffsetList() { + return ((bitField0_ & 0x00000002) != 0) ? + java.util.Collections.unmodifiableList(varOffset_) : varOffset_; + } + /** + *
+     * Offset of this variable into the full variable.
+     * 
+ * + * repeated int64 var_offset = 3; + */ + public int getVarOffsetCount() { + return varOffset_.size(); + } + /** + *
+     * Offset of this variable into the full variable.
+     * 
+ * + * repeated int64 var_offset = 3; + */ + public long getVarOffset(int index) { + return varOffset_.getLong(index); + } + /** + *
+     * Offset of this variable into the full variable.
+     * 
+ * + * repeated int64 var_offset = 3; + */ + public Builder setVarOffset( + int index, long value) { + ensureVarOffsetIsMutable(); + varOffset_.setLong(index, value); + onChanged(); + return this; + } + /** + *
+     * Offset of this variable into the full variable.
+     * 
+ * + * repeated int64 var_offset = 3; + */ + public Builder addVarOffset(long value) { + ensureVarOffsetIsMutable(); + varOffset_.addLong(value); + onChanged(); + return this; + } + /** + *
+     * Offset of this variable into the full variable.
+     * 
+ * + * repeated int64 var_offset = 3; + */ + public Builder addAllVarOffset( + java.lang.Iterable values) { + ensureVarOffsetIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, varOffset_); + onChanged(); + return this; + } + /** + *
+     * Offset of this variable into the full variable.
+     * 
+ * + * repeated int64 var_offset = 3; + */ + public Builder clearVarOffset() { + varOffset_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList varShape_ = emptyLongList(); + private void ensureVarShapeIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + varShape_ = mutableCopy(varShape_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Shape of this variable.
+     * 
+ * + * repeated int64 var_shape = 4; + */ + public java.util.List + getVarShapeList() { + return ((bitField0_ & 0x00000004) != 0) ? + java.util.Collections.unmodifiableList(varShape_) : varShape_; + } + /** + *
+     * Shape of this variable.
+     * 
+ * + * repeated int64 var_shape = 4; + */ + public int getVarShapeCount() { + return varShape_.size(); + } + /** + *
+     * Shape of this variable.
+     * 
+ * + * repeated int64 var_shape = 4; + */ + public long getVarShape(int index) { + return varShape_.getLong(index); + } + /** + *
+     * Shape of this variable.
+     * 
+ * + * repeated int64 var_shape = 4; + */ + public Builder setVarShape( + int index, long value) { + ensureVarShapeIsMutable(); + varShape_.setLong(index, value); + onChanged(); + return this; + } + /** + *
+     * Shape of this variable.
+     * 
+ * + * repeated int64 var_shape = 4; + */ + public Builder addVarShape(long value) { + ensureVarShapeIsMutable(); + varShape_.addLong(value); + onChanged(); + return this; + } + /** + *
+     * Shape of this variable.
+     * 
+ * + * repeated int64 var_shape = 4; + */ + public Builder addAllVarShape( + java.lang.Iterable values) { + ensureVarShapeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, varShape_); + onChanged(); + return this; + } + /** + *
+     * Shape of this variable.
+     * 
+ * + * repeated int64 var_shape = 4; + */ + public Builder clearVarShape() { + varShape_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.SaveSliceInfoDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.SaveSliceInfoDef) + private static final org.tensorflow.proto.framework.SaveSliceInfoDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.SaveSliceInfoDef(); + } + + public static org.tensorflow.proto.framework.SaveSliceInfoDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SaveSliceInfoDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SaveSliceInfoDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SaveSliceInfoDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SaveSliceInfoDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SaveSliceInfoDefOrBuilder.java new file mode 100644 index 00000000000..c06b53fbb61 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SaveSliceInfoDefOrBuilder.java @@ -0,0 +1,102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/variable.proto + +package org.tensorflow.proto.framework; + +public interface SaveSliceInfoDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.SaveSliceInfoDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Name of the full variable of which this is a slice.
+   * 
+ * + * string full_name = 1; + */ + java.lang.String getFullName(); + /** + *
+   * Name of the full variable of which this is a slice.
+   * 
+ * + * string full_name = 1; + */ + com.google.protobuf.ByteString + getFullNameBytes(); + + /** + *
+   * Shape of the full variable.
+   * 
+ * + * repeated int64 full_shape = 2; + */ + java.util.List getFullShapeList(); + /** + *
+   * Shape of the full variable.
+   * 
+ * + * repeated int64 full_shape = 2; + */ + int getFullShapeCount(); + /** + *
+   * Shape of the full variable.
+   * 
+ * + * repeated int64 full_shape = 2; + */ + long getFullShape(int index); + + /** + *
+   * Offset of this variable into the full variable.
+   * 
+ * + * repeated int64 var_offset = 3; + */ + java.util.List getVarOffsetList(); + /** + *
+   * Offset of this variable into the full variable.
+   * 
+ * + * repeated int64 var_offset = 3; + */ + int getVarOffsetCount(); + /** + *
+   * Offset of this variable into the full variable.
+   * 
+ * + * repeated int64 var_offset = 3; + */ + long getVarOffset(int index); + + /** + *
+   * Shape of this variable.
+   * 
+ * + * repeated int64 var_shape = 4; + */ + java.util.List getVarShapeList(); + /** + *
+   * Shape of this variable.
+   * 
+ * + * repeated int64 var_shape = 4; + */ + int getVarShapeCount(); + /** + *
+   * Shape of this variable.
+   * 
+ * + * repeated int64 var_shape = 4; + */ + long getVarShape(int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedAsset.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedAsset.java new file mode 100644 index 00000000000..2558719f7c3 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedAsset.java @@ -0,0 +1,514 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * A SavedAsset points to an asset in the MetaGraph.
+ * When bound to a function this object evaluates to a tensor with the absolute
+ * filename. Users should not depend on a particular part of the filename to
+ * remain stable (e.g. basename could be changed).
+ * 
+ * + * Protobuf type {@code tensorflow.SavedAsset} + */ +public final class SavedAsset extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.SavedAsset) + SavedAssetOrBuilder { +private static final long serialVersionUID = 0L; + // Use SavedAsset.newBuilder() to construct. + private SavedAsset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SavedAsset() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SavedAsset(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SavedAsset( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + assetFileDefIndex_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedAsset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedAsset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedAsset.class, org.tensorflow.proto.framework.SavedAsset.Builder.class); + } + + public static final int ASSET_FILE_DEF_INDEX_FIELD_NUMBER = 1; + private int assetFileDefIndex_; + /** + *
+   * Index into `MetaGraphDef.asset_file_def[]` that describes the Asset.
+   * Only the field `AssetFileDef.filename` is used. Other fields, such as
+   * `AssetFileDef.tensor_info`, MUST be ignored.
+   * 
+ * + * int32 asset_file_def_index = 1; + */ + public int getAssetFileDefIndex() { + return assetFileDefIndex_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (assetFileDefIndex_ != 0) { + output.writeInt32(1, assetFileDefIndex_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (assetFileDefIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, assetFileDefIndex_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.SavedAsset)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.SavedAsset other = (org.tensorflow.proto.framework.SavedAsset) obj; + + if (getAssetFileDefIndex() + != other.getAssetFileDefIndex()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ASSET_FILE_DEF_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getAssetFileDefIndex(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.SavedAsset parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedAsset parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedAsset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedAsset 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.proto.framework.SavedAsset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedAsset parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedAsset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedAsset parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedAsset parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedAsset parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedAsset parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedAsset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.SavedAsset prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A SavedAsset points to an asset in the MetaGraph.
+   * When bound to a function this object evaluates to a tensor with the absolute
+   * filename. Users should not depend on a particular part of the filename to
+   * remain stable (e.g. basename could be changed).
+   * 
+ * + * Protobuf type {@code tensorflow.SavedAsset} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.SavedAsset) + org.tensorflow.proto.framework.SavedAssetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedAsset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedAsset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedAsset.class, org.tensorflow.proto.framework.SavedAsset.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.SavedAsset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + assetFileDefIndex_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedAsset_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedAsset getDefaultInstanceForType() { + return org.tensorflow.proto.framework.SavedAsset.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedAsset build() { + org.tensorflow.proto.framework.SavedAsset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedAsset buildPartial() { + org.tensorflow.proto.framework.SavedAsset result = new org.tensorflow.proto.framework.SavedAsset(this); + result.assetFileDefIndex_ = assetFileDefIndex_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.SavedAsset) { + return mergeFrom((org.tensorflow.proto.framework.SavedAsset)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.SavedAsset other) { + if (other == org.tensorflow.proto.framework.SavedAsset.getDefaultInstance()) return this; + if (other.getAssetFileDefIndex() != 0) { + setAssetFileDefIndex(other.getAssetFileDefIndex()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.SavedAsset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.SavedAsset) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int assetFileDefIndex_ ; + /** + *
+     * Index into `MetaGraphDef.asset_file_def[]` that describes the Asset.
+     * Only the field `AssetFileDef.filename` is used. Other fields, such as
+     * `AssetFileDef.tensor_info`, MUST be ignored.
+     * 
+ * + * int32 asset_file_def_index = 1; + */ + public int getAssetFileDefIndex() { + return assetFileDefIndex_; + } + /** + *
+     * Index into `MetaGraphDef.asset_file_def[]` that describes the Asset.
+     * Only the field `AssetFileDef.filename` is used. Other fields, such as
+     * `AssetFileDef.tensor_info`, MUST be ignored.
+     * 
+ * + * int32 asset_file_def_index = 1; + */ + public Builder setAssetFileDefIndex(int value) { + + assetFileDefIndex_ = value; + onChanged(); + return this; + } + /** + *
+     * Index into `MetaGraphDef.asset_file_def[]` that describes the Asset.
+     * Only the field `AssetFileDef.filename` is used. Other fields, such as
+     * `AssetFileDef.tensor_info`, MUST be ignored.
+     * 
+ * + * int32 asset_file_def_index = 1; + */ + public Builder clearAssetFileDefIndex() { + + assetFileDefIndex_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.SavedAsset) + } + + // @@protoc_insertion_point(class_scope:tensorflow.SavedAsset) + private static final org.tensorflow.proto.framework.SavedAsset DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.SavedAsset(); + } + + public static org.tensorflow.proto.framework.SavedAsset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SavedAsset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SavedAsset(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedAsset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedAssetOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedAssetOrBuilder.java new file mode 100644 index 00000000000..a12a5ff6ad0 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedAssetOrBuilder.java @@ -0,0 +1,20 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +public interface SavedAssetOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.SavedAsset) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Index into `MetaGraphDef.asset_file_def[]` that describes the Asset.
+   * Only the field `AssetFileDef.filename` is used. Other fields, such as
+   * `AssetFileDef.tensor_info`, MUST be ignored.
+   * 
+ * + * int32 asset_file_def_index = 1; + */ + int getAssetFileDefIndex(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedBareConcreteFunction.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedBareConcreteFunction.java new file mode 100644 index 00000000000..e7fadf9f362 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedBareConcreteFunction.java @@ -0,0 +1,873 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.SavedBareConcreteFunction} + */ +public final class SavedBareConcreteFunction extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.SavedBareConcreteFunction) + SavedBareConcreteFunctionOrBuilder { +private static final long serialVersionUID = 0L; + // Use SavedBareConcreteFunction.newBuilder() to construct. + private SavedBareConcreteFunction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SavedBareConcreteFunction() { + concreteFunctionName_ = ""; + argumentKeywords_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SavedBareConcreteFunction(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SavedBareConcreteFunction( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + concreteFunctionName_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + argumentKeywords_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + argumentKeywords_.add(s); + break; + } + case 24: { + + allowedPositionalArguments_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + argumentKeywords_ = argumentKeywords_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedBareConcreteFunction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedBareConcreteFunction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedBareConcreteFunction.class, org.tensorflow.proto.framework.SavedBareConcreteFunction.Builder.class); + } + + public static final int CONCRETE_FUNCTION_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object concreteFunctionName_; + /** + *
+   * Identifies a SavedConcreteFunction.
+   * 
+ * + * string concrete_function_name = 1; + */ + public java.lang.String getConcreteFunctionName() { + java.lang.Object ref = concreteFunctionName_; + 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(); + concreteFunctionName_ = s; + return s; + } + } + /** + *
+   * Identifies a SavedConcreteFunction.
+   * 
+ * + * string concrete_function_name = 1; + */ + public com.google.protobuf.ByteString + getConcreteFunctionNameBytes() { + java.lang.Object ref = concreteFunctionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + concreteFunctionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARGUMENT_KEYWORDS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList argumentKeywords_; + /** + *
+   * A sequence of unique strings, one per Tensor argument.
+   * 
+ * + * repeated string argument_keywords = 2; + */ + public com.google.protobuf.ProtocolStringList + getArgumentKeywordsList() { + return argumentKeywords_; + } + /** + *
+   * A sequence of unique strings, one per Tensor argument.
+   * 
+ * + * repeated string argument_keywords = 2; + */ + public int getArgumentKeywordsCount() { + return argumentKeywords_.size(); + } + /** + *
+   * A sequence of unique strings, one per Tensor argument.
+   * 
+ * + * repeated string argument_keywords = 2; + */ + public java.lang.String getArgumentKeywords(int index) { + return argumentKeywords_.get(index); + } + /** + *
+   * A sequence of unique strings, one per Tensor argument.
+   * 
+ * + * repeated string argument_keywords = 2; + */ + public com.google.protobuf.ByteString + getArgumentKeywordsBytes(int index) { + return argumentKeywords_.getByteString(index); + } + + public static final int ALLOWED_POSITIONAL_ARGUMENTS_FIELD_NUMBER = 3; + private long allowedPositionalArguments_; + /** + *
+   * The prefix of `argument_keywords` which may be identified by position.
+   * 
+ * + * int64 allowed_positional_arguments = 3; + */ + public long getAllowedPositionalArguments() { + return allowedPositionalArguments_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getConcreteFunctionNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, concreteFunctionName_); + } + for (int i = 0; i < argumentKeywords_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, argumentKeywords_.getRaw(i)); + } + if (allowedPositionalArguments_ != 0L) { + output.writeInt64(3, allowedPositionalArguments_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getConcreteFunctionNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, concreteFunctionName_); + } + { + int dataSize = 0; + for (int i = 0; i < argumentKeywords_.size(); i++) { + dataSize += computeStringSizeNoTag(argumentKeywords_.getRaw(i)); + } + size += dataSize; + size += 1 * getArgumentKeywordsList().size(); + } + if (allowedPositionalArguments_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, allowedPositionalArguments_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.SavedBareConcreteFunction)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.SavedBareConcreteFunction other = (org.tensorflow.proto.framework.SavedBareConcreteFunction) obj; + + if (!getConcreteFunctionName() + .equals(other.getConcreteFunctionName())) return false; + if (!getArgumentKeywordsList() + .equals(other.getArgumentKeywordsList())) return false; + if (getAllowedPositionalArguments() + != other.getAllowedPositionalArguments()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONCRETE_FUNCTION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getConcreteFunctionName().hashCode(); + if (getArgumentKeywordsCount() > 0) { + hash = (37 * hash) + ARGUMENT_KEYWORDS_FIELD_NUMBER; + hash = (53 * hash) + getArgumentKeywordsList().hashCode(); + } + hash = (37 * hash) + ALLOWED_POSITIONAL_ARGUMENTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAllowedPositionalArguments()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.SavedBareConcreteFunction parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedBareConcreteFunction parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedBareConcreteFunction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedBareConcreteFunction 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.proto.framework.SavedBareConcreteFunction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedBareConcreteFunction parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedBareConcreteFunction parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedBareConcreteFunction parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedBareConcreteFunction parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedBareConcreteFunction parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedBareConcreteFunction parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedBareConcreteFunction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.SavedBareConcreteFunction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.SavedBareConcreteFunction} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.SavedBareConcreteFunction) + org.tensorflow.proto.framework.SavedBareConcreteFunctionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedBareConcreteFunction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedBareConcreteFunction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedBareConcreteFunction.class, org.tensorflow.proto.framework.SavedBareConcreteFunction.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.SavedBareConcreteFunction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + concreteFunctionName_ = ""; + + argumentKeywords_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + allowedPositionalArguments_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedBareConcreteFunction_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedBareConcreteFunction getDefaultInstanceForType() { + return org.tensorflow.proto.framework.SavedBareConcreteFunction.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedBareConcreteFunction build() { + org.tensorflow.proto.framework.SavedBareConcreteFunction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedBareConcreteFunction buildPartial() { + org.tensorflow.proto.framework.SavedBareConcreteFunction result = new org.tensorflow.proto.framework.SavedBareConcreteFunction(this); + int from_bitField0_ = bitField0_; + result.concreteFunctionName_ = concreteFunctionName_; + if (((bitField0_ & 0x00000001) != 0)) { + argumentKeywords_ = argumentKeywords_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.argumentKeywords_ = argumentKeywords_; + result.allowedPositionalArguments_ = allowedPositionalArguments_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.SavedBareConcreteFunction) { + return mergeFrom((org.tensorflow.proto.framework.SavedBareConcreteFunction)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.SavedBareConcreteFunction other) { + if (other == org.tensorflow.proto.framework.SavedBareConcreteFunction.getDefaultInstance()) return this; + if (!other.getConcreteFunctionName().isEmpty()) { + concreteFunctionName_ = other.concreteFunctionName_; + onChanged(); + } + if (!other.argumentKeywords_.isEmpty()) { + if (argumentKeywords_.isEmpty()) { + argumentKeywords_ = other.argumentKeywords_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureArgumentKeywordsIsMutable(); + argumentKeywords_.addAll(other.argumentKeywords_); + } + onChanged(); + } + if (other.getAllowedPositionalArguments() != 0L) { + setAllowedPositionalArguments(other.getAllowedPositionalArguments()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.SavedBareConcreteFunction parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.SavedBareConcreteFunction) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object concreteFunctionName_ = ""; + /** + *
+     * Identifies a SavedConcreteFunction.
+     * 
+ * + * string concrete_function_name = 1; + */ + public java.lang.String getConcreteFunctionName() { + java.lang.Object ref = concreteFunctionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + concreteFunctionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Identifies a SavedConcreteFunction.
+     * 
+ * + * string concrete_function_name = 1; + */ + public com.google.protobuf.ByteString + getConcreteFunctionNameBytes() { + java.lang.Object ref = concreteFunctionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + concreteFunctionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Identifies a SavedConcreteFunction.
+     * 
+ * + * string concrete_function_name = 1; + */ + public Builder setConcreteFunctionName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + concreteFunctionName_ = value; + onChanged(); + return this; + } + /** + *
+     * Identifies a SavedConcreteFunction.
+     * 
+ * + * string concrete_function_name = 1; + */ + public Builder clearConcreteFunctionName() { + + concreteFunctionName_ = getDefaultInstance().getConcreteFunctionName(); + onChanged(); + return this; + } + /** + *
+     * Identifies a SavedConcreteFunction.
+     * 
+ * + * string concrete_function_name = 1; + */ + public Builder setConcreteFunctionNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + concreteFunctionName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList argumentKeywords_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureArgumentKeywordsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + argumentKeywords_ = new com.google.protobuf.LazyStringArrayList(argumentKeywords_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * A sequence of unique strings, one per Tensor argument.
+     * 
+ * + * repeated string argument_keywords = 2; + */ + public com.google.protobuf.ProtocolStringList + getArgumentKeywordsList() { + return argumentKeywords_.getUnmodifiableView(); + } + /** + *
+     * A sequence of unique strings, one per Tensor argument.
+     * 
+ * + * repeated string argument_keywords = 2; + */ + public int getArgumentKeywordsCount() { + return argumentKeywords_.size(); + } + /** + *
+     * A sequence of unique strings, one per Tensor argument.
+     * 
+ * + * repeated string argument_keywords = 2; + */ + public java.lang.String getArgumentKeywords(int index) { + return argumentKeywords_.get(index); + } + /** + *
+     * A sequence of unique strings, one per Tensor argument.
+     * 
+ * + * repeated string argument_keywords = 2; + */ + public com.google.protobuf.ByteString + getArgumentKeywordsBytes(int index) { + return argumentKeywords_.getByteString(index); + } + /** + *
+     * A sequence of unique strings, one per Tensor argument.
+     * 
+ * + * repeated string argument_keywords = 2; + */ + public Builder setArgumentKeywords( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgumentKeywordsIsMutable(); + argumentKeywords_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A sequence of unique strings, one per Tensor argument.
+     * 
+ * + * repeated string argument_keywords = 2; + */ + public Builder addArgumentKeywords( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgumentKeywordsIsMutable(); + argumentKeywords_.add(value); + onChanged(); + return this; + } + /** + *
+     * A sequence of unique strings, one per Tensor argument.
+     * 
+ * + * repeated string argument_keywords = 2; + */ + public Builder addAllArgumentKeywords( + java.lang.Iterable values) { + ensureArgumentKeywordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, argumentKeywords_); + onChanged(); + return this; + } + /** + *
+     * A sequence of unique strings, one per Tensor argument.
+     * 
+ * + * repeated string argument_keywords = 2; + */ + public Builder clearArgumentKeywords() { + argumentKeywords_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A sequence of unique strings, one per Tensor argument.
+     * 
+ * + * repeated string argument_keywords = 2; + */ + public Builder addArgumentKeywordsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureArgumentKeywordsIsMutable(); + argumentKeywords_.add(value); + onChanged(); + return this; + } + + private long allowedPositionalArguments_ ; + /** + *
+     * The prefix of `argument_keywords` which may be identified by position.
+     * 
+ * + * int64 allowed_positional_arguments = 3; + */ + public long getAllowedPositionalArguments() { + return allowedPositionalArguments_; + } + /** + *
+     * The prefix of `argument_keywords` which may be identified by position.
+     * 
+ * + * int64 allowed_positional_arguments = 3; + */ + public Builder setAllowedPositionalArguments(long value) { + + allowedPositionalArguments_ = value; + onChanged(); + return this; + } + /** + *
+     * The prefix of `argument_keywords` which may be identified by position.
+     * 
+ * + * int64 allowed_positional_arguments = 3; + */ + public Builder clearAllowedPositionalArguments() { + + allowedPositionalArguments_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.SavedBareConcreteFunction) + } + + // @@protoc_insertion_point(class_scope:tensorflow.SavedBareConcreteFunction) + private static final org.tensorflow.proto.framework.SavedBareConcreteFunction DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.SavedBareConcreteFunction(); + } + + public static org.tensorflow.proto.framework.SavedBareConcreteFunction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SavedBareConcreteFunction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SavedBareConcreteFunction(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedBareConcreteFunction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedBareConcreteFunctionOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedBareConcreteFunctionOrBuilder.java new file mode 100644 index 00000000000..cf9a625e8b3 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedBareConcreteFunctionOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +public interface SavedBareConcreteFunctionOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.SavedBareConcreteFunction) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Identifies a SavedConcreteFunction.
+   * 
+ * + * string concrete_function_name = 1; + */ + java.lang.String getConcreteFunctionName(); + /** + *
+   * Identifies a SavedConcreteFunction.
+   * 
+ * + * string concrete_function_name = 1; + */ + com.google.protobuf.ByteString + getConcreteFunctionNameBytes(); + + /** + *
+   * A sequence of unique strings, one per Tensor argument.
+   * 
+ * + * repeated string argument_keywords = 2; + */ + java.util.List + getArgumentKeywordsList(); + /** + *
+   * A sequence of unique strings, one per Tensor argument.
+   * 
+ * + * repeated string argument_keywords = 2; + */ + int getArgumentKeywordsCount(); + /** + *
+   * A sequence of unique strings, one per Tensor argument.
+   * 
+ * + * repeated string argument_keywords = 2; + */ + java.lang.String getArgumentKeywords(int index); + /** + *
+   * A sequence of unique strings, one per Tensor argument.
+   * 
+ * + * repeated string argument_keywords = 2; + */ + com.google.protobuf.ByteString + getArgumentKeywordsBytes(int index); + + /** + *
+   * The prefix of `argument_keywords` which may be identified by position.
+   * 
+ * + * int64 allowed_positional_arguments = 3; + */ + long getAllowedPositionalArguments(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedConcreteFunction.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedConcreteFunction.java new file mode 100644 index 00000000000..62106345581 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedConcreteFunction.java @@ -0,0 +1,1156 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Stores low-level information about a concrete function. Referenced in either
+ * a SavedFunction or a SavedBareConcreteFunction.
+ * 
+ * + * Protobuf type {@code tensorflow.SavedConcreteFunction} + */ +public final class SavedConcreteFunction extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.SavedConcreteFunction) + SavedConcreteFunctionOrBuilder { +private static final long serialVersionUID = 0L; + // Use SavedConcreteFunction.newBuilder() to construct. + private SavedConcreteFunction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SavedConcreteFunction() { + boundInputs_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SavedConcreteFunction(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SavedConcreteFunction( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + boundInputs_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + boundInputs_.addInt(input.readInt32()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + boundInputs_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + boundInputs_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + case 26: { + org.tensorflow.proto.framework.StructuredValue.Builder subBuilder = null; + if (canonicalizedInputSignature_ != null) { + subBuilder = canonicalizedInputSignature_.toBuilder(); + } + canonicalizedInputSignature_ = input.readMessage(org.tensorflow.proto.framework.StructuredValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(canonicalizedInputSignature_); + canonicalizedInputSignature_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + org.tensorflow.proto.framework.StructuredValue.Builder subBuilder = null; + if (outputSignature_ != null) { + subBuilder = outputSignature_.toBuilder(); + } + outputSignature_ = input.readMessage(org.tensorflow.proto.framework.StructuredValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputSignature_); + outputSignature_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + boundInputs_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedConcreteFunction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedConcreteFunction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedConcreteFunction.class, org.tensorflow.proto.framework.SavedConcreteFunction.Builder.class); + } + + public static final int BOUND_INPUTS_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.IntList boundInputs_; + /** + *
+   * Bound inputs to the function. The SavedObjects identified by the node ids
+   * given here are appended as extra inputs to the caller-supplied inputs.
+   * The only types of SavedObjects valid here are SavedVariable, SavedResource
+   * and SavedAsset.
+   * 
+ * + * repeated int32 bound_inputs = 2; + */ + public java.util.List + getBoundInputsList() { + return boundInputs_; + } + /** + *
+   * Bound inputs to the function. The SavedObjects identified by the node ids
+   * given here are appended as extra inputs to the caller-supplied inputs.
+   * The only types of SavedObjects valid here are SavedVariable, SavedResource
+   * and SavedAsset.
+   * 
+ * + * repeated int32 bound_inputs = 2; + */ + public int getBoundInputsCount() { + return boundInputs_.size(); + } + /** + *
+   * Bound inputs to the function. The SavedObjects identified by the node ids
+   * given here are appended as extra inputs to the caller-supplied inputs.
+   * The only types of SavedObjects valid here are SavedVariable, SavedResource
+   * and SavedAsset.
+   * 
+ * + * repeated int32 bound_inputs = 2; + */ + public int getBoundInputs(int index) { + return boundInputs_.getInt(index); + } + private int boundInputsMemoizedSerializedSize = -1; + + public static final int CANONICALIZED_INPUT_SIGNATURE_FIELD_NUMBER = 3; + private org.tensorflow.proto.framework.StructuredValue canonicalizedInputSignature_; + /** + *
+   * Input in canonicalized form that was received to create this concrete
+   * function.
+   * 
+ * + * .tensorflow.StructuredValue canonicalized_input_signature = 3; + */ + public boolean hasCanonicalizedInputSignature() { + return canonicalizedInputSignature_ != null; + } + /** + *
+   * Input in canonicalized form that was received to create this concrete
+   * function.
+   * 
+ * + * .tensorflow.StructuredValue canonicalized_input_signature = 3; + */ + public org.tensorflow.proto.framework.StructuredValue getCanonicalizedInputSignature() { + return canonicalizedInputSignature_ == null ? org.tensorflow.proto.framework.StructuredValue.getDefaultInstance() : canonicalizedInputSignature_; + } + /** + *
+   * Input in canonicalized form that was received to create this concrete
+   * function.
+   * 
+ * + * .tensorflow.StructuredValue canonicalized_input_signature = 3; + */ + public org.tensorflow.proto.framework.StructuredValueOrBuilder getCanonicalizedInputSignatureOrBuilder() { + return getCanonicalizedInputSignature(); + } + + public static final int OUTPUT_SIGNATURE_FIELD_NUMBER = 4; + private org.tensorflow.proto.framework.StructuredValue outputSignature_; + /** + *
+   * Output that was the return value of this function after replacing all
+   * Tensors with TensorSpecs. This can be an arbitrary nested function and will
+   * be used to reconstruct the full structure from pure tensors.
+   * 
+ * + * .tensorflow.StructuredValue output_signature = 4; + */ + public boolean hasOutputSignature() { + return outputSignature_ != null; + } + /** + *
+   * Output that was the return value of this function after replacing all
+   * Tensors with TensorSpecs. This can be an arbitrary nested function and will
+   * be used to reconstruct the full structure from pure tensors.
+   * 
+ * + * .tensorflow.StructuredValue output_signature = 4; + */ + public org.tensorflow.proto.framework.StructuredValue getOutputSignature() { + return outputSignature_ == null ? org.tensorflow.proto.framework.StructuredValue.getDefaultInstance() : outputSignature_; + } + /** + *
+   * Output that was the return value of this function after replacing all
+   * Tensors with TensorSpecs. This can be an arbitrary nested function and will
+   * be used to reconstruct the full structure from pure tensors.
+   * 
+ * + * .tensorflow.StructuredValue output_signature = 4; + */ + public org.tensorflow.proto.framework.StructuredValueOrBuilder getOutputSignatureOrBuilder() { + return getOutputSignature(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getBoundInputsList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(boundInputsMemoizedSerializedSize); + } + for (int i = 0; i < boundInputs_.size(); i++) { + output.writeInt32NoTag(boundInputs_.getInt(i)); + } + if (canonicalizedInputSignature_ != null) { + output.writeMessage(3, getCanonicalizedInputSignature()); + } + if (outputSignature_ != null) { + output.writeMessage(4, getOutputSignature()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < boundInputs_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(boundInputs_.getInt(i)); + } + size += dataSize; + if (!getBoundInputsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + boundInputsMemoizedSerializedSize = dataSize; + } + if (canonicalizedInputSignature_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getCanonicalizedInputSignature()); + } + if (outputSignature_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getOutputSignature()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.SavedConcreteFunction)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.SavedConcreteFunction other = (org.tensorflow.proto.framework.SavedConcreteFunction) obj; + + if (!getBoundInputsList() + .equals(other.getBoundInputsList())) return false; + if (hasCanonicalizedInputSignature() != other.hasCanonicalizedInputSignature()) return false; + if (hasCanonicalizedInputSignature()) { + if (!getCanonicalizedInputSignature() + .equals(other.getCanonicalizedInputSignature())) return false; + } + if (hasOutputSignature() != other.hasOutputSignature()) return false; + if (hasOutputSignature()) { + if (!getOutputSignature() + .equals(other.getOutputSignature())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBoundInputsCount() > 0) { + hash = (37 * hash) + BOUND_INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getBoundInputsList().hashCode(); + } + if (hasCanonicalizedInputSignature()) { + hash = (37 * hash) + CANONICALIZED_INPUT_SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getCanonicalizedInputSignature().hashCode(); + } + if (hasOutputSignature()) { + hash = (37 * hash) + OUTPUT_SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getOutputSignature().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.SavedConcreteFunction parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedConcreteFunction parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedConcreteFunction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedConcreteFunction 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.proto.framework.SavedConcreteFunction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedConcreteFunction parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedConcreteFunction parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedConcreteFunction parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedConcreteFunction parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedConcreteFunction parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedConcreteFunction parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedConcreteFunction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.SavedConcreteFunction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Stores low-level information about a concrete function. Referenced in either
+   * a SavedFunction or a SavedBareConcreteFunction.
+   * 
+ * + * Protobuf type {@code tensorflow.SavedConcreteFunction} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.SavedConcreteFunction) + org.tensorflow.proto.framework.SavedConcreteFunctionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedConcreteFunction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedConcreteFunction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedConcreteFunction.class, org.tensorflow.proto.framework.SavedConcreteFunction.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.SavedConcreteFunction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + boundInputs_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + if (canonicalizedInputSignatureBuilder_ == null) { + canonicalizedInputSignature_ = null; + } else { + canonicalizedInputSignature_ = null; + canonicalizedInputSignatureBuilder_ = null; + } + if (outputSignatureBuilder_ == null) { + outputSignature_ = null; + } else { + outputSignature_ = null; + outputSignatureBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedConcreteFunction_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedConcreteFunction getDefaultInstanceForType() { + return org.tensorflow.proto.framework.SavedConcreteFunction.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedConcreteFunction build() { + org.tensorflow.proto.framework.SavedConcreteFunction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedConcreteFunction buildPartial() { + org.tensorflow.proto.framework.SavedConcreteFunction result = new org.tensorflow.proto.framework.SavedConcreteFunction(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + boundInputs_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.boundInputs_ = boundInputs_; + if (canonicalizedInputSignatureBuilder_ == null) { + result.canonicalizedInputSignature_ = canonicalizedInputSignature_; + } else { + result.canonicalizedInputSignature_ = canonicalizedInputSignatureBuilder_.build(); + } + if (outputSignatureBuilder_ == null) { + result.outputSignature_ = outputSignature_; + } else { + result.outputSignature_ = outputSignatureBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.SavedConcreteFunction) { + return mergeFrom((org.tensorflow.proto.framework.SavedConcreteFunction)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.SavedConcreteFunction other) { + if (other == org.tensorflow.proto.framework.SavedConcreteFunction.getDefaultInstance()) return this; + if (!other.boundInputs_.isEmpty()) { + if (boundInputs_.isEmpty()) { + boundInputs_ = other.boundInputs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBoundInputsIsMutable(); + boundInputs_.addAll(other.boundInputs_); + } + onChanged(); + } + if (other.hasCanonicalizedInputSignature()) { + mergeCanonicalizedInputSignature(other.getCanonicalizedInputSignature()); + } + if (other.hasOutputSignature()) { + mergeOutputSignature(other.getOutputSignature()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.SavedConcreteFunction parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.SavedConcreteFunction) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.IntList boundInputs_ = emptyIntList(); + private void ensureBoundInputsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + boundInputs_ = mutableCopy(boundInputs_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Bound inputs to the function. The SavedObjects identified by the node ids
+     * given here are appended as extra inputs to the caller-supplied inputs.
+     * The only types of SavedObjects valid here are SavedVariable, SavedResource
+     * and SavedAsset.
+     * 
+ * + * repeated int32 bound_inputs = 2; + */ + public java.util.List + getBoundInputsList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(boundInputs_) : boundInputs_; + } + /** + *
+     * Bound inputs to the function. The SavedObjects identified by the node ids
+     * given here are appended as extra inputs to the caller-supplied inputs.
+     * The only types of SavedObjects valid here are SavedVariable, SavedResource
+     * and SavedAsset.
+     * 
+ * + * repeated int32 bound_inputs = 2; + */ + public int getBoundInputsCount() { + return boundInputs_.size(); + } + /** + *
+     * Bound inputs to the function. The SavedObjects identified by the node ids
+     * given here are appended as extra inputs to the caller-supplied inputs.
+     * The only types of SavedObjects valid here are SavedVariable, SavedResource
+     * and SavedAsset.
+     * 
+ * + * repeated int32 bound_inputs = 2; + */ + public int getBoundInputs(int index) { + return boundInputs_.getInt(index); + } + /** + *
+     * Bound inputs to the function. The SavedObjects identified by the node ids
+     * given here are appended as extra inputs to the caller-supplied inputs.
+     * The only types of SavedObjects valid here are SavedVariable, SavedResource
+     * and SavedAsset.
+     * 
+ * + * repeated int32 bound_inputs = 2; + */ + public Builder setBoundInputs( + int index, int value) { + ensureBoundInputsIsMutable(); + boundInputs_.setInt(index, value); + onChanged(); + return this; + } + /** + *
+     * Bound inputs to the function. The SavedObjects identified by the node ids
+     * given here are appended as extra inputs to the caller-supplied inputs.
+     * The only types of SavedObjects valid here are SavedVariable, SavedResource
+     * and SavedAsset.
+     * 
+ * + * repeated int32 bound_inputs = 2; + */ + public Builder addBoundInputs(int value) { + ensureBoundInputsIsMutable(); + boundInputs_.addInt(value); + onChanged(); + return this; + } + /** + *
+     * Bound inputs to the function. The SavedObjects identified by the node ids
+     * given here are appended as extra inputs to the caller-supplied inputs.
+     * The only types of SavedObjects valid here are SavedVariable, SavedResource
+     * and SavedAsset.
+     * 
+ * + * repeated int32 bound_inputs = 2; + */ + public Builder addAllBoundInputs( + java.lang.Iterable values) { + ensureBoundInputsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, boundInputs_); + onChanged(); + return this; + } + /** + *
+     * Bound inputs to the function. The SavedObjects identified by the node ids
+     * given here are appended as extra inputs to the caller-supplied inputs.
+     * The only types of SavedObjects valid here are SavedVariable, SavedResource
+     * and SavedAsset.
+     * 
+ * + * repeated int32 bound_inputs = 2; + */ + public Builder clearBoundInputs() { + boundInputs_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.StructuredValue canonicalizedInputSignature_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder> canonicalizedInputSignatureBuilder_; + /** + *
+     * Input in canonicalized form that was received to create this concrete
+     * function.
+     * 
+ * + * .tensorflow.StructuredValue canonicalized_input_signature = 3; + */ + public boolean hasCanonicalizedInputSignature() { + return canonicalizedInputSignatureBuilder_ != null || canonicalizedInputSignature_ != null; + } + /** + *
+     * Input in canonicalized form that was received to create this concrete
+     * function.
+     * 
+ * + * .tensorflow.StructuredValue canonicalized_input_signature = 3; + */ + public org.tensorflow.proto.framework.StructuredValue getCanonicalizedInputSignature() { + if (canonicalizedInputSignatureBuilder_ == null) { + return canonicalizedInputSignature_ == null ? org.tensorflow.proto.framework.StructuredValue.getDefaultInstance() : canonicalizedInputSignature_; + } else { + return canonicalizedInputSignatureBuilder_.getMessage(); + } + } + /** + *
+     * Input in canonicalized form that was received to create this concrete
+     * function.
+     * 
+ * + * .tensorflow.StructuredValue canonicalized_input_signature = 3; + */ + public Builder setCanonicalizedInputSignature(org.tensorflow.proto.framework.StructuredValue value) { + if (canonicalizedInputSignatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + canonicalizedInputSignature_ = value; + onChanged(); + } else { + canonicalizedInputSignatureBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Input in canonicalized form that was received to create this concrete
+     * function.
+     * 
+ * + * .tensorflow.StructuredValue canonicalized_input_signature = 3; + */ + public Builder setCanonicalizedInputSignature( + org.tensorflow.proto.framework.StructuredValue.Builder builderForValue) { + if (canonicalizedInputSignatureBuilder_ == null) { + canonicalizedInputSignature_ = builderForValue.build(); + onChanged(); + } else { + canonicalizedInputSignatureBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Input in canonicalized form that was received to create this concrete
+     * function.
+     * 
+ * + * .tensorflow.StructuredValue canonicalized_input_signature = 3; + */ + public Builder mergeCanonicalizedInputSignature(org.tensorflow.proto.framework.StructuredValue value) { + if (canonicalizedInputSignatureBuilder_ == null) { + if (canonicalizedInputSignature_ != null) { + canonicalizedInputSignature_ = + org.tensorflow.proto.framework.StructuredValue.newBuilder(canonicalizedInputSignature_).mergeFrom(value).buildPartial(); + } else { + canonicalizedInputSignature_ = value; + } + onChanged(); + } else { + canonicalizedInputSignatureBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Input in canonicalized form that was received to create this concrete
+     * function.
+     * 
+ * + * .tensorflow.StructuredValue canonicalized_input_signature = 3; + */ + public Builder clearCanonicalizedInputSignature() { + if (canonicalizedInputSignatureBuilder_ == null) { + canonicalizedInputSignature_ = null; + onChanged(); + } else { + canonicalizedInputSignature_ = null; + canonicalizedInputSignatureBuilder_ = null; + } + + return this; + } + /** + *
+     * Input in canonicalized form that was received to create this concrete
+     * function.
+     * 
+ * + * .tensorflow.StructuredValue canonicalized_input_signature = 3; + */ + public org.tensorflow.proto.framework.StructuredValue.Builder getCanonicalizedInputSignatureBuilder() { + + onChanged(); + return getCanonicalizedInputSignatureFieldBuilder().getBuilder(); + } + /** + *
+     * Input in canonicalized form that was received to create this concrete
+     * function.
+     * 
+ * + * .tensorflow.StructuredValue canonicalized_input_signature = 3; + */ + public org.tensorflow.proto.framework.StructuredValueOrBuilder getCanonicalizedInputSignatureOrBuilder() { + if (canonicalizedInputSignatureBuilder_ != null) { + return canonicalizedInputSignatureBuilder_.getMessageOrBuilder(); + } else { + return canonicalizedInputSignature_ == null ? + org.tensorflow.proto.framework.StructuredValue.getDefaultInstance() : canonicalizedInputSignature_; + } + } + /** + *
+     * Input in canonicalized form that was received to create this concrete
+     * function.
+     * 
+ * + * .tensorflow.StructuredValue canonicalized_input_signature = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder> + getCanonicalizedInputSignatureFieldBuilder() { + if (canonicalizedInputSignatureBuilder_ == null) { + canonicalizedInputSignatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder>( + getCanonicalizedInputSignature(), + getParentForChildren(), + isClean()); + canonicalizedInputSignature_ = null; + } + return canonicalizedInputSignatureBuilder_; + } + + private org.tensorflow.proto.framework.StructuredValue outputSignature_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder> outputSignatureBuilder_; + /** + *
+     * Output that was the return value of this function after replacing all
+     * Tensors with TensorSpecs. This can be an arbitrary nested function and will
+     * be used to reconstruct the full structure from pure tensors.
+     * 
+ * + * .tensorflow.StructuredValue output_signature = 4; + */ + public boolean hasOutputSignature() { + return outputSignatureBuilder_ != null || outputSignature_ != null; + } + /** + *
+     * Output that was the return value of this function after replacing all
+     * Tensors with TensorSpecs. This can be an arbitrary nested function and will
+     * be used to reconstruct the full structure from pure tensors.
+     * 
+ * + * .tensorflow.StructuredValue output_signature = 4; + */ + public org.tensorflow.proto.framework.StructuredValue getOutputSignature() { + if (outputSignatureBuilder_ == null) { + return outputSignature_ == null ? org.tensorflow.proto.framework.StructuredValue.getDefaultInstance() : outputSignature_; + } else { + return outputSignatureBuilder_.getMessage(); + } + } + /** + *
+     * Output that was the return value of this function after replacing all
+     * Tensors with TensorSpecs. This can be an arbitrary nested function and will
+     * be used to reconstruct the full structure from pure tensors.
+     * 
+ * + * .tensorflow.StructuredValue output_signature = 4; + */ + public Builder setOutputSignature(org.tensorflow.proto.framework.StructuredValue value) { + if (outputSignatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputSignature_ = value; + onChanged(); + } else { + outputSignatureBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output that was the return value of this function after replacing all
+     * Tensors with TensorSpecs. This can be an arbitrary nested function and will
+     * be used to reconstruct the full structure from pure tensors.
+     * 
+ * + * .tensorflow.StructuredValue output_signature = 4; + */ + public Builder setOutputSignature( + org.tensorflow.proto.framework.StructuredValue.Builder builderForValue) { + if (outputSignatureBuilder_ == null) { + outputSignature_ = builderForValue.build(); + onChanged(); + } else { + outputSignatureBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output that was the return value of this function after replacing all
+     * Tensors with TensorSpecs. This can be an arbitrary nested function and will
+     * be used to reconstruct the full structure from pure tensors.
+     * 
+ * + * .tensorflow.StructuredValue output_signature = 4; + */ + public Builder mergeOutputSignature(org.tensorflow.proto.framework.StructuredValue value) { + if (outputSignatureBuilder_ == null) { + if (outputSignature_ != null) { + outputSignature_ = + org.tensorflow.proto.framework.StructuredValue.newBuilder(outputSignature_).mergeFrom(value).buildPartial(); + } else { + outputSignature_ = value; + } + onChanged(); + } else { + outputSignatureBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output that was the return value of this function after replacing all
+     * Tensors with TensorSpecs. This can be an arbitrary nested function and will
+     * be used to reconstruct the full structure from pure tensors.
+     * 
+ * + * .tensorflow.StructuredValue output_signature = 4; + */ + public Builder clearOutputSignature() { + if (outputSignatureBuilder_ == null) { + outputSignature_ = null; + onChanged(); + } else { + outputSignature_ = null; + outputSignatureBuilder_ = null; + } + + return this; + } + /** + *
+     * Output that was the return value of this function after replacing all
+     * Tensors with TensorSpecs. This can be an arbitrary nested function and will
+     * be used to reconstruct the full structure from pure tensors.
+     * 
+ * + * .tensorflow.StructuredValue output_signature = 4; + */ + public org.tensorflow.proto.framework.StructuredValue.Builder getOutputSignatureBuilder() { + + onChanged(); + return getOutputSignatureFieldBuilder().getBuilder(); + } + /** + *
+     * Output that was the return value of this function after replacing all
+     * Tensors with TensorSpecs. This can be an arbitrary nested function and will
+     * be used to reconstruct the full structure from pure tensors.
+     * 
+ * + * .tensorflow.StructuredValue output_signature = 4; + */ + public org.tensorflow.proto.framework.StructuredValueOrBuilder getOutputSignatureOrBuilder() { + if (outputSignatureBuilder_ != null) { + return outputSignatureBuilder_.getMessageOrBuilder(); + } else { + return outputSignature_ == null ? + org.tensorflow.proto.framework.StructuredValue.getDefaultInstance() : outputSignature_; + } + } + /** + *
+     * Output that was the return value of this function after replacing all
+     * Tensors with TensorSpecs. This can be an arbitrary nested function and will
+     * be used to reconstruct the full structure from pure tensors.
+     * 
+ * + * .tensorflow.StructuredValue output_signature = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder> + getOutputSignatureFieldBuilder() { + if (outputSignatureBuilder_ == null) { + outputSignatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.StructuredValue, org.tensorflow.proto.framework.StructuredValue.Builder, org.tensorflow.proto.framework.StructuredValueOrBuilder>( + getOutputSignature(), + getParentForChildren(), + isClean()); + outputSignature_ = null; + } + return outputSignatureBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.SavedConcreteFunction) + } + + // @@protoc_insertion_point(class_scope:tensorflow.SavedConcreteFunction) + private static final org.tensorflow.proto.framework.SavedConcreteFunction DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.SavedConcreteFunction(); + } + + public static org.tensorflow.proto.framework.SavedConcreteFunction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SavedConcreteFunction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SavedConcreteFunction(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedConcreteFunction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedConcreteFunctionOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedConcreteFunctionOrBuilder.java new file mode 100644 index 00000000000..49145b8ca01 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedConcreteFunctionOrBuilder.java @@ -0,0 +1,102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +public interface SavedConcreteFunctionOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.SavedConcreteFunction) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Bound inputs to the function. The SavedObjects identified by the node ids
+   * given here are appended as extra inputs to the caller-supplied inputs.
+   * The only types of SavedObjects valid here are SavedVariable, SavedResource
+   * and SavedAsset.
+   * 
+ * + * repeated int32 bound_inputs = 2; + */ + java.util.List getBoundInputsList(); + /** + *
+   * Bound inputs to the function. The SavedObjects identified by the node ids
+   * given here are appended as extra inputs to the caller-supplied inputs.
+   * The only types of SavedObjects valid here are SavedVariable, SavedResource
+   * and SavedAsset.
+   * 
+ * + * repeated int32 bound_inputs = 2; + */ + int getBoundInputsCount(); + /** + *
+   * Bound inputs to the function. The SavedObjects identified by the node ids
+   * given here are appended as extra inputs to the caller-supplied inputs.
+   * The only types of SavedObjects valid here are SavedVariable, SavedResource
+   * and SavedAsset.
+   * 
+ * + * repeated int32 bound_inputs = 2; + */ + int getBoundInputs(int index); + + /** + *
+   * Input in canonicalized form that was received to create this concrete
+   * function.
+   * 
+ * + * .tensorflow.StructuredValue canonicalized_input_signature = 3; + */ + boolean hasCanonicalizedInputSignature(); + /** + *
+   * Input in canonicalized form that was received to create this concrete
+   * function.
+   * 
+ * + * .tensorflow.StructuredValue canonicalized_input_signature = 3; + */ + org.tensorflow.proto.framework.StructuredValue getCanonicalizedInputSignature(); + /** + *
+   * Input in canonicalized form that was received to create this concrete
+   * function.
+   * 
+ * + * .tensorflow.StructuredValue canonicalized_input_signature = 3; + */ + org.tensorflow.proto.framework.StructuredValueOrBuilder getCanonicalizedInputSignatureOrBuilder(); + + /** + *
+   * Output that was the return value of this function after replacing all
+   * Tensors with TensorSpecs. This can be an arbitrary nested function and will
+   * be used to reconstruct the full structure from pure tensors.
+   * 
+ * + * .tensorflow.StructuredValue output_signature = 4; + */ + boolean hasOutputSignature(); + /** + *
+   * Output that was the return value of this function after replacing all
+   * Tensors with TensorSpecs. This can be an arbitrary nested function and will
+   * be used to reconstruct the full structure from pure tensors.
+   * 
+ * + * .tensorflow.StructuredValue output_signature = 4; + */ + org.tensorflow.proto.framework.StructuredValue getOutputSignature(); + /** + *
+   * Output that was the return value of this function after replacing all
+   * Tensors with TensorSpecs. This can be an arbitrary nested function and will
+   * be used to reconstruct the full structure from pure tensors.
+   * 
+ * + * .tensorflow.StructuredValue output_signature = 4; + */ + org.tensorflow.proto.framework.StructuredValueOrBuilder getOutputSignatureOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedConstant.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedConstant.java new file mode 100644 index 00000000000..4ba709c9c98 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedConstant.java @@ -0,0 +1,574 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.SavedConstant} + */ +public final class SavedConstant extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.SavedConstant) + SavedConstantOrBuilder { +private static final long serialVersionUID = 0L; + // Use SavedConstant.newBuilder() to construct. + private SavedConstant(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SavedConstant() { + operation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SavedConstant(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SavedConstant( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + operation_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedConstant_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedConstant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedConstant.class, org.tensorflow.proto.framework.SavedConstant.Builder.class); + } + + public static final int OPERATION_FIELD_NUMBER = 1; + private volatile java.lang.Object operation_; + /** + *
+   * An Operation name for a ConstantOp in this SavedObjectGraph's MetaGraph.
+   * 
+ * + * string operation = 1; + */ + public java.lang.String getOperation() { + java.lang.Object ref = operation_; + 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(); + operation_ = s; + return s; + } + } + /** + *
+   * An Operation name for a ConstantOp in this SavedObjectGraph's MetaGraph.
+   * 
+ * + * string operation = 1; + */ + public com.google.protobuf.ByteString + getOperationBytes() { + java.lang.Object ref = operation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + operation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getOperationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, operation_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getOperationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, operation_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.SavedConstant)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.SavedConstant other = (org.tensorflow.proto.framework.SavedConstant) obj; + + if (!getOperation() + .equals(other.getOperation())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getOperation().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.SavedConstant parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedConstant parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedConstant parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedConstant 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.proto.framework.SavedConstant parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedConstant parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedConstant parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedConstant parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedConstant parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedConstant parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedConstant parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedConstant parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.SavedConstant prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.SavedConstant} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.SavedConstant) + org.tensorflow.proto.framework.SavedConstantOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedConstant_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedConstant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedConstant.class, org.tensorflow.proto.framework.SavedConstant.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.SavedConstant.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + operation_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedConstant_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedConstant getDefaultInstanceForType() { + return org.tensorflow.proto.framework.SavedConstant.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedConstant build() { + org.tensorflow.proto.framework.SavedConstant result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedConstant buildPartial() { + org.tensorflow.proto.framework.SavedConstant result = new org.tensorflow.proto.framework.SavedConstant(this); + result.operation_ = operation_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.SavedConstant) { + return mergeFrom((org.tensorflow.proto.framework.SavedConstant)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.SavedConstant other) { + if (other == org.tensorflow.proto.framework.SavedConstant.getDefaultInstance()) return this; + if (!other.getOperation().isEmpty()) { + operation_ = other.operation_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.SavedConstant parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.SavedConstant) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object operation_ = ""; + /** + *
+     * An Operation name for a ConstantOp in this SavedObjectGraph's MetaGraph.
+     * 
+ * + * string operation = 1; + */ + public java.lang.String getOperation() { + java.lang.Object ref = operation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * An Operation name for a ConstantOp in this SavedObjectGraph's MetaGraph.
+     * 
+ * + * string operation = 1; + */ + public com.google.protobuf.ByteString + getOperationBytes() { + java.lang.Object ref = operation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + operation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * An Operation name for a ConstantOp in this SavedObjectGraph's MetaGraph.
+     * 
+ * + * string operation = 1; + */ + public Builder setOperation( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + operation_ = value; + onChanged(); + return this; + } + /** + *
+     * An Operation name for a ConstantOp in this SavedObjectGraph's MetaGraph.
+     * 
+ * + * string operation = 1; + */ + public Builder clearOperation() { + + operation_ = getDefaultInstance().getOperation(); + onChanged(); + return this; + } + /** + *
+     * An Operation name for a ConstantOp in this SavedObjectGraph's MetaGraph.
+     * 
+ * + * string operation = 1; + */ + public Builder setOperationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + operation_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.SavedConstant) + } + + // @@protoc_insertion_point(class_scope:tensorflow.SavedConstant) + private static final org.tensorflow.proto.framework.SavedConstant DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.SavedConstant(); + } + + public static org.tensorflow.proto.framework.SavedConstant getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SavedConstant parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SavedConstant(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedConstant getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedConstantOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedConstantOrBuilder.java new file mode 100644 index 00000000000..ed435bc83ba --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedConstantOrBuilder.java @@ -0,0 +1,27 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +public interface SavedConstantOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.SavedConstant) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * An Operation name for a ConstantOp in this SavedObjectGraph's MetaGraph.
+   * 
+ * + * string operation = 1; + */ + java.lang.String getOperation(); + /** + *
+   * An Operation name for a ConstantOp in this SavedObjectGraph's MetaGraph.
+   * 
+ * + * string operation = 1; + */ + com.google.protobuf.ByteString + getOperationBytes(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedFunction.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedFunction.java new file mode 100644 index 00000000000..d873063784e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedFunction.java @@ -0,0 +1,781 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * A function with multiple signatures, possibly with non-Tensor arguments.
+ * 
+ * + * Protobuf type {@code tensorflow.SavedFunction} + */ +public final class SavedFunction extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.SavedFunction) + SavedFunctionOrBuilder { +private static final long serialVersionUID = 0L; + // Use SavedFunction.newBuilder() to construct. + private SavedFunction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SavedFunction() { + concreteFunctions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SavedFunction(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SavedFunction( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + concreteFunctions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + concreteFunctions_.add(s); + break; + } + case 18: { + org.tensorflow.proto.framework.FunctionSpec.Builder subBuilder = null; + if (functionSpec_ != null) { + subBuilder = functionSpec_.toBuilder(); + } + functionSpec_ = input.readMessage(org.tensorflow.proto.framework.FunctionSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(functionSpec_); + functionSpec_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + concreteFunctions_ = concreteFunctions_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedFunction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedFunction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedFunction.class, org.tensorflow.proto.framework.SavedFunction.Builder.class); + } + + public static final int CONCRETE_FUNCTIONS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList concreteFunctions_; + /** + * repeated string concrete_functions = 1; + */ + public com.google.protobuf.ProtocolStringList + getConcreteFunctionsList() { + return concreteFunctions_; + } + /** + * repeated string concrete_functions = 1; + */ + public int getConcreteFunctionsCount() { + return concreteFunctions_.size(); + } + /** + * repeated string concrete_functions = 1; + */ + public java.lang.String getConcreteFunctions(int index) { + return concreteFunctions_.get(index); + } + /** + * repeated string concrete_functions = 1; + */ + public com.google.protobuf.ByteString + getConcreteFunctionsBytes(int index) { + return concreteFunctions_.getByteString(index); + } + + public static final int FUNCTION_SPEC_FIELD_NUMBER = 2; + private org.tensorflow.proto.framework.FunctionSpec functionSpec_; + /** + * .tensorflow.FunctionSpec function_spec = 2; + */ + public boolean hasFunctionSpec() { + return functionSpec_ != null; + } + /** + * .tensorflow.FunctionSpec function_spec = 2; + */ + public org.tensorflow.proto.framework.FunctionSpec getFunctionSpec() { + return functionSpec_ == null ? org.tensorflow.proto.framework.FunctionSpec.getDefaultInstance() : functionSpec_; + } + /** + * .tensorflow.FunctionSpec function_spec = 2; + */ + public org.tensorflow.proto.framework.FunctionSpecOrBuilder getFunctionSpecOrBuilder() { + return getFunctionSpec(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < concreteFunctions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, concreteFunctions_.getRaw(i)); + } + if (functionSpec_ != null) { + output.writeMessage(2, getFunctionSpec()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < concreteFunctions_.size(); i++) { + dataSize += computeStringSizeNoTag(concreteFunctions_.getRaw(i)); + } + size += dataSize; + size += 1 * getConcreteFunctionsList().size(); + } + if (functionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFunctionSpec()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.SavedFunction)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.SavedFunction other = (org.tensorflow.proto.framework.SavedFunction) obj; + + if (!getConcreteFunctionsList() + .equals(other.getConcreteFunctionsList())) return false; + if (hasFunctionSpec() != other.hasFunctionSpec()) return false; + if (hasFunctionSpec()) { + if (!getFunctionSpec() + .equals(other.getFunctionSpec())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConcreteFunctionsCount() > 0) { + hash = (37 * hash) + CONCRETE_FUNCTIONS_FIELD_NUMBER; + hash = (53 * hash) + getConcreteFunctionsList().hashCode(); + } + if (hasFunctionSpec()) { + hash = (37 * hash) + FUNCTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getFunctionSpec().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.SavedFunction parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedFunction parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedFunction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedFunction 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.proto.framework.SavedFunction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedFunction parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedFunction parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedFunction parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedFunction parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedFunction parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedFunction parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedFunction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.SavedFunction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A function with multiple signatures, possibly with non-Tensor arguments.
+   * 
+ * + * Protobuf type {@code tensorflow.SavedFunction} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.SavedFunction) + org.tensorflow.proto.framework.SavedFunctionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedFunction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedFunction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedFunction.class, org.tensorflow.proto.framework.SavedFunction.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.SavedFunction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + concreteFunctions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (functionSpecBuilder_ == null) { + functionSpec_ = null; + } else { + functionSpec_ = null; + functionSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedFunction_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedFunction getDefaultInstanceForType() { + return org.tensorflow.proto.framework.SavedFunction.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedFunction build() { + org.tensorflow.proto.framework.SavedFunction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedFunction buildPartial() { + org.tensorflow.proto.framework.SavedFunction result = new org.tensorflow.proto.framework.SavedFunction(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + concreteFunctions_ = concreteFunctions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.concreteFunctions_ = concreteFunctions_; + if (functionSpecBuilder_ == null) { + result.functionSpec_ = functionSpec_; + } else { + result.functionSpec_ = functionSpecBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.SavedFunction) { + return mergeFrom((org.tensorflow.proto.framework.SavedFunction)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.SavedFunction other) { + if (other == org.tensorflow.proto.framework.SavedFunction.getDefaultInstance()) return this; + if (!other.concreteFunctions_.isEmpty()) { + if (concreteFunctions_.isEmpty()) { + concreteFunctions_ = other.concreteFunctions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConcreteFunctionsIsMutable(); + concreteFunctions_.addAll(other.concreteFunctions_); + } + onChanged(); + } + if (other.hasFunctionSpec()) { + mergeFunctionSpec(other.getFunctionSpec()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.SavedFunction parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.SavedFunction) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList concreteFunctions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureConcreteFunctionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + concreteFunctions_ = new com.google.protobuf.LazyStringArrayList(concreteFunctions_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string concrete_functions = 1; + */ + public com.google.protobuf.ProtocolStringList + getConcreteFunctionsList() { + return concreteFunctions_.getUnmodifiableView(); + } + /** + * repeated string concrete_functions = 1; + */ + public int getConcreteFunctionsCount() { + return concreteFunctions_.size(); + } + /** + * repeated string concrete_functions = 1; + */ + public java.lang.String getConcreteFunctions(int index) { + return concreteFunctions_.get(index); + } + /** + * repeated string concrete_functions = 1; + */ + public com.google.protobuf.ByteString + getConcreteFunctionsBytes(int index) { + return concreteFunctions_.getByteString(index); + } + /** + * repeated string concrete_functions = 1; + */ + public Builder setConcreteFunctions( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureConcreteFunctionsIsMutable(); + concreteFunctions_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string concrete_functions = 1; + */ + public Builder addConcreteFunctions( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureConcreteFunctionsIsMutable(); + concreteFunctions_.add(value); + onChanged(); + return this; + } + /** + * repeated string concrete_functions = 1; + */ + public Builder addAllConcreteFunctions( + java.lang.Iterable values) { + ensureConcreteFunctionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, concreteFunctions_); + onChanged(); + return this; + } + /** + * repeated string concrete_functions = 1; + */ + public Builder clearConcreteFunctions() { + concreteFunctions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string concrete_functions = 1; + */ + public Builder addConcreteFunctionsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureConcreteFunctionsIsMutable(); + concreteFunctions_.add(value); + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.FunctionSpec functionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.FunctionSpec, org.tensorflow.proto.framework.FunctionSpec.Builder, org.tensorflow.proto.framework.FunctionSpecOrBuilder> functionSpecBuilder_; + /** + * .tensorflow.FunctionSpec function_spec = 2; + */ + public boolean hasFunctionSpec() { + return functionSpecBuilder_ != null || functionSpec_ != null; + } + /** + * .tensorflow.FunctionSpec function_spec = 2; + */ + public org.tensorflow.proto.framework.FunctionSpec getFunctionSpec() { + if (functionSpecBuilder_ == null) { + return functionSpec_ == null ? org.tensorflow.proto.framework.FunctionSpec.getDefaultInstance() : functionSpec_; + } else { + return functionSpecBuilder_.getMessage(); + } + } + /** + * .tensorflow.FunctionSpec function_spec = 2; + */ + public Builder setFunctionSpec(org.tensorflow.proto.framework.FunctionSpec value) { + if (functionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + functionSpec_ = value; + onChanged(); + } else { + functionSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.FunctionSpec function_spec = 2; + */ + public Builder setFunctionSpec( + org.tensorflow.proto.framework.FunctionSpec.Builder builderForValue) { + if (functionSpecBuilder_ == null) { + functionSpec_ = builderForValue.build(); + onChanged(); + } else { + functionSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.FunctionSpec function_spec = 2; + */ + public Builder mergeFunctionSpec(org.tensorflow.proto.framework.FunctionSpec value) { + if (functionSpecBuilder_ == null) { + if (functionSpec_ != null) { + functionSpec_ = + org.tensorflow.proto.framework.FunctionSpec.newBuilder(functionSpec_).mergeFrom(value).buildPartial(); + } else { + functionSpec_ = value; + } + onChanged(); + } else { + functionSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.FunctionSpec function_spec = 2; + */ + public Builder clearFunctionSpec() { + if (functionSpecBuilder_ == null) { + functionSpec_ = null; + onChanged(); + } else { + functionSpec_ = null; + functionSpecBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.FunctionSpec function_spec = 2; + */ + public org.tensorflow.proto.framework.FunctionSpec.Builder getFunctionSpecBuilder() { + + onChanged(); + return getFunctionSpecFieldBuilder().getBuilder(); + } + /** + * .tensorflow.FunctionSpec function_spec = 2; + */ + public org.tensorflow.proto.framework.FunctionSpecOrBuilder getFunctionSpecOrBuilder() { + if (functionSpecBuilder_ != null) { + return functionSpecBuilder_.getMessageOrBuilder(); + } else { + return functionSpec_ == null ? + org.tensorflow.proto.framework.FunctionSpec.getDefaultInstance() : functionSpec_; + } + } + /** + * .tensorflow.FunctionSpec function_spec = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.FunctionSpec, org.tensorflow.proto.framework.FunctionSpec.Builder, org.tensorflow.proto.framework.FunctionSpecOrBuilder> + getFunctionSpecFieldBuilder() { + if (functionSpecBuilder_ == null) { + functionSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.FunctionSpec, org.tensorflow.proto.framework.FunctionSpec.Builder, org.tensorflow.proto.framework.FunctionSpecOrBuilder>( + getFunctionSpec(), + getParentForChildren(), + isClean()); + functionSpec_ = null; + } + return functionSpecBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.SavedFunction) + } + + // @@protoc_insertion_point(class_scope:tensorflow.SavedFunction) + private static final org.tensorflow.proto.framework.SavedFunction DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.SavedFunction(); + } + + public static org.tensorflow.proto.framework.SavedFunction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SavedFunction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SavedFunction(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedFunction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedFunctionOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedFunctionOrBuilder.java new file mode 100644 index 00000000000..19b27a54fb3 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedFunctionOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +public interface SavedFunctionOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.SavedFunction) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string concrete_functions = 1; + */ + java.util.List + getConcreteFunctionsList(); + /** + * repeated string concrete_functions = 1; + */ + int getConcreteFunctionsCount(); + /** + * repeated string concrete_functions = 1; + */ + java.lang.String getConcreteFunctions(int index); + /** + * repeated string concrete_functions = 1; + */ + com.google.protobuf.ByteString + getConcreteFunctionsBytes(int index); + + /** + * .tensorflow.FunctionSpec function_spec = 2; + */ + boolean hasFunctionSpec(); + /** + * .tensorflow.FunctionSpec function_spec = 2; + */ + org.tensorflow.proto.framework.FunctionSpec getFunctionSpec(); + /** + * .tensorflow.FunctionSpec function_spec = 2; + */ + org.tensorflow.proto.framework.FunctionSpecOrBuilder getFunctionSpecOrBuilder(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedModel.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedModel.java new file mode 100644 index 00000000000..ac25416e31a --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedModel.java @@ -0,0 +1,949 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_model.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * SavedModel is the high level serialization format for TensorFlow Models.
+ * See [todo: doc links, similar to session_bundle] for more information.
+ * 
+ * + * Protobuf type {@code tensorflow.SavedModel} + */ +public final class SavedModel extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.SavedModel) + SavedModelOrBuilder { +private static final long serialVersionUID = 0L; + // Use SavedModel.newBuilder() to construct. + private SavedModel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SavedModel() { + metaGraphs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SavedModel(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SavedModel( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + savedModelSchemaVersion_ = input.readInt64(); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + metaGraphs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + metaGraphs_.add( + input.readMessage(org.tensorflow.proto.framework.MetaGraphDef.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + metaGraphs_ = java.util.Collections.unmodifiableList(metaGraphs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedModelProtos.internal_static_tensorflow_SavedModel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedModelProtos.internal_static_tensorflow_SavedModel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedModel.class, org.tensorflow.proto.framework.SavedModel.Builder.class); + } + + public static final int SAVED_MODEL_SCHEMA_VERSION_FIELD_NUMBER = 1; + private long savedModelSchemaVersion_; + /** + *
+   * The schema version of the SavedModel instance. Used for versioning when
+   * making future changes to the specification/implementation. Initial value
+   * at release will be 1.
+   * 
+ * + * int64 saved_model_schema_version = 1; + */ + public long getSavedModelSchemaVersion() { + return savedModelSchemaVersion_; + } + + public static final int META_GRAPHS_FIELD_NUMBER = 2; + private java.util.List metaGraphs_; + /** + *
+   * One or more MetaGraphs.
+   * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public java.util.List getMetaGraphsList() { + return metaGraphs_; + } + /** + *
+   * One or more MetaGraphs.
+   * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public java.util.List + getMetaGraphsOrBuilderList() { + return metaGraphs_; + } + /** + *
+   * One or more MetaGraphs.
+   * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public int getMetaGraphsCount() { + return metaGraphs_.size(); + } + /** + *
+   * One or more MetaGraphs.
+   * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public org.tensorflow.proto.framework.MetaGraphDef getMetaGraphs(int index) { + return metaGraphs_.get(index); + } + /** + *
+   * One or more MetaGraphs.
+   * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public org.tensorflow.proto.framework.MetaGraphDefOrBuilder getMetaGraphsOrBuilder( + int index) { + return metaGraphs_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (savedModelSchemaVersion_ != 0L) { + output.writeInt64(1, savedModelSchemaVersion_); + } + for (int i = 0; i < metaGraphs_.size(); i++) { + output.writeMessage(2, metaGraphs_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (savedModelSchemaVersion_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, savedModelSchemaVersion_); + } + for (int i = 0; i < metaGraphs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, metaGraphs_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.SavedModel)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.SavedModel other = (org.tensorflow.proto.framework.SavedModel) obj; + + if (getSavedModelSchemaVersion() + != other.getSavedModelSchemaVersion()) return false; + if (!getMetaGraphsList() + .equals(other.getMetaGraphsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SAVED_MODEL_SCHEMA_VERSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSavedModelSchemaVersion()); + if (getMetaGraphsCount() > 0) { + hash = (37 * hash) + META_GRAPHS_FIELD_NUMBER; + hash = (53 * hash) + getMetaGraphsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.SavedModel parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedModel parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedModel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedModel 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.proto.framework.SavedModel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedModel parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedModel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedModel parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedModel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedModel parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedModel parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedModel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.SavedModel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * SavedModel is the high level serialization format for TensorFlow Models.
+   * See [todo: doc links, similar to session_bundle] for more information.
+   * 
+ * + * Protobuf type {@code tensorflow.SavedModel} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.SavedModel) + org.tensorflow.proto.framework.SavedModelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedModelProtos.internal_static_tensorflow_SavedModel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedModelProtos.internal_static_tensorflow_SavedModel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedModel.class, org.tensorflow.proto.framework.SavedModel.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.SavedModel.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getMetaGraphsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + savedModelSchemaVersion_ = 0L; + + if (metaGraphsBuilder_ == null) { + metaGraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + metaGraphsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.SavedModelProtos.internal_static_tensorflow_SavedModel_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedModel getDefaultInstanceForType() { + return org.tensorflow.proto.framework.SavedModel.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedModel build() { + org.tensorflow.proto.framework.SavedModel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedModel buildPartial() { + org.tensorflow.proto.framework.SavedModel result = new org.tensorflow.proto.framework.SavedModel(this); + int from_bitField0_ = bitField0_; + result.savedModelSchemaVersion_ = savedModelSchemaVersion_; + if (metaGraphsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + metaGraphs_ = java.util.Collections.unmodifiableList(metaGraphs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.metaGraphs_ = metaGraphs_; + } else { + result.metaGraphs_ = metaGraphsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.SavedModel) { + return mergeFrom((org.tensorflow.proto.framework.SavedModel)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.SavedModel other) { + if (other == org.tensorflow.proto.framework.SavedModel.getDefaultInstance()) return this; + if (other.getSavedModelSchemaVersion() != 0L) { + setSavedModelSchemaVersion(other.getSavedModelSchemaVersion()); + } + if (metaGraphsBuilder_ == null) { + if (!other.metaGraphs_.isEmpty()) { + if (metaGraphs_.isEmpty()) { + metaGraphs_ = other.metaGraphs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMetaGraphsIsMutable(); + metaGraphs_.addAll(other.metaGraphs_); + } + onChanged(); + } + } else { + if (!other.metaGraphs_.isEmpty()) { + if (metaGraphsBuilder_.isEmpty()) { + metaGraphsBuilder_.dispose(); + metaGraphsBuilder_ = null; + metaGraphs_ = other.metaGraphs_; + bitField0_ = (bitField0_ & ~0x00000001); + metaGraphsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMetaGraphsFieldBuilder() : null; + } else { + metaGraphsBuilder_.addAllMessages(other.metaGraphs_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.SavedModel parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.SavedModel) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long savedModelSchemaVersion_ ; + /** + *
+     * The schema version of the SavedModel instance. Used for versioning when
+     * making future changes to the specification/implementation. Initial value
+     * at release will be 1.
+     * 
+ * + * int64 saved_model_schema_version = 1; + */ + public long getSavedModelSchemaVersion() { + return savedModelSchemaVersion_; + } + /** + *
+     * The schema version of the SavedModel instance. Used for versioning when
+     * making future changes to the specification/implementation. Initial value
+     * at release will be 1.
+     * 
+ * + * int64 saved_model_schema_version = 1; + */ + public Builder setSavedModelSchemaVersion(long value) { + + savedModelSchemaVersion_ = value; + onChanged(); + return this; + } + /** + *
+     * The schema version of the SavedModel instance. Used for versioning when
+     * making future changes to the specification/implementation. Initial value
+     * at release will be 1.
+     * 
+ * + * int64 saved_model_schema_version = 1; + */ + public Builder clearSavedModelSchemaVersion() { + + savedModelSchemaVersion_ = 0L; + onChanged(); + return this; + } + + private java.util.List metaGraphs_ = + java.util.Collections.emptyList(); + private void ensureMetaGraphsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + metaGraphs_ = new java.util.ArrayList(metaGraphs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.MetaGraphDef, org.tensorflow.proto.framework.MetaGraphDef.Builder, org.tensorflow.proto.framework.MetaGraphDefOrBuilder> metaGraphsBuilder_; + + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public java.util.List getMetaGraphsList() { + if (metaGraphsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metaGraphs_); + } else { + return metaGraphsBuilder_.getMessageList(); + } + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public int getMetaGraphsCount() { + if (metaGraphsBuilder_ == null) { + return metaGraphs_.size(); + } else { + return metaGraphsBuilder_.getCount(); + } + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public org.tensorflow.proto.framework.MetaGraphDef getMetaGraphs(int index) { + if (metaGraphsBuilder_ == null) { + return metaGraphs_.get(index); + } else { + return metaGraphsBuilder_.getMessage(index); + } + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public Builder setMetaGraphs( + int index, org.tensorflow.proto.framework.MetaGraphDef value) { + if (metaGraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetaGraphsIsMutable(); + metaGraphs_.set(index, value); + onChanged(); + } else { + metaGraphsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public Builder setMetaGraphs( + int index, org.tensorflow.proto.framework.MetaGraphDef.Builder builderForValue) { + if (metaGraphsBuilder_ == null) { + ensureMetaGraphsIsMutable(); + metaGraphs_.set(index, builderForValue.build()); + onChanged(); + } else { + metaGraphsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public Builder addMetaGraphs(org.tensorflow.proto.framework.MetaGraphDef value) { + if (metaGraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetaGraphsIsMutable(); + metaGraphs_.add(value); + onChanged(); + } else { + metaGraphsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public Builder addMetaGraphs( + int index, org.tensorflow.proto.framework.MetaGraphDef value) { + if (metaGraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetaGraphsIsMutable(); + metaGraphs_.add(index, value); + onChanged(); + } else { + metaGraphsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public Builder addMetaGraphs( + org.tensorflow.proto.framework.MetaGraphDef.Builder builderForValue) { + if (metaGraphsBuilder_ == null) { + ensureMetaGraphsIsMutable(); + metaGraphs_.add(builderForValue.build()); + onChanged(); + } else { + metaGraphsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public Builder addMetaGraphs( + int index, org.tensorflow.proto.framework.MetaGraphDef.Builder builderForValue) { + if (metaGraphsBuilder_ == null) { + ensureMetaGraphsIsMutable(); + metaGraphs_.add(index, builderForValue.build()); + onChanged(); + } else { + metaGraphsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public Builder addAllMetaGraphs( + java.lang.Iterable values) { + if (metaGraphsBuilder_ == null) { + ensureMetaGraphsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, metaGraphs_); + onChanged(); + } else { + metaGraphsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public Builder clearMetaGraphs() { + if (metaGraphsBuilder_ == null) { + metaGraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + metaGraphsBuilder_.clear(); + } + return this; + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public Builder removeMetaGraphs(int index) { + if (metaGraphsBuilder_ == null) { + ensureMetaGraphsIsMutable(); + metaGraphs_.remove(index); + onChanged(); + } else { + metaGraphsBuilder_.remove(index); + } + return this; + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public org.tensorflow.proto.framework.MetaGraphDef.Builder getMetaGraphsBuilder( + int index) { + return getMetaGraphsFieldBuilder().getBuilder(index); + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public org.tensorflow.proto.framework.MetaGraphDefOrBuilder getMetaGraphsOrBuilder( + int index) { + if (metaGraphsBuilder_ == null) { + return metaGraphs_.get(index); } else { + return metaGraphsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public java.util.List + getMetaGraphsOrBuilderList() { + if (metaGraphsBuilder_ != null) { + return metaGraphsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metaGraphs_); + } + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public org.tensorflow.proto.framework.MetaGraphDef.Builder addMetaGraphsBuilder() { + return getMetaGraphsFieldBuilder().addBuilder( + org.tensorflow.proto.framework.MetaGraphDef.getDefaultInstance()); + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public org.tensorflow.proto.framework.MetaGraphDef.Builder addMetaGraphsBuilder( + int index) { + return getMetaGraphsFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.MetaGraphDef.getDefaultInstance()); + } + /** + *
+     * One or more MetaGraphs.
+     * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + public java.util.List + getMetaGraphsBuilderList() { + return getMetaGraphsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.MetaGraphDef, org.tensorflow.proto.framework.MetaGraphDef.Builder, org.tensorflow.proto.framework.MetaGraphDefOrBuilder> + getMetaGraphsFieldBuilder() { + if (metaGraphsBuilder_ == null) { + metaGraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.MetaGraphDef, org.tensorflow.proto.framework.MetaGraphDef.Builder, org.tensorflow.proto.framework.MetaGraphDefOrBuilder>( + metaGraphs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + metaGraphs_ = null; + } + return metaGraphsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.SavedModel) + } + + // @@protoc_insertion_point(class_scope:tensorflow.SavedModel) + private static final org.tensorflow.proto.framework.SavedModel DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.SavedModel(); + } + + public static org.tensorflow.proto.framework.SavedModel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SavedModel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SavedModel(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedModel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedModelOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedModelOrBuilder.java new file mode 100644 index 00000000000..9714aee34dd --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedModelOrBuilder.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_model.proto + +package org.tensorflow.proto.framework; + +public interface SavedModelOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.SavedModel) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The schema version of the SavedModel instance. Used for versioning when
+   * making future changes to the specification/implementation. Initial value
+   * at release will be 1.
+   * 
+ * + * int64 saved_model_schema_version = 1; + */ + long getSavedModelSchemaVersion(); + + /** + *
+   * One or more MetaGraphs.
+   * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + java.util.List + getMetaGraphsList(); + /** + *
+   * One or more MetaGraphs.
+   * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + org.tensorflow.proto.framework.MetaGraphDef getMetaGraphs(int index); + /** + *
+   * One or more MetaGraphs.
+   * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + int getMetaGraphsCount(); + /** + *
+   * One or more MetaGraphs.
+   * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + java.util.List + getMetaGraphsOrBuilderList(); + /** + *
+   * One or more MetaGraphs.
+   * 
+ * + * repeated .tensorflow.MetaGraphDef meta_graphs = 2; + */ + org.tensorflow.proto.framework.MetaGraphDefOrBuilder getMetaGraphsOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedModelProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedModelProtos.java new file mode 100644 index 00000000000..05b4edd36f5 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedModelProtos.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_model.proto + +package org.tensorflow.proto.framework; + +public final class SavedModelProtos { + private SavedModelProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SavedModel_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SavedModel_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/protobuf/saved_model.p" + + "roto\022\ntensorflow\032)tensorflow/core/protob" + + "uf/meta_graph.proto\"_\n\nSavedModel\022\"\n\032sav" + + "ed_model_schema_version\030\001 \001(\003\022-\n\013meta_gr" + + "aphs\030\002 \003(\0132\030.tensorflow.MetaGraphDefB\201\001\n" + + "\036org.tensorflow.proto.frameworkB\020SavedMo" + + "delProtosP\001ZHgithub.com/tensorflow/tenso" + + "rflow/tensorflow/go/core/core_protos_go_" + + "proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.MetaGraphProtos.getDescriptor(), + }); + internal_static_tensorflow_SavedModel_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_SavedModel_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SavedModel_descriptor, + new java.lang.String[] { "SavedModelSchemaVersion", "MetaGraphs", }); + org.tensorflow.proto.framework.MetaGraphProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedObject.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedObject.java new file mode 100644 index 00000000000..87fbfce92bf --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedObject.java @@ -0,0 +1,2901 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.SavedObject} + */ +public final class SavedObject extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.SavedObject) + SavedObjectOrBuilder { +private static final long serialVersionUID = 0L; + // Use SavedObject.newBuilder() to construct. + private SavedObject(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SavedObject() { + children_ = java.util.Collections.emptyList(); + slotVariables_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SavedObject(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SavedObject( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + children_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + children_.add( + input.readMessage(org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + slotVariables_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + slotVariables_.add( + input.readMessage(org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.parser(), extensionRegistry)); + break; + } + case 34: { + org.tensorflow.proto.framework.SavedUserObject.Builder subBuilder = null; + if (kindCase_ == 4) { + subBuilder = ((org.tensorflow.proto.framework.SavedUserObject) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.SavedUserObject.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.SavedUserObject) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 4; + break; + } + case 42: { + org.tensorflow.proto.framework.SavedAsset.Builder subBuilder = null; + if (kindCase_ == 5) { + subBuilder = ((org.tensorflow.proto.framework.SavedAsset) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.SavedAsset.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.SavedAsset) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 5; + break; + } + case 50: { + org.tensorflow.proto.framework.SavedFunction.Builder subBuilder = null; + if (kindCase_ == 6) { + subBuilder = ((org.tensorflow.proto.framework.SavedFunction) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.SavedFunction.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.SavedFunction) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 6; + break; + } + case 58: { + org.tensorflow.proto.framework.SavedVariable.Builder subBuilder = null; + if (kindCase_ == 7) { + subBuilder = ((org.tensorflow.proto.framework.SavedVariable) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.SavedVariable.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.SavedVariable) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 7; + break; + } + case 66: { + org.tensorflow.proto.framework.SavedBareConcreteFunction.Builder subBuilder = null; + if (kindCase_ == 8) { + subBuilder = ((org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.SavedBareConcreteFunction.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 8; + break; + } + case 74: { + org.tensorflow.proto.framework.SavedConstant.Builder subBuilder = null; + if (kindCase_ == 9) { + subBuilder = ((org.tensorflow.proto.framework.SavedConstant) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.SavedConstant.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.SavedConstant) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 9; + break; + } + case 82: { + org.tensorflow.proto.framework.SavedResource.Builder subBuilder = null; + if (kindCase_ == 10) { + subBuilder = ((org.tensorflow.proto.framework.SavedResource) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.SavedResource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.SavedResource) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 10; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + children_ = java.util.Collections.unmodifiableList(children_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + slotVariables_ = java.util.Collections.unmodifiableList(slotVariables_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedObject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedObject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedObject.class, org.tensorflow.proto.framework.SavedObject.Builder.class); + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + public enum KindCase + implements com.google.protobuf.Internal.EnumLite { + USER_OBJECT(4), + ASSET(5), + FUNCTION(6), + VARIABLE(7), + BARE_CONCRETE_FUNCTION(8), + CONSTANT(9), + RESOURCE(10), + KIND_NOT_SET(0); + private final int value; + private KindCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static KindCase valueOf(int value) { + return forNumber(value); + } + + public static KindCase forNumber(int value) { + switch (value) { + case 4: return USER_OBJECT; + case 5: return ASSET; + case 6: return FUNCTION; + case 7: return VARIABLE; + case 8: return BARE_CONCRETE_FUNCTION; + case 9: return CONSTANT; + case 10: return RESOURCE; + case 0: return KIND_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public KindCase + getKindCase() { + return KindCase.forNumber( + kindCase_); + } + + public static final int CHILDREN_FIELD_NUMBER = 1; + private java.util.List children_; + /** + *
+   * Objects which this object depends on: named edges in the dependency
+   * graph.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public java.util.List getChildrenList() { + return children_; + } + /** + *
+   * Objects which this object depends on: named edges in the dependency
+   * graph.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public java.util.List + getChildrenOrBuilderList() { + return children_; + } + /** + *
+   * Objects which this object depends on: named edges in the dependency
+   * graph.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public int getChildrenCount() { + return children_.size(); + } + /** + *
+   * Objects which this object depends on: named edges in the dependency
+   * graph.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference getChildren(int index) { + return children_.get(index); + } + /** + *
+   * Objects which this object depends on: named edges in the dependency
+   * graph.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder getChildrenOrBuilder( + int index) { + return children_.get(index); + } + + public static final int SLOT_VARIABLES_FIELD_NUMBER = 3; + private java.util.List slotVariables_; + /** + *
+   * Slot variables owned by this object. This describes the three-way
+   * (optimizer, variable, slot variable) relationship; none of the three
+   * depend on the others directly.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public java.util.List getSlotVariablesList() { + return slotVariables_; + } + /** + *
+   * Slot variables owned by this object. This describes the three-way
+   * (optimizer, variable, slot variable) relationship; none of the three
+   * depend on the others directly.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public java.util.List + getSlotVariablesOrBuilderList() { + return slotVariables_; + } + /** + *
+   * Slot variables owned by this object. This describes the three-way
+   * (optimizer, variable, slot variable) relationship; none of the three
+   * depend on the others directly.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public int getSlotVariablesCount() { + return slotVariables_.size(); + } + /** + *
+   * Slot variables owned by this object. This describes the three-way
+   * (optimizer, variable, slot variable) relationship; none of the three
+   * depend on the others directly.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference getSlotVariables(int index) { + return slotVariables_.get(index); + } + /** + *
+   * Slot variables owned by this object. This describes the three-way
+   * (optimizer, variable, slot variable) relationship; none of the three
+   * depend on the others directly.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder getSlotVariablesOrBuilder( + int index) { + return slotVariables_.get(index); + } + + public static final int USER_OBJECT_FIELD_NUMBER = 4; + /** + * .tensorflow.SavedUserObject user_object = 4; + */ + public boolean hasUserObject() { + return kindCase_ == 4; + } + /** + * .tensorflow.SavedUserObject user_object = 4; + */ + public org.tensorflow.proto.framework.SavedUserObject getUserObject() { + if (kindCase_ == 4) { + return (org.tensorflow.proto.framework.SavedUserObject) kind_; + } + return org.tensorflow.proto.framework.SavedUserObject.getDefaultInstance(); + } + /** + * .tensorflow.SavedUserObject user_object = 4; + */ + public org.tensorflow.proto.framework.SavedUserObjectOrBuilder getUserObjectOrBuilder() { + if (kindCase_ == 4) { + return (org.tensorflow.proto.framework.SavedUserObject) kind_; + } + return org.tensorflow.proto.framework.SavedUserObject.getDefaultInstance(); + } + + public static final int ASSET_FIELD_NUMBER = 5; + /** + * .tensorflow.SavedAsset asset = 5; + */ + public boolean hasAsset() { + return kindCase_ == 5; + } + /** + * .tensorflow.SavedAsset asset = 5; + */ + public org.tensorflow.proto.framework.SavedAsset getAsset() { + if (kindCase_ == 5) { + return (org.tensorflow.proto.framework.SavedAsset) kind_; + } + return org.tensorflow.proto.framework.SavedAsset.getDefaultInstance(); + } + /** + * .tensorflow.SavedAsset asset = 5; + */ + public org.tensorflow.proto.framework.SavedAssetOrBuilder getAssetOrBuilder() { + if (kindCase_ == 5) { + return (org.tensorflow.proto.framework.SavedAsset) kind_; + } + return org.tensorflow.proto.framework.SavedAsset.getDefaultInstance(); + } + + public static final int FUNCTION_FIELD_NUMBER = 6; + /** + * .tensorflow.SavedFunction function = 6; + */ + public boolean hasFunction() { + return kindCase_ == 6; + } + /** + * .tensorflow.SavedFunction function = 6; + */ + public org.tensorflow.proto.framework.SavedFunction getFunction() { + if (kindCase_ == 6) { + return (org.tensorflow.proto.framework.SavedFunction) kind_; + } + return org.tensorflow.proto.framework.SavedFunction.getDefaultInstance(); + } + /** + * .tensorflow.SavedFunction function = 6; + */ + public org.tensorflow.proto.framework.SavedFunctionOrBuilder getFunctionOrBuilder() { + if (kindCase_ == 6) { + return (org.tensorflow.proto.framework.SavedFunction) kind_; + } + return org.tensorflow.proto.framework.SavedFunction.getDefaultInstance(); + } + + public static final int VARIABLE_FIELD_NUMBER = 7; + /** + * .tensorflow.SavedVariable variable = 7; + */ + public boolean hasVariable() { + return kindCase_ == 7; + } + /** + * .tensorflow.SavedVariable variable = 7; + */ + public org.tensorflow.proto.framework.SavedVariable getVariable() { + if (kindCase_ == 7) { + return (org.tensorflow.proto.framework.SavedVariable) kind_; + } + return org.tensorflow.proto.framework.SavedVariable.getDefaultInstance(); + } + /** + * .tensorflow.SavedVariable variable = 7; + */ + public org.tensorflow.proto.framework.SavedVariableOrBuilder getVariableOrBuilder() { + if (kindCase_ == 7) { + return (org.tensorflow.proto.framework.SavedVariable) kind_; + } + return org.tensorflow.proto.framework.SavedVariable.getDefaultInstance(); + } + + public static final int BARE_CONCRETE_FUNCTION_FIELD_NUMBER = 8; + /** + * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; + */ + public boolean hasBareConcreteFunction() { + return kindCase_ == 8; + } + /** + * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; + */ + public org.tensorflow.proto.framework.SavedBareConcreteFunction getBareConcreteFunction() { + if (kindCase_ == 8) { + return (org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_; + } + return org.tensorflow.proto.framework.SavedBareConcreteFunction.getDefaultInstance(); + } + /** + * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; + */ + public org.tensorflow.proto.framework.SavedBareConcreteFunctionOrBuilder getBareConcreteFunctionOrBuilder() { + if (kindCase_ == 8) { + return (org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_; + } + return org.tensorflow.proto.framework.SavedBareConcreteFunction.getDefaultInstance(); + } + + public static final int CONSTANT_FIELD_NUMBER = 9; + /** + * .tensorflow.SavedConstant constant = 9; + */ + public boolean hasConstant() { + return kindCase_ == 9; + } + /** + * .tensorflow.SavedConstant constant = 9; + */ + public org.tensorflow.proto.framework.SavedConstant getConstant() { + if (kindCase_ == 9) { + return (org.tensorflow.proto.framework.SavedConstant) kind_; + } + return org.tensorflow.proto.framework.SavedConstant.getDefaultInstance(); + } + /** + * .tensorflow.SavedConstant constant = 9; + */ + public org.tensorflow.proto.framework.SavedConstantOrBuilder getConstantOrBuilder() { + if (kindCase_ == 9) { + return (org.tensorflow.proto.framework.SavedConstant) kind_; + } + return org.tensorflow.proto.framework.SavedConstant.getDefaultInstance(); + } + + public static final int RESOURCE_FIELD_NUMBER = 10; + /** + * .tensorflow.SavedResource resource = 10; + */ + public boolean hasResource() { + return kindCase_ == 10; + } + /** + * .tensorflow.SavedResource resource = 10; + */ + public org.tensorflow.proto.framework.SavedResource getResource() { + if (kindCase_ == 10) { + return (org.tensorflow.proto.framework.SavedResource) kind_; + } + return org.tensorflow.proto.framework.SavedResource.getDefaultInstance(); + } + /** + * .tensorflow.SavedResource resource = 10; + */ + public org.tensorflow.proto.framework.SavedResourceOrBuilder getResourceOrBuilder() { + if (kindCase_ == 10) { + return (org.tensorflow.proto.framework.SavedResource) kind_; + } + return org.tensorflow.proto.framework.SavedResource.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < children_.size(); i++) { + output.writeMessage(1, children_.get(i)); + } + for (int i = 0; i < slotVariables_.size(); i++) { + output.writeMessage(3, slotVariables_.get(i)); + } + if (kindCase_ == 4) { + output.writeMessage(4, (org.tensorflow.proto.framework.SavedUserObject) kind_); + } + if (kindCase_ == 5) { + output.writeMessage(5, (org.tensorflow.proto.framework.SavedAsset) kind_); + } + if (kindCase_ == 6) { + output.writeMessage(6, (org.tensorflow.proto.framework.SavedFunction) kind_); + } + if (kindCase_ == 7) { + output.writeMessage(7, (org.tensorflow.proto.framework.SavedVariable) kind_); + } + if (kindCase_ == 8) { + output.writeMessage(8, (org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_); + } + if (kindCase_ == 9) { + output.writeMessage(9, (org.tensorflow.proto.framework.SavedConstant) kind_); + } + if (kindCase_ == 10) { + output.writeMessage(10, (org.tensorflow.proto.framework.SavedResource) kind_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < children_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, children_.get(i)); + } + for (int i = 0; i < slotVariables_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, slotVariables_.get(i)); + } + if (kindCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (org.tensorflow.proto.framework.SavedUserObject) kind_); + } + if (kindCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (org.tensorflow.proto.framework.SavedAsset) kind_); + } + if (kindCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (org.tensorflow.proto.framework.SavedFunction) kind_); + } + if (kindCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (org.tensorflow.proto.framework.SavedVariable) kind_); + } + if (kindCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_); + } + if (kindCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (org.tensorflow.proto.framework.SavedConstant) kind_); + } + if (kindCase_ == 10) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, (org.tensorflow.proto.framework.SavedResource) kind_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.SavedObject)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.SavedObject other = (org.tensorflow.proto.framework.SavedObject) obj; + + if (!getChildrenList() + .equals(other.getChildrenList())) return false; + if (!getSlotVariablesList() + .equals(other.getSlotVariablesList())) return false; + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 4: + if (!getUserObject() + .equals(other.getUserObject())) return false; + break; + case 5: + if (!getAsset() + .equals(other.getAsset())) return false; + break; + case 6: + if (!getFunction() + .equals(other.getFunction())) return false; + break; + case 7: + if (!getVariable() + .equals(other.getVariable())) return false; + break; + case 8: + if (!getBareConcreteFunction() + .equals(other.getBareConcreteFunction())) return false; + break; + case 9: + if (!getConstant() + .equals(other.getConstant())) return false; + break; + case 10: + if (!getResource() + .equals(other.getResource())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getChildrenCount() > 0) { + hash = (37 * hash) + CHILDREN_FIELD_NUMBER; + hash = (53 * hash) + getChildrenList().hashCode(); + } + if (getSlotVariablesCount() > 0) { + hash = (37 * hash) + SLOT_VARIABLES_FIELD_NUMBER; + hash = (53 * hash) + getSlotVariablesList().hashCode(); + } + switch (kindCase_) { + case 4: + hash = (37 * hash) + USER_OBJECT_FIELD_NUMBER; + hash = (53 * hash) + getUserObject().hashCode(); + break; + case 5: + hash = (37 * hash) + ASSET_FIELD_NUMBER; + hash = (53 * hash) + getAsset().hashCode(); + break; + case 6: + hash = (37 * hash) + FUNCTION_FIELD_NUMBER; + hash = (53 * hash) + getFunction().hashCode(); + break; + case 7: + hash = (37 * hash) + VARIABLE_FIELD_NUMBER; + hash = (53 * hash) + getVariable().hashCode(); + break; + case 8: + hash = (37 * hash) + BARE_CONCRETE_FUNCTION_FIELD_NUMBER; + hash = (53 * hash) + getBareConcreteFunction().hashCode(); + break; + case 9: + hash = (37 * hash) + CONSTANT_FIELD_NUMBER; + hash = (53 * hash) + getConstant().hashCode(); + break; + case 10: + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.SavedObject parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedObject parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedObject parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedObject 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.proto.framework.SavedObject parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedObject parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedObject parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedObject parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedObject parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedObject parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedObject parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedObject parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.SavedObject prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.SavedObject} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.SavedObject) + org.tensorflow.proto.framework.SavedObjectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedObject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedObject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedObject.class, org.tensorflow.proto.framework.SavedObject.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.SavedObject.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getChildrenFieldBuilder(); + getSlotVariablesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (childrenBuilder_ == null) { + children_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + childrenBuilder_.clear(); + } + if (slotVariablesBuilder_ == null) { + slotVariables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + slotVariablesBuilder_.clear(); + } + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedObject_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedObject getDefaultInstanceForType() { + return org.tensorflow.proto.framework.SavedObject.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedObject build() { + org.tensorflow.proto.framework.SavedObject result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedObject buildPartial() { + org.tensorflow.proto.framework.SavedObject result = new org.tensorflow.proto.framework.SavedObject(this); + int from_bitField0_ = bitField0_; + if (childrenBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + children_ = java.util.Collections.unmodifiableList(children_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.children_ = children_; + } else { + result.children_ = childrenBuilder_.build(); + } + if (slotVariablesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + slotVariables_ = java.util.Collections.unmodifiableList(slotVariables_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.slotVariables_ = slotVariables_; + } else { + result.slotVariables_ = slotVariablesBuilder_.build(); + } + if (kindCase_ == 4) { + if (userObjectBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = userObjectBuilder_.build(); + } + } + if (kindCase_ == 5) { + if (assetBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = assetBuilder_.build(); + } + } + if (kindCase_ == 6) { + if (functionBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = functionBuilder_.build(); + } + } + if (kindCase_ == 7) { + if (variableBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = variableBuilder_.build(); + } + } + if (kindCase_ == 8) { + if (bareConcreteFunctionBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = bareConcreteFunctionBuilder_.build(); + } + } + if (kindCase_ == 9) { + if (constantBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = constantBuilder_.build(); + } + } + if (kindCase_ == 10) { + if (resourceBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = resourceBuilder_.build(); + } + } + result.kindCase_ = kindCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.SavedObject) { + return mergeFrom((org.tensorflow.proto.framework.SavedObject)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.SavedObject other) { + if (other == org.tensorflow.proto.framework.SavedObject.getDefaultInstance()) return this; + if (childrenBuilder_ == null) { + if (!other.children_.isEmpty()) { + if (children_.isEmpty()) { + children_ = other.children_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureChildrenIsMutable(); + children_.addAll(other.children_); + } + onChanged(); + } + } else { + if (!other.children_.isEmpty()) { + if (childrenBuilder_.isEmpty()) { + childrenBuilder_.dispose(); + childrenBuilder_ = null; + children_ = other.children_; + bitField0_ = (bitField0_ & ~0x00000001); + childrenBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getChildrenFieldBuilder() : null; + } else { + childrenBuilder_.addAllMessages(other.children_); + } + } + } + if (slotVariablesBuilder_ == null) { + if (!other.slotVariables_.isEmpty()) { + if (slotVariables_.isEmpty()) { + slotVariables_ = other.slotVariables_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSlotVariablesIsMutable(); + slotVariables_.addAll(other.slotVariables_); + } + onChanged(); + } + } else { + if (!other.slotVariables_.isEmpty()) { + if (slotVariablesBuilder_.isEmpty()) { + slotVariablesBuilder_.dispose(); + slotVariablesBuilder_ = null; + slotVariables_ = other.slotVariables_; + bitField0_ = (bitField0_ & ~0x00000002); + slotVariablesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSlotVariablesFieldBuilder() : null; + } else { + slotVariablesBuilder_.addAllMessages(other.slotVariables_); + } + } + } + switch (other.getKindCase()) { + case USER_OBJECT: { + mergeUserObject(other.getUserObject()); + break; + } + case ASSET: { + mergeAsset(other.getAsset()); + break; + } + case FUNCTION: { + mergeFunction(other.getFunction()); + break; + } + case VARIABLE: { + mergeVariable(other.getVariable()); + break; + } + case BARE_CONCRETE_FUNCTION: { + mergeBareConcreteFunction(other.getBareConcreteFunction()); + break; + } + case CONSTANT: { + mergeConstant(other.getConstant()); + break; + } + case RESOURCE: { + mergeResource(other.getResource()); + break; + } + case KIND_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.SavedObject parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.SavedObject) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int kindCase_ = 0; + private java.lang.Object kind_; + public KindCase + getKindCase() { + return KindCase.forNumber( + kindCase_); + } + + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.util.List children_ = + java.util.Collections.emptyList(); + private void ensureChildrenIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + children_ = new java.util.ArrayList(children_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder> childrenBuilder_; + + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public java.util.List getChildrenList() { + if (childrenBuilder_ == null) { + return java.util.Collections.unmodifiableList(children_); + } else { + return childrenBuilder_.getMessageList(); + } + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public int getChildrenCount() { + if (childrenBuilder_ == null) { + return children_.size(); + } else { + return childrenBuilder_.getCount(); + } + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference getChildren(int index) { + if (childrenBuilder_ == null) { + return children_.get(index); + } else { + return childrenBuilder_.getMessage(index); + } + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public Builder setChildren( + int index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference value) { + if (childrenBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChildrenIsMutable(); + children_.set(index, value); + onChanged(); + } else { + childrenBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public Builder setChildren( + int index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder builderForValue) { + if (childrenBuilder_ == null) { + ensureChildrenIsMutable(); + children_.set(index, builderForValue.build()); + onChanged(); + } else { + childrenBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public Builder addChildren(org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference value) { + if (childrenBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChildrenIsMutable(); + children_.add(value); + onChanged(); + } else { + childrenBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public Builder addChildren( + int index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference value) { + if (childrenBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChildrenIsMutable(); + children_.add(index, value); + onChanged(); + } else { + childrenBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public Builder addChildren( + org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder builderForValue) { + if (childrenBuilder_ == null) { + ensureChildrenIsMutable(); + children_.add(builderForValue.build()); + onChanged(); + } else { + childrenBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public Builder addChildren( + int index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder builderForValue) { + if (childrenBuilder_ == null) { + ensureChildrenIsMutable(); + children_.add(index, builderForValue.build()); + onChanged(); + } else { + childrenBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public Builder addAllChildren( + java.lang.Iterable values) { + if (childrenBuilder_ == null) { + ensureChildrenIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, children_); + onChanged(); + } else { + childrenBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public Builder clearChildren() { + if (childrenBuilder_ == null) { + children_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + childrenBuilder_.clear(); + } + return this; + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public Builder removeChildren(int index) { + if (childrenBuilder_ == null) { + ensureChildrenIsMutable(); + children_.remove(index); + onChanged(); + } else { + childrenBuilder_.remove(index); + } + return this; + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder getChildrenBuilder( + int index) { + return getChildrenFieldBuilder().getBuilder(index); + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder getChildrenOrBuilder( + int index) { + if (childrenBuilder_ == null) { + return children_.get(index); } else { + return childrenBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public java.util.List + getChildrenOrBuilderList() { + if (childrenBuilder_ != null) { + return childrenBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(children_); + } + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder addChildrenBuilder() { + return getChildrenFieldBuilder().addBuilder( + org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.getDefaultInstance()); + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder addChildrenBuilder( + int index) { + return getChildrenFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.getDefaultInstance()); + } + /** + *
+     * Objects which this object depends on: named edges in the dependency
+     * graph.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + public java.util.List + getChildrenBuilderList() { + return getChildrenFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder> + getChildrenFieldBuilder() { + if (childrenBuilder_ == null) { + childrenBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder>( + children_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + children_ = null; + } + return childrenBuilder_; + } + + private java.util.List slotVariables_ = + java.util.Collections.emptyList(); + private void ensureSlotVariablesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + slotVariables_ = new java.util.ArrayList(slotVariables_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder> slotVariablesBuilder_; + + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public java.util.List getSlotVariablesList() { + if (slotVariablesBuilder_ == null) { + return java.util.Collections.unmodifiableList(slotVariables_); + } else { + return slotVariablesBuilder_.getMessageList(); + } + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public int getSlotVariablesCount() { + if (slotVariablesBuilder_ == null) { + return slotVariables_.size(); + } else { + return slotVariablesBuilder_.getCount(); + } + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference getSlotVariables(int index) { + if (slotVariablesBuilder_ == null) { + return slotVariables_.get(index); + } else { + return slotVariablesBuilder_.getMessage(index); + } + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public Builder setSlotVariables( + int index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference value) { + if (slotVariablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSlotVariablesIsMutable(); + slotVariables_.set(index, value); + onChanged(); + } else { + slotVariablesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public Builder setSlotVariables( + int index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder builderForValue) { + if (slotVariablesBuilder_ == null) { + ensureSlotVariablesIsMutable(); + slotVariables_.set(index, builderForValue.build()); + onChanged(); + } else { + slotVariablesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public Builder addSlotVariables(org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference value) { + if (slotVariablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSlotVariablesIsMutable(); + slotVariables_.add(value); + onChanged(); + } else { + slotVariablesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public Builder addSlotVariables( + int index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference value) { + if (slotVariablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSlotVariablesIsMutable(); + slotVariables_.add(index, value); + onChanged(); + } else { + slotVariablesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public Builder addSlotVariables( + org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder builderForValue) { + if (slotVariablesBuilder_ == null) { + ensureSlotVariablesIsMutable(); + slotVariables_.add(builderForValue.build()); + onChanged(); + } else { + slotVariablesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public Builder addSlotVariables( + int index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder builderForValue) { + if (slotVariablesBuilder_ == null) { + ensureSlotVariablesIsMutable(); + slotVariables_.add(index, builderForValue.build()); + onChanged(); + } else { + slotVariablesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public Builder addAllSlotVariables( + java.lang.Iterable values) { + if (slotVariablesBuilder_ == null) { + ensureSlotVariablesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, slotVariables_); + onChanged(); + } else { + slotVariablesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public Builder clearSlotVariables() { + if (slotVariablesBuilder_ == null) { + slotVariables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + slotVariablesBuilder_.clear(); + } + return this; + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public Builder removeSlotVariables(int index) { + if (slotVariablesBuilder_ == null) { + ensureSlotVariablesIsMutable(); + slotVariables_.remove(index); + onChanged(); + } else { + slotVariablesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder getSlotVariablesBuilder( + int index) { + return getSlotVariablesFieldBuilder().getBuilder(index); + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder getSlotVariablesOrBuilder( + int index) { + if (slotVariablesBuilder_ == null) { + return slotVariables_.get(index); } else { + return slotVariablesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public java.util.List + getSlotVariablesOrBuilderList() { + if (slotVariablesBuilder_ != null) { + return slotVariablesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(slotVariables_); + } + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder addSlotVariablesBuilder() { + return getSlotVariablesFieldBuilder().addBuilder( + org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.getDefaultInstance()); + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder addSlotVariablesBuilder( + int index) { + return getSlotVariablesFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.getDefaultInstance()); + } + /** + *
+     * Slot variables owned by this object. This describes the three-way
+     * (optimizer, variable, slot variable) relationship; none of the three
+     * depend on the others directly.
+     * Note: currently only valid if kind == "user_object".
+     * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + public java.util.List + getSlotVariablesBuilderList() { + return getSlotVariablesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder> + getSlotVariablesFieldBuilder() { + if (slotVariablesBuilder_ == null) { + slotVariablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder, org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder>( + slotVariables_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + slotVariables_ = null; + } + return slotVariablesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedUserObject, org.tensorflow.proto.framework.SavedUserObject.Builder, org.tensorflow.proto.framework.SavedUserObjectOrBuilder> userObjectBuilder_; + /** + * .tensorflow.SavedUserObject user_object = 4; + */ + public boolean hasUserObject() { + return kindCase_ == 4; + } + /** + * .tensorflow.SavedUserObject user_object = 4; + */ + public org.tensorflow.proto.framework.SavedUserObject getUserObject() { + if (userObjectBuilder_ == null) { + if (kindCase_ == 4) { + return (org.tensorflow.proto.framework.SavedUserObject) kind_; + } + return org.tensorflow.proto.framework.SavedUserObject.getDefaultInstance(); + } else { + if (kindCase_ == 4) { + return userObjectBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.SavedUserObject.getDefaultInstance(); + } + } + /** + * .tensorflow.SavedUserObject user_object = 4; + */ + public Builder setUserObject(org.tensorflow.proto.framework.SavedUserObject value) { + if (userObjectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + userObjectBuilder_.setMessage(value); + } + kindCase_ = 4; + return this; + } + /** + * .tensorflow.SavedUserObject user_object = 4; + */ + public Builder setUserObject( + org.tensorflow.proto.framework.SavedUserObject.Builder builderForValue) { + if (userObjectBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + userObjectBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 4; + return this; + } + /** + * .tensorflow.SavedUserObject user_object = 4; + */ + public Builder mergeUserObject(org.tensorflow.proto.framework.SavedUserObject value) { + if (userObjectBuilder_ == null) { + if (kindCase_ == 4 && + kind_ != org.tensorflow.proto.framework.SavedUserObject.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.SavedUserObject.newBuilder((org.tensorflow.proto.framework.SavedUserObject) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 4) { + userObjectBuilder_.mergeFrom(value); + } + userObjectBuilder_.setMessage(value); + } + kindCase_ = 4; + return this; + } + /** + * .tensorflow.SavedUserObject user_object = 4; + */ + public Builder clearUserObject() { + if (userObjectBuilder_ == null) { + if (kindCase_ == 4) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 4) { + kindCase_ = 0; + kind_ = null; + } + userObjectBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.SavedUserObject user_object = 4; + */ + public org.tensorflow.proto.framework.SavedUserObject.Builder getUserObjectBuilder() { + return getUserObjectFieldBuilder().getBuilder(); + } + /** + * .tensorflow.SavedUserObject user_object = 4; + */ + public org.tensorflow.proto.framework.SavedUserObjectOrBuilder getUserObjectOrBuilder() { + if ((kindCase_ == 4) && (userObjectBuilder_ != null)) { + return userObjectBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 4) { + return (org.tensorflow.proto.framework.SavedUserObject) kind_; + } + return org.tensorflow.proto.framework.SavedUserObject.getDefaultInstance(); + } + } + /** + * .tensorflow.SavedUserObject user_object = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedUserObject, org.tensorflow.proto.framework.SavedUserObject.Builder, org.tensorflow.proto.framework.SavedUserObjectOrBuilder> + getUserObjectFieldBuilder() { + if (userObjectBuilder_ == null) { + if (!(kindCase_ == 4)) { + kind_ = org.tensorflow.proto.framework.SavedUserObject.getDefaultInstance(); + } + userObjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedUserObject, org.tensorflow.proto.framework.SavedUserObject.Builder, org.tensorflow.proto.framework.SavedUserObjectOrBuilder>( + (org.tensorflow.proto.framework.SavedUserObject) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 4; + onChanged();; + return userObjectBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedAsset, org.tensorflow.proto.framework.SavedAsset.Builder, org.tensorflow.proto.framework.SavedAssetOrBuilder> assetBuilder_; + /** + * .tensorflow.SavedAsset asset = 5; + */ + public boolean hasAsset() { + return kindCase_ == 5; + } + /** + * .tensorflow.SavedAsset asset = 5; + */ + public org.tensorflow.proto.framework.SavedAsset getAsset() { + if (assetBuilder_ == null) { + if (kindCase_ == 5) { + return (org.tensorflow.proto.framework.SavedAsset) kind_; + } + return org.tensorflow.proto.framework.SavedAsset.getDefaultInstance(); + } else { + if (kindCase_ == 5) { + return assetBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.SavedAsset.getDefaultInstance(); + } + } + /** + * .tensorflow.SavedAsset asset = 5; + */ + public Builder setAsset(org.tensorflow.proto.framework.SavedAsset value) { + if (assetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + assetBuilder_.setMessage(value); + } + kindCase_ = 5; + return this; + } + /** + * .tensorflow.SavedAsset asset = 5; + */ + public Builder setAsset( + org.tensorflow.proto.framework.SavedAsset.Builder builderForValue) { + if (assetBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + assetBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 5; + return this; + } + /** + * .tensorflow.SavedAsset asset = 5; + */ + public Builder mergeAsset(org.tensorflow.proto.framework.SavedAsset value) { + if (assetBuilder_ == null) { + if (kindCase_ == 5 && + kind_ != org.tensorflow.proto.framework.SavedAsset.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.SavedAsset.newBuilder((org.tensorflow.proto.framework.SavedAsset) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 5) { + assetBuilder_.mergeFrom(value); + } + assetBuilder_.setMessage(value); + } + kindCase_ = 5; + return this; + } + /** + * .tensorflow.SavedAsset asset = 5; + */ + public Builder clearAsset() { + if (assetBuilder_ == null) { + if (kindCase_ == 5) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 5) { + kindCase_ = 0; + kind_ = null; + } + assetBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.SavedAsset asset = 5; + */ + public org.tensorflow.proto.framework.SavedAsset.Builder getAssetBuilder() { + return getAssetFieldBuilder().getBuilder(); + } + /** + * .tensorflow.SavedAsset asset = 5; + */ + public org.tensorflow.proto.framework.SavedAssetOrBuilder getAssetOrBuilder() { + if ((kindCase_ == 5) && (assetBuilder_ != null)) { + return assetBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 5) { + return (org.tensorflow.proto.framework.SavedAsset) kind_; + } + return org.tensorflow.proto.framework.SavedAsset.getDefaultInstance(); + } + } + /** + * .tensorflow.SavedAsset asset = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedAsset, org.tensorflow.proto.framework.SavedAsset.Builder, org.tensorflow.proto.framework.SavedAssetOrBuilder> + getAssetFieldBuilder() { + if (assetBuilder_ == null) { + if (!(kindCase_ == 5)) { + kind_ = org.tensorflow.proto.framework.SavedAsset.getDefaultInstance(); + } + assetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedAsset, org.tensorflow.proto.framework.SavedAsset.Builder, org.tensorflow.proto.framework.SavedAssetOrBuilder>( + (org.tensorflow.proto.framework.SavedAsset) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 5; + onChanged();; + return assetBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedFunction, org.tensorflow.proto.framework.SavedFunction.Builder, org.tensorflow.proto.framework.SavedFunctionOrBuilder> functionBuilder_; + /** + * .tensorflow.SavedFunction function = 6; + */ + public boolean hasFunction() { + return kindCase_ == 6; + } + /** + * .tensorflow.SavedFunction function = 6; + */ + public org.tensorflow.proto.framework.SavedFunction getFunction() { + if (functionBuilder_ == null) { + if (kindCase_ == 6) { + return (org.tensorflow.proto.framework.SavedFunction) kind_; + } + return org.tensorflow.proto.framework.SavedFunction.getDefaultInstance(); + } else { + if (kindCase_ == 6) { + return functionBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.SavedFunction.getDefaultInstance(); + } + } + /** + * .tensorflow.SavedFunction function = 6; + */ + public Builder setFunction(org.tensorflow.proto.framework.SavedFunction value) { + if (functionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + functionBuilder_.setMessage(value); + } + kindCase_ = 6; + return this; + } + /** + * .tensorflow.SavedFunction function = 6; + */ + public Builder setFunction( + org.tensorflow.proto.framework.SavedFunction.Builder builderForValue) { + if (functionBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + functionBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 6; + return this; + } + /** + * .tensorflow.SavedFunction function = 6; + */ + public Builder mergeFunction(org.tensorflow.proto.framework.SavedFunction value) { + if (functionBuilder_ == null) { + if (kindCase_ == 6 && + kind_ != org.tensorflow.proto.framework.SavedFunction.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.SavedFunction.newBuilder((org.tensorflow.proto.framework.SavedFunction) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 6) { + functionBuilder_.mergeFrom(value); + } + functionBuilder_.setMessage(value); + } + kindCase_ = 6; + return this; + } + /** + * .tensorflow.SavedFunction function = 6; + */ + public Builder clearFunction() { + if (functionBuilder_ == null) { + if (kindCase_ == 6) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 6) { + kindCase_ = 0; + kind_ = null; + } + functionBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.SavedFunction function = 6; + */ + public org.tensorflow.proto.framework.SavedFunction.Builder getFunctionBuilder() { + return getFunctionFieldBuilder().getBuilder(); + } + /** + * .tensorflow.SavedFunction function = 6; + */ + public org.tensorflow.proto.framework.SavedFunctionOrBuilder getFunctionOrBuilder() { + if ((kindCase_ == 6) && (functionBuilder_ != null)) { + return functionBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 6) { + return (org.tensorflow.proto.framework.SavedFunction) kind_; + } + return org.tensorflow.proto.framework.SavedFunction.getDefaultInstance(); + } + } + /** + * .tensorflow.SavedFunction function = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedFunction, org.tensorflow.proto.framework.SavedFunction.Builder, org.tensorflow.proto.framework.SavedFunctionOrBuilder> + getFunctionFieldBuilder() { + if (functionBuilder_ == null) { + if (!(kindCase_ == 6)) { + kind_ = org.tensorflow.proto.framework.SavedFunction.getDefaultInstance(); + } + functionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedFunction, org.tensorflow.proto.framework.SavedFunction.Builder, org.tensorflow.proto.framework.SavedFunctionOrBuilder>( + (org.tensorflow.proto.framework.SavedFunction) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 6; + onChanged();; + return functionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedVariable, org.tensorflow.proto.framework.SavedVariable.Builder, org.tensorflow.proto.framework.SavedVariableOrBuilder> variableBuilder_; + /** + * .tensorflow.SavedVariable variable = 7; + */ + public boolean hasVariable() { + return kindCase_ == 7; + } + /** + * .tensorflow.SavedVariable variable = 7; + */ + public org.tensorflow.proto.framework.SavedVariable getVariable() { + if (variableBuilder_ == null) { + if (kindCase_ == 7) { + return (org.tensorflow.proto.framework.SavedVariable) kind_; + } + return org.tensorflow.proto.framework.SavedVariable.getDefaultInstance(); + } else { + if (kindCase_ == 7) { + return variableBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.SavedVariable.getDefaultInstance(); + } + } + /** + * .tensorflow.SavedVariable variable = 7; + */ + public Builder setVariable(org.tensorflow.proto.framework.SavedVariable value) { + if (variableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + variableBuilder_.setMessage(value); + } + kindCase_ = 7; + return this; + } + /** + * .tensorflow.SavedVariable variable = 7; + */ + public Builder setVariable( + org.tensorflow.proto.framework.SavedVariable.Builder builderForValue) { + if (variableBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + variableBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 7; + return this; + } + /** + * .tensorflow.SavedVariable variable = 7; + */ + public Builder mergeVariable(org.tensorflow.proto.framework.SavedVariable value) { + if (variableBuilder_ == null) { + if (kindCase_ == 7 && + kind_ != org.tensorflow.proto.framework.SavedVariable.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.SavedVariable.newBuilder((org.tensorflow.proto.framework.SavedVariable) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 7) { + variableBuilder_.mergeFrom(value); + } + variableBuilder_.setMessage(value); + } + kindCase_ = 7; + return this; + } + /** + * .tensorflow.SavedVariable variable = 7; + */ + public Builder clearVariable() { + if (variableBuilder_ == null) { + if (kindCase_ == 7) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 7) { + kindCase_ = 0; + kind_ = null; + } + variableBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.SavedVariable variable = 7; + */ + public org.tensorflow.proto.framework.SavedVariable.Builder getVariableBuilder() { + return getVariableFieldBuilder().getBuilder(); + } + /** + * .tensorflow.SavedVariable variable = 7; + */ + public org.tensorflow.proto.framework.SavedVariableOrBuilder getVariableOrBuilder() { + if ((kindCase_ == 7) && (variableBuilder_ != null)) { + return variableBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 7) { + return (org.tensorflow.proto.framework.SavedVariable) kind_; + } + return org.tensorflow.proto.framework.SavedVariable.getDefaultInstance(); + } + } + /** + * .tensorflow.SavedVariable variable = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedVariable, org.tensorflow.proto.framework.SavedVariable.Builder, org.tensorflow.proto.framework.SavedVariableOrBuilder> + getVariableFieldBuilder() { + if (variableBuilder_ == null) { + if (!(kindCase_ == 7)) { + kind_ = org.tensorflow.proto.framework.SavedVariable.getDefaultInstance(); + } + variableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedVariable, org.tensorflow.proto.framework.SavedVariable.Builder, org.tensorflow.proto.framework.SavedVariableOrBuilder>( + (org.tensorflow.proto.framework.SavedVariable) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 7; + onChanged();; + return variableBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedBareConcreteFunction, org.tensorflow.proto.framework.SavedBareConcreteFunction.Builder, org.tensorflow.proto.framework.SavedBareConcreteFunctionOrBuilder> bareConcreteFunctionBuilder_; + /** + * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; + */ + public boolean hasBareConcreteFunction() { + return kindCase_ == 8; + } + /** + * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; + */ + public org.tensorflow.proto.framework.SavedBareConcreteFunction getBareConcreteFunction() { + if (bareConcreteFunctionBuilder_ == null) { + if (kindCase_ == 8) { + return (org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_; + } + return org.tensorflow.proto.framework.SavedBareConcreteFunction.getDefaultInstance(); + } else { + if (kindCase_ == 8) { + return bareConcreteFunctionBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.SavedBareConcreteFunction.getDefaultInstance(); + } + } + /** + * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; + */ + public Builder setBareConcreteFunction(org.tensorflow.proto.framework.SavedBareConcreteFunction value) { + if (bareConcreteFunctionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + bareConcreteFunctionBuilder_.setMessage(value); + } + kindCase_ = 8; + return this; + } + /** + * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; + */ + public Builder setBareConcreteFunction( + org.tensorflow.proto.framework.SavedBareConcreteFunction.Builder builderForValue) { + if (bareConcreteFunctionBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + bareConcreteFunctionBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 8; + return this; + } + /** + * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; + */ + public Builder mergeBareConcreteFunction(org.tensorflow.proto.framework.SavedBareConcreteFunction value) { + if (bareConcreteFunctionBuilder_ == null) { + if (kindCase_ == 8 && + kind_ != org.tensorflow.proto.framework.SavedBareConcreteFunction.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.SavedBareConcreteFunction.newBuilder((org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 8) { + bareConcreteFunctionBuilder_.mergeFrom(value); + } + bareConcreteFunctionBuilder_.setMessage(value); + } + kindCase_ = 8; + return this; + } + /** + * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; + */ + public Builder clearBareConcreteFunction() { + if (bareConcreteFunctionBuilder_ == null) { + if (kindCase_ == 8) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 8) { + kindCase_ = 0; + kind_ = null; + } + bareConcreteFunctionBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; + */ + public org.tensorflow.proto.framework.SavedBareConcreteFunction.Builder getBareConcreteFunctionBuilder() { + return getBareConcreteFunctionFieldBuilder().getBuilder(); + } + /** + * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; + */ + public org.tensorflow.proto.framework.SavedBareConcreteFunctionOrBuilder getBareConcreteFunctionOrBuilder() { + if ((kindCase_ == 8) && (bareConcreteFunctionBuilder_ != null)) { + return bareConcreteFunctionBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 8) { + return (org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_; + } + return org.tensorflow.proto.framework.SavedBareConcreteFunction.getDefaultInstance(); + } + } + /** + * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedBareConcreteFunction, org.tensorflow.proto.framework.SavedBareConcreteFunction.Builder, org.tensorflow.proto.framework.SavedBareConcreteFunctionOrBuilder> + getBareConcreteFunctionFieldBuilder() { + if (bareConcreteFunctionBuilder_ == null) { + if (!(kindCase_ == 8)) { + kind_ = org.tensorflow.proto.framework.SavedBareConcreteFunction.getDefaultInstance(); + } + bareConcreteFunctionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedBareConcreteFunction, org.tensorflow.proto.framework.SavedBareConcreteFunction.Builder, org.tensorflow.proto.framework.SavedBareConcreteFunctionOrBuilder>( + (org.tensorflow.proto.framework.SavedBareConcreteFunction) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 8; + onChanged();; + return bareConcreteFunctionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedConstant, org.tensorflow.proto.framework.SavedConstant.Builder, org.tensorflow.proto.framework.SavedConstantOrBuilder> constantBuilder_; + /** + * .tensorflow.SavedConstant constant = 9; + */ + public boolean hasConstant() { + return kindCase_ == 9; + } + /** + * .tensorflow.SavedConstant constant = 9; + */ + public org.tensorflow.proto.framework.SavedConstant getConstant() { + if (constantBuilder_ == null) { + if (kindCase_ == 9) { + return (org.tensorflow.proto.framework.SavedConstant) kind_; + } + return org.tensorflow.proto.framework.SavedConstant.getDefaultInstance(); + } else { + if (kindCase_ == 9) { + return constantBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.SavedConstant.getDefaultInstance(); + } + } + /** + * .tensorflow.SavedConstant constant = 9; + */ + public Builder setConstant(org.tensorflow.proto.framework.SavedConstant value) { + if (constantBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + constantBuilder_.setMessage(value); + } + kindCase_ = 9; + return this; + } + /** + * .tensorflow.SavedConstant constant = 9; + */ + public Builder setConstant( + org.tensorflow.proto.framework.SavedConstant.Builder builderForValue) { + if (constantBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + constantBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 9; + return this; + } + /** + * .tensorflow.SavedConstant constant = 9; + */ + public Builder mergeConstant(org.tensorflow.proto.framework.SavedConstant value) { + if (constantBuilder_ == null) { + if (kindCase_ == 9 && + kind_ != org.tensorflow.proto.framework.SavedConstant.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.SavedConstant.newBuilder((org.tensorflow.proto.framework.SavedConstant) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 9) { + constantBuilder_.mergeFrom(value); + } + constantBuilder_.setMessage(value); + } + kindCase_ = 9; + return this; + } + /** + * .tensorflow.SavedConstant constant = 9; + */ + public Builder clearConstant() { + if (constantBuilder_ == null) { + if (kindCase_ == 9) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 9) { + kindCase_ = 0; + kind_ = null; + } + constantBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.SavedConstant constant = 9; + */ + public org.tensorflow.proto.framework.SavedConstant.Builder getConstantBuilder() { + return getConstantFieldBuilder().getBuilder(); + } + /** + * .tensorflow.SavedConstant constant = 9; + */ + public org.tensorflow.proto.framework.SavedConstantOrBuilder getConstantOrBuilder() { + if ((kindCase_ == 9) && (constantBuilder_ != null)) { + return constantBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 9) { + return (org.tensorflow.proto.framework.SavedConstant) kind_; + } + return org.tensorflow.proto.framework.SavedConstant.getDefaultInstance(); + } + } + /** + * .tensorflow.SavedConstant constant = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedConstant, org.tensorflow.proto.framework.SavedConstant.Builder, org.tensorflow.proto.framework.SavedConstantOrBuilder> + getConstantFieldBuilder() { + if (constantBuilder_ == null) { + if (!(kindCase_ == 9)) { + kind_ = org.tensorflow.proto.framework.SavedConstant.getDefaultInstance(); + } + constantBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedConstant, org.tensorflow.proto.framework.SavedConstant.Builder, org.tensorflow.proto.framework.SavedConstantOrBuilder>( + (org.tensorflow.proto.framework.SavedConstant) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 9; + onChanged();; + return constantBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedResource, org.tensorflow.proto.framework.SavedResource.Builder, org.tensorflow.proto.framework.SavedResourceOrBuilder> resourceBuilder_; + /** + * .tensorflow.SavedResource resource = 10; + */ + public boolean hasResource() { + return kindCase_ == 10; + } + /** + * .tensorflow.SavedResource resource = 10; + */ + public org.tensorflow.proto.framework.SavedResource getResource() { + if (resourceBuilder_ == null) { + if (kindCase_ == 10) { + return (org.tensorflow.proto.framework.SavedResource) kind_; + } + return org.tensorflow.proto.framework.SavedResource.getDefaultInstance(); + } else { + if (kindCase_ == 10) { + return resourceBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.SavedResource.getDefaultInstance(); + } + } + /** + * .tensorflow.SavedResource resource = 10; + */ + public Builder setResource(org.tensorflow.proto.framework.SavedResource value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + resourceBuilder_.setMessage(value); + } + kindCase_ = 10; + return this; + } + /** + * .tensorflow.SavedResource resource = 10; + */ + public Builder setResource( + org.tensorflow.proto.framework.SavedResource.Builder builderForValue) { + if (resourceBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 10; + return this; + } + /** + * .tensorflow.SavedResource resource = 10; + */ + public Builder mergeResource(org.tensorflow.proto.framework.SavedResource value) { + if (resourceBuilder_ == null) { + if (kindCase_ == 10 && + kind_ != org.tensorflow.proto.framework.SavedResource.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.SavedResource.newBuilder((org.tensorflow.proto.framework.SavedResource) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 10) { + resourceBuilder_.mergeFrom(value); + } + resourceBuilder_.setMessage(value); + } + kindCase_ = 10; + return this; + } + /** + * .tensorflow.SavedResource resource = 10; + */ + public Builder clearResource() { + if (resourceBuilder_ == null) { + if (kindCase_ == 10) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 10) { + kindCase_ = 0; + kind_ = null; + } + resourceBuilder_.clear(); + } + return this; + } + /** + * .tensorflow.SavedResource resource = 10; + */ + public org.tensorflow.proto.framework.SavedResource.Builder getResourceBuilder() { + return getResourceFieldBuilder().getBuilder(); + } + /** + * .tensorflow.SavedResource resource = 10; + */ + public org.tensorflow.proto.framework.SavedResourceOrBuilder getResourceOrBuilder() { + if ((kindCase_ == 10) && (resourceBuilder_ != null)) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 10) { + return (org.tensorflow.proto.framework.SavedResource) kind_; + } + return org.tensorflow.proto.framework.SavedResource.getDefaultInstance(); + } + } + /** + * .tensorflow.SavedResource resource = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedResource, org.tensorflow.proto.framework.SavedResource.Builder, org.tensorflow.proto.framework.SavedResourceOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + if (!(kindCase_ == 10)) { + kind_ = org.tensorflow.proto.framework.SavedResource.getDefaultInstance(); + } + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.SavedResource, org.tensorflow.proto.framework.SavedResource.Builder, org.tensorflow.proto.framework.SavedResourceOrBuilder>( + (org.tensorflow.proto.framework.SavedResource) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 10; + onChanged();; + return resourceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.SavedObject) + } + + // @@protoc_insertion_point(class_scope:tensorflow.SavedObject) + private static final org.tensorflow.proto.framework.SavedObject DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.SavedObject(); + } + + public static org.tensorflow.proto.framework.SavedObject getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SavedObject parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SavedObject(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedObject getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedObjectGraph.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedObjectGraph.java new file mode 100644 index 00000000000..40a1e497db4 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedObjectGraph.java @@ -0,0 +1,1231 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.SavedObjectGraph} + */ +public final class SavedObjectGraph extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.SavedObjectGraph) + SavedObjectGraphOrBuilder { +private static final long serialVersionUID = 0L; + // Use SavedObjectGraph.newBuilder() to construct. + private SavedObjectGraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SavedObjectGraph() { + nodes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SavedObjectGraph(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SavedObjectGraph( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + nodes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + nodes_.add( + input.readMessage(org.tensorflow.proto.framework.SavedObject.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + concreteFunctions_ = com.google.protobuf.MapField.newMapField( + ConcreteFunctionsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + concreteFunctions__ = input.readMessage( + ConcreteFunctionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + concreteFunctions_.getMutableMap().put( + concreteFunctions__.getKey(), concreteFunctions__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + nodes_ = java.util.Collections.unmodifiableList(nodes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedObjectGraph_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetConcreteFunctions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedObjectGraph_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedObjectGraph.class, org.tensorflow.proto.framework.SavedObjectGraph.Builder.class); + } + + public static final int NODES_FIELD_NUMBER = 1; + private java.util.List nodes_; + /** + *
+   * Flattened list of objects in the object graph.
+   * The position of the object in this list indicates its id.
+   * Nodes[0] is considered the root node.
+   * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public java.util.List getNodesList() { + return nodes_; + } + /** + *
+   * Flattened list of objects in the object graph.
+   * The position of the object in this list indicates its id.
+   * Nodes[0] is considered the root node.
+   * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public java.util.List + getNodesOrBuilderList() { + return nodes_; + } + /** + *
+   * Flattened list of objects in the object graph.
+   * The position of the object in this list indicates its id.
+   * Nodes[0] is considered the root node.
+   * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public int getNodesCount() { + return nodes_.size(); + } + /** + *
+   * Flattened list of objects in the object graph.
+   * The position of the object in this list indicates its id.
+   * Nodes[0] is considered the root node.
+   * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public org.tensorflow.proto.framework.SavedObject getNodes(int index) { + return nodes_.get(index); + } + /** + *
+   * Flattened list of objects in the object graph.
+   * The position of the object in this list indicates its id.
+   * Nodes[0] is considered the root node.
+   * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public org.tensorflow.proto.framework.SavedObjectOrBuilder getNodesOrBuilder( + int index) { + return nodes_.get(index); + } + + public static final int CONCRETE_FUNCTIONS_FIELD_NUMBER = 2; + private static final class ConcreteFunctionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, org.tensorflow.proto.framework.SavedConcreteFunction> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedObjectGraph_ConcreteFunctionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.framework.SavedConcreteFunction.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.SavedConcreteFunction> concreteFunctions_; + private com.google.protobuf.MapField + internalGetConcreteFunctions() { + if (concreteFunctions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConcreteFunctionsDefaultEntryHolder.defaultEntry); + } + return concreteFunctions_; + } + + public int getConcreteFunctionsCount() { + return internalGetConcreteFunctions().getMap().size(); + } + /** + *
+   * Information about captures and output structures in concrete functions.
+   * Referenced from SavedBareConcreteFunction and SavedFunction.
+   * 
+ * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + + public boolean containsConcreteFunctions( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetConcreteFunctions().getMap().containsKey(key); + } + /** + * Use {@link #getConcreteFunctionsMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getConcreteFunctions() { + return getConcreteFunctionsMap(); + } + /** + *
+   * Information about captures and output structures in concrete functions.
+   * Referenced from SavedBareConcreteFunction and SavedFunction.
+   * 
+ * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + + public java.util.Map getConcreteFunctionsMap() { + return internalGetConcreteFunctions().getMap(); + } + /** + *
+   * Information about captures and output structures in concrete functions.
+   * Referenced from SavedBareConcreteFunction and SavedFunction.
+   * 
+ * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + + public org.tensorflow.proto.framework.SavedConcreteFunction getConcreteFunctionsOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.SavedConcreteFunction defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetConcreteFunctions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Information about captures and output structures in concrete functions.
+   * Referenced from SavedBareConcreteFunction and SavedFunction.
+   * 
+ * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + + public org.tensorflow.proto.framework.SavedConcreteFunction getConcreteFunctionsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetConcreteFunctions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < nodes_.size(); i++) { + output.writeMessage(1, nodes_.get(i)); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetConcreteFunctions(), + ConcreteFunctionsDefaultEntryHolder.defaultEntry, + 2); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < nodes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, nodes_.get(i)); + } + for (java.util.Map.Entry entry + : internalGetConcreteFunctions().getMap().entrySet()) { + com.google.protobuf.MapEntry + concreteFunctions__ = ConcreteFunctionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, concreteFunctions__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.SavedObjectGraph)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.SavedObjectGraph other = (org.tensorflow.proto.framework.SavedObjectGraph) obj; + + if (!getNodesList() + .equals(other.getNodesList())) return false; + if (!internalGetConcreteFunctions().equals( + other.internalGetConcreteFunctions())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNodesCount() > 0) { + hash = (37 * hash) + NODES_FIELD_NUMBER; + hash = (53 * hash) + getNodesList().hashCode(); + } + if (!internalGetConcreteFunctions().getMap().isEmpty()) { + hash = (37 * hash) + CONCRETE_FUNCTIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetConcreteFunctions().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.SavedObjectGraph parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedObjectGraph parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedObjectGraph parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedObjectGraph 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.proto.framework.SavedObjectGraph parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedObjectGraph parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedObjectGraph parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedObjectGraph parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedObjectGraph parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedObjectGraph parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedObjectGraph parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedObjectGraph parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.SavedObjectGraph prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.SavedObjectGraph} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.SavedObjectGraph) + org.tensorflow.proto.framework.SavedObjectGraphOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedObjectGraph_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetConcreteFunctions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableConcreteFunctions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedObjectGraph_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedObjectGraph.class, org.tensorflow.proto.framework.SavedObjectGraph.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.SavedObjectGraph.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getNodesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (nodesBuilder_ == null) { + nodes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + nodesBuilder_.clear(); + } + internalGetMutableConcreteFunctions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedObjectGraph_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedObjectGraph getDefaultInstanceForType() { + return org.tensorflow.proto.framework.SavedObjectGraph.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedObjectGraph build() { + org.tensorflow.proto.framework.SavedObjectGraph result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedObjectGraph buildPartial() { + org.tensorflow.proto.framework.SavedObjectGraph result = new org.tensorflow.proto.framework.SavedObjectGraph(this); + int from_bitField0_ = bitField0_; + if (nodesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + nodes_ = java.util.Collections.unmodifiableList(nodes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.nodes_ = nodes_; + } else { + result.nodes_ = nodesBuilder_.build(); + } + result.concreteFunctions_ = internalGetConcreteFunctions(); + result.concreteFunctions_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.SavedObjectGraph) { + return mergeFrom((org.tensorflow.proto.framework.SavedObjectGraph)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.SavedObjectGraph other) { + if (other == org.tensorflow.proto.framework.SavedObjectGraph.getDefaultInstance()) return this; + if (nodesBuilder_ == null) { + if (!other.nodes_.isEmpty()) { + if (nodes_.isEmpty()) { + nodes_ = other.nodes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNodesIsMutable(); + nodes_.addAll(other.nodes_); + } + onChanged(); + } + } else { + if (!other.nodes_.isEmpty()) { + if (nodesBuilder_.isEmpty()) { + nodesBuilder_.dispose(); + nodesBuilder_ = null; + nodes_ = other.nodes_; + bitField0_ = (bitField0_ & ~0x00000001); + nodesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNodesFieldBuilder() : null; + } else { + nodesBuilder_.addAllMessages(other.nodes_); + } + } + } + internalGetMutableConcreteFunctions().mergeFrom( + other.internalGetConcreteFunctions()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.SavedObjectGraph parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.SavedObjectGraph) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List nodes_ = + java.util.Collections.emptyList(); + private void ensureNodesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + nodes_ = new java.util.ArrayList(nodes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.SavedObject, org.tensorflow.proto.framework.SavedObject.Builder, org.tensorflow.proto.framework.SavedObjectOrBuilder> nodesBuilder_; + + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public java.util.List getNodesList() { + if (nodesBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodes_); + } else { + return nodesBuilder_.getMessageList(); + } + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public int getNodesCount() { + if (nodesBuilder_ == null) { + return nodes_.size(); + } else { + return nodesBuilder_.getCount(); + } + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public org.tensorflow.proto.framework.SavedObject getNodes(int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); + } else { + return nodesBuilder_.getMessage(index); + } + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public Builder setNodes( + int index, org.tensorflow.proto.framework.SavedObject value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.set(index, value); + onChanged(); + } else { + nodesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public Builder setNodes( + int index, org.tensorflow.proto.framework.SavedObject.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.set(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public Builder addNodes(org.tensorflow.proto.framework.SavedObject value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(value); + onChanged(); + } else { + nodesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public Builder addNodes( + int index, org.tensorflow.proto.framework.SavedObject value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(index, value); + onChanged(); + } else { + nodesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public Builder addNodes( + org.tensorflow.proto.framework.SavedObject.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public Builder addNodes( + int index, org.tensorflow.proto.framework.SavedObject.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public Builder addAllNodes( + java.lang.Iterable values) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nodes_); + onChanged(); + } else { + nodesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public Builder clearNodes() { + if (nodesBuilder_ == null) { + nodes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + nodesBuilder_.clear(); + } + return this; + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public Builder removeNodes(int index) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.remove(index); + onChanged(); + } else { + nodesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public org.tensorflow.proto.framework.SavedObject.Builder getNodesBuilder( + int index) { + return getNodesFieldBuilder().getBuilder(index); + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public org.tensorflow.proto.framework.SavedObjectOrBuilder getNodesOrBuilder( + int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); } else { + return nodesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public java.util.List + getNodesOrBuilderList() { + if (nodesBuilder_ != null) { + return nodesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodes_); + } + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public org.tensorflow.proto.framework.SavedObject.Builder addNodesBuilder() { + return getNodesFieldBuilder().addBuilder( + org.tensorflow.proto.framework.SavedObject.getDefaultInstance()); + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public org.tensorflow.proto.framework.SavedObject.Builder addNodesBuilder( + int index) { + return getNodesFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.SavedObject.getDefaultInstance()); + } + /** + *
+     * Flattened list of objects in the object graph.
+     * The position of the object in this list indicates its id.
+     * Nodes[0] is considered the root node.
+     * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + public java.util.List + getNodesBuilderList() { + return getNodesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.SavedObject, org.tensorflow.proto.framework.SavedObject.Builder, org.tensorflow.proto.framework.SavedObjectOrBuilder> + getNodesFieldBuilder() { + if (nodesBuilder_ == null) { + nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.SavedObject, org.tensorflow.proto.framework.SavedObject.Builder, org.tensorflow.proto.framework.SavedObjectOrBuilder>( + nodes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + nodes_ = null; + } + return nodesBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.SavedConcreteFunction> concreteFunctions_; + private com.google.protobuf.MapField + internalGetConcreteFunctions() { + if (concreteFunctions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConcreteFunctionsDefaultEntryHolder.defaultEntry); + } + return concreteFunctions_; + } + private com.google.protobuf.MapField + internalGetMutableConcreteFunctions() { + onChanged();; + if (concreteFunctions_ == null) { + concreteFunctions_ = com.google.protobuf.MapField.newMapField( + ConcreteFunctionsDefaultEntryHolder.defaultEntry); + } + if (!concreteFunctions_.isMutable()) { + concreteFunctions_ = concreteFunctions_.copy(); + } + return concreteFunctions_; + } + + public int getConcreteFunctionsCount() { + return internalGetConcreteFunctions().getMap().size(); + } + /** + *
+     * Information about captures and output structures in concrete functions.
+     * Referenced from SavedBareConcreteFunction and SavedFunction.
+     * 
+ * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + + public boolean containsConcreteFunctions( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetConcreteFunctions().getMap().containsKey(key); + } + /** + * Use {@link #getConcreteFunctionsMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getConcreteFunctions() { + return getConcreteFunctionsMap(); + } + /** + *
+     * Information about captures and output structures in concrete functions.
+     * Referenced from SavedBareConcreteFunction and SavedFunction.
+     * 
+ * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + + public java.util.Map getConcreteFunctionsMap() { + return internalGetConcreteFunctions().getMap(); + } + /** + *
+     * Information about captures and output structures in concrete functions.
+     * Referenced from SavedBareConcreteFunction and SavedFunction.
+     * 
+ * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + + public org.tensorflow.proto.framework.SavedConcreteFunction getConcreteFunctionsOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.SavedConcreteFunction defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetConcreteFunctions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Information about captures and output structures in concrete functions.
+     * Referenced from SavedBareConcreteFunction and SavedFunction.
+     * 
+ * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + + public org.tensorflow.proto.framework.SavedConcreteFunction getConcreteFunctionsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetConcreteFunctions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearConcreteFunctions() { + internalGetMutableConcreteFunctions().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Information about captures and output structures in concrete functions.
+     * Referenced from SavedBareConcreteFunction and SavedFunction.
+     * 
+ * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + + public Builder removeConcreteFunctions( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableConcreteFunctions().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableConcreteFunctions() { + return internalGetMutableConcreteFunctions().getMutableMap(); + } + /** + *
+     * Information about captures and output structures in concrete functions.
+     * Referenced from SavedBareConcreteFunction and SavedFunction.
+     * 
+ * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + public Builder putConcreteFunctions( + java.lang.String key, + org.tensorflow.proto.framework.SavedConcreteFunction value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableConcreteFunctions().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Information about captures and output structures in concrete functions.
+     * Referenced from SavedBareConcreteFunction and SavedFunction.
+     * 
+ * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + + public Builder putAllConcreteFunctions( + java.util.Map values) { + internalGetMutableConcreteFunctions().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.SavedObjectGraph) + } + + // @@protoc_insertion_point(class_scope:tensorflow.SavedObjectGraph) + private static final org.tensorflow.proto.framework.SavedObjectGraph DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.SavedObjectGraph(); + } + + public static org.tensorflow.proto.framework.SavedObjectGraph getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SavedObjectGraph parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SavedObjectGraph(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedObjectGraph getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedObjectGraphOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedObjectGraphOrBuilder.java new file mode 100644 index 00000000000..3d80fbc1306 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedObjectGraphOrBuilder.java @@ -0,0 +1,122 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +public interface SavedObjectGraphOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.SavedObjectGraph) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Flattened list of objects in the object graph.
+   * The position of the object in this list indicates its id.
+   * Nodes[0] is considered the root node.
+   * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + java.util.List + getNodesList(); + /** + *
+   * Flattened list of objects in the object graph.
+   * The position of the object in this list indicates its id.
+   * Nodes[0] is considered the root node.
+   * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + org.tensorflow.proto.framework.SavedObject getNodes(int index); + /** + *
+   * Flattened list of objects in the object graph.
+   * The position of the object in this list indicates its id.
+   * Nodes[0] is considered the root node.
+   * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + int getNodesCount(); + /** + *
+   * Flattened list of objects in the object graph.
+   * The position of the object in this list indicates its id.
+   * Nodes[0] is considered the root node.
+   * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + java.util.List + getNodesOrBuilderList(); + /** + *
+   * Flattened list of objects in the object graph.
+   * The position of the object in this list indicates its id.
+   * Nodes[0] is considered the root node.
+   * 
+ * + * repeated .tensorflow.SavedObject nodes = 1; + */ + org.tensorflow.proto.framework.SavedObjectOrBuilder getNodesOrBuilder( + int index); + + /** + *
+   * Information about captures and output structures in concrete functions.
+   * Referenced from SavedBareConcreteFunction and SavedFunction.
+   * 
+ * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + int getConcreteFunctionsCount(); + /** + *
+   * Information about captures and output structures in concrete functions.
+   * Referenced from SavedBareConcreteFunction and SavedFunction.
+   * 
+ * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + boolean containsConcreteFunctions( + java.lang.String key); + /** + * Use {@link #getConcreteFunctionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getConcreteFunctions(); + /** + *
+   * Information about captures and output structures in concrete functions.
+   * Referenced from SavedBareConcreteFunction and SavedFunction.
+   * 
+ * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + java.util.Map + getConcreteFunctionsMap(); + /** + *
+   * Information about captures and output structures in concrete functions.
+   * Referenced from SavedBareConcreteFunction and SavedFunction.
+   * 
+ * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + + org.tensorflow.proto.framework.SavedConcreteFunction getConcreteFunctionsOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.SavedConcreteFunction defaultValue); + /** + *
+   * Information about captures and output structures in concrete functions.
+   * Referenced from SavedBareConcreteFunction and SavedFunction.
+   * 
+ * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + + org.tensorflow.proto.framework.SavedConcreteFunction getConcreteFunctionsOrThrow( + java.lang.String key); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedObjectGraphProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedObjectGraphProtos.java new file mode 100644 index 00000000000..9bee2ff2cbd --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedObjectGraphProtos.java @@ -0,0 +1,236 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +public final class SavedObjectGraphProtos { + private SavedObjectGraphProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SavedObjectGraph_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SavedObjectGraph_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SavedObjectGraph_ConcreteFunctionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SavedObjectGraph_ConcreteFunctionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SavedObject_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SavedObject_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SavedUserObject_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SavedUserObject_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SavedAsset_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SavedAsset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SavedFunction_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SavedFunction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SavedConcreteFunction_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SavedConcreteFunction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SavedBareConcreteFunction_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SavedBareConcreteFunction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SavedConstant_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SavedConstant_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SavedVariable_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SavedVariable_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_FunctionSpec_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_FunctionSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_SavedResource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_SavedResource_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/protobuf/saved_object_" + + "graph.proto\022\ntensorflow\032,tensorflow/core" + + "/framework/tensor_shape.proto\032%tensorflo" + + "w/core/framework/types.proto\032(tensorflow" + + "/core/framework/variable.proto\032(tensorfl" + + "ow/core/framework/versions.proto\032%tensor" + + "flow/core/protobuf/struct.proto\0325tensorf" + + "low/core/protobuf/trackable_object_graph" + + ".proto\"\350\001\n\020SavedObjectGraph\022&\n\005nodes\030\001 \003" + + "(\0132\027.tensorflow.SavedObject\022O\n\022concrete_" + + "functions\030\002 \003(\01323.tensorflow.SavedObject" + + "Graph.ConcreteFunctionsEntry\032[\n\026Concrete" + + "FunctionsEntry\022\013\n\003key\030\001 \001(\t\0220\n\005value\030\002 \001" + + "(\0132!.tensorflow.SavedConcreteFunction:\0028" + + "\001\"\275\004\n\013SavedObject\022R\n\010children\030\001 \003(\0132@.te" + + "nsorflow.TrackableObjectGraph.TrackableO" + + "bject.ObjectReference\022^\n\016slot_variables\030" + + "\003 \003(\0132F.tensorflow.TrackableObjectGraph." + + "TrackableObject.SlotVariableReference\0222\n" + + "\013user_object\030\004 \001(\0132\033.tensorflow.SavedUse" + + "rObjectH\000\022\'\n\005asset\030\005 \001(\0132\026.tensorflow.Sa" + + "vedAssetH\000\022-\n\010function\030\006 \001(\0132\031.tensorflo" + + "w.SavedFunctionH\000\022-\n\010variable\030\007 \001(\0132\031.te" + + "nsorflow.SavedVariableH\000\022G\n\026bare_concret" + + "e_function\030\010 \001(\0132%.tensorflow.SavedBareC" + + "oncreteFunctionH\000\022-\n\010constant\030\t \001(\0132\031.te" + + "nsorflow.SavedConstantH\000\022-\n\010resource\030\n \001" + + "(\0132\031.tensorflow.SavedResourceH\000B\006\n\004kindJ" + + "\004\010\002\020\003R\nattributes\"`\n\017SavedUserObject\022\022\n\n" + + "identifier\030\001 \001(\t\022\'\n\007version\030\002 \001(\0132\026.tens" + + "orflow.VersionDef\022\020\n\010metadata\030\003 \001(\t\"*\n\nS" + + "avedAsset\022\034\n\024asset_file_def_index\030\001 \001(\005\"" + + "\\\n\rSavedFunction\022\032\n\022concrete_functions\030\001" + + " \003(\t\022/\n\rfunction_spec\030\002 \001(\0132\030.tensorflow" + + ".FunctionSpec\"\250\001\n\025SavedConcreteFunction\022" + + "\024\n\014bound_inputs\030\002 \003(\005\022B\n\035canonicalized_i" + + "nput_signature\030\003 \001(\0132\033.tensorflow.Struct" + + "uredValue\0225\n\020output_signature\030\004 \001(\0132\033.te" + + "nsorflow.StructuredValue\"|\n\031SavedBareCon" + + "creteFunction\022\036\n\026concrete_function_name\030" + + "\001 \001(\t\022\031\n\021argument_keywords\030\002 \003(\t\022$\n\034allo" + + "wed_positional_arguments\030\003 \001(\003\"\"\n\rSavedC" + + "onstant\022\021\n\toperation\030\001 \001(\t\"\366\001\n\rSavedVari" + + "able\022#\n\005dtype\030\001 \001(\0162\024.tensorflow.DataTyp" + + "e\022+\n\005shape\030\002 \001(\0132\034.tensorflow.TensorShap" + + "eProto\022\021\n\ttrainable\030\003 \001(\010\022<\n\017synchroniza" + + "tion\030\004 \001(\0162#.tensorflow.VariableSynchron" + + "ization\0224\n\013aggregation\030\005 \001(\0162\037.tensorflo" + + "w.VariableAggregation\022\014\n\004name\030\006 \001(\t\"\225\001\n\014" + + "FunctionSpec\0220\n\013fullargspec\030\001 \001(\0132\033.tens" + + "orflow.StructuredValue\022\021\n\tis_method\030\002 \001(" + + "\010\0224\n\017input_signature\030\005 \001(\0132\033.tensorflow." + + "StructuredValueJ\004\010\003\020\004J\004\010\004\020\005\"\037\n\rSavedReso" + + "urce\022\016\n\006device\030\001 \001(\tB\207\001\n\036org.tensorflow." + + "proto.frameworkB\026SavedObjectGraphProtosP" + + "\001ZHgithub.com/tensorflow/tensorflow/tens" + + "orflow/go/core/core_protos_go_proto\370\001\001b\006" + + "proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(), + org.tensorflow.proto.framework.TypesProtos.getDescriptor(), + org.tensorflow.proto.framework.VariableProtos.getDescriptor(), + org.tensorflow.proto.framework.VersionsProtos.getDescriptor(), + org.tensorflow.proto.framework.StructProtos.getDescriptor(), + org.tensorflow.proto.framework.TrackableObjectGraphProtos.getDescriptor(), + }); + internal_static_tensorflow_SavedObjectGraph_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_SavedObjectGraph_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SavedObjectGraph_descriptor, + new java.lang.String[] { "Nodes", "ConcreteFunctions", }); + internal_static_tensorflow_SavedObjectGraph_ConcreteFunctionsEntry_descriptor = + internal_static_tensorflow_SavedObjectGraph_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_SavedObjectGraph_ConcreteFunctionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SavedObjectGraph_ConcreteFunctionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_SavedObject_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_SavedObject_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SavedObject_descriptor, + new java.lang.String[] { "Children", "SlotVariables", "UserObject", "Asset", "Function", "Variable", "BareConcreteFunction", "Constant", "Resource", "Kind", }); + internal_static_tensorflow_SavedUserObject_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_tensorflow_SavedUserObject_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SavedUserObject_descriptor, + new java.lang.String[] { "Identifier", "Version", "Metadata", }); + internal_static_tensorflow_SavedAsset_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_tensorflow_SavedAsset_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SavedAsset_descriptor, + new java.lang.String[] { "AssetFileDefIndex", }); + internal_static_tensorflow_SavedFunction_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_tensorflow_SavedFunction_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SavedFunction_descriptor, + new java.lang.String[] { "ConcreteFunctions", "FunctionSpec", }); + internal_static_tensorflow_SavedConcreteFunction_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_tensorflow_SavedConcreteFunction_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SavedConcreteFunction_descriptor, + new java.lang.String[] { "BoundInputs", "CanonicalizedInputSignature", "OutputSignature", }); + internal_static_tensorflow_SavedBareConcreteFunction_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_tensorflow_SavedBareConcreteFunction_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SavedBareConcreteFunction_descriptor, + new java.lang.String[] { "ConcreteFunctionName", "ArgumentKeywords", "AllowedPositionalArguments", }); + internal_static_tensorflow_SavedConstant_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_tensorflow_SavedConstant_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SavedConstant_descriptor, + new java.lang.String[] { "Operation", }); + internal_static_tensorflow_SavedVariable_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_tensorflow_SavedVariable_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SavedVariable_descriptor, + new java.lang.String[] { "Dtype", "Shape", "Trainable", "Synchronization", "Aggregation", "Name", }); + internal_static_tensorflow_FunctionSpec_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_tensorflow_FunctionSpec_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_FunctionSpec_descriptor, + new java.lang.String[] { "Fullargspec", "IsMethod", "InputSignature", }); + internal_static_tensorflow_SavedResource_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_tensorflow_SavedResource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_SavedResource_descriptor, + new java.lang.String[] { "Device", }); + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(); + org.tensorflow.proto.framework.TypesProtos.getDescriptor(); + org.tensorflow.proto.framework.VariableProtos.getDescriptor(); + org.tensorflow.proto.framework.VersionsProtos.getDescriptor(); + org.tensorflow.proto.framework.StructProtos.getDescriptor(); + org.tensorflow.proto.framework.TrackableObjectGraphProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedObjectOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedObjectOrBuilder.java new file mode 100644 index 00000000000..614bb639258 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedObjectOrBuilder.java @@ -0,0 +1,215 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +public interface SavedObjectOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.SavedObject) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Objects which this object depends on: named edges in the dependency
+   * graph.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + java.util.List + getChildrenList(); + /** + *
+   * Objects which this object depends on: named edges in the dependency
+   * graph.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReference getChildren(int index); + /** + *
+   * Objects which this object depends on: named edges in the dependency
+   * graph.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + int getChildrenCount(); + /** + *
+   * Objects which this object depends on: named edges in the dependency
+   * graph.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + java.util.List + getChildrenOrBuilderList(); + /** + *
+   * Objects which this object depends on: named edges in the dependency
+   * graph.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; + */ + org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder getChildrenOrBuilder( + int index); + + /** + *
+   * Slot variables owned by this object. This describes the three-way
+   * (optimizer, variable, slot variable) relationship; none of the three
+   * depend on the others directly.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + java.util.List + getSlotVariablesList(); + /** + *
+   * Slot variables owned by this object. This describes the three-way
+   * (optimizer, variable, slot variable) relationship; none of the three
+   * depend on the others directly.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReference getSlotVariables(int index); + /** + *
+   * Slot variables owned by this object. This describes the three-way
+   * (optimizer, variable, slot variable) relationship; none of the three
+   * depend on the others directly.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + int getSlotVariablesCount(); + /** + *
+   * Slot variables owned by this object. This describes the three-way
+   * (optimizer, variable, slot variable) relationship; none of the three
+   * depend on the others directly.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + java.util.List + getSlotVariablesOrBuilderList(); + /** + *
+   * Slot variables owned by this object. This describes the three-way
+   * (optimizer, variable, slot variable) relationship; none of the three
+   * depend on the others directly.
+   * Note: currently only valid if kind == "user_object".
+   * 
+ * + * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; + */ + org.tensorflow.proto.framework.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder getSlotVariablesOrBuilder( + int index); + + /** + * .tensorflow.SavedUserObject user_object = 4; + */ + boolean hasUserObject(); + /** + * .tensorflow.SavedUserObject user_object = 4; + */ + org.tensorflow.proto.framework.SavedUserObject getUserObject(); + /** + * .tensorflow.SavedUserObject user_object = 4; + */ + org.tensorflow.proto.framework.SavedUserObjectOrBuilder getUserObjectOrBuilder(); + + /** + * .tensorflow.SavedAsset asset = 5; + */ + boolean hasAsset(); + /** + * .tensorflow.SavedAsset asset = 5; + */ + org.tensorflow.proto.framework.SavedAsset getAsset(); + /** + * .tensorflow.SavedAsset asset = 5; + */ + org.tensorflow.proto.framework.SavedAssetOrBuilder getAssetOrBuilder(); + + /** + * .tensorflow.SavedFunction function = 6; + */ + boolean hasFunction(); + /** + * .tensorflow.SavedFunction function = 6; + */ + org.tensorflow.proto.framework.SavedFunction getFunction(); + /** + * .tensorflow.SavedFunction function = 6; + */ + org.tensorflow.proto.framework.SavedFunctionOrBuilder getFunctionOrBuilder(); + + /** + * .tensorflow.SavedVariable variable = 7; + */ + boolean hasVariable(); + /** + * .tensorflow.SavedVariable variable = 7; + */ + org.tensorflow.proto.framework.SavedVariable getVariable(); + /** + * .tensorflow.SavedVariable variable = 7; + */ + org.tensorflow.proto.framework.SavedVariableOrBuilder getVariableOrBuilder(); + + /** + * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; + */ + boolean hasBareConcreteFunction(); + /** + * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; + */ + org.tensorflow.proto.framework.SavedBareConcreteFunction getBareConcreteFunction(); + /** + * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; + */ + org.tensorflow.proto.framework.SavedBareConcreteFunctionOrBuilder getBareConcreteFunctionOrBuilder(); + + /** + * .tensorflow.SavedConstant constant = 9; + */ + boolean hasConstant(); + /** + * .tensorflow.SavedConstant constant = 9; + */ + org.tensorflow.proto.framework.SavedConstant getConstant(); + /** + * .tensorflow.SavedConstant constant = 9; + */ + org.tensorflow.proto.framework.SavedConstantOrBuilder getConstantOrBuilder(); + + /** + * .tensorflow.SavedResource resource = 10; + */ + boolean hasResource(); + /** + * .tensorflow.SavedResource resource = 10; + */ + org.tensorflow.proto.framework.SavedResource getResource(); + /** + * .tensorflow.SavedResource resource = 10; + */ + org.tensorflow.proto.framework.SavedResourceOrBuilder getResourceOrBuilder(); + + public org.tensorflow.proto.framework.SavedObject.KindCase getKindCase(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedResource.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedResource.java new file mode 100644 index 00000000000..b45f7ff73a9 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedResource.java @@ -0,0 +1,600 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * A SavedResource represents a TF object that holds state during its lifetime.
+ * An object of this type can have a reference to a:
+ * create_resource() and an initialize() function.
+ * 
+ * + * Protobuf type {@code tensorflow.SavedResource} + */ +public final class SavedResource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.SavedResource) + SavedResourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use SavedResource.newBuilder() to construct. + private SavedResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SavedResource() { + device_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SavedResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SavedResource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + device_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedResource.class, org.tensorflow.proto.framework.SavedResource.Builder.class); + } + + public static final int DEVICE_FIELD_NUMBER = 1; + private volatile java.lang.Object device_; + /** + *
+   * A device specification indicating a required placement for the resource
+   * creation function, e.g. "CPU". An empty string allows the user to select a
+   * device.
+   * 
+ * + * 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; + } + } + /** + *
+   * A device specification indicating a required placement for the resource
+   * creation function, e.g. "CPU". An empty string allows the user to select a
+   * device.
+   * 
+ * + * 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; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getDeviceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, device_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDeviceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, device_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.SavedResource)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.SavedResource other = (org.tensorflow.proto.framework.SavedResource) obj; + + if (!getDevice() + .equals(other.getDevice())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DEVICE_FIELD_NUMBER; + hash = (53 * hash) + getDevice().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.SavedResource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedResource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedResource 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.proto.framework.SavedResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedResource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedResource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedResource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedResource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedResource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedResource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedResource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.SavedResource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A SavedResource represents a TF object that holds state during its lifetime.
+   * An object of this type can have a reference to a:
+   * create_resource() and an initialize() function.
+   * 
+ * + * Protobuf type {@code tensorflow.SavedResource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.SavedResource) + org.tensorflow.proto.framework.SavedResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedResource.class, org.tensorflow.proto.framework.SavedResource.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.SavedResource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + device_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedResource_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedResource getDefaultInstanceForType() { + return org.tensorflow.proto.framework.SavedResource.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedResource build() { + org.tensorflow.proto.framework.SavedResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedResource buildPartial() { + org.tensorflow.proto.framework.SavedResource result = new org.tensorflow.proto.framework.SavedResource(this); + result.device_ = device_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.SavedResource) { + return mergeFrom((org.tensorflow.proto.framework.SavedResource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.SavedResource other) { + if (other == org.tensorflow.proto.framework.SavedResource.getDefaultInstance()) return this; + if (!other.getDevice().isEmpty()) { + device_ = other.device_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.SavedResource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.SavedResource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object device_ = ""; + /** + *
+     * A device specification indicating a required placement for the resource
+     * creation function, e.g. "CPU". An empty string allows the user to select a
+     * device.
+     * 
+ * + * 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; + } + } + /** + *
+     * A device specification indicating a required placement for the resource
+     * creation function, e.g. "CPU". An empty string allows the user to select a
+     * device.
+     * 
+ * + * 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; + } + } + /** + *
+     * A device specification indicating a required placement for the resource
+     * creation function, e.g. "CPU". An empty string allows the user to select a
+     * device.
+     * 
+ * + * string device = 1; + */ + public Builder setDevice( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + device_ = value; + onChanged(); + return this; + } + /** + *
+     * A device specification indicating a required placement for the resource
+     * creation function, e.g. "CPU". An empty string allows the user to select a
+     * device.
+     * 
+ * + * string device = 1; + */ + public Builder clearDevice() { + + device_ = getDefaultInstance().getDevice(); + onChanged(); + return this; + } + /** + *
+     * A device specification indicating a required placement for the resource
+     * creation function, e.g. "CPU". An empty string allows the user to select a
+     * device.
+     * 
+ * + * string device = 1; + */ + public Builder setDeviceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + device_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.SavedResource) + } + + // @@protoc_insertion_point(class_scope:tensorflow.SavedResource) + private static final org.tensorflow.proto.framework.SavedResource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.SavedResource(); + } + + public static org.tensorflow.proto.framework.SavedResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SavedResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SavedResource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedResourceOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedResourceOrBuilder.java new file mode 100644 index 00000000000..5d78c2eea9b --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedResourceOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +public interface SavedResourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.SavedResource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A device specification indicating a required placement for the resource
+   * creation function, e.g. "CPU". An empty string allows the user to select a
+   * device.
+   * 
+ * + * string device = 1; + */ + java.lang.String getDevice(); + /** + *
+   * A device specification indicating a required placement for the resource
+   * creation function, e.g. "CPU". An empty string allows the user to select a
+   * device.
+   * 
+ * + * string device = 1; + */ + com.google.protobuf.ByteString + getDeviceBytes(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedUserObject.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedUserObject.java new file mode 100644 index 00000000000..f66874096f5 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedUserObject.java @@ -0,0 +1,974 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * A SavedUserObject is an object (in the object-oriented language of the
+ * TensorFlow program) of some user- or framework-defined class other than
+ * those handled specifically by the other kinds of SavedObjects.
+ * This object cannot be evaluated as a tensor, and therefore cannot be bound
+ * to an input of a function.
+ * 
+ * + * Protobuf type {@code tensorflow.SavedUserObject} + */ +public final class SavedUserObject extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.SavedUserObject) + SavedUserObjectOrBuilder { +private static final long serialVersionUID = 0L; + // Use SavedUserObject.newBuilder() to construct. + private SavedUserObject(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SavedUserObject() { + identifier_ = ""; + metadata_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SavedUserObject(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SavedUserObject( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + identifier_ = s; + break; + } + case 18: { + org.tensorflow.proto.framework.VersionDef.Builder subBuilder = null; + if (version_ != null) { + subBuilder = version_.toBuilder(); + } + version_ = input.readMessage(org.tensorflow.proto.framework.VersionDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(version_); + version_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + metadata_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedUserObject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedUserObject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedUserObject.class, org.tensorflow.proto.framework.SavedUserObject.Builder.class); + } + + public static final int IDENTIFIER_FIELD_NUMBER = 1; + private volatile java.lang.Object identifier_; + /** + *
+   * Corresponds to a registration of the type to use in the loading program.
+   * 
+ * + * string identifier = 1; + */ + public java.lang.String getIdentifier() { + java.lang.Object ref = identifier_; + 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(); + identifier_ = s; + return s; + } + } + /** + *
+   * Corresponds to a registration of the type to use in the loading program.
+   * 
+ * + * string identifier = 1; + */ + public com.google.protobuf.ByteString + getIdentifierBytes() { + java.lang.Object ref = identifier_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + identifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + private org.tensorflow.proto.framework.VersionDef version_; + /** + *
+   * Version information from the producer of this SavedUserObject.
+   * 
+ * + * .tensorflow.VersionDef version = 2; + */ + public boolean hasVersion() { + return version_ != null; + } + /** + *
+   * Version information from the producer of this SavedUserObject.
+   * 
+ * + * .tensorflow.VersionDef version = 2; + */ + public org.tensorflow.proto.framework.VersionDef getVersion() { + return version_ == null ? org.tensorflow.proto.framework.VersionDef.getDefaultInstance() : version_; + } + /** + *
+   * Version information from the producer of this SavedUserObject.
+   * 
+ * + * .tensorflow.VersionDef version = 2; + */ + public org.tensorflow.proto.framework.VersionDefOrBuilder getVersionOrBuilder() { + return getVersion(); + } + + public static final int METADATA_FIELD_NUMBER = 3; + private volatile java.lang.Object metadata_; + /** + *
+   * Initialization-related metadata.
+   * 
+ * + * string metadata = 3; + */ + public java.lang.String getMetadata() { + java.lang.Object ref = metadata_; + 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(); + metadata_ = s; + return s; + } + } + /** + *
+   * Initialization-related metadata.
+   * 
+ * + * string metadata = 3; + */ + public com.google.protobuf.ByteString + getMetadataBytes() { + java.lang.Object ref = metadata_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getIdentifierBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, identifier_); + } + if (version_ != null) { + output.writeMessage(2, getVersion()); + } + if (!getMetadataBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, metadata_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdentifierBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, identifier_); + } + if (version_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getVersion()); + } + if (!getMetadataBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, metadata_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.SavedUserObject)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.SavedUserObject other = (org.tensorflow.proto.framework.SavedUserObject) obj; + + if (!getIdentifier() + .equals(other.getIdentifier())) return false; + if (hasVersion() != other.hasVersion()) return false; + if (hasVersion()) { + if (!getVersion() + .equals(other.getVersion())) return false; + } + if (!getMetadata() + .equals(other.getMetadata())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IDENTIFIER_FIELD_NUMBER; + hash = (53 * hash) + getIdentifier().hashCode(); + if (hasVersion()) { + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + } + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.SavedUserObject parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedUserObject parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedUserObject parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedUserObject 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.proto.framework.SavedUserObject parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedUserObject parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedUserObject parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedUserObject parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedUserObject parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedUserObject parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedUserObject parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedUserObject parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.SavedUserObject prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A SavedUserObject is an object (in the object-oriented language of the
+   * TensorFlow program) of some user- or framework-defined class other than
+   * those handled specifically by the other kinds of SavedObjects.
+   * This object cannot be evaluated as a tensor, and therefore cannot be bound
+   * to an input of a function.
+   * 
+ * + * Protobuf type {@code tensorflow.SavedUserObject} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.SavedUserObject) + org.tensorflow.proto.framework.SavedUserObjectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedUserObject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedUserObject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedUserObject.class, org.tensorflow.proto.framework.SavedUserObject.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.SavedUserObject.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + identifier_ = ""; + + if (versionBuilder_ == null) { + version_ = null; + } else { + version_ = null; + versionBuilder_ = null; + } + metadata_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedUserObject_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedUserObject getDefaultInstanceForType() { + return org.tensorflow.proto.framework.SavedUserObject.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedUserObject build() { + org.tensorflow.proto.framework.SavedUserObject result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedUserObject buildPartial() { + org.tensorflow.proto.framework.SavedUserObject result = new org.tensorflow.proto.framework.SavedUserObject(this); + result.identifier_ = identifier_; + if (versionBuilder_ == null) { + result.version_ = version_; + } else { + result.version_ = versionBuilder_.build(); + } + result.metadata_ = metadata_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.SavedUserObject) { + return mergeFrom((org.tensorflow.proto.framework.SavedUserObject)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.SavedUserObject other) { + if (other == org.tensorflow.proto.framework.SavedUserObject.getDefaultInstance()) return this; + if (!other.getIdentifier().isEmpty()) { + identifier_ = other.identifier_; + onChanged(); + } + if (other.hasVersion()) { + mergeVersion(other.getVersion()); + } + if (!other.getMetadata().isEmpty()) { + metadata_ = other.metadata_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.SavedUserObject parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.SavedUserObject) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object identifier_ = ""; + /** + *
+     * Corresponds to a registration of the type to use in the loading program.
+     * 
+ * + * string identifier = 1; + */ + public java.lang.String getIdentifier() { + java.lang.Object ref = identifier_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + identifier_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Corresponds to a registration of the type to use in the loading program.
+     * 
+ * + * string identifier = 1; + */ + public com.google.protobuf.ByteString + getIdentifierBytes() { + java.lang.Object ref = identifier_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + identifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Corresponds to a registration of the type to use in the loading program.
+     * 
+ * + * string identifier = 1; + */ + public Builder setIdentifier( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + identifier_ = value; + onChanged(); + return this; + } + /** + *
+     * Corresponds to a registration of the type to use in the loading program.
+     * 
+ * + * string identifier = 1; + */ + public Builder clearIdentifier() { + + identifier_ = getDefaultInstance().getIdentifier(); + onChanged(); + return this; + } + /** + *
+     * Corresponds to a registration of the type to use in the loading program.
+     * 
+ * + * string identifier = 1; + */ + public Builder setIdentifierBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + identifier_ = value; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.VersionDef version_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.VersionDef, org.tensorflow.proto.framework.VersionDef.Builder, org.tensorflow.proto.framework.VersionDefOrBuilder> versionBuilder_; + /** + *
+     * Version information from the producer of this SavedUserObject.
+     * 
+ * + * .tensorflow.VersionDef version = 2; + */ + public boolean hasVersion() { + return versionBuilder_ != null || version_ != null; + } + /** + *
+     * Version information from the producer of this SavedUserObject.
+     * 
+ * + * .tensorflow.VersionDef version = 2; + */ + public org.tensorflow.proto.framework.VersionDef getVersion() { + if (versionBuilder_ == null) { + return version_ == null ? org.tensorflow.proto.framework.VersionDef.getDefaultInstance() : version_; + } else { + return versionBuilder_.getMessage(); + } + } + /** + *
+     * Version information from the producer of this SavedUserObject.
+     * 
+ * + * .tensorflow.VersionDef version = 2; + */ + public Builder setVersion(org.tensorflow.proto.framework.VersionDef value) { + if (versionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + onChanged(); + } else { + versionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Version information from the producer of this SavedUserObject.
+     * 
+ * + * .tensorflow.VersionDef version = 2; + */ + public Builder setVersion( + org.tensorflow.proto.framework.VersionDef.Builder builderForValue) { + if (versionBuilder_ == null) { + version_ = builderForValue.build(); + onChanged(); + } else { + versionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Version information from the producer of this SavedUserObject.
+     * 
+ * + * .tensorflow.VersionDef version = 2; + */ + public Builder mergeVersion(org.tensorflow.proto.framework.VersionDef value) { + if (versionBuilder_ == null) { + if (version_ != null) { + version_ = + org.tensorflow.proto.framework.VersionDef.newBuilder(version_).mergeFrom(value).buildPartial(); + } else { + version_ = value; + } + onChanged(); + } else { + versionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Version information from the producer of this SavedUserObject.
+     * 
+ * + * .tensorflow.VersionDef version = 2; + */ + public Builder clearVersion() { + if (versionBuilder_ == null) { + version_ = null; + onChanged(); + } else { + version_ = null; + versionBuilder_ = null; + } + + return this; + } + /** + *
+     * Version information from the producer of this SavedUserObject.
+     * 
+ * + * .tensorflow.VersionDef version = 2; + */ + public org.tensorflow.proto.framework.VersionDef.Builder getVersionBuilder() { + + onChanged(); + return getVersionFieldBuilder().getBuilder(); + } + /** + *
+     * Version information from the producer of this SavedUserObject.
+     * 
+ * + * .tensorflow.VersionDef version = 2; + */ + public org.tensorflow.proto.framework.VersionDefOrBuilder getVersionOrBuilder() { + if (versionBuilder_ != null) { + return versionBuilder_.getMessageOrBuilder(); + } else { + return version_ == null ? + org.tensorflow.proto.framework.VersionDef.getDefaultInstance() : version_; + } + } + /** + *
+     * Version information from the producer of this SavedUserObject.
+     * 
+ * + * .tensorflow.VersionDef version = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.VersionDef, org.tensorflow.proto.framework.VersionDef.Builder, org.tensorflow.proto.framework.VersionDefOrBuilder> + getVersionFieldBuilder() { + if (versionBuilder_ == null) { + versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.VersionDef, org.tensorflow.proto.framework.VersionDef.Builder, org.tensorflow.proto.framework.VersionDefOrBuilder>( + getVersion(), + getParentForChildren(), + isClean()); + version_ = null; + } + return versionBuilder_; + } + + private java.lang.Object metadata_ = ""; + /** + *
+     * Initialization-related metadata.
+     * 
+ * + * string metadata = 3; + */ + public java.lang.String getMetadata() { + java.lang.Object ref = metadata_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadata_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Initialization-related metadata.
+     * 
+ * + * string metadata = 3; + */ + public com.google.protobuf.ByteString + getMetadataBytes() { + java.lang.Object ref = metadata_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Initialization-related metadata.
+     * 
+ * + * string metadata = 3; + */ + public Builder setMetadata( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + metadata_ = value; + onChanged(); + return this; + } + /** + *
+     * Initialization-related metadata.
+     * 
+ * + * string metadata = 3; + */ + public Builder clearMetadata() { + + metadata_ = getDefaultInstance().getMetadata(); + onChanged(); + return this; + } + /** + *
+     * Initialization-related metadata.
+     * 
+ * + * string metadata = 3; + */ + public Builder setMetadataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + metadata_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.SavedUserObject) + } + + // @@protoc_insertion_point(class_scope:tensorflow.SavedUserObject) + private static final org.tensorflow.proto.framework.SavedUserObject DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.SavedUserObject(); + } + + public static org.tensorflow.proto.framework.SavedUserObject getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SavedUserObject parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SavedUserObject(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedUserObject getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedUserObjectOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedUserObjectOrBuilder.java new file mode 100644 index 00000000000..bd7cbadcbd3 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedUserObjectOrBuilder.java @@ -0,0 +1,70 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +public interface SavedUserObjectOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.SavedUserObject) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Corresponds to a registration of the type to use in the loading program.
+   * 
+ * + * string identifier = 1; + */ + java.lang.String getIdentifier(); + /** + *
+   * Corresponds to a registration of the type to use in the loading program.
+   * 
+ * + * string identifier = 1; + */ + com.google.protobuf.ByteString + getIdentifierBytes(); + + /** + *
+   * Version information from the producer of this SavedUserObject.
+   * 
+ * + * .tensorflow.VersionDef version = 2; + */ + boolean hasVersion(); + /** + *
+   * Version information from the producer of this SavedUserObject.
+   * 
+ * + * .tensorflow.VersionDef version = 2; + */ + org.tensorflow.proto.framework.VersionDef getVersion(); + /** + *
+   * Version information from the producer of this SavedUserObject.
+   * 
+ * + * .tensorflow.VersionDef version = 2; + */ + org.tensorflow.proto.framework.VersionDefOrBuilder getVersionOrBuilder(); + + /** + *
+   * Initialization-related metadata.
+   * 
+ * + * string metadata = 3; + */ + java.lang.String getMetadata(); + /** + *
+   * Initialization-related metadata.
+   * 
+ * + * string metadata = 3; + */ + com.google.protobuf.ByteString + getMetadataBytes(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedVariable.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedVariable.java new file mode 100644 index 00000000000..17ce45af6d7 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedVariable.java @@ -0,0 +1,1050 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Represents a Variable that is initialized by loading the contents from the
+ * checkpoint.
+ * 
+ * + * Protobuf type {@code tensorflow.SavedVariable} + */ +public final class SavedVariable extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.SavedVariable) + SavedVariableOrBuilder { +private static final long serialVersionUID = 0L; + // Use SavedVariable.newBuilder() to construct. + private SavedVariable(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SavedVariable() { + dtype_ = 0; + synchronization_ = 0; + aggregation_ = 0; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SavedVariable(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SavedVariable( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + dtype_ = rawValue; + break; + } + case 18: { + org.tensorflow.proto.framework.TensorShapeProto.Builder subBuilder = null; + if (shape_ != null) { + subBuilder = shape_.toBuilder(); + } + shape_ = input.readMessage(org.tensorflow.proto.framework.TensorShapeProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(shape_); + shape_ = subBuilder.buildPartial(); + } + + break; + } + case 24: { + + trainable_ = input.readBool(); + break; + } + case 32: { + int rawValue = input.readEnum(); + + synchronization_ = rawValue; + break; + } + case 40: { + int rawValue = input.readEnum(); + + aggregation_ = rawValue; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedVariable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedVariable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedVariable.class, org.tensorflow.proto.framework.SavedVariable.Builder.class); + } + + public static final int DTYPE_FIELD_NUMBER = 1; + private int dtype_; + /** + * .tensorflow.DataType dtype = 1; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + + public static final int SHAPE_FIELD_NUMBER = 2; + private org.tensorflow.proto.framework.TensorShapeProto shape_; + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public boolean hasShape() { + return shape_ != null; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProto getShape() { + return shape_ == null ? org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { + return getShape(); + } + + public static final int TRAINABLE_FIELD_NUMBER = 3; + private boolean trainable_; + /** + * bool trainable = 3; + */ + public boolean getTrainable() { + return trainable_; + } + + public static final int SYNCHRONIZATION_FIELD_NUMBER = 4; + private int synchronization_; + /** + * .tensorflow.VariableSynchronization synchronization = 4; + */ + public int getSynchronizationValue() { + return synchronization_; + } + /** + * .tensorflow.VariableSynchronization synchronization = 4; + */ + public org.tensorflow.proto.framework.VariableSynchronization getSynchronization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.VariableSynchronization result = org.tensorflow.proto.framework.VariableSynchronization.valueOf(synchronization_); + return result == null ? org.tensorflow.proto.framework.VariableSynchronization.UNRECOGNIZED : result; + } + + public static final int AGGREGATION_FIELD_NUMBER = 5; + private int aggregation_; + /** + * .tensorflow.VariableAggregation aggregation = 5; + */ + public int getAggregationValue() { + return aggregation_; + } + /** + * .tensorflow.VariableAggregation aggregation = 5; + */ + public org.tensorflow.proto.framework.VariableAggregation getAggregation() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.VariableAggregation result = org.tensorflow.proto.framework.VariableAggregation.valueOf(aggregation_); + return result == null ? org.tensorflow.proto.framework.VariableAggregation.UNRECOGNIZED : result; + } + + public static final int NAME_FIELD_NUMBER = 6; + private volatile java.lang.Object name_; + /** + * string name = 6; + */ + 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; + } + } + /** + * string name = 6; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + output.writeEnum(1, dtype_); + } + if (shape_ != null) { + output.writeMessage(2, getShape()); + } + if (trainable_ != false) { + output.writeBool(3, trainable_); + } + if (synchronization_ != org.tensorflow.proto.framework.VariableSynchronization.VARIABLE_SYNCHRONIZATION_AUTO.getNumber()) { + output.writeEnum(4, synchronization_); + } + if (aggregation_ != org.tensorflow.proto.framework.VariableAggregation.VARIABLE_AGGREGATION_NONE.getNumber()) { + output.writeEnum(5, aggregation_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dtype_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, dtype_); + } + if (shape_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getShape()); + } + if (trainable_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, trainable_); + } + if (synchronization_ != org.tensorflow.proto.framework.VariableSynchronization.VARIABLE_SYNCHRONIZATION_AUTO.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, synchronization_); + } + if (aggregation_ != org.tensorflow.proto.framework.VariableAggregation.VARIABLE_AGGREGATION_NONE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, aggregation_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.SavedVariable)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.SavedVariable other = (org.tensorflow.proto.framework.SavedVariable) obj; + + if (dtype_ != other.dtype_) return false; + if (hasShape() != other.hasShape()) return false; + if (hasShape()) { + if (!getShape() + .equals(other.getShape())) return false; + } + if (getTrainable() + != other.getTrainable()) return false; + if (synchronization_ != other.synchronization_) return false; + if (aggregation_ != other.aggregation_) return false; + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DTYPE_FIELD_NUMBER; + hash = (53 * hash) + dtype_; + if (hasShape()) { + hash = (37 * hash) + SHAPE_FIELD_NUMBER; + hash = (53 * hash) + getShape().hashCode(); + } + hash = (37 * hash) + TRAINABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getTrainable()); + hash = (37 * hash) + SYNCHRONIZATION_FIELD_NUMBER; + hash = (53 * hash) + synchronization_; + hash = (37 * hash) + AGGREGATION_FIELD_NUMBER; + hash = (53 * hash) + aggregation_; + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.SavedVariable parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedVariable parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedVariable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedVariable 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.proto.framework.SavedVariable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SavedVariable parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedVariable parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedVariable parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedVariable parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedVariable parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SavedVariable parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SavedVariable parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.SavedVariable prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a Variable that is initialized by loading the contents from the
+   * checkpoint.
+   * 
+ * + * Protobuf type {@code tensorflow.SavedVariable} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.SavedVariable) + org.tensorflow.proto.framework.SavedVariableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedVariable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedVariable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SavedVariable.class, org.tensorflow.proto.framework.SavedVariable.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.SavedVariable.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + dtype_ = 0; + + if (shapeBuilder_ == null) { + shape_ = null; + } else { + shape_ = null; + shapeBuilder_ = null; + } + trainable_ = false; + + synchronization_ = 0; + + aggregation_ = 0; + + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.SavedObjectGraphProtos.internal_static_tensorflow_SavedVariable_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedVariable getDefaultInstanceForType() { + return org.tensorflow.proto.framework.SavedVariable.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedVariable build() { + org.tensorflow.proto.framework.SavedVariable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedVariable buildPartial() { + org.tensorflow.proto.framework.SavedVariable result = new org.tensorflow.proto.framework.SavedVariable(this); + result.dtype_ = dtype_; + if (shapeBuilder_ == null) { + result.shape_ = shape_; + } else { + result.shape_ = shapeBuilder_.build(); + } + result.trainable_ = trainable_; + result.synchronization_ = synchronization_; + result.aggregation_ = aggregation_; + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.SavedVariable) { + return mergeFrom((org.tensorflow.proto.framework.SavedVariable)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.SavedVariable other) { + if (other == org.tensorflow.proto.framework.SavedVariable.getDefaultInstance()) return this; + if (other.dtype_ != 0) { + setDtypeValue(other.getDtypeValue()); + } + if (other.hasShape()) { + mergeShape(other.getShape()); + } + if (other.getTrainable() != false) { + setTrainable(other.getTrainable()); + } + if (other.synchronization_ != 0) { + setSynchronizationValue(other.getSynchronizationValue()); + } + if (other.aggregation_ != 0) { + setAggregationValue(other.getAggregationValue()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.SavedVariable parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.SavedVariable) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int dtype_ = 0; + /** + * .tensorflow.DataType dtype = 1; + */ + public int getDtypeValue() { + return dtype_; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder setDtypeValue(int value) { + dtype_ = value; + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public org.tensorflow.proto.framework.DataType getDtype() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(dtype_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder setDtype(org.tensorflow.proto.framework.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + + dtype_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .tensorflow.DataType dtype = 1; + */ + public Builder clearDtype() { + + dtype_ = 0; + onChanged(); + return this; + } + + private org.tensorflow.proto.framework.TensorShapeProto shape_; + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> shapeBuilder_; + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public boolean hasShape() { + return shapeBuilder_ != null || shape_ != null; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProto getShape() { + if (shapeBuilder_ == null) { + return shape_ == null ? org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } else { + return shapeBuilder_.getMessage(); + } + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder setShape(org.tensorflow.proto.framework.TensorShapeProto value) { + if (shapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shape_ = value; + onChanged(); + } else { + shapeBuilder_.setMessage(value); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder setShape( + org.tensorflow.proto.framework.TensorShapeProto.Builder builderForValue) { + if (shapeBuilder_ == null) { + shape_ = builderForValue.build(); + onChanged(); + } else { + shapeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder mergeShape(org.tensorflow.proto.framework.TensorShapeProto value) { + if (shapeBuilder_ == null) { + if (shape_ != null) { + shape_ = + org.tensorflow.proto.framework.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial(); + } else { + shape_ = value; + } + onChanged(); + } else { + shapeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public Builder clearShape() { + if (shapeBuilder_ == null) { + shape_ = null; + onChanged(); + } else { + shape_ = null; + shapeBuilder_ = null; + } + + return this; + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProto.Builder getShapeBuilder() { + + onChanged(); + return getShapeFieldBuilder().getBuilder(); + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { + if (shapeBuilder_ != null) { + return shapeBuilder_.getMessageOrBuilder(); + } else { + return shape_ == null ? + org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_; + } + } + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> + getShapeFieldBuilder() { + if (shapeBuilder_ == null) { + shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder>( + getShape(), + getParentForChildren(), + isClean()); + shape_ = null; + } + return shapeBuilder_; + } + + private boolean trainable_ ; + /** + * bool trainable = 3; + */ + public boolean getTrainable() { + return trainable_; + } + /** + * bool trainable = 3; + */ + public Builder setTrainable(boolean value) { + + trainable_ = value; + onChanged(); + return this; + } + /** + * bool trainable = 3; + */ + public Builder clearTrainable() { + + trainable_ = false; + onChanged(); + return this; + } + + private int synchronization_ = 0; + /** + * .tensorflow.VariableSynchronization synchronization = 4; + */ + public int getSynchronizationValue() { + return synchronization_; + } + /** + * .tensorflow.VariableSynchronization synchronization = 4; + */ + public Builder setSynchronizationValue(int value) { + synchronization_ = value; + onChanged(); + return this; + } + /** + * .tensorflow.VariableSynchronization synchronization = 4; + */ + public org.tensorflow.proto.framework.VariableSynchronization getSynchronization() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.VariableSynchronization result = org.tensorflow.proto.framework.VariableSynchronization.valueOf(synchronization_); + return result == null ? org.tensorflow.proto.framework.VariableSynchronization.UNRECOGNIZED : result; + } + /** + * .tensorflow.VariableSynchronization synchronization = 4; + */ + public Builder setSynchronization(org.tensorflow.proto.framework.VariableSynchronization value) { + if (value == null) { + throw new NullPointerException(); + } + + synchronization_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .tensorflow.VariableSynchronization synchronization = 4; + */ + public Builder clearSynchronization() { + + synchronization_ = 0; + onChanged(); + return this; + } + + private int aggregation_ = 0; + /** + * .tensorflow.VariableAggregation aggregation = 5; + */ + public int getAggregationValue() { + return aggregation_; + } + /** + * .tensorflow.VariableAggregation aggregation = 5; + */ + public Builder setAggregationValue(int value) { + aggregation_ = value; + onChanged(); + return this; + } + /** + * .tensorflow.VariableAggregation aggregation = 5; + */ + public org.tensorflow.proto.framework.VariableAggregation getAggregation() { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.VariableAggregation result = org.tensorflow.proto.framework.VariableAggregation.valueOf(aggregation_); + return result == null ? org.tensorflow.proto.framework.VariableAggregation.UNRECOGNIZED : result; + } + /** + * .tensorflow.VariableAggregation aggregation = 5; + */ + public Builder setAggregation(org.tensorflow.proto.framework.VariableAggregation value) { + if (value == null) { + throw new NullPointerException(); + } + + aggregation_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .tensorflow.VariableAggregation aggregation = 5; + */ + public Builder clearAggregation() { + + aggregation_ = 0; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * string name = 6; + */ + 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; + } + } + /** + * string name = 6; + */ + 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; + } + } + /** + * string name = 6; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 6; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * string name = 6; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.SavedVariable) + } + + // @@protoc_insertion_point(class_scope:tensorflow.SavedVariable) + private static final org.tensorflow.proto.framework.SavedVariable DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.SavedVariable(); + } + + public static org.tensorflow.proto.framework.SavedVariable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SavedVariable parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SavedVariable(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SavedVariable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedVariableOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedVariableOrBuilder.java new file mode 100644 index 00000000000..27da7b6abfa --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SavedVariableOrBuilder.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/saved_object_graph.proto + +package org.tensorflow.proto.framework; + +public interface SavedVariableOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.SavedVariable) + com.google.protobuf.MessageOrBuilder { + + /** + * .tensorflow.DataType dtype = 1; + */ + int getDtypeValue(); + /** + * .tensorflow.DataType dtype = 1; + */ + org.tensorflow.proto.framework.DataType getDtype(); + + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + boolean hasShape(); + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + org.tensorflow.proto.framework.TensorShapeProto getShape(); + /** + * .tensorflow.TensorShapeProto shape = 2; + */ + org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder(); + + /** + * bool trainable = 3; + */ + boolean getTrainable(); + + /** + * .tensorflow.VariableSynchronization synchronization = 4; + */ + int getSynchronizationValue(); + /** + * .tensorflow.VariableSynchronization synchronization = 4; + */ + org.tensorflow.proto.framework.VariableSynchronization getSynchronization(); + + /** + * .tensorflow.VariableAggregation aggregation = 5; + */ + int getAggregationValue(); + /** + * .tensorflow.VariableAggregation aggregation = 5; + */ + org.tensorflow.proto.framework.VariableAggregation getAggregation(); + + /** + * string name = 6; + */ + java.lang.String getName(); + /** + * string name = 6; + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ScopedAllocatorOptions.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ScopedAllocatorOptions.java new file mode 100644 index 00000000000..37bf6f9c4d1 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ScopedAllocatorOptions.java @@ -0,0 +1,644 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/rewriter_config.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.ScopedAllocatorOptions} + */ +public final class ScopedAllocatorOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.ScopedAllocatorOptions) + ScopedAllocatorOptionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use ScopedAllocatorOptions.newBuilder() to construct. + private ScopedAllocatorOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ScopedAllocatorOptions() { + enableOp_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ScopedAllocatorOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ScopedAllocatorOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + enableOp_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + enableOp_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + enableOp_ = enableOp_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_ScopedAllocatorOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_ScopedAllocatorOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ScopedAllocatorOptions.class, org.tensorflow.proto.framework.ScopedAllocatorOptions.Builder.class); + } + + public static final int ENABLE_OP_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList enableOp_; + /** + *
+   * If present, only perform optimization for these ops.
+   * 
+ * + * repeated string enable_op = 1; + */ + public com.google.protobuf.ProtocolStringList + getEnableOpList() { + return enableOp_; + } + /** + *
+   * If present, only perform optimization for these ops.
+   * 
+ * + * repeated string enable_op = 1; + */ + public int getEnableOpCount() { + return enableOp_.size(); + } + /** + *
+   * If present, only perform optimization for these ops.
+   * 
+ * + * repeated string enable_op = 1; + */ + public java.lang.String getEnableOp(int index) { + return enableOp_.get(index); + } + /** + *
+   * If present, only perform optimization for these ops.
+   * 
+ * + * repeated string enable_op = 1; + */ + public com.google.protobuf.ByteString + getEnableOpBytes(int index) { + return enableOp_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < enableOp_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, enableOp_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < enableOp_.size(); i++) { + dataSize += computeStringSizeNoTag(enableOp_.getRaw(i)); + } + size += dataSize; + size += 1 * getEnableOpList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.ScopedAllocatorOptions)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.ScopedAllocatorOptions other = (org.tensorflow.proto.framework.ScopedAllocatorOptions) obj; + + if (!getEnableOpList() + .equals(other.getEnableOpList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEnableOpCount() > 0) { + hash = (37 * hash) + ENABLE_OP_FIELD_NUMBER; + hash = (53 * hash) + getEnableOpList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.ScopedAllocatorOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ScopedAllocatorOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ScopedAllocatorOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ScopedAllocatorOptions 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.proto.framework.ScopedAllocatorOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.ScopedAllocatorOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.ScopedAllocatorOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ScopedAllocatorOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ScopedAllocatorOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ScopedAllocatorOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.ScopedAllocatorOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.ScopedAllocatorOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.ScopedAllocatorOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.ScopedAllocatorOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ScopedAllocatorOptions) + org.tensorflow.proto.framework.ScopedAllocatorOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_ScopedAllocatorOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_ScopedAllocatorOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.ScopedAllocatorOptions.class, org.tensorflow.proto.framework.ScopedAllocatorOptions.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.ScopedAllocatorOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + enableOp_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.RewriterConfigProtos.internal_static_tensorflow_ScopedAllocatorOptions_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ScopedAllocatorOptions getDefaultInstanceForType() { + return org.tensorflow.proto.framework.ScopedAllocatorOptions.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.ScopedAllocatorOptions build() { + org.tensorflow.proto.framework.ScopedAllocatorOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ScopedAllocatorOptions buildPartial() { + org.tensorflow.proto.framework.ScopedAllocatorOptions result = new org.tensorflow.proto.framework.ScopedAllocatorOptions(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + enableOp_ = enableOp_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.enableOp_ = enableOp_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.ScopedAllocatorOptions) { + return mergeFrom((org.tensorflow.proto.framework.ScopedAllocatorOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.ScopedAllocatorOptions other) { + if (other == org.tensorflow.proto.framework.ScopedAllocatorOptions.getDefaultInstance()) return this; + if (!other.enableOp_.isEmpty()) { + if (enableOp_.isEmpty()) { + enableOp_ = other.enableOp_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEnableOpIsMutable(); + enableOp_.addAll(other.enableOp_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.ScopedAllocatorOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.ScopedAllocatorOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList enableOp_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureEnableOpIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + enableOp_ = new com.google.protobuf.LazyStringArrayList(enableOp_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * If present, only perform optimization for these ops.
+     * 
+ * + * repeated string enable_op = 1; + */ + public com.google.protobuf.ProtocolStringList + getEnableOpList() { + return enableOp_.getUnmodifiableView(); + } + /** + *
+     * If present, only perform optimization for these ops.
+     * 
+ * + * repeated string enable_op = 1; + */ + public int getEnableOpCount() { + return enableOp_.size(); + } + /** + *
+     * If present, only perform optimization for these ops.
+     * 
+ * + * repeated string enable_op = 1; + */ + public java.lang.String getEnableOp(int index) { + return enableOp_.get(index); + } + /** + *
+     * If present, only perform optimization for these ops.
+     * 
+ * + * repeated string enable_op = 1; + */ + public com.google.protobuf.ByteString + getEnableOpBytes(int index) { + return enableOp_.getByteString(index); + } + /** + *
+     * If present, only perform optimization for these ops.
+     * 
+ * + * repeated string enable_op = 1; + */ + public Builder setEnableOp( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnableOpIsMutable(); + enableOp_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * If present, only perform optimization for these ops.
+     * 
+ * + * repeated string enable_op = 1; + */ + public Builder addEnableOp( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnableOpIsMutable(); + enableOp_.add(value); + onChanged(); + return this; + } + /** + *
+     * If present, only perform optimization for these ops.
+     * 
+ * + * repeated string enable_op = 1; + */ + public Builder addAllEnableOp( + java.lang.Iterable values) { + ensureEnableOpIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, enableOp_); + onChanged(); + return this; + } + /** + *
+     * If present, only perform optimization for these ops.
+     * 
+ * + * repeated string enable_op = 1; + */ + public Builder clearEnableOp() { + enableOp_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * If present, only perform optimization for these ops.
+     * 
+ * + * repeated string enable_op = 1; + */ + public Builder addEnableOpBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEnableOpIsMutable(); + enableOp_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.ScopedAllocatorOptions) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ScopedAllocatorOptions) + private static final org.tensorflow.proto.framework.ScopedAllocatorOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.ScopedAllocatorOptions(); + } + + public static org.tensorflow.proto.framework.ScopedAllocatorOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ScopedAllocatorOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ScopedAllocatorOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.ScopedAllocatorOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ScopedAllocatorOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ScopedAllocatorOptionsOrBuilder.java new file mode 100644 index 00000000000..df536ed18a9 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/ScopedAllocatorOptionsOrBuilder.java @@ -0,0 +1,44 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/rewriter_config.proto + +package org.tensorflow.proto.framework; + +public interface ScopedAllocatorOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ScopedAllocatorOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If present, only perform optimization for these ops.
+   * 
+ * + * repeated string enable_op = 1; + */ + java.util.List + getEnableOpList(); + /** + *
+   * If present, only perform optimization for these ops.
+   * 
+ * + * repeated string enable_op = 1; + */ + int getEnableOpCount(); + /** + *
+   * If present, only perform optimization for these ops.
+   * 
+ * + * repeated string enable_op = 1; + */ + java.lang.String getEnableOp(int index); + /** + *
+   * If present, only perform optimization for these ops.
+   * 
+ * + * repeated string enable_op = 1; + */ + com.google.protobuf.ByteString + getEnableOpBytes(int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SessionMetadata.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SessionMetadata.java new file mode 100644 index 00000000000..a825437b468 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SessionMetadata.java @@ -0,0 +1,636 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * Metadata about the session.
+ * This can be used by the runtime and the Ops for debugging, monitoring, etc.
+ * The (name, version) tuple is expected to be a unique identifier for
+ * sessions within the same process.
+ * NOTE: This is currently used and propagated only by the direct session.
+ * 
+ * + * Protobuf type {@code tensorflow.SessionMetadata} + */ +public final class SessionMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.SessionMetadata) + SessionMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use SessionMetadata.newBuilder() to construct. + private SessionMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SessionMetadata() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SessionMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SessionMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + version_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_SessionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_SessionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SessionMetadata.class, org.tensorflow.proto.framework.SessionMetadata.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * 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; + } + } + /** + * 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 VERSION_FIELD_NUMBER = 2; + private long version_; + /** + *
+   * The version is optional. If set, needs to be >= 0.
+   * 
+ * + * int64 version = 2; + */ + public long getVersion() { + return version_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (version_ != 0L) { + output.writeInt64(2, version_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (version_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, version_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.SessionMetadata)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.SessionMetadata other = (org.tensorflow.proto.framework.SessionMetadata) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getVersion() + != other.getVersion()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getVersion()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.SessionMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SessionMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SessionMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SessionMetadata 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.proto.framework.SessionMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SessionMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SessionMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SessionMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SessionMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SessionMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SessionMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SessionMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.SessionMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Metadata about the session.
+   * This can be used by the runtime and the Ops for debugging, monitoring, etc.
+   * The (name, version) tuple is expected to be a unique identifier for
+   * sessions within the same process.
+   * NOTE: This is currently used and propagated only by the direct session.
+   * 
+ * + * Protobuf type {@code tensorflow.SessionMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.SessionMetadata) + org.tensorflow.proto.framework.SessionMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_SessionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_SessionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SessionMetadata.class, org.tensorflow.proto.framework.SessionMetadata.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.SessionMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + version_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.ConfigProtos.internal_static_tensorflow_SessionMetadata_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SessionMetadata getDefaultInstanceForType() { + return org.tensorflow.proto.framework.SessionMetadata.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.SessionMetadata build() { + org.tensorflow.proto.framework.SessionMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SessionMetadata buildPartial() { + org.tensorflow.proto.framework.SessionMetadata result = new org.tensorflow.proto.framework.SessionMetadata(this); + result.name_ = name_; + result.version_ = version_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.SessionMetadata) { + return mergeFrom((org.tensorflow.proto.framework.SessionMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.SessionMetadata other) { + if (other == org.tensorflow.proto.framework.SessionMetadata.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getVersion() != 0L) { + setVersion(other.getVersion()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.SessionMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.SessionMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * 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; + } + } + /** + * 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; + } + } + /** + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * 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 long version_ ; + /** + *
+     * The version is optional. If set, needs to be >= 0.
+     * 
+ * + * int64 version = 2; + */ + public long getVersion() { + return version_; + } + /** + *
+     * The version is optional. If set, needs to be >= 0.
+     * 
+ * + * int64 version = 2; + */ + public Builder setVersion(long value) { + + version_ = value; + onChanged(); + return this; + } + /** + *
+     * The version is optional. If set, needs to be >= 0.
+     * 
+ * + * int64 version = 2; + */ + public Builder clearVersion() { + + version_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.SessionMetadata) + } + + // @@protoc_insertion_point(class_scope:tensorflow.SessionMetadata) + private static final org.tensorflow.proto.framework.SessionMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.SessionMetadata(); + } + + public static org.tensorflow.proto.framework.SessionMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SessionMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SessionMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SessionMetadataOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SessionMetadataOrBuilder.java new file mode 100644 index 00000000000..eae7295e772 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SessionMetadataOrBuilder.java @@ -0,0 +1,28 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/config.proto + +package org.tensorflow.proto.framework; + +public interface SessionMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.SessionMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + */ + java.lang.String getName(); + /** + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The version is optional. If set, needs to be >= 0.
+   * 
+ * + * int64 version = 2; + */ + long getVersion(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SignatureDef.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SignatureDef.java new file mode 100644 index 00000000000..fe588917c86 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SignatureDef.java @@ -0,0 +1,1339 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/meta_graph.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * SignatureDef defines the signature of a computation supported by a TensorFlow
+ * graph.
+ * For example, a model with two loss computations, sharing a single input,
+ * might have the following signature_def map.
+ * Note that across the two SignatureDefs "loss_A" and "loss_B", the input key,
+ * output key, and method_name are identical, and will be used by system(s) that
+ * implement or rely upon this particular loss method. The output tensor names
+ * differ, demonstrating how different outputs can exist for the same method.
+ * signature_def {
+ *   key: "loss_A"
+ *   value {
+ *     inputs {
+ *       key: "input"
+ *       value {
+ *         name: "input:0"
+ *         dtype: DT_STRING
+ *         tensor_shape: ...
+ *       }
+ *     }
+ *     outputs {
+ *       key: "loss_output"
+ *       value {
+ *         name: "loss_output_A:0"
+ *         dtype: DT_FLOAT
+ *         tensor_shape: ...
+ *       }
+ *     }
+ *   }
+ *   ...
+ *   method_name: "some/package/compute_loss"
+ * }
+ * signature_def {
+ *   key: "loss_B"
+ *   value {
+ *     inputs {
+ *       key: "input"
+ *       value {
+ *         name: "input:0"
+ *         dtype: DT_STRING
+ *         tensor_shape: ...
+ *       }
+ *     }
+ *     outputs {
+ *       key: "loss_output"
+ *       value {
+ *         name: "loss_output_B:0"
+ *         dtype: DT_FLOAT
+ *         tensor_shape: ...
+ *       }
+ *     }
+ *   }
+ *   ...
+ *   method_name: "some/package/compute_loss"
+ * }
+ * 
+ * + * Protobuf type {@code tensorflow.SignatureDef} + */ +public final class SignatureDef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.SignatureDef) + SignatureDefOrBuilder { +private static final long serialVersionUID = 0L; + // Use SignatureDef.newBuilder() to construct. + private SignatureDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SignatureDef() { + methodName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SignatureDef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SignatureDef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + inputs_ = com.google.protobuf.MapField.newMapField( + InputsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + inputs__ = input.readMessage( + InputsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + inputs_.getMutableMap().put( + inputs__.getKey(), inputs__.getValue()); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + outputs_ = com.google.protobuf.MapField.newMapField( + OutputsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + outputs__ = input.readMessage( + OutputsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + outputs_.getMutableMap().put( + outputs__.getKey(), outputs__.getValue()); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + methodName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetInputs(); + case 2: + return internalGetOutputs(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SignatureDef.class, org.tensorflow.proto.framework.SignatureDef.Builder.class); + } + + public static final int INPUTS_FIELD_NUMBER = 1; + private static final class InputsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, org.tensorflow.proto.framework.TensorInfo> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_InputsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.framework.TensorInfo.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.TensorInfo> inputs_; + private com.google.protobuf.MapField + internalGetInputs() { + if (inputs_ == null) { + return com.google.protobuf.MapField.emptyMapField( + InputsDefaultEntryHolder.defaultEntry); + } + return inputs_; + } + + public int getInputsCount() { + return internalGetInputs().getMap().size(); + } + /** + *
+   * Named input parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + + public boolean containsInputs( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetInputs().getMap().containsKey(key); + } + /** + * Use {@link #getInputsMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getInputs() { + return getInputsMap(); + } + /** + *
+   * Named input parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + + public java.util.Map getInputsMap() { + return internalGetInputs().getMap(); + } + /** + *
+   * Named input parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + + public org.tensorflow.proto.framework.TensorInfo getInputsOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.TensorInfo defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetInputs().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Named input parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + + public org.tensorflow.proto.framework.TensorInfo getInputsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetInputs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int OUTPUTS_FIELD_NUMBER = 2; + private static final class OutputsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, org.tensorflow.proto.framework.TensorInfo> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_OutputsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + org.tensorflow.proto.framework.TensorInfo.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.TensorInfo> outputs_; + private com.google.protobuf.MapField + internalGetOutputs() { + if (outputs_ == null) { + return com.google.protobuf.MapField.emptyMapField( + OutputsDefaultEntryHolder.defaultEntry); + } + return outputs_; + } + + public int getOutputsCount() { + return internalGetOutputs().getMap().size(); + } + /** + *
+   * Named output parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + + public boolean containsOutputs( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetOutputs().getMap().containsKey(key); + } + /** + * Use {@link #getOutputsMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getOutputs() { + return getOutputsMap(); + } + /** + *
+   * Named output parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + + public java.util.Map getOutputsMap() { + return internalGetOutputs().getMap(); + } + /** + *
+   * Named output parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + + public org.tensorflow.proto.framework.TensorInfo getOutputsOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.TensorInfo defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetOutputs().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Named output parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + + public org.tensorflow.proto.framework.TensorInfo getOutputsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetOutputs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int METHOD_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object methodName_; + /** + *
+   * Extensible method_name information enabling third-party users to mark a
+   * SignatureDef as supporting a particular method. This enables producers and
+   * consumers of SignatureDefs, e.g. a model definition library and a serving
+   * library to have a clear hand-off regarding the semantics of a computation.
+   * Note that multiple SignatureDefs in a single MetaGraphDef may have the same
+   * method_name. This is commonly used to support multi-headed computation,
+   * where a single graph computation may return multiple results.
+   * 
+ * + * string method_name = 3; + */ + public java.lang.String getMethodName() { + java.lang.Object ref = methodName_; + 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(); + methodName_ = s; + return s; + } + } + /** + *
+   * Extensible method_name information enabling third-party users to mark a
+   * SignatureDef as supporting a particular method. This enables producers and
+   * consumers of SignatureDefs, e.g. a model definition library and a serving
+   * library to have a clear hand-off regarding the semantics of a computation.
+   * Note that multiple SignatureDefs in a single MetaGraphDef may have the same
+   * method_name. This is commonly used to support multi-headed computation,
+   * where a single graph computation may return multiple results.
+   * 
+ * + * string method_name = 3; + */ + public com.google.protobuf.ByteString + getMethodNameBytes() { + java.lang.Object ref = methodName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + methodName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetInputs(), + InputsDefaultEntryHolder.defaultEntry, + 1); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetOutputs(), + OutputsDefaultEntryHolder.defaultEntry, + 2); + if (!getMethodNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, methodName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetInputs().getMap().entrySet()) { + com.google.protobuf.MapEntry + inputs__ = InputsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, inputs__); + } + for (java.util.Map.Entry entry + : internalGetOutputs().getMap().entrySet()) { + com.google.protobuf.MapEntry + outputs__ = OutputsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, outputs__); + } + if (!getMethodNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, methodName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.SignatureDef)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.SignatureDef other = (org.tensorflow.proto.framework.SignatureDef) obj; + + if (!internalGetInputs().equals( + other.internalGetInputs())) return false; + if (!internalGetOutputs().equals( + other.internalGetOutputs())) return false; + if (!getMethodName() + .equals(other.getMethodName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetInputs().getMap().isEmpty()) { + hash = (37 * hash) + INPUTS_FIELD_NUMBER; + hash = (53 * hash) + internalGetInputs().hashCode(); + } + if (!internalGetOutputs().getMap().isEmpty()) { + hash = (37 * hash) + OUTPUTS_FIELD_NUMBER; + hash = (53 * hash) + internalGetOutputs().hashCode(); + } + hash = (37 * hash) + METHOD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMethodName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.SignatureDef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SignatureDef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SignatureDef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SignatureDef 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.proto.framework.SignatureDef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.SignatureDef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.SignatureDef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SignatureDef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SignatureDef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SignatureDef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.SignatureDef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.SignatureDef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.SignatureDef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * SignatureDef defines the signature of a computation supported by a TensorFlow
+   * graph.
+   * For example, a model with two loss computations, sharing a single input,
+   * might have the following signature_def map.
+   * Note that across the two SignatureDefs "loss_A" and "loss_B", the input key,
+   * output key, and method_name are identical, and will be used by system(s) that
+   * implement or rely upon this particular loss method. The output tensor names
+   * differ, demonstrating how different outputs can exist for the same method.
+   * signature_def {
+   *   key: "loss_A"
+   *   value {
+   *     inputs {
+   *       key: "input"
+   *       value {
+   *         name: "input:0"
+   *         dtype: DT_STRING
+   *         tensor_shape: ...
+   *       }
+   *     }
+   *     outputs {
+   *       key: "loss_output"
+   *       value {
+   *         name: "loss_output_A:0"
+   *         dtype: DT_FLOAT
+   *         tensor_shape: ...
+   *       }
+   *     }
+   *   }
+   *   ...
+   *   method_name: "some/package/compute_loss"
+   * }
+   * signature_def {
+   *   key: "loss_B"
+   *   value {
+   *     inputs {
+   *       key: "input"
+   *       value {
+   *         name: "input:0"
+   *         dtype: DT_STRING
+   *         tensor_shape: ...
+   *       }
+   *     }
+   *     outputs {
+   *       key: "loss_output"
+   *       value {
+   *         name: "loss_output_B:0"
+   *         dtype: DT_FLOAT
+   *         tensor_shape: ...
+   *       }
+   *     }
+   *   }
+   *   ...
+   *   method_name: "some/package/compute_loss"
+   * }
+   * 
+ * + * Protobuf type {@code tensorflow.SignatureDef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.SignatureDef) + org.tensorflow.proto.framework.SignatureDefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetInputs(); + case 2: + return internalGetOutputs(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableInputs(); + case 2: + return internalGetMutableOutputs(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.SignatureDef.class, org.tensorflow.proto.framework.SignatureDef.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.SignatureDef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableInputs().clear(); + internalGetMutableOutputs().clear(); + methodName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SignatureDef getDefaultInstanceForType() { + return org.tensorflow.proto.framework.SignatureDef.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.SignatureDef build() { + org.tensorflow.proto.framework.SignatureDef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SignatureDef buildPartial() { + org.tensorflow.proto.framework.SignatureDef result = new org.tensorflow.proto.framework.SignatureDef(this); + int from_bitField0_ = bitField0_; + result.inputs_ = internalGetInputs(); + result.inputs_.makeImmutable(); + result.outputs_ = internalGetOutputs(); + result.outputs_.makeImmutable(); + result.methodName_ = methodName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.SignatureDef) { + return mergeFrom((org.tensorflow.proto.framework.SignatureDef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.SignatureDef other) { + if (other == org.tensorflow.proto.framework.SignatureDef.getDefaultInstance()) return this; + internalGetMutableInputs().mergeFrom( + other.internalGetInputs()); + internalGetMutableOutputs().mergeFrom( + other.internalGetOutputs()); + if (!other.getMethodName().isEmpty()) { + methodName_ = other.methodName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.SignatureDef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.SignatureDef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.TensorInfo> inputs_; + private com.google.protobuf.MapField + internalGetInputs() { + if (inputs_ == null) { + return com.google.protobuf.MapField.emptyMapField( + InputsDefaultEntryHolder.defaultEntry); + } + return inputs_; + } + private com.google.protobuf.MapField + internalGetMutableInputs() { + onChanged();; + if (inputs_ == null) { + inputs_ = com.google.protobuf.MapField.newMapField( + InputsDefaultEntryHolder.defaultEntry); + } + if (!inputs_.isMutable()) { + inputs_ = inputs_.copy(); + } + return inputs_; + } + + public int getInputsCount() { + return internalGetInputs().getMap().size(); + } + /** + *
+     * Named input parameters.
+     * 
+ * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + + public boolean containsInputs( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetInputs().getMap().containsKey(key); + } + /** + * Use {@link #getInputsMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getInputs() { + return getInputsMap(); + } + /** + *
+     * Named input parameters.
+     * 
+ * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + + public java.util.Map getInputsMap() { + return internalGetInputs().getMap(); + } + /** + *
+     * Named input parameters.
+     * 
+ * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + + public org.tensorflow.proto.framework.TensorInfo getInputsOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.TensorInfo defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetInputs().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Named input parameters.
+     * 
+ * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + + public org.tensorflow.proto.framework.TensorInfo getInputsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetInputs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearInputs() { + internalGetMutableInputs().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Named input parameters.
+     * 
+ * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + + public Builder removeInputs( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableInputs().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableInputs() { + return internalGetMutableInputs().getMutableMap(); + } + /** + *
+     * Named input parameters.
+     * 
+ * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + public Builder putInputs( + java.lang.String key, + org.tensorflow.proto.framework.TensorInfo value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableInputs().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Named input parameters.
+     * 
+ * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + + public Builder putAllInputs( + java.util.Map values) { + internalGetMutableInputs().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, org.tensorflow.proto.framework.TensorInfo> outputs_; + private com.google.protobuf.MapField + internalGetOutputs() { + if (outputs_ == null) { + return com.google.protobuf.MapField.emptyMapField( + OutputsDefaultEntryHolder.defaultEntry); + } + return outputs_; + } + private com.google.protobuf.MapField + internalGetMutableOutputs() { + onChanged();; + if (outputs_ == null) { + outputs_ = com.google.protobuf.MapField.newMapField( + OutputsDefaultEntryHolder.defaultEntry); + } + if (!outputs_.isMutable()) { + outputs_ = outputs_.copy(); + } + return outputs_; + } + + public int getOutputsCount() { + return internalGetOutputs().getMap().size(); + } + /** + *
+     * Named output parameters.
+     * 
+ * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + + public boolean containsOutputs( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetOutputs().getMap().containsKey(key); + } + /** + * Use {@link #getOutputsMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getOutputs() { + return getOutputsMap(); + } + /** + *
+     * Named output parameters.
+     * 
+ * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + + public java.util.Map getOutputsMap() { + return internalGetOutputs().getMap(); + } + /** + *
+     * Named output parameters.
+     * 
+ * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + + public org.tensorflow.proto.framework.TensorInfo getOutputsOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.TensorInfo defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetOutputs().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Named output parameters.
+     * 
+ * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + + public org.tensorflow.proto.framework.TensorInfo getOutputsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetOutputs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearOutputs() { + internalGetMutableOutputs().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Named output parameters.
+     * 
+ * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + + public Builder removeOutputs( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableOutputs().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableOutputs() { + return internalGetMutableOutputs().getMutableMap(); + } + /** + *
+     * Named output parameters.
+     * 
+ * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + public Builder putOutputs( + java.lang.String key, + org.tensorflow.proto.framework.TensorInfo value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableOutputs().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Named output parameters.
+     * 
+ * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + + public Builder putAllOutputs( + java.util.Map values) { + internalGetMutableOutputs().getMutableMap() + .putAll(values); + return this; + } + + private java.lang.Object methodName_ = ""; + /** + *
+     * Extensible method_name information enabling third-party users to mark a
+     * SignatureDef as supporting a particular method. This enables producers and
+     * consumers of SignatureDefs, e.g. a model definition library and a serving
+     * library to have a clear hand-off regarding the semantics of a computation.
+     * Note that multiple SignatureDefs in a single MetaGraphDef may have the same
+     * method_name. This is commonly used to support multi-headed computation,
+     * where a single graph computation may return multiple results.
+     * 
+ * + * string method_name = 3; + */ + public java.lang.String getMethodName() { + java.lang.Object ref = methodName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + methodName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Extensible method_name information enabling third-party users to mark a
+     * SignatureDef as supporting a particular method. This enables producers and
+     * consumers of SignatureDefs, e.g. a model definition library and a serving
+     * library to have a clear hand-off regarding the semantics of a computation.
+     * Note that multiple SignatureDefs in a single MetaGraphDef may have the same
+     * method_name. This is commonly used to support multi-headed computation,
+     * where a single graph computation may return multiple results.
+     * 
+ * + * string method_name = 3; + */ + public com.google.protobuf.ByteString + getMethodNameBytes() { + java.lang.Object ref = methodName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + methodName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Extensible method_name information enabling third-party users to mark a
+     * SignatureDef as supporting a particular method. This enables producers and
+     * consumers of SignatureDefs, e.g. a model definition library and a serving
+     * library to have a clear hand-off regarding the semantics of a computation.
+     * Note that multiple SignatureDefs in a single MetaGraphDef may have the same
+     * method_name. This is commonly used to support multi-headed computation,
+     * where a single graph computation may return multiple results.
+     * 
+ * + * string method_name = 3; + */ + public Builder setMethodName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + methodName_ = value; + onChanged(); + return this; + } + /** + *
+     * Extensible method_name information enabling third-party users to mark a
+     * SignatureDef as supporting a particular method. This enables producers and
+     * consumers of SignatureDefs, e.g. a model definition library and a serving
+     * library to have a clear hand-off regarding the semantics of a computation.
+     * Note that multiple SignatureDefs in a single MetaGraphDef may have the same
+     * method_name. This is commonly used to support multi-headed computation,
+     * where a single graph computation may return multiple results.
+     * 
+ * + * string method_name = 3; + */ + public Builder clearMethodName() { + + methodName_ = getDefaultInstance().getMethodName(); + onChanged(); + return this; + } + /** + *
+     * Extensible method_name information enabling third-party users to mark a
+     * SignatureDef as supporting a particular method. This enables producers and
+     * consumers of SignatureDefs, e.g. a model definition library and a serving
+     * library to have a clear hand-off regarding the semantics of a computation.
+     * Note that multiple SignatureDefs in a single MetaGraphDef may have the same
+     * method_name. This is commonly used to support multi-headed computation,
+     * where a single graph computation may return multiple results.
+     * 
+ * + * string method_name = 3; + */ + public Builder setMethodNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + methodName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.SignatureDef) + } + + // @@protoc_insertion_point(class_scope:tensorflow.SignatureDef) + private static final org.tensorflow.proto.framework.SignatureDef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.SignatureDef(); + } + + public static org.tensorflow.proto.framework.SignatureDef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SignatureDef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SignatureDef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.SignatureDef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SignatureDefOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SignatureDefOrBuilder.java new file mode 100644 index 00000000000..e9234adf5f7 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/SignatureDefOrBuilder.java @@ -0,0 +1,147 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/meta_graph.proto + +package org.tensorflow.proto.framework; + +public interface SignatureDefOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.SignatureDef) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Named input parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + int getInputsCount(); + /** + *
+   * Named input parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + boolean containsInputs( + java.lang.String key); + /** + * Use {@link #getInputsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getInputs(); + /** + *
+   * Named input parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + java.util.Map + getInputsMap(); + /** + *
+   * Named input parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + + org.tensorflow.proto.framework.TensorInfo getInputsOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.TensorInfo defaultValue); + /** + *
+   * Named input parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + + org.tensorflow.proto.framework.TensorInfo getInputsOrThrow( + java.lang.String key); + + /** + *
+   * Named output parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + int getOutputsCount(); + /** + *
+   * Named output parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + boolean containsOutputs( + java.lang.String key); + /** + * Use {@link #getOutputsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getOutputs(); + /** + *
+   * Named output parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + java.util.Map + getOutputsMap(); + /** + *
+   * Named output parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + + org.tensorflow.proto.framework.TensorInfo getOutputsOrDefault( + java.lang.String key, + org.tensorflow.proto.framework.TensorInfo defaultValue); + /** + *
+   * Named output parameters.
+   * 
+ * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + + org.tensorflow.proto.framework.TensorInfo getOutputsOrThrow( + java.lang.String key); + + /** + *
+   * Extensible method_name information enabling third-party users to mark a
+   * SignatureDef as supporting a particular method. This enables producers and
+   * consumers of SignatureDefs, e.g. a model definition library and a serving
+   * library to have a clear hand-off regarding the semantics of a computation.
+   * Note that multiple SignatureDefs in a single MetaGraphDef may have the same
+   * method_name. This is commonly used to support multi-headed computation,
+   * where a single graph computation may return multiple results.
+   * 
+ * + * string method_name = 3; + */ + java.lang.String getMethodName(); + /** + *
+   * Extensible method_name information enabling third-party users to mark a
+   * SignatureDef as supporting a particular method. This enables producers and
+   * consumers of SignatureDefs, e.g. a model definition library and a serving
+   * library to have a clear hand-off regarding the semantics of a computation.
+   * Note that multiple SignatureDefs in a single MetaGraphDef may have the same
+   * method_name. This is commonly used to support multi-headed computation,
+   * where a single graph computation may return multiple results.
+   * 
+ * + * string method_name = 3; + */ + com.google.protobuf.ByteString + getMethodNameBytes(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StepStats.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StepStats.java new file mode 100644 index 00000000000..01a979698bd --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StepStats.java @@ -0,0 +1,765 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/step_stats.proto + +package org.tensorflow.proto.framework; + +/** + * Protobuf type {@code tensorflow.StepStats} + */ +public final class StepStats extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.StepStats) + StepStatsOrBuilder { +private static final long serialVersionUID = 0L; + // Use StepStats.newBuilder() to construct. + private StepStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StepStats() { + devStats_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StepStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StepStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + devStats_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + devStats_.add( + input.readMessage(org.tensorflow.proto.framework.DeviceStepStats.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + devStats_ = java.util.Collections.unmodifiableList(devStats_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_StepStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_StepStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.StepStats.class, org.tensorflow.proto.framework.StepStats.Builder.class); + } + + public static final int DEV_STATS_FIELD_NUMBER = 1; + private java.util.List devStats_; + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public java.util.List getDevStatsList() { + return devStats_; + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public java.util.List + getDevStatsOrBuilderList() { + return devStats_; + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public int getDevStatsCount() { + return devStats_.size(); + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public org.tensorflow.proto.framework.DeviceStepStats getDevStats(int index) { + return devStats_.get(index); + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public org.tensorflow.proto.framework.DeviceStepStatsOrBuilder getDevStatsOrBuilder( + int index) { + return devStats_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < devStats_.size(); i++) { + output.writeMessage(1, devStats_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < devStats_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, devStats_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.StepStats)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.StepStats other = (org.tensorflow.proto.framework.StepStats) obj; + + if (!getDevStatsList() + .equals(other.getDevStatsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDevStatsCount() > 0) { + hash = (37 * hash) + DEV_STATS_FIELD_NUMBER; + hash = (53 * hash) + getDevStatsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.StepStats parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.StepStats parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.StepStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.StepStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.StepStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.StepStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.StepStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.StepStats parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.StepStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.StepStats parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.StepStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.StepStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.StepStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.StepStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.StepStats) + org.tensorflow.proto.framework.StepStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_StepStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_StepStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.StepStats.class, org.tensorflow.proto.framework.StepStats.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.StepStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDevStatsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (devStatsBuilder_ == null) { + devStats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + devStatsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.StepStatsProtos.internal_static_tensorflow_StepStats_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.StepStats getDefaultInstanceForType() { + return org.tensorflow.proto.framework.StepStats.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.StepStats build() { + org.tensorflow.proto.framework.StepStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.StepStats buildPartial() { + org.tensorflow.proto.framework.StepStats result = new org.tensorflow.proto.framework.StepStats(this); + int from_bitField0_ = bitField0_; + if (devStatsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + devStats_ = java.util.Collections.unmodifiableList(devStats_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.devStats_ = devStats_; + } else { + result.devStats_ = devStatsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.StepStats) { + return mergeFrom((org.tensorflow.proto.framework.StepStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.StepStats other) { + if (other == org.tensorflow.proto.framework.StepStats.getDefaultInstance()) return this; + if (devStatsBuilder_ == null) { + if (!other.devStats_.isEmpty()) { + if (devStats_.isEmpty()) { + devStats_ = other.devStats_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDevStatsIsMutable(); + devStats_.addAll(other.devStats_); + } + onChanged(); + } + } else { + if (!other.devStats_.isEmpty()) { + if (devStatsBuilder_.isEmpty()) { + devStatsBuilder_.dispose(); + devStatsBuilder_ = null; + devStats_ = other.devStats_; + bitField0_ = (bitField0_ & ~0x00000001); + devStatsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDevStatsFieldBuilder() : null; + } else { + devStatsBuilder_.addAllMessages(other.devStats_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.StepStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.StepStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List devStats_ = + java.util.Collections.emptyList(); + private void ensureDevStatsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + devStats_ = new java.util.ArrayList(devStats_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.DeviceStepStats, org.tensorflow.proto.framework.DeviceStepStats.Builder, org.tensorflow.proto.framework.DeviceStepStatsOrBuilder> devStatsBuilder_; + + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public java.util.List getDevStatsList() { + if (devStatsBuilder_ == null) { + return java.util.Collections.unmodifiableList(devStats_); + } else { + return devStatsBuilder_.getMessageList(); + } + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public int getDevStatsCount() { + if (devStatsBuilder_ == null) { + return devStats_.size(); + } else { + return devStatsBuilder_.getCount(); + } + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public org.tensorflow.proto.framework.DeviceStepStats getDevStats(int index) { + if (devStatsBuilder_ == null) { + return devStats_.get(index); + } else { + return devStatsBuilder_.getMessage(index); + } + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public Builder setDevStats( + int index, org.tensorflow.proto.framework.DeviceStepStats value) { + if (devStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevStatsIsMutable(); + devStats_.set(index, value); + onChanged(); + } else { + devStatsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public Builder setDevStats( + int index, org.tensorflow.proto.framework.DeviceStepStats.Builder builderForValue) { + if (devStatsBuilder_ == null) { + ensureDevStatsIsMutable(); + devStats_.set(index, builderForValue.build()); + onChanged(); + } else { + devStatsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public Builder addDevStats(org.tensorflow.proto.framework.DeviceStepStats value) { + if (devStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevStatsIsMutable(); + devStats_.add(value); + onChanged(); + } else { + devStatsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public Builder addDevStats( + int index, org.tensorflow.proto.framework.DeviceStepStats value) { + if (devStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevStatsIsMutable(); + devStats_.add(index, value); + onChanged(); + } else { + devStatsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public Builder addDevStats( + org.tensorflow.proto.framework.DeviceStepStats.Builder builderForValue) { + if (devStatsBuilder_ == null) { + ensureDevStatsIsMutable(); + devStats_.add(builderForValue.build()); + onChanged(); + } else { + devStatsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public Builder addDevStats( + int index, org.tensorflow.proto.framework.DeviceStepStats.Builder builderForValue) { + if (devStatsBuilder_ == null) { + ensureDevStatsIsMutable(); + devStats_.add(index, builderForValue.build()); + onChanged(); + } else { + devStatsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public Builder addAllDevStats( + java.lang.Iterable values) { + if (devStatsBuilder_ == null) { + ensureDevStatsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, devStats_); + onChanged(); + } else { + devStatsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public Builder clearDevStats() { + if (devStatsBuilder_ == null) { + devStats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + devStatsBuilder_.clear(); + } + return this; + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public Builder removeDevStats(int index) { + if (devStatsBuilder_ == null) { + ensureDevStatsIsMutable(); + devStats_.remove(index); + onChanged(); + } else { + devStatsBuilder_.remove(index); + } + return this; + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public org.tensorflow.proto.framework.DeviceStepStats.Builder getDevStatsBuilder( + int index) { + return getDevStatsFieldBuilder().getBuilder(index); + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public org.tensorflow.proto.framework.DeviceStepStatsOrBuilder getDevStatsOrBuilder( + int index) { + if (devStatsBuilder_ == null) { + return devStats_.get(index); } else { + return devStatsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public java.util.List + getDevStatsOrBuilderList() { + if (devStatsBuilder_ != null) { + return devStatsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(devStats_); + } + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public org.tensorflow.proto.framework.DeviceStepStats.Builder addDevStatsBuilder() { + return getDevStatsFieldBuilder().addBuilder( + org.tensorflow.proto.framework.DeviceStepStats.getDefaultInstance()); + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public org.tensorflow.proto.framework.DeviceStepStats.Builder addDevStatsBuilder( + int index) { + return getDevStatsFieldBuilder().addBuilder( + index, org.tensorflow.proto.framework.DeviceStepStats.getDefaultInstance()); + } + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + public java.util.List + getDevStatsBuilderList() { + return getDevStatsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.DeviceStepStats, org.tensorflow.proto.framework.DeviceStepStats.Builder, org.tensorflow.proto.framework.DeviceStepStatsOrBuilder> + getDevStatsFieldBuilder() { + if (devStatsBuilder_ == null) { + devStatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + org.tensorflow.proto.framework.DeviceStepStats, org.tensorflow.proto.framework.DeviceStepStats.Builder, org.tensorflow.proto.framework.DeviceStepStatsOrBuilder>( + devStats_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + devStats_ = null; + } + return devStatsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.StepStats) + } + + // @@protoc_insertion_point(class_scope:tensorflow.StepStats) + private static final org.tensorflow.proto.framework.StepStats DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.StepStats(); + } + + public static org.tensorflow.proto.framework.StepStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StepStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StepStats(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.StepStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StepStatsOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StepStatsOrBuilder.java new file mode 100644 index 00000000000..bb7cdf41046 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StepStatsOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/step_stats.proto + +package org.tensorflow.proto.framework; + +public interface StepStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.StepStats) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + java.util.List + getDevStatsList(); + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + org.tensorflow.proto.framework.DeviceStepStats getDevStats(int index); + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + int getDevStatsCount(); + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + java.util.List + getDevStatsOrBuilderList(); + /** + * repeated .tensorflow.DeviceStepStats dev_stats = 1; + */ + org.tensorflow.proto.framework.DeviceStepStatsOrBuilder getDevStatsOrBuilder( + int index); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StepStatsProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StepStatsProtos.java new file mode 100644 index 00000000000..15ef4a6b554 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StepStatsProtos.java @@ -0,0 +1,169 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/step_stats.proto + +package org.tensorflow.proto.framework; + +public final class StepStatsProtos { + private StepStatsProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_AllocationRecord_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_AllocationRecord_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_AllocatorMemoryUsed_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_AllocatorMemoryUsed_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_NodeOutput_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_NodeOutput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_MemoryStats_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_MemoryStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_NodeExecStats_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_NodeExecStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_DeviceStepStats_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_DeviceStepStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_DeviceStepStats_ThreadNamesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_DeviceStepStats_ThreadNamesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_StepStats_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_StepStats_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n*tensorflow/core/framework/step_stats.p" + + "roto\022\ntensorflow\0326tensorflow/core/framew" + + "ork/allocation_description.proto\0322tensor" + + "flow/core/framework/tensor_description.p" + + "roto\"=\n\020AllocationRecord\022\024\n\014alloc_micros" + + "\030\001 \001(\003\022\023\n\013alloc_bytes\030\002 \001(\003\"\304\001\n\023Allocato" + + "rMemoryUsed\022\026\n\016allocator_name\030\001 \001(\t\022\023\n\013t" + + "otal_bytes\030\002 \001(\003\022\022\n\npeak_bytes\030\003 \001(\003\022\022\n\n" + + "live_bytes\030\004 \001(\003\0228\n\022allocation_records\030\006" + + " \003(\0132\034.tensorflow.AllocationRecord\022\036\n\026al" + + "locator_bytes_in_use\030\005 \001(\003\"U\n\nNodeOutput" + + "\022\014\n\004slot\030\001 \001(\005\0229\n\022tensor_description\030\003 \001" + + "(\0132\035.tensorflow.TensorDescription\"\354\001\n\013Me" + + "moryStats\022\030\n\020temp_memory_size\030\001 \001(\003\022\036\n\026p" + + "ersistent_memory_size\030\003 \001(\003\022#\n\033persisten" + + "t_tensor_alloc_ids\030\005 \003(\003\022#\n\027device_temp_" + + "memory_size\030\002 \001(\003B\002\030\001\022)\n\035device_persiste" + + "nt_memory_size\030\004 \001(\003B\002\030\001\022.\n\"device_persi" + + "stent_tensor_alloc_ids\030\006 \003(\003B\002\030\001\"\236\004\n\rNod" + + "eExecStats\022\021\n\tnode_name\030\001 \001(\t\022\030\n\020all_sta" + + "rt_micros\030\002 \001(\003\022\033\n\023op_start_rel_micros\030\003" + + " \001(\003\022\031\n\021op_end_rel_micros\030\004 \001(\003\022\032\n\022all_e" + + "nd_rel_micros\030\005 \001(\003\022/\n\006memory\030\006 \003(\0132\037.te" + + "nsorflow.AllocatorMemoryUsed\022&\n\006output\030\007" + + " \003(\0132\026.tensorflow.NodeOutput\022\026\n\016timeline" + + "_label\030\010 \001(\t\022\030\n\020scheduled_micros\030\t \001(\003\022\021" + + "\n\tthread_id\030\n \001(\r\022<\n\021referenced_tensor\030\013" + + " \003(\0132!.tensorflow.AllocationDescription\022" + + "-\n\014memory_stats\030\014 \001(\0132\027.tensorflow.Memor" + + "yStats\022\027\n\017all_start_nanos\030\r \001(\003\022\032\n\022op_st" + + "art_rel_nanos\030\016 \001(\003\022\030\n\020op_end_rel_nanos\030" + + "\017 \001(\003\022\031\n\021all_end_rel_nanos\030\020 \001(\003\022\027\n\017sche" + + "duled_nanos\030\021 \001(\003\"\310\001\n\017DeviceStepStats\022\016\n" + + "\006device\030\001 \001(\t\022-\n\nnode_stats\030\002 \003(\0132\031.tens" + + "orflow.NodeExecStats\022B\n\014thread_names\030\003 \003" + + "(\0132,.tensorflow.DeviceStepStats.ThreadNa" + + "mesEntry\0322\n\020ThreadNamesEntry\022\013\n\003key\030\001 \001(" + + "\r\022\r\n\005value\030\002 \001(\t:\0028\001\";\n\tStepStats\022.\n\tdev" + + "_stats\030\001 \003(\0132\033.tensorflow.DeviceStepStat" + + "sB\211\001\n\036org.tensorflow.proto.frameworkB\017St" + + "epStatsProtosP\001ZQgithub.com/tensorflow/t" + + "ensorflow/tensorflow/go/core/framework/s" + + "tep_stats_go_proto\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.AllocationDescriptionProtos.getDescriptor(), + org.tensorflow.proto.framework.TensorDescriptionProtos.getDescriptor(), + }); + internal_static_tensorflow_AllocationRecord_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_AllocationRecord_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_AllocationRecord_descriptor, + new java.lang.String[] { "AllocMicros", "AllocBytes", }); + internal_static_tensorflow_AllocatorMemoryUsed_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_AllocatorMemoryUsed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_AllocatorMemoryUsed_descriptor, + new java.lang.String[] { "AllocatorName", "TotalBytes", "PeakBytes", "LiveBytes", "AllocationRecords", "AllocatorBytesInUse", }); + internal_static_tensorflow_NodeOutput_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_tensorflow_NodeOutput_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_NodeOutput_descriptor, + new java.lang.String[] { "Slot", "TensorDescription", }); + internal_static_tensorflow_MemoryStats_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_tensorflow_MemoryStats_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_MemoryStats_descriptor, + new java.lang.String[] { "TempMemorySize", "PersistentMemorySize", "PersistentTensorAllocIds", "DeviceTempMemorySize", "DevicePersistentMemorySize", "DevicePersistentTensorAllocIds", }); + internal_static_tensorflow_NodeExecStats_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_tensorflow_NodeExecStats_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_NodeExecStats_descriptor, + new java.lang.String[] { "NodeName", "AllStartMicros", "OpStartRelMicros", "OpEndRelMicros", "AllEndRelMicros", "Memory", "Output", "TimelineLabel", "ScheduledMicros", "ThreadId", "ReferencedTensor", "MemoryStats", "AllStartNanos", "OpStartRelNanos", "OpEndRelNanos", "AllEndRelNanos", "ScheduledNanos", }); + internal_static_tensorflow_DeviceStepStats_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_tensorflow_DeviceStepStats_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_DeviceStepStats_descriptor, + new java.lang.String[] { "Device", "NodeStats", "ThreadNames", }); + internal_static_tensorflow_DeviceStepStats_ThreadNamesEntry_descriptor = + internal_static_tensorflow_DeviceStepStats_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_DeviceStepStats_ThreadNamesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_DeviceStepStats_ThreadNamesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_StepStats_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_tensorflow_StepStats_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_StepStats_descriptor, + new java.lang.String[] { "DevStats", }); + org.tensorflow.proto.framework.AllocationDescriptionProtos.getDescriptor(); + org.tensorflow.proto.framework.TensorDescriptionProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StructProtos.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StructProtos.java new file mode 100644 index 00000000000..1197f3ac83f --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StructProtos.java @@ -0,0 +1,193 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/struct.proto + +package org.tensorflow.proto.framework; + +public final class StructProtos { + private StructProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_StructuredValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_StructuredValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_NoneValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_NoneValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_ListValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_ListValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_TupleValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_TupleValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_DictValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_DictValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_DictValue_FieldsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_DictValue_FieldsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_PairValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_PairValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_NamedTupleValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_NamedTupleValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_TensorSpecProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_TensorSpecProto_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_TypeSpecProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tensorflow_TypeSpecProto_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/protobuf/struct.proto\022" + + "\ntensorflow\032,tensorflow/core/framework/t" + + "ensor_shape.proto\032%tensorflow/core/frame" + + "work/types.proto\"\307\004\n\017StructuredValue\022+\n\n" + + "none_value\030\001 \001(\0132\025.tensorflow.NoneValueH" + + "\000\022\027\n\rfloat64_value\030\013 \001(\001H\000\022\025\n\013int64_valu" + + "e\030\014 \001(\022H\000\022\026\n\014string_value\030\r \001(\tH\000\022\024\n\nboo" + + "l_value\030\016 \001(\010H\000\022:\n\022tensor_shape_value\030\037 " + + "\001(\0132\034.tensorflow.TensorShapeProtoH\000\0222\n\022t" + + "ensor_dtype_value\030 \001(\0162\024.tensorflow.Dat" + + "aTypeH\000\0228\n\021tensor_spec_value\030! \001(\0132\033.ten" + + "sorflow.TensorSpecProtoH\000\0224\n\017type_spec_v" + + "alue\030\" \001(\0132\031.tensorflow.TypeSpecProtoH\000\022" + + "+\n\nlist_value\0303 \001(\0132\025.tensorflow.ListVal" + + "ueH\000\022-\n\013tuple_value\0304 \001(\0132\026.tensorflow.T" + + "upleValueH\000\022+\n\ndict_value\0305 \001(\0132\025.tensor" + + "flow.DictValueH\000\0228\n\021named_tuple_value\0306 " + + "\001(\0132\033.tensorflow.NamedTupleValueH\000B\006\n\004ki" + + "nd\"\013\n\tNoneValue\"8\n\tListValue\022+\n\006values\030\001" + + " \003(\0132\033.tensorflow.StructuredValue\"9\n\nTup" + + "leValue\022+\n\006values\030\001 \003(\0132\033.tensorflow.Str" + + "ucturedValue\"\212\001\n\tDictValue\0221\n\006fields\030\001 \003" + + "(\0132!.tensorflow.DictValue.FieldsEntry\032J\n" + + "\013FieldsEntry\022\013\n\003key\030\001 \001(\t\022*\n\005value\030\002 \001(\013" + + "2\033.tensorflow.StructuredValue:\0028\001\"D\n\tPai" + + "rValue\022\013\n\003key\030\001 \001(\t\022*\n\005value\030\002 \001(\0132\033.ten" + + "sorflow.StructuredValue\"F\n\017NamedTupleVal" + + "ue\022\014\n\004name\030\001 \001(\t\022%\n\006values\030\002 \003(\0132\025.tenso" + + "rflow.PairValue\"q\n\017TensorSpecProto\022\014\n\004na" + + "me\030\001 \001(\t\022+\n\005shape\030\002 \001(\0132\034.tensorflow.Ten" + + "sorShapeProto\022#\n\005dtype\030\003 \001(\0162\024.tensorflo" + + "w.DataType\"\212\003\n\rTypeSpecProto\022@\n\017type_spe" + + "c_class\030\001 \001(\0162\'.tensorflow.TypeSpecProto" + + ".TypeSpecClass\022/\n\ntype_state\030\002 \001(\0132\033.ten" + + "sorflow.StructuredValue\022\034\n\024type_spec_cla" + + "ss_name\030\003 \001(\t\"\347\001\n\rTypeSpecClass\022\013\n\007UNKNO" + + "WN\020\000\022\026\n\022SPARSE_TENSOR_SPEC\020\001\022\027\n\023INDEXED_" + + "SLICES_SPEC\020\002\022\026\n\022RAGGED_TENSOR_SPEC\020\003\022\025\n" + + "\021TENSOR_ARRAY_SPEC\020\004\022\025\n\021DATA_DATASET_SPE" + + "C\020\005\022\026\n\022DATA_ITERATOR_SPEC\020\006\022\021\n\rOPTIONAL_" + + "SPEC\020\007\022\024\n\020PER_REPLICA_SPEC\020\010\022\021\n\rVARIABLE" + + "_SPEC\020\tBz\n\036org.tensorflow.proto.framewor" + + "kB\014StructProtosP\001ZHgithub.com/tensorflow" + + "/tensorflow/tensorflow/go/core/core_prot" + + "os_go_protob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(), + org.tensorflow.proto.framework.TypesProtos.getDescriptor(), + }); + internal_static_tensorflow_StructuredValue_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tensorflow_StructuredValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_StructuredValue_descriptor, + new java.lang.String[] { "NoneValue", "Float64Value", "Int64Value", "StringValue", "BoolValue", "TensorShapeValue", "TensorDtypeValue", "TensorSpecValue", "TypeSpecValue", "ListValue", "TupleValue", "DictValue", "NamedTupleValue", "Kind", }); + internal_static_tensorflow_NoneValue_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_tensorflow_NoneValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_NoneValue_descriptor, + new java.lang.String[] { }); + internal_static_tensorflow_ListValue_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_tensorflow_ListValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_ListValue_descriptor, + new java.lang.String[] { "Values", }); + internal_static_tensorflow_TupleValue_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_tensorflow_TupleValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_TupleValue_descriptor, + new java.lang.String[] { "Values", }); + internal_static_tensorflow_DictValue_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_tensorflow_DictValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_DictValue_descriptor, + new java.lang.String[] { "Fields", }); + internal_static_tensorflow_DictValue_FieldsEntry_descriptor = + internal_static_tensorflow_DictValue_descriptor.getNestedTypes().get(0); + internal_static_tensorflow_DictValue_FieldsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_DictValue_FieldsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_PairValue_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_tensorflow_PairValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_PairValue_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_NamedTupleValue_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_tensorflow_NamedTupleValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_NamedTupleValue_descriptor, + new java.lang.String[] { "Name", "Values", }); + internal_static_tensorflow_TensorSpecProto_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_tensorflow_TensorSpecProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_TensorSpecProto_descriptor, + new java.lang.String[] { "Name", "Shape", "Dtype", }); + internal_static_tensorflow_TypeSpecProto_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_tensorflow_TypeSpecProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tensorflow_TypeSpecProto_descriptor, + new java.lang.String[] { "TypeSpecClass", "TypeState", "TypeSpecClassName", }); + org.tensorflow.proto.framework.TensorShapeProtos.getDescriptor(); + org.tensorflow.proto.framework.TypesProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StructuredValue.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StructuredValue.java new file mode 100644 index 00000000000..b72c71d9271 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StructuredValue.java @@ -0,0 +1,3171 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/struct.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * `StructuredValue` represents a dynamically typed value representing various
+ * data structures that are inspired by Python data structures typically used in
+ * TensorFlow functions as inputs and outputs.
+ * For example when saving a Layer there may be a `training` argument. If the
+ * user passes a boolean True/False, that switches between two concrete
+ * TensorFlow functions. In order to switch between them in the same way after
+ * loading the SavedModel, we need to represent "True" and "False".
+ * A more advanced example might be a function which takes a list of
+ * dictionaries mapping from strings to Tensors. In order to map from
+ * user-specified arguments `[{"a": tf.constant(1.)}, {"q": tf.constant(3.)}]`
+ * after load to the right saved TensorFlow function, we need to represent the
+ * nested structure and the strings, recording that we have a trace for anything
+ * matching `[{"a": tf.TensorSpec(None, tf.float32)}, {"q": tf.TensorSpec([],
+ * tf.float64)}]` as an example.
+ * Likewise functions may return nested structures of Tensors, for example
+ * returning a dictionary mapping from strings to Tensors. In order for the
+ * loaded function to return the same structure we need to serialize it.
+ * This is an ergonomic aid for working with loaded SavedModels, not a promise
+ * to serialize all possible function signatures. For example we do not expect
+ * to pickle generic Python objects, and ideally we'd stay language-agnostic.
+ * 
+ * + * Protobuf type {@code tensorflow.StructuredValue} + */ +public final class StructuredValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.StructuredValue) + StructuredValueOrBuilder { +private static final long serialVersionUID = 0L; + // Use StructuredValue.newBuilder() to construct. + private StructuredValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StructuredValue() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StructuredValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StructuredValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.tensorflow.proto.framework.NoneValue.Builder subBuilder = null; + if (kindCase_ == 1) { + subBuilder = ((org.tensorflow.proto.framework.NoneValue) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.NoneValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.NoneValue) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 1; + break; + } + case 89: { + kindCase_ = 11; + kind_ = input.readDouble(); + break; + } + case 96: { + kindCase_ = 12; + kind_ = input.readSInt64(); + break; + } + case 106: { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 13; + kind_ = s; + break; + } + case 112: { + kindCase_ = 14; + kind_ = input.readBool(); + break; + } + case 250: { + org.tensorflow.proto.framework.TensorShapeProto.Builder subBuilder = null; + if (kindCase_ == 31) { + subBuilder = ((org.tensorflow.proto.framework.TensorShapeProto) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.TensorShapeProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.TensorShapeProto) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 31; + break; + } + case 256: { + int rawValue = input.readEnum(); + kindCase_ = 32; + kind_ = rawValue; + break; + } + case 266: { + org.tensorflow.proto.framework.TensorSpecProto.Builder subBuilder = null; + if (kindCase_ == 33) { + subBuilder = ((org.tensorflow.proto.framework.TensorSpecProto) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.TensorSpecProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.TensorSpecProto) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 33; + break; + } + case 274: { + org.tensorflow.proto.framework.TypeSpecProto.Builder subBuilder = null; + if (kindCase_ == 34) { + subBuilder = ((org.tensorflow.proto.framework.TypeSpecProto) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.TypeSpecProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.TypeSpecProto) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 34; + break; + } + case 410: { + org.tensorflow.proto.framework.ListValue.Builder subBuilder = null; + if (kindCase_ == 51) { + subBuilder = ((org.tensorflow.proto.framework.ListValue) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.ListValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.ListValue) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 51; + break; + } + case 418: { + org.tensorflow.proto.framework.TupleValue.Builder subBuilder = null; + if (kindCase_ == 52) { + subBuilder = ((org.tensorflow.proto.framework.TupleValue) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.TupleValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.TupleValue) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 52; + break; + } + case 426: { + org.tensorflow.proto.framework.DictValue.Builder subBuilder = null; + if (kindCase_ == 53) { + subBuilder = ((org.tensorflow.proto.framework.DictValue) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.DictValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.DictValue) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 53; + break; + } + case 434: { + org.tensorflow.proto.framework.NamedTupleValue.Builder subBuilder = null; + if (kindCase_ == 54) { + subBuilder = ((org.tensorflow.proto.framework.NamedTupleValue) kind_).toBuilder(); + } + kind_ = + input.readMessage(org.tensorflow.proto.framework.NamedTupleValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.tensorflow.proto.framework.NamedTupleValue) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 54; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_StructuredValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_StructuredValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.StructuredValue.class, org.tensorflow.proto.framework.StructuredValue.Builder.class); + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + public enum KindCase + implements com.google.protobuf.Internal.EnumLite { + NONE_VALUE(1), + FLOAT64_VALUE(11), + INT64_VALUE(12), + STRING_VALUE(13), + BOOL_VALUE(14), + TENSOR_SHAPE_VALUE(31), + TENSOR_DTYPE_VALUE(32), + TENSOR_SPEC_VALUE(33), + TYPE_SPEC_VALUE(34), + LIST_VALUE(51), + TUPLE_VALUE(52), + DICT_VALUE(53), + NAMED_TUPLE_VALUE(54), + KIND_NOT_SET(0); + private final int value; + private KindCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static KindCase valueOf(int value) { + return forNumber(value); + } + + public static KindCase forNumber(int value) { + switch (value) { + case 1: return NONE_VALUE; + case 11: return FLOAT64_VALUE; + case 12: return INT64_VALUE; + case 13: return STRING_VALUE; + case 14: return BOOL_VALUE; + case 31: return TENSOR_SHAPE_VALUE; + case 32: return TENSOR_DTYPE_VALUE; + case 33: return TENSOR_SPEC_VALUE; + case 34: return TYPE_SPEC_VALUE; + case 51: return LIST_VALUE; + case 52: return TUPLE_VALUE; + case 53: return DICT_VALUE; + case 54: return NAMED_TUPLE_VALUE; + case 0: return KIND_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public KindCase + getKindCase() { + return KindCase.forNumber( + kindCase_); + } + + public static final int NONE_VALUE_FIELD_NUMBER = 1; + /** + *
+   * Represents None.
+   * 
+ * + * .tensorflow.NoneValue none_value = 1; + */ + public boolean hasNoneValue() { + return kindCase_ == 1; + } + /** + *
+   * Represents None.
+   * 
+ * + * .tensorflow.NoneValue none_value = 1; + */ + public org.tensorflow.proto.framework.NoneValue getNoneValue() { + if (kindCase_ == 1) { + return (org.tensorflow.proto.framework.NoneValue) kind_; + } + return org.tensorflow.proto.framework.NoneValue.getDefaultInstance(); + } + /** + *
+   * Represents None.
+   * 
+ * + * .tensorflow.NoneValue none_value = 1; + */ + public org.tensorflow.proto.framework.NoneValueOrBuilder getNoneValueOrBuilder() { + if (kindCase_ == 1) { + return (org.tensorflow.proto.framework.NoneValue) kind_; + } + return org.tensorflow.proto.framework.NoneValue.getDefaultInstance(); + } + + public static final int FLOAT64_VALUE_FIELD_NUMBER = 11; + /** + *
+   * Represents a double-precision floating-point value (a Python `float`).
+   * 
+ * + * double float64_value = 11; + */ + public double getFloat64Value() { + if (kindCase_ == 11) { + return (java.lang.Double) kind_; + } + return 0D; + } + + public static final int INT64_VALUE_FIELD_NUMBER = 12; + /** + *
+   * Represents a signed integer value, limited to 64 bits.
+   * Larger values from Python's arbitrary-precision integers are unsupported.
+   * 
+ * + * sint64 int64_value = 12; + */ + public long getInt64Value() { + if (kindCase_ == 12) { + return (java.lang.Long) kind_; + } + return 0L; + } + + public static final int STRING_VALUE_FIELD_NUMBER = 13; + /** + *
+   * Represents a string of Unicode characters stored in a Python `str`.
+   * In Python 3, this is exactly what type `str` is.
+   * In Python 2, this is the UTF-8 encoding of the characters.
+   * For strings with ASCII characters only (as often used in TensorFlow code)
+   * there is effectively no difference between the language versions.
+   * The obsolescent `unicode` type of Python 2 is not supported here.
+   * 
+ * + * string string_value = 13; + */ + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (kindCase_ == 13) { + ref = kind_; + } + 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 (kindCase_ == 13) { + kind_ = s; + } + return s; + } + } + /** + *
+   * Represents a string of Unicode characters stored in a Python `str`.
+   * In Python 3, this is exactly what type `str` is.
+   * In Python 2, this is the UTF-8 encoding of the characters.
+   * For strings with ASCII characters only (as often used in TensorFlow code)
+   * there is effectively no difference between the language versions.
+   * The obsolescent `unicode` type of Python 2 is not supported here.
+   * 
+ * + * string string_value = 13; + */ + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 13) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (kindCase_ == 13) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOL_VALUE_FIELD_NUMBER = 14; + /** + *
+   * Represents a boolean value.
+   * 
+ * + * bool bool_value = 14; + */ + public boolean getBoolValue() { + if (kindCase_ == 14) { + return (java.lang.Boolean) kind_; + } + return false; + } + + public static final int TENSOR_SHAPE_VALUE_FIELD_NUMBER = 31; + /** + *
+   * Represents a TensorShape.
+   * 
+ * + * .tensorflow.TensorShapeProto tensor_shape_value = 31; + */ + public boolean hasTensorShapeValue() { + return kindCase_ == 31; + } + /** + *
+   * Represents a TensorShape.
+   * 
+ * + * .tensorflow.TensorShapeProto tensor_shape_value = 31; + */ + public org.tensorflow.proto.framework.TensorShapeProto getTensorShapeValue() { + if (kindCase_ == 31) { + return (org.tensorflow.proto.framework.TensorShapeProto) kind_; + } + return org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance(); + } + /** + *
+   * Represents a TensorShape.
+   * 
+ * + * .tensorflow.TensorShapeProto tensor_shape_value = 31; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getTensorShapeValueOrBuilder() { + if (kindCase_ == 31) { + return (org.tensorflow.proto.framework.TensorShapeProto) kind_; + } + return org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance(); + } + + public static final int TENSOR_DTYPE_VALUE_FIELD_NUMBER = 32; + /** + *
+   * Represents an enum value for dtype.
+   * 
+ * + * .tensorflow.DataType tensor_dtype_value = 32; + */ + public int getTensorDtypeValueValue() { + if (kindCase_ == 32) { + return (java.lang.Integer) kind_; + } + return 0; + } + /** + *
+   * Represents an enum value for dtype.
+   * 
+ * + * .tensorflow.DataType tensor_dtype_value = 32; + */ + public org.tensorflow.proto.framework.DataType getTensorDtypeValue() { + if (kindCase_ == 32) { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf( + (java.lang.Integer) kind_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + return org.tensorflow.proto.framework.DataType.DT_INVALID; + } + + public static final int TENSOR_SPEC_VALUE_FIELD_NUMBER = 33; + /** + *
+   * Represents a value for tf.TensorSpec.
+   * 
+ * + * .tensorflow.TensorSpecProto tensor_spec_value = 33; + */ + public boolean hasTensorSpecValue() { + return kindCase_ == 33; + } + /** + *
+   * Represents a value for tf.TensorSpec.
+   * 
+ * + * .tensorflow.TensorSpecProto tensor_spec_value = 33; + */ + public org.tensorflow.proto.framework.TensorSpecProto getTensorSpecValue() { + if (kindCase_ == 33) { + return (org.tensorflow.proto.framework.TensorSpecProto) kind_; + } + return org.tensorflow.proto.framework.TensorSpecProto.getDefaultInstance(); + } + /** + *
+   * Represents a value for tf.TensorSpec.
+   * 
+ * + * .tensorflow.TensorSpecProto tensor_spec_value = 33; + */ + public org.tensorflow.proto.framework.TensorSpecProtoOrBuilder getTensorSpecValueOrBuilder() { + if (kindCase_ == 33) { + return (org.tensorflow.proto.framework.TensorSpecProto) kind_; + } + return org.tensorflow.proto.framework.TensorSpecProto.getDefaultInstance(); + } + + public static final int TYPE_SPEC_VALUE_FIELD_NUMBER = 34; + /** + *
+   * Represents a value for tf.TypeSpec.
+   * 
+ * + * .tensorflow.TypeSpecProto type_spec_value = 34; + */ + public boolean hasTypeSpecValue() { + return kindCase_ == 34; + } + /** + *
+   * Represents a value for tf.TypeSpec.
+   * 
+ * + * .tensorflow.TypeSpecProto type_spec_value = 34; + */ + public org.tensorflow.proto.framework.TypeSpecProto getTypeSpecValue() { + if (kindCase_ == 34) { + return (org.tensorflow.proto.framework.TypeSpecProto) kind_; + } + return org.tensorflow.proto.framework.TypeSpecProto.getDefaultInstance(); + } + /** + *
+   * Represents a value for tf.TypeSpec.
+   * 
+ * + * .tensorflow.TypeSpecProto type_spec_value = 34; + */ + public org.tensorflow.proto.framework.TypeSpecProtoOrBuilder getTypeSpecValueOrBuilder() { + if (kindCase_ == 34) { + return (org.tensorflow.proto.framework.TypeSpecProto) kind_; + } + return org.tensorflow.proto.framework.TypeSpecProto.getDefaultInstance(); + } + + public static final int LIST_VALUE_FIELD_NUMBER = 51; + /** + *
+   * Represents a list of `Value`.
+   * 
+ * + * .tensorflow.ListValue list_value = 51; + */ + public boolean hasListValue() { + return kindCase_ == 51; + } + /** + *
+   * Represents a list of `Value`.
+   * 
+ * + * .tensorflow.ListValue list_value = 51; + */ + public org.tensorflow.proto.framework.ListValue getListValue() { + if (kindCase_ == 51) { + return (org.tensorflow.proto.framework.ListValue) kind_; + } + return org.tensorflow.proto.framework.ListValue.getDefaultInstance(); + } + /** + *
+   * Represents a list of `Value`.
+   * 
+ * + * .tensorflow.ListValue list_value = 51; + */ + public org.tensorflow.proto.framework.ListValueOrBuilder getListValueOrBuilder() { + if (kindCase_ == 51) { + return (org.tensorflow.proto.framework.ListValue) kind_; + } + return org.tensorflow.proto.framework.ListValue.getDefaultInstance(); + } + + public static final int TUPLE_VALUE_FIELD_NUMBER = 52; + /** + *
+   * Represents a tuple of `Value`.
+   * 
+ * + * .tensorflow.TupleValue tuple_value = 52; + */ + public boolean hasTupleValue() { + return kindCase_ == 52; + } + /** + *
+   * Represents a tuple of `Value`.
+   * 
+ * + * .tensorflow.TupleValue tuple_value = 52; + */ + public org.tensorflow.proto.framework.TupleValue getTupleValue() { + if (kindCase_ == 52) { + return (org.tensorflow.proto.framework.TupleValue) kind_; + } + return org.tensorflow.proto.framework.TupleValue.getDefaultInstance(); + } + /** + *
+   * Represents a tuple of `Value`.
+   * 
+ * + * .tensorflow.TupleValue tuple_value = 52; + */ + public org.tensorflow.proto.framework.TupleValueOrBuilder getTupleValueOrBuilder() { + if (kindCase_ == 52) { + return (org.tensorflow.proto.framework.TupleValue) kind_; + } + return org.tensorflow.proto.framework.TupleValue.getDefaultInstance(); + } + + public static final int DICT_VALUE_FIELD_NUMBER = 53; + /** + *
+   * Represents a dict `Value`.
+   * 
+ * + * .tensorflow.DictValue dict_value = 53; + */ + public boolean hasDictValue() { + return kindCase_ == 53; + } + /** + *
+   * Represents a dict `Value`.
+   * 
+ * + * .tensorflow.DictValue dict_value = 53; + */ + public org.tensorflow.proto.framework.DictValue getDictValue() { + if (kindCase_ == 53) { + return (org.tensorflow.proto.framework.DictValue) kind_; + } + return org.tensorflow.proto.framework.DictValue.getDefaultInstance(); + } + /** + *
+   * Represents a dict `Value`.
+   * 
+ * + * .tensorflow.DictValue dict_value = 53; + */ + public org.tensorflow.proto.framework.DictValueOrBuilder getDictValueOrBuilder() { + if (kindCase_ == 53) { + return (org.tensorflow.proto.framework.DictValue) kind_; + } + return org.tensorflow.proto.framework.DictValue.getDefaultInstance(); + } + + public static final int NAMED_TUPLE_VALUE_FIELD_NUMBER = 54; + /** + *
+   * Represents Python's namedtuple.
+   * 
+ * + * .tensorflow.NamedTupleValue named_tuple_value = 54; + */ + public boolean hasNamedTupleValue() { + return kindCase_ == 54; + } + /** + *
+   * Represents Python's namedtuple.
+   * 
+ * + * .tensorflow.NamedTupleValue named_tuple_value = 54; + */ + public org.tensorflow.proto.framework.NamedTupleValue getNamedTupleValue() { + if (kindCase_ == 54) { + return (org.tensorflow.proto.framework.NamedTupleValue) kind_; + } + return org.tensorflow.proto.framework.NamedTupleValue.getDefaultInstance(); + } + /** + *
+   * Represents Python's namedtuple.
+   * 
+ * + * .tensorflow.NamedTupleValue named_tuple_value = 54; + */ + public org.tensorflow.proto.framework.NamedTupleValueOrBuilder getNamedTupleValueOrBuilder() { + if (kindCase_ == 54) { + return (org.tensorflow.proto.framework.NamedTupleValue) kind_; + } + return org.tensorflow.proto.framework.NamedTupleValue.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (kindCase_ == 1) { + output.writeMessage(1, (org.tensorflow.proto.framework.NoneValue) kind_); + } + if (kindCase_ == 11) { + output.writeDouble( + 11, (double)((java.lang.Double) kind_)); + } + if (kindCase_ == 12) { + output.writeSInt64( + 12, (long)((java.lang.Long) kind_)); + } + if (kindCase_ == 13) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, kind_); + } + if (kindCase_ == 14) { + output.writeBool( + 14, (boolean)((java.lang.Boolean) kind_)); + } + if (kindCase_ == 31) { + output.writeMessage(31, (org.tensorflow.proto.framework.TensorShapeProto) kind_); + } + if (kindCase_ == 32) { + output.writeEnum(32, ((java.lang.Integer) kind_)); + } + if (kindCase_ == 33) { + output.writeMessage(33, (org.tensorflow.proto.framework.TensorSpecProto) kind_); + } + if (kindCase_ == 34) { + output.writeMessage(34, (org.tensorflow.proto.framework.TypeSpecProto) kind_); + } + if (kindCase_ == 51) { + output.writeMessage(51, (org.tensorflow.proto.framework.ListValue) kind_); + } + if (kindCase_ == 52) { + output.writeMessage(52, (org.tensorflow.proto.framework.TupleValue) kind_); + } + if (kindCase_ == 53) { + output.writeMessage(53, (org.tensorflow.proto.framework.DictValue) kind_); + } + if (kindCase_ == 54) { + output.writeMessage(54, (org.tensorflow.proto.framework.NamedTupleValue) kind_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kindCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (org.tensorflow.proto.framework.NoneValue) kind_); + } + if (kindCase_ == 11) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize( + 11, (double)((java.lang.Double) kind_)); + } + if (kindCase_ == 12) { + size += com.google.protobuf.CodedOutputStream + .computeSInt64Size( + 12, (long)((java.lang.Long) kind_)); + } + if (kindCase_ == 13) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, kind_); + } + if (kindCase_ == 14) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize( + 14, (boolean)((java.lang.Boolean) kind_)); + } + if (kindCase_ == 31) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(31, (org.tensorflow.proto.framework.TensorShapeProto) kind_); + } + if (kindCase_ == 32) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(32, ((java.lang.Integer) kind_)); + } + if (kindCase_ == 33) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(33, (org.tensorflow.proto.framework.TensorSpecProto) kind_); + } + if (kindCase_ == 34) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(34, (org.tensorflow.proto.framework.TypeSpecProto) kind_); + } + if (kindCase_ == 51) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(51, (org.tensorflow.proto.framework.ListValue) kind_); + } + if (kindCase_ == 52) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(52, (org.tensorflow.proto.framework.TupleValue) kind_); + } + if (kindCase_ == 53) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(53, (org.tensorflow.proto.framework.DictValue) kind_); + } + if (kindCase_ == 54) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(54, (org.tensorflow.proto.framework.NamedTupleValue) kind_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.StructuredValue)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.StructuredValue other = (org.tensorflow.proto.framework.StructuredValue) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getNoneValue() + .equals(other.getNoneValue())) return false; + break; + case 11: + if (java.lang.Double.doubleToLongBits(getFloat64Value()) + != java.lang.Double.doubleToLongBits( + other.getFloat64Value())) return false; + break; + case 12: + if (getInt64Value() + != other.getInt64Value()) return false; + break; + case 13: + if (!getStringValue() + .equals(other.getStringValue())) return false; + break; + case 14: + if (getBoolValue() + != other.getBoolValue()) return false; + break; + case 31: + if (!getTensorShapeValue() + .equals(other.getTensorShapeValue())) return false; + break; + case 32: + if (getTensorDtypeValueValue() + != other.getTensorDtypeValueValue()) return false; + break; + case 33: + if (!getTensorSpecValue() + .equals(other.getTensorSpecValue())) return false; + break; + case 34: + if (!getTypeSpecValue() + .equals(other.getTypeSpecValue())) return false; + break; + case 51: + if (!getListValue() + .equals(other.getListValue())) return false; + break; + case 52: + if (!getTupleValue() + .equals(other.getTupleValue())) return false; + break; + case 53: + if (!getDictValue() + .equals(other.getDictValue())) return false; + break; + case 54: + if (!getNamedTupleValue() + .equals(other.getNamedTupleValue())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (kindCase_) { + case 1: + hash = (37 * hash) + NONE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getNoneValue().hashCode(); + break; + case 11: + hash = (37 * hash) + FLOAT64_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getFloat64Value())); + break; + case 12: + hash = (37 * hash) + INT64_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getInt64Value()); + break; + case 13: + hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + break; + case 14: + hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getBoolValue()); + break; + case 31: + hash = (37 * hash) + TENSOR_SHAPE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getTensorShapeValue().hashCode(); + break; + case 32: + hash = (37 * hash) + TENSOR_DTYPE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getTensorDtypeValueValue(); + break; + case 33: + hash = (37 * hash) + TENSOR_SPEC_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getTensorSpecValue().hashCode(); + break; + case 34: + hash = (37 * hash) + TYPE_SPEC_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getTypeSpecValue().hashCode(); + break; + case 51: + hash = (37 * hash) + LIST_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getListValue().hashCode(); + break; + case 52: + hash = (37 * hash) + TUPLE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getTupleValue().hashCode(); + break; + case 53: + hash = (37 * hash) + DICT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getDictValue().hashCode(); + break; + case 54: + hash = (37 * hash) + NAMED_TUPLE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getNamedTupleValue().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.StructuredValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.StructuredValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.StructuredValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.StructuredValue 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.proto.framework.StructuredValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.StructuredValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.StructuredValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.StructuredValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.StructuredValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.StructuredValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.StructuredValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.StructuredValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.StructuredValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `StructuredValue` represents a dynamically typed value representing various
+   * data structures that are inspired by Python data structures typically used in
+   * TensorFlow functions as inputs and outputs.
+   * For example when saving a Layer there may be a `training` argument. If the
+   * user passes a boolean True/False, that switches between two concrete
+   * TensorFlow functions. In order to switch between them in the same way after
+   * loading the SavedModel, we need to represent "True" and "False".
+   * A more advanced example might be a function which takes a list of
+   * dictionaries mapping from strings to Tensors. In order to map from
+   * user-specified arguments `[{"a": tf.constant(1.)}, {"q": tf.constant(3.)}]`
+   * after load to the right saved TensorFlow function, we need to represent the
+   * nested structure and the strings, recording that we have a trace for anything
+   * matching `[{"a": tf.TensorSpec(None, tf.float32)}, {"q": tf.TensorSpec([],
+   * tf.float64)}]` as an example.
+   * Likewise functions may return nested structures of Tensors, for example
+   * returning a dictionary mapping from strings to Tensors. In order for the
+   * loaded function to return the same structure we need to serialize it.
+   * This is an ergonomic aid for working with loaded SavedModels, not a promise
+   * to serialize all possible function signatures. For example we do not expect
+   * to pickle generic Python objects, and ideally we'd stay language-agnostic.
+   * 
+ * + * Protobuf type {@code tensorflow.StructuredValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.StructuredValue) + org.tensorflow.proto.framework.StructuredValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_StructuredValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_StructuredValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.StructuredValue.class, org.tensorflow.proto.framework.StructuredValue.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.StructuredValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.StructProtos.internal_static_tensorflow_StructuredValue_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.StructuredValue getDefaultInstanceForType() { + return org.tensorflow.proto.framework.StructuredValue.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.StructuredValue build() { + org.tensorflow.proto.framework.StructuredValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.StructuredValue buildPartial() { + org.tensorflow.proto.framework.StructuredValue result = new org.tensorflow.proto.framework.StructuredValue(this); + if (kindCase_ == 1) { + if (noneValueBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = noneValueBuilder_.build(); + } + } + if (kindCase_ == 11) { + result.kind_ = kind_; + } + if (kindCase_ == 12) { + result.kind_ = kind_; + } + if (kindCase_ == 13) { + result.kind_ = kind_; + } + if (kindCase_ == 14) { + result.kind_ = kind_; + } + if (kindCase_ == 31) { + if (tensorShapeValueBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = tensorShapeValueBuilder_.build(); + } + } + if (kindCase_ == 32) { + result.kind_ = kind_; + } + if (kindCase_ == 33) { + if (tensorSpecValueBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = tensorSpecValueBuilder_.build(); + } + } + if (kindCase_ == 34) { + if (typeSpecValueBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = typeSpecValueBuilder_.build(); + } + } + if (kindCase_ == 51) { + if (listValueBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = listValueBuilder_.build(); + } + } + if (kindCase_ == 52) { + if (tupleValueBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = tupleValueBuilder_.build(); + } + } + if (kindCase_ == 53) { + if (dictValueBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = dictValueBuilder_.build(); + } + } + if (kindCase_ == 54) { + if (namedTupleValueBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = namedTupleValueBuilder_.build(); + } + } + result.kindCase_ = kindCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.StructuredValue) { + return mergeFrom((org.tensorflow.proto.framework.StructuredValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.StructuredValue other) { + if (other == org.tensorflow.proto.framework.StructuredValue.getDefaultInstance()) return this; + switch (other.getKindCase()) { + case NONE_VALUE: { + mergeNoneValue(other.getNoneValue()); + break; + } + case FLOAT64_VALUE: { + setFloat64Value(other.getFloat64Value()); + break; + } + case INT64_VALUE: { + setInt64Value(other.getInt64Value()); + break; + } + case STRING_VALUE: { + kindCase_ = 13; + kind_ = other.kind_; + onChanged(); + break; + } + case BOOL_VALUE: { + setBoolValue(other.getBoolValue()); + break; + } + case TENSOR_SHAPE_VALUE: { + mergeTensorShapeValue(other.getTensorShapeValue()); + break; + } + case TENSOR_DTYPE_VALUE: { + setTensorDtypeValueValue(other.getTensorDtypeValueValue()); + break; + } + case TENSOR_SPEC_VALUE: { + mergeTensorSpecValue(other.getTensorSpecValue()); + break; + } + case TYPE_SPEC_VALUE: { + mergeTypeSpecValue(other.getTypeSpecValue()); + break; + } + case LIST_VALUE: { + mergeListValue(other.getListValue()); + break; + } + case TUPLE_VALUE: { + mergeTupleValue(other.getTupleValue()); + break; + } + case DICT_VALUE: { + mergeDictValue(other.getDictValue()); + break; + } + case NAMED_TUPLE_VALUE: { + mergeNamedTupleValue(other.getNamedTupleValue()); + break; + } + case KIND_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.StructuredValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.StructuredValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int kindCase_ = 0; + private java.lang.Object kind_; + public KindCase + getKindCase() { + return KindCase.forNumber( + kindCase_); + } + + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.NoneValue, org.tensorflow.proto.framework.NoneValue.Builder, org.tensorflow.proto.framework.NoneValueOrBuilder> noneValueBuilder_; + /** + *
+     * Represents None.
+     * 
+ * + * .tensorflow.NoneValue none_value = 1; + */ + public boolean hasNoneValue() { + return kindCase_ == 1; + } + /** + *
+     * Represents None.
+     * 
+ * + * .tensorflow.NoneValue none_value = 1; + */ + public org.tensorflow.proto.framework.NoneValue getNoneValue() { + if (noneValueBuilder_ == null) { + if (kindCase_ == 1) { + return (org.tensorflow.proto.framework.NoneValue) kind_; + } + return org.tensorflow.proto.framework.NoneValue.getDefaultInstance(); + } else { + if (kindCase_ == 1) { + return noneValueBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.NoneValue.getDefaultInstance(); + } + } + /** + *
+     * Represents None.
+     * 
+ * + * .tensorflow.NoneValue none_value = 1; + */ + public Builder setNoneValue(org.tensorflow.proto.framework.NoneValue value) { + if (noneValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + noneValueBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + /** + *
+     * Represents None.
+     * 
+ * + * .tensorflow.NoneValue none_value = 1; + */ + public Builder setNoneValue( + org.tensorflow.proto.framework.NoneValue.Builder builderForValue) { + if (noneValueBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + noneValueBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 1; + return this; + } + /** + *
+     * Represents None.
+     * 
+ * + * .tensorflow.NoneValue none_value = 1; + */ + public Builder mergeNoneValue(org.tensorflow.proto.framework.NoneValue value) { + if (noneValueBuilder_ == null) { + if (kindCase_ == 1 && + kind_ != org.tensorflow.proto.framework.NoneValue.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.NoneValue.newBuilder((org.tensorflow.proto.framework.NoneValue) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 1) { + noneValueBuilder_.mergeFrom(value); + } + noneValueBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + /** + *
+     * Represents None.
+     * 
+ * + * .tensorflow.NoneValue none_value = 1; + */ + public Builder clearNoneValue() { + if (noneValueBuilder_ == null) { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + } + noneValueBuilder_.clear(); + } + return this; + } + /** + *
+     * Represents None.
+     * 
+ * + * .tensorflow.NoneValue none_value = 1; + */ + public org.tensorflow.proto.framework.NoneValue.Builder getNoneValueBuilder() { + return getNoneValueFieldBuilder().getBuilder(); + } + /** + *
+     * Represents None.
+     * 
+ * + * .tensorflow.NoneValue none_value = 1; + */ + public org.tensorflow.proto.framework.NoneValueOrBuilder getNoneValueOrBuilder() { + if ((kindCase_ == 1) && (noneValueBuilder_ != null)) { + return noneValueBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 1) { + return (org.tensorflow.proto.framework.NoneValue) kind_; + } + return org.tensorflow.proto.framework.NoneValue.getDefaultInstance(); + } + } + /** + *
+     * Represents None.
+     * 
+ * + * .tensorflow.NoneValue none_value = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.NoneValue, org.tensorflow.proto.framework.NoneValue.Builder, org.tensorflow.proto.framework.NoneValueOrBuilder> + getNoneValueFieldBuilder() { + if (noneValueBuilder_ == null) { + if (!(kindCase_ == 1)) { + kind_ = org.tensorflow.proto.framework.NoneValue.getDefaultInstance(); + } + noneValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.NoneValue, org.tensorflow.proto.framework.NoneValue.Builder, org.tensorflow.proto.framework.NoneValueOrBuilder>( + (org.tensorflow.proto.framework.NoneValue) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 1; + onChanged();; + return noneValueBuilder_; + } + + /** + *
+     * Represents a double-precision floating-point value (a Python `float`).
+     * 
+ * + * double float64_value = 11; + */ + public double getFloat64Value() { + if (kindCase_ == 11) { + return (java.lang.Double) kind_; + } + return 0D; + } + /** + *
+     * Represents a double-precision floating-point value (a Python `float`).
+     * 
+ * + * double float64_value = 11; + */ + public Builder setFloat64Value(double value) { + kindCase_ = 11; + kind_ = value; + onChanged(); + return this; + } + /** + *
+     * Represents a double-precision floating-point value (a Python `float`).
+     * 
+ * + * double float64_value = 11; + */ + public Builder clearFloat64Value() { + if (kindCase_ == 11) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * Represents a signed integer value, limited to 64 bits.
+     * Larger values from Python's arbitrary-precision integers are unsupported.
+     * 
+ * + * sint64 int64_value = 12; + */ + public long getInt64Value() { + if (kindCase_ == 12) { + return (java.lang.Long) kind_; + } + return 0L; + } + /** + *
+     * Represents a signed integer value, limited to 64 bits.
+     * Larger values from Python's arbitrary-precision integers are unsupported.
+     * 
+ * + * sint64 int64_value = 12; + */ + public Builder setInt64Value(long value) { + kindCase_ = 12; + kind_ = value; + onChanged(); + return this; + } + /** + *
+     * Represents a signed integer value, limited to 64 bits.
+     * Larger values from Python's arbitrary-precision integers are unsupported.
+     * 
+ * + * sint64 int64_value = 12; + */ + public Builder clearInt64Value() { + if (kindCase_ == 12) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * Represents a string of Unicode characters stored in a Python `str`.
+     * In Python 3, this is exactly what type `str` is.
+     * In Python 2, this is the UTF-8 encoding of the characters.
+     * For strings with ASCII characters only (as often used in TensorFlow code)
+     * there is effectively no difference between the language versions.
+     * The obsolescent `unicode` type of Python 2 is not supported here.
+     * 
+ * + * string string_value = 13; + */ + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (kindCase_ == 13) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 13) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Represents a string of Unicode characters stored in a Python `str`.
+     * In Python 3, this is exactly what type `str` is.
+     * In Python 2, this is the UTF-8 encoding of the characters.
+     * For strings with ASCII characters only (as often used in TensorFlow code)
+     * there is effectively no difference between the language versions.
+     * The obsolescent `unicode` type of Python 2 is not supported here.
+     * 
+ * + * string string_value = 13; + */ + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 13) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (kindCase_ == 13) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Represents a string of Unicode characters stored in a Python `str`.
+     * In Python 3, this is exactly what type `str` is.
+     * In Python 2, this is the UTF-8 encoding of the characters.
+     * For strings with ASCII characters only (as often used in TensorFlow code)
+     * there is effectively no difference between the language versions.
+     * The obsolescent `unicode` type of Python 2 is not supported here.
+     * 
+ * + * string string_value = 13; + */ + public Builder setStringValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 13; + kind_ = value; + onChanged(); + return this; + } + /** + *
+     * Represents a string of Unicode characters stored in a Python `str`.
+     * In Python 3, this is exactly what type `str` is.
+     * In Python 2, this is the UTF-8 encoding of the characters.
+     * For strings with ASCII characters only (as often used in TensorFlow code)
+     * there is effectively no difference between the language versions.
+     * The obsolescent `unicode` type of Python 2 is not supported here.
+     * 
+ * + * string string_value = 13; + */ + public Builder clearStringValue() { + if (kindCase_ == 13) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + /** + *
+     * Represents a string of Unicode characters stored in a Python `str`.
+     * In Python 3, this is exactly what type `str` is.
+     * In Python 2, this is the UTF-8 encoding of the characters.
+     * For strings with ASCII characters only (as often used in TensorFlow code)
+     * there is effectively no difference between the language versions.
+     * The obsolescent `unicode` type of Python 2 is not supported here.
+     * 
+ * + * string string_value = 13; + */ + public Builder setStringValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 13; + kind_ = value; + onChanged(); + return this; + } + + /** + *
+     * Represents a boolean value.
+     * 
+ * + * bool bool_value = 14; + */ + public boolean getBoolValue() { + if (kindCase_ == 14) { + return (java.lang.Boolean) kind_; + } + return false; + } + /** + *
+     * Represents a boolean value.
+     * 
+ * + * bool bool_value = 14; + */ + public Builder setBoolValue(boolean value) { + kindCase_ = 14; + kind_ = value; + onChanged(); + return this; + } + /** + *
+     * Represents a boolean value.
+     * 
+ * + * bool bool_value = 14; + */ + public Builder clearBoolValue() { + if (kindCase_ == 14) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> tensorShapeValueBuilder_; + /** + *
+     * Represents a TensorShape.
+     * 
+ * + * .tensorflow.TensorShapeProto tensor_shape_value = 31; + */ + public boolean hasTensorShapeValue() { + return kindCase_ == 31; + } + /** + *
+     * Represents a TensorShape.
+     * 
+ * + * .tensorflow.TensorShapeProto tensor_shape_value = 31; + */ + public org.tensorflow.proto.framework.TensorShapeProto getTensorShapeValue() { + if (tensorShapeValueBuilder_ == null) { + if (kindCase_ == 31) { + return (org.tensorflow.proto.framework.TensorShapeProto) kind_; + } + return org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance(); + } else { + if (kindCase_ == 31) { + return tensorShapeValueBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance(); + } + } + /** + *
+     * Represents a TensorShape.
+     * 
+ * + * .tensorflow.TensorShapeProto tensor_shape_value = 31; + */ + public Builder setTensorShapeValue(org.tensorflow.proto.framework.TensorShapeProto value) { + if (tensorShapeValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + tensorShapeValueBuilder_.setMessage(value); + } + kindCase_ = 31; + return this; + } + /** + *
+     * Represents a TensorShape.
+     * 
+ * + * .tensorflow.TensorShapeProto tensor_shape_value = 31; + */ + public Builder setTensorShapeValue( + org.tensorflow.proto.framework.TensorShapeProto.Builder builderForValue) { + if (tensorShapeValueBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + tensorShapeValueBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 31; + return this; + } + /** + *
+     * Represents a TensorShape.
+     * 
+ * + * .tensorflow.TensorShapeProto tensor_shape_value = 31; + */ + public Builder mergeTensorShapeValue(org.tensorflow.proto.framework.TensorShapeProto value) { + if (tensorShapeValueBuilder_ == null) { + if (kindCase_ == 31 && + kind_ != org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.TensorShapeProto.newBuilder((org.tensorflow.proto.framework.TensorShapeProto) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 31) { + tensorShapeValueBuilder_.mergeFrom(value); + } + tensorShapeValueBuilder_.setMessage(value); + } + kindCase_ = 31; + return this; + } + /** + *
+     * Represents a TensorShape.
+     * 
+ * + * .tensorflow.TensorShapeProto tensor_shape_value = 31; + */ + public Builder clearTensorShapeValue() { + if (tensorShapeValueBuilder_ == null) { + if (kindCase_ == 31) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 31) { + kindCase_ = 0; + kind_ = null; + } + tensorShapeValueBuilder_.clear(); + } + return this; + } + /** + *
+     * Represents a TensorShape.
+     * 
+ * + * .tensorflow.TensorShapeProto tensor_shape_value = 31; + */ + public org.tensorflow.proto.framework.TensorShapeProto.Builder getTensorShapeValueBuilder() { + return getTensorShapeValueFieldBuilder().getBuilder(); + } + /** + *
+     * Represents a TensorShape.
+     * 
+ * + * .tensorflow.TensorShapeProto tensor_shape_value = 31; + */ + public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getTensorShapeValueOrBuilder() { + if ((kindCase_ == 31) && (tensorShapeValueBuilder_ != null)) { + return tensorShapeValueBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 31) { + return (org.tensorflow.proto.framework.TensorShapeProto) kind_; + } + return org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance(); + } + } + /** + *
+     * Represents a TensorShape.
+     * 
+ * + * .tensorflow.TensorShapeProto tensor_shape_value = 31; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> + getTensorShapeValueFieldBuilder() { + if (tensorShapeValueBuilder_ == null) { + if (!(kindCase_ == 31)) { + kind_ = org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance(); + } + tensorShapeValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder>( + (org.tensorflow.proto.framework.TensorShapeProto) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 31; + onChanged();; + return tensorShapeValueBuilder_; + } + + /** + *
+     * Represents an enum value for dtype.
+     * 
+ * + * .tensorflow.DataType tensor_dtype_value = 32; + */ + public int getTensorDtypeValueValue() { + if (kindCase_ == 32) { + return ((java.lang.Integer) kind_).intValue(); + } + return 0; + } + /** + *
+     * Represents an enum value for dtype.
+     * 
+ * + * .tensorflow.DataType tensor_dtype_value = 32; + */ + public Builder setTensorDtypeValueValue(int value) { + kindCase_ = 32; + kind_ = value; + onChanged(); + return this; + } + /** + *
+     * Represents an enum value for dtype.
+     * 
+ * + * .tensorflow.DataType tensor_dtype_value = 32; + */ + public org.tensorflow.proto.framework.DataType getTensorDtypeValue() { + if (kindCase_ == 32) { + @SuppressWarnings("deprecation") + org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf( + (java.lang.Integer) kind_); + return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result; + } + return org.tensorflow.proto.framework.DataType.DT_INVALID; + } + /** + *
+     * Represents an enum value for dtype.
+     * 
+ * + * .tensorflow.DataType tensor_dtype_value = 32; + */ + public Builder setTensorDtypeValue(org.tensorflow.proto.framework.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 32; + kind_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Represents an enum value for dtype.
+     * 
+ * + * .tensorflow.DataType tensor_dtype_value = 32; + */ + public Builder clearTensorDtypeValue() { + if (kindCase_ == 32) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorSpecProto, org.tensorflow.proto.framework.TensorSpecProto.Builder, org.tensorflow.proto.framework.TensorSpecProtoOrBuilder> tensorSpecValueBuilder_; + /** + *
+     * Represents a value for tf.TensorSpec.
+     * 
+ * + * .tensorflow.TensorSpecProto tensor_spec_value = 33; + */ + public boolean hasTensorSpecValue() { + return kindCase_ == 33; + } + /** + *
+     * Represents a value for tf.TensorSpec.
+     * 
+ * + * .tensorflow.TensorSpecProto tensor_spec_value = 33; + */ + public org.tensorflow.proto.framework.TensorSpecProto getTensorSpecValue() { + if (tensorSpecValueBuilder_ == null) { + if (kindCase_ == 33) { + return (org.tensorflow.proto.framework.TensorSpecProto) kind_; + } + return org.tensorflow.proto.framework.TensorSpecProto.getDefaultInstance(); + } else { + if (kindCase_ == 33) { + return tensorSpecValueBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.TensorSpecProto.getDefaultInstance(); + } + } + /** + *
+     * Represents a value for tf.TensorSpec.
+     * 
+ * + * .tensorflow.TensorSpecProto tensor_spec_value = 33; + */ + public Builder setTensorSpecValue(org.tensorflow.proto.framework.TensorSpecProto value) { + if (tensorSpecValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + tensorSpecValueBuilder_.setMessage(value); + } + kindCase_ = 33; + return this; + } + /** + *
+     * Represents a value for tf.TensorSpec.
+     * 
+ * + * .tensorflow.TensorSpecProto tensor_spec_value = 33; + */ + public Builder setTensorSpecValue( + org.tensorflow.proto.framework.TensorSpecProto.Builder builderForValue) { + if (tensorSpecValueBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + tensorSpecValueBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 33; + return this; + } + /** + *
+     * Represents a value for tf.TensorSpec.
+     * 
+ * + * .tensorflow.TensorSpecProto tensor_spec_value = 33; + */ + public Builder mergeTensorSpecValue(org.tensorflow.proto.framework.TensorSpecProto value) { + if (tensorSpecValueBuilder_ == null) { + if (kindCase_ == 33 && + kind_ != org.tensorflow.proto.framework.TensorSpecProto.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.TensorSpecProto.newBuilder((org.tensorflow.proto.framework.TensorSpecProto) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 33) { + tensorSpecValueBuilder_.mergeFrom(value); + } + tensorSpecValueBuilder_.setMessage(value); + } + kindCase_ = 33; + return this; + } + /** + *
+     * Represents a value for tf.TensorSpec.
+     * 
+ * + * .tensorflow.TensorSpecProto tensor_spec_value = 33; + */ + public Builder clearTensorSpecValue() { + if (tensorSpecValueBuilder_ == null) { + if (kindCase_ == 33) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 33) { + kindCase_ = 0; + kind_ = null; + } + tensorSpecValueBuilder_.clear(); + } + return this; + } + /** + *
+     * Represents a value for tf.TensorSpec.
+     * 
+ * + * .tensorflow.TensorSpecProto tensor_spec_value = 33; + */ + public org.tensorflow.proto.framework.TensorSpecProto.Builder getTensorSpecValueBuilder() { + return getTensorSpecValueFieldBuilder().getBuilder(); + } + /** + *
+     * Represents a value for tf.TensorSpec.
+     * 
+ * + * .tensorflow.TensorSpecProto tensor_spec_value = 33; + */ + public org.tensorflow.proto.framework.TensorSpecProtoOrBuilder getTensorSpecValueOrBuilder() { + if ((kindCase_ == 33) && (tensorSpecValueBuilder_ != null)) { + return tensorSpecValueBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 33) { + return (org.tensorflow.proto.framework.TensorSpecProto) kind_; + } + return org.tensorflow.proto.framework.TensorSpecProto.getDefaultInstance(); + } + } + /** + *
+     * Represents a value for tf.TensorSpec.
+     * 
+ * + * .tensorflow.TensorSpecProto tensor_spec_value = 33; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorSpecProto, org.tensorflow.proto.framework.TensorSpecProto.Builder, org.tensorflow.proto.framework.TensorSpecProtoOrBuilder> + getTensorSpecValueFieldBuilder() { + if (tensorSpecValueBuilder_ == null) { + if (!(kindCase_ == 33)) { + kind_ = org.tensorflow.proto.framework.TensorSpecProto.getDefaultInstance(); + } + tensorSpecValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TensorSpecProto, org.tensorflow.proto.framework.TensorSpecProto.Builder, org.tensorflow.proto.framework.TensorSpecProtoOrBuilder>( + (org.tensorflow.proto.framework.TensorSpecProto) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 33; + onChanged();; + return tensorSpecValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TypeSpecProto, org.tensorflow.proto.framework.TypeSpecProto.Builder, org.tensorflow.proto.framework.TypeSpecProtoOrBuilder> typeSpecValueBuilder_; + /** + *
+     * Represents a value for tf.TypeSpec.
+     * 
+ * + * .tensorflow.TypeSpecProto type_spec_value = 34; + */ + public boolean hasTypeSpecValue() { + return kindCase_ == 34; + } + /** + *
+     * Represents a value for tf.TypeSpec.
+     * 
+ * + * .tensorflow.TypeSpecProto type_spec_value = 34; + */ + public org.tensorflow.proto.framework.TypeSpecProto getTypeSpecValue() { + if (typeSpecValueBuilder_ == null) { + if (kindCase_ == 34) { + return (org.tensorflow.proto.framework.TypeSpecProto) kind_; + } + return org.tensorflow.proto.framework.TypeSpecProto.getDefaultInstance(); + } else { + if (kindCase_ == 34) { + return typeSpecValueBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.TypeSpecProto.getDefaultInstance(); + } + } + /** + *
+     * Represents a value for tf.TypeSpec.
+     * 
+ * + * .tensorflow.TypeSpecProto type_spec_value = 34; + */ + public Builder setTypeSpecValue(org.tensorflow.proto.framework.TypeSpecProto value) { + if (typeSpecValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + typeSpecValueBuilder_.setMessage(value); + } + kindCase_ = 34; + return this; + } + /** + *
+     * Represents a value for tf.TypeSpec.
+     * 
+ * + * .tensorflow.TypeSpecProto type_spec_value = 34; + */ + public Builder setTypeSpecValue( + org.tensorflow.proto.framework.TypeSpecProto.Builder builderForValue) { + if (typeSpecValueBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + typeSpecValueBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 34; + return this; + } + /** + *
+     * Represents a value for tf.TypeSpec.
+     * 
+ * + * .tensorflow.TypeSpecProto type_spec_value = 34; + */ + public Builder mergeTypeSpecValue(org.tensorflow.proto.framework.TypeSpecProto value) { + if (typeSpecValueBuilder_ == null) { + if (kindCase_ == 34 && + kind_ != org.tensorflow.proto.framework.TypeSpecProto.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.TypeSpecProto.newBuilder((org.tensorflow.proto.framework.TypeSpecProto) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 34) { + typeSpecValueBuilder_.mergeFrom(value); + } + typeSpecValueBuilder_.setMessage(value); + } + kindCase_ = 34; + return this; + } + /** + *
+     * Represents a value for tf.TypeSpec.
+     * 
+ * + * .tensorflow.TypeSpecProto type_spec_value = 34; + */ + public Builder clearTypeSpecValue() { + if (typeSpecValueBuilder_ == null) { + if (kindCase_ == 34) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 34) { + kindCase_ = 0; + kind_ = null; + } + typeSpecValueBuilder_.clear(); + } + return this; + } + /** + *
+     * Represents a value for tf.TypeSpec.
+     * 
+ * + * .tensorflow.TypeSpecProto type_spec_value = 34; + */ + public org.tensorflow.proto.framework.TypeSpecProto.Builder getTypeSpecValueBuilder() { + return getTypeSpecValueFieldBuilder().getBuilder(); + } + /** + *
+     * Represents a value for tf.TypeSpec.
+     * 
+ * + * .tensorflow.TypeSpecProto type_spec_value = 34; + */ + public org.tensorflow.proto.framework.TypeSpecProtoOrBuilder getTypeSpecValueOrBuilder() { + if ((kindCase_ == 34) && (typeSpecValueBuilder_ != null)) { + return typeSpecValueBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 34) { + return (org.tensorflow.proto.framework.TypeSpecProto) kind_; + } + return org.tensorflow.proto.framework.TypeSpecProto.getDefaultInstance(); + } + } + /** + *
+     * Represents a value for tf.TypeSpec.
+     * 
+ * + * .tensorflow.TypeSpecProto type_spec_value = 34; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TypeSpecProto, org.tensorflow.proto.framework.TypeSpecProto.Builder, org.tensorflow.proto.framework.TypeSpecProtoOrBuilder> + getTypeSpecValueFieldBuilder() { + if (typeSpecValueBuilder_ == null) { + if (!(kindCase_ == 34)) { + kind_ = org.tensorflow.proto.framework.TypeSpecProto.getDefaultInstance(); + } + typeSpecValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TypeSpecProto, org.tensorflow.proto.framework.TypeSpecProto.Builder, org.tensorflow.proto.framework.TypeSpecProtoOrBuilder>( + (org.tensorflow.proto.framework.TypeSpecProto) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 34; + onChanged();; + return typeSpecValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.ListValue, org.tensorflow.proto.framework.ListValue.Builder, org.tensorflow.proto.framework.ListValueOrBuilder> listValueBuilder_; + /** + *
+     * Represents a list of `Value`.
+     * 
+ * + * .tensorflow.ListValue list_value = 51; + */ + public boolean hasListValue() { + return kindCase_ == 51; + } + /** + *
+     * Represents a list of `Value`.
+     * 
+ * + * .tensorflow.ListValue list_value = 51; + */ + public org.tensorflow.proto.framework.ListValue getListValue() { + if (listValueBuilder_ == null) { + if (kindCase_ == 51) { + return (org.tensorflow.proto.framework.ListValue) kind_; + } + return org.tensorflow.proto.framework.ListValue.getDefaultInstance(); + } else { + if (kindCase_ == 51) { + return listValueBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.ListValue.getDefaultInstance(); + } + } + /** + *
+     * Represents a list of `Value`.
+     * 
+ * + * .tensorflow.ListValue list_value = 51; + */ + public Builder setListValue(org.tensorflow.proto.framework.ListValue value) { + if (listValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + listValueBuilder_.setMessage(value); + } + kindCase_ = 51; + return this; + } + /** + *
+     * Represents a list of `Value`.
+     * 
+ * + * .tensorflow.ListValue list_value = 51; + */ + public Builder setListValue( + org.tensorflow.proto.framework.ListValue.Builder builderForValue) { + if (listValueBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + listValueBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 51; + return this; + } + /** + *
+     * Represents a list of `Value`.
+     * 
+ * + * .tensorflow.ListValue list_value = 51; + */ + public Builder mergeListValue(org.tensorflow.proto.framework.ListValue value) { + if (listValueBuilder_ == null) { + if (kindCase_ == 51 && + kind_ != org.tensorflow.proto.framework.ListValue.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.ListValue.newBuilder((org.tensorflow.proto.framework.ListValue) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 51) { + listValueBuilder_.mergeFrom(value); + } + listValueBuilder_.setMessage(value); + } + kindCase_ = 51; + return this; + } + /** + *
+     * Represents a list of `Value`.
+     * 
+ * + * .tensorflow.ListValue list_value = 51; + */ + public Builder clearListValue() { + if (listValueBuilder_ == null) { + if (kindCase_ == 51) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 51) { + kindCase_ = 0; + kind_ = null; + } + listValueBuilder_.clear(); + } + return this; + } + /** + *
+     * Represents a list of `Value`.
+     * 
+ * + * .tensorflow.ListValue list_value = 51; + */ + public org.tensorflow.proto.framework.ListValue.Builder getListValueBuilder() { + return getListValueFieldBuilder().getBuilder(); + } + /** + *
+     * Represents a list of `Value`.
+     * 
+ * + * .tensorflow.ListValue list_value = 51; + */ + public org.tensorflow.proto.framework.ListValueOrBuilder getListValueOrBuilder() { + if ((kindCase_ == 51) && (listValueBuilder_ != null)) { + return listValueBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 51) { + return (org.tensorflow.proto.framework.ListValue) kind_; + } + return org.tensorflow.proto.framework.ListValue.getDefaultInstance(); + } + } + /** + *
+     * Represents a list of `Value`.
+     * 
+ * + * .tensorflow.ListValue list_value = 51; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.ListValue, org.tensorflow.proto.framework.ListValue.Builder, org.tensorflow.proto.framework.ListValueOrBuilder> + getListValueFieldBuilder() { + if (listValueBuilder_ == null) { + if (!(kindCase_ == 51)) { + kind_ = org.tensorflow.proto.framework.ListValue.getDefaultInstance(); + } + listValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.ListValue, org.tensorflow.proto.framework.ListValue.Builder, org.tensorflow.proto.framework.ListValueOrBuilder>( + (org.tensorflow.proto.framework.ListValue) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 51; + onChanged();; + return listValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TupleValue, org.tensorflow.proto.framework.TupleValue.Builder, org.tensorflow.proto.framework.TupleValueOrBuilder> tupleValueBuilder_; + /** + *
+     * Represents a tuple of `Value`.
+     * 
+ * + * .tensorflow.TupleValue tuple_value = 52; + */ + public boolean hasTupleValue() { + return kindCase_ == 52; + } + /** + *
+     * Represents a tuple of `Value`.
+     * 
+ * + * .tensorflow.TupleValue tuple_value = 52; + */ + public org.tensorflow.proto.framework.TupleValue getTupleValue() { + if (tupleValueBuilder_ == null) { + if (kindCase_ == 52) { + return (org.tensorflow.proto.framework.TupleValue) kind_; + } + return org.tensorflow.proto.framework.TupleValue.getDefaultInstance(); + } else { + if (kindCase_ == 52) { + return tupleValueBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.TupleValue.getDefaultInstance(); + } + } + /** + *
+     * Represents a tuple of `Value`.
+     * 
+ * + * .tensorflow.TupleValue tuple_value = 52; + */ + public Builder setTupleValue(org.tensorflow.proto.framework.TupleValue value) { + if (tupleValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + tupleValueBuilder_.setMessage(value); + } + kindCase_ = 52; + return this; + } + /** + *
+     * Represents a tuple of `Value`.
+     * 
+ * + * .tensorflow.TupleValue tuple_value = 52; + */ + public Builder setTupleValue( + org.tensorflow.proto.framework.TupleValue.Builder builderForValue) { + if (tupleValueBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + tupleValueBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 52; + return this; + } + /** + *
+     * Represents a tuple of `Value`.
+     * 
+ * + * .tensorflow.TupleValue tuple_value = 52; + */ + public Builder mergeTupleValue(org.tensorflow.proto.framework.TupleValue value) { + if (tupleValueBuilder_ == null) { + if (kindCase_ == 52 && + kind_ != org.tensorflow.proto.framework.TupleValue.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.TupleValue.newBuilder((org.tensorflow.proto.framework.TupleValue) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 52) { + tupleValueBuilder_.mergeFrom(value); + } + tupleValueBuilder_.setMessage(value); + } + kindCase_ = 52; + return this; + } + /** + *
+     * Represents a tuple of `Value`.
+     * 
+ * + * .tensorflow.TupleValue tuple_value = 52; + */ + public Builder clearTupleValue() { + if (tupleValueBuilder_ == null) { + if (kindCase_ == 52) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 52) { + kindCase_ = 0; + kind_ = null; + } + tupleValueBuilder_.clear(); + } + return this; + } + /** + *
+     * Represents a tuple of `Value`.
+     * 
+ * + * .tensorflow.TupleValue tuple_value = 52; + */ + public org.tensorflow.proto.framework.TupleValue.Builder getTupleValueBuilder() { + return getTupleValueFieldBuilder().getBuilder(); + } + /** + *
+     * Represents a tuple of `Value`.
+     * 
+ * + * .tensorflow.TupleValue tuple_value = 52; + */ + public org.tensorflow.proto.framework.TupleValueOrBuilder getTupleValueOrBuilder() { + if ((kindCase_ == 52) && (tupleValueBuilder_ != null)) { + return tupleValueBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 52) { + return (org.tensorflow.proto.framework.TupleValue) kind_; + } + return org.tensorflow.proto.framework.TupleValue.getDefaultInstance(); + } + } + /** + *
+     * Represents a tuple of `Value`.
+     * 
+ * + * .tensorflow.TupleValue tuple_value = 52; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TupleValue, org.tensorflow.proto.framework.TupleValue.Builder, org.tensorflow.proto.framework.TupleValueOrBuilder> + getTupleValueFieldBuilder() { + if (tupleValueBuilder_ == null) { + if (!(kindCase_ == 52)) { + kind_ = org.tensorflow.proto.framework.TupleValue.getDefaultInstance(); + } + tupleValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.TupleValue, org.tensorflow.proto.framework.TupleValue.Builder, org.tensorflow.proto.framework.TupleValueOrBuilder>( + (org.tensorflow.proto.framework.TupleValue) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 52; + onChanged();; + return tupleValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.DictValue, org.tensorflow.proto.framework.DictValue.Builder, org.tensorflow.proto.framework.DictValueOrBuilder> dictValueBuilder_; + /** + *
+     * Represents a dict `Value`.
+     * 
+ * + * .tensorflow.DictValue dict_value = 53; + */ + public boolean hasDictValue() { + return kindCase_ == 53; + } + /** + *
+     * Represents a dict `Value`.
+     * 
+ * + * .tensorflow.DictValue dict_value = 53; + */ + public org.tensorflow.proto.framework.DictValue getDictValue() { + if (dictValueBuilder_ == null) { + if (kindCase_ == 53) { + return (org.tensorflow.proto.framework.DictValue) kind_; + } + return org.tensorflow.proto.framework.DictValue.getDefaultInstance(); + } else { + if (kindCase_ == 53) { + return dictValueBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.DictValue.getDefaultInstance(); + } + } + /** + *
+     * Represents a dict `Value`.
+     * 
+ * + * .tensorflow.DictValue dict_value = 53; + */ + public Builder setDictValue(org.tensorflow.proto.framework.DictValue value) { + if (dictValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + dictValueBuilder_.setMessage(value); + } + kindCase_ = 53; + return this; + } + /** + *
+     * Represents a dict `Value`.
+     * 
+ * + * .tensorflow.DictValue dict_value = 53; + */ + public Builder setDictValue( + org.tensorflow.proto.framework.DictValue.Builder builderForValue) { + if (dictValueBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + dictValueBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 53; + return this; + } + /** + *
+     * Represents a dict `Value`.
+     * 
+ * + * .tensorflow.DictValue dict_value = 53; + */ + public Builder mergeDictValue(org.tensorflow.proto.framework.DictValue value) { + if (dictValueBuilder_ == null) { + if (kindCase_ == 53 && + kind_ != org.tensorflow.proto.framework.DictValue.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.DictValue.newBuilder((org.tensorflow.proto.framework.DictValue) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 53) { + dictValueBuilder_.mergeFrom(value); + } + dictValueBuilder_.setMessage(value); + } + kindCase_ = 53; + return this; + } + /** + *
+     * Represents a dict `Value`.
+     * 
+ * + * .tensorflow.DictValue dict_value = 53; + */ + public Builder clearDictValue() { + if (dictValueBuilder_ == null) { + if (kindCase_ == 53) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 53) { + kindCase_ = 0; + kind_ = null; + } + dictValueBuilder_.clear(); + } + return this; + } + /** + *
+     * Represents a dict `Value`.
+     * 
+ * + * .tensorflow.DictValue dict_value = 53; + */ + public org.tensorflow.proto.framework.DictValue.Builder getDictValueBuilder() { + return getDictValueFieldBuilder().getBuilder(); + } + /** + *
+     * Represents a dict `Value`.
+     * 
+ * + * .tensorflow.DictValue dict_value = 53; + */ + public org.tensorflow.proto.framework.DictValueOrBuilder getDictValueOrBuilder() { + if ((kindCase_ == 53) && (dictValueBuilder_ != null)) { + return dictValueBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 53) { + return (org.tensorflow.proto.framework.DictValue) kind_; + } + return org.tensorflow.proto.framework.DictValue.getDefaultInstance(); + } + } + /** + *
+     * Represents a dict `Value`.
+     * 
+ * + * .tensorflow.DictValue dict_value = 53; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.DictValue, org.tensorflow.proto.framework.DictValue.Builder, org.tensorflow.proto.framework.DictValueOrBuilder> + getDictValueFieldBuilder() { + if (dictValueBuilder_ == null) { + if (!(kindCase_ == 53)) { + kind_ = org.tensorflow.proto.framework.DictValue.getDefaultInstance(); + } + dictValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.DictValue, org.tensorflow.proto.framework.DictValue.Builder, org.tensorflow.proto.framework.DictValueOrBuilder>( + (org.tensorflow.proto.framework.DictValue) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 53; + onChanged();; + return dictValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.NamedTupleValue, org.tensorflow.proto.framework.NamedTupleValue.Builder, org.tensorflow.proto.framework.NamedTupleValueOrBuilder> namedTupleValueBuilder_; + /** + *
+     * Represents Python's namedtuple.
+     * 
+ * + * .tensorflow.NamedTupleValue named_tuple_value = 54; + */ + public boolean hasNamedTupleValue() { + return kindCase_ == 54; + } + /** + *
+     * Represents Python's namedtuple.
+     * 
+ * + * .tensorflow.NamedTupleValue named_tuple_value = 54; + */ + public org.tensorflow.proto.framework.NamedTupleValue getNamedTupleValue() { + if (namedTupleValueBuilder_ == null) { + if (kindCase_ == 54) { + return (org.tensorflow.proto.framework.NamedTupleValue) kind_; + } + return org.tensorflow.proto.framework.NamedTupleValue.getDefaultInstance(); + } else { + if (kindCase_ == 54) { + return namedTupleValueBuilder_.getMessage(); + } + return org.tensorflow.proto.framework.NamedTupleValue.getDefaultInstance(); + } + } + /** + *
+     * Represents Python's namedtuple.
+     * 
+ * + * .tensorflow.NamedTupleValue named_tuple_value = 54; + */ + public Builder setNamedTupleValue(org.tensorflow.proto.framework.NamedTupleValue value) { + if (namedTupleValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + namedTupleValueBuilder_.setMessage(value); + } + kindCase_ = 54; + return this; + } + /** + *
+     * Represents Python's namedtuple.
+     * 
+ * + * .tensorflow.NamedTupleValue named_tuple_value = 54; + */ + public Builder setNamedTupleValue( + org.tensorflow.proto.framework.NamedTupleValue.Builder builderForValue) { + if (namedTupleValueBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + namedTupleValueBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 54; + return this; + } + /** + *
+     * Represents Python's namedtuple.
+     * 
+ * + * .tensorflow.NamedTupleValue named_tuple_value = 54; + */ + public Builder mergeNamedTupleValue(org.tensorflow.proto.framework.NamedTupleValue value) { + if (namedTupleValueBuilder_ == null) { + if (kindCase_ == 54 && + kind_ != org.tensorflow.proto.framework.NamedTupleValue.getDefaultInstance()) { + kind_ = org.tensorflow.proto.framework.NamedTupleValue.newBuilder((org.tensorflow.proto.framework.NamedTupleValue) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 54) { + namedTupleValueBuilder_.mergeFrom(value); + } + namedTupleValueBuilder_.setMessage(value); + } + kindCase_ = 54; + return this; + } + /** + *
+     * Represents Python's namedtuple.
+     * 
+ * + * .tensorflow.NamedTupleValue named_tuple_value = 54; + */ + public Builder clearNamedTupleValue() { + if (namedTupleValueBuilder_ == null) { + if (kindCase_ == 54) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 54) { + kindCase_ = 0; + kind_ = null; + } + namedTupleValueBuilder_.clear(); + } + return this; + } + /** + *
+     * Represents Python's namedtuple.
+     * 
+ * + * .tensorflow.NamedTupleValue named_tuple_value = 54; + */ + public org.tensorflow.proto.framework.NamedTupleValue.Builder getNamedTupleValueBuilder() { + return getNamedTupleValueFieldBuilder().getBuilder(); + } + /** + *
+     * Represents Python's namedtuple.
+     * 
+ * + * .tensorflow.NamedTupleValue named_tuple_value = 54; + */ + public org.tensorflow.proto.framework.NamedTupleValueOrBuilder getNamedTupleValueOrBuilder() { + if ((kindCase_ == 54) && (namedTupleValueBuilder_ != null)) { + return namedTupleValueBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 54) { + return (org.tensorflow.proto.framework.NamedTupleValue) kind_; + } + return org.tensorflow.proto.framework.NamedTupleValue.getDefaultInstance(); + } + } + /** + *
+     * Represents Python's namedtuple.
+     * 
+ * + * .tensorflow.NamedTupleValue named_tuple_value = 54; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.NamedTupleValue, org.tensorflow.proto.framework.NamedTupleValue.Builder, org.tensorflow.proto.framework.NamedTupleValueOrBuilder> + getNamedTupleValueFieldBuilder() { + if (namedTupleValueBuilder_ == null) { + if (!(kindCase_ == 54)) { + kind_ = org.tensorflow.proto.framework.NamedTupleValue.getDefaultInstance(); + } + namedTupleValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.tensorflow.proto.framework.NamedTupleValue, org.tensorflow.proto.framework.NamedTupleValue.Builder, org.tensorflow.proto.framework.NamedTupleValueOrBuilder>( + (org.tensorflow.proto.framework.NamedTupleValue) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 54; + onChanged();; + return namedTupleValueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.StructuredValue) + } + + // @@protoc_insertion_point(class_scope:tensorflow.StructuredValue) + private static final org.tensorflow.proto.framework.StructuredValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.StructuredValue(); + } + + public static org.tensorflow.proto.framework.StructuredValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StructuredValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StructuredValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.StructuredValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StructuredValueOrBuilder.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StructuredValueOrBuilder.java new file mode 100644 index 00000000000..94106768023 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/StructuredValueOrBuilder.java @@ -0,0 +1,284 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/protobuf/struct.proto + +package org.tensorflow.proto.framework; + +public interface StructuredValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.StructuredValue) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Represents None.
+   * 
+ * + * .tensorflow.NoneValue none_value = 1; + */ + boolean hasNoneValue(); + /** + *
+   * Represents None.
+   * 
+ * + * .tensorflow.NoneValue none_value = 1; + */ + org.tensorflow.proto.framework.NoneValue getNoneValue(); + /** + *
+   * Represents None.
+   * 
+ * + * .tensorflow.NoneValue none_value = 1; + */ + org.tensorflow.proto.framework.NoneValueOrBuilder getNoneValueOrBuilder(); + + /** + *
+   * Represents a double-precision floating-point value (a Python `float`).
+   * 
+ * + * double float64_value = 11; + */ + double getFloat64Value(); + + /** + *
+   * Represents a signed integer value, limited to 64 bits.
+   * Larger values from Python's arbitrary-precision integers are unsupported.
+   * 
+ * + * sint64 int64_value = 12; + */ + long getInt64Value(); + + /** + *
+   * Represents a string of Unicode characters stored in a Python `str`.
+   * In Python 3, this is exactly what type `str` is.
+   * In Python 2, this is the UTF-8 encoding of the characters.
+   * For strings with ASCII characters only (as often used in TensorFlow code)
+   * there is effectively no difference between the language versions.
+   * The obsolescent `unicode` type of Python 2 is not supported here.
+   * 
+ * + * string string_value = 13; + */ + java.lang.String getStringValue(); + /** + *
+   * Represents a string of Unicode characters stored in a Python `str`.
+   * In Python 3, this is exactly what type `str` is.
+   * In Python 2, this is the UTF-8 encoding of the characters.
+   * For strings with ASCII characters only (as often used in TensorFlow code)
+   * there is effectively no difference between the language versions.
+   * The obsolescent `unicode` type of Python 2 is not supported here.
+   * 
+ * + * string string_value = 13; + */ + com.google.protobuf.ByteString + getStringValueBytes(); + + /** + *
+   * Represents a boolean value.
+   * 
+ * + * bool bool_value = 14; + */ + boolean getBoolValue(); + + /** + *
+   * Represents a TensorShape.
+   * 
+ * + * .tensorflow.TensorShapeProto tensor_shape_value = 31; + */ + boolean hasTensorShapeValue(); + /** + *
+   * Represents a TensorShape.
+   * 
+ * + * .tensorflow.TensorShapeProto tensor_shape_value = 31; + */ + org.tensorflow.proto.framework.TensorShapeProto getTensorShapeValue(); + /** + *
+   * Represents a TensorShape.
+   * 
+ * + * .tensorflow.TensorShapeProto tensor_shape_value = 31; + */ + org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getTensorShapeValueOrBuilder(); + + /** + *
+   * Represents an enum value for dtype.
+   * 
+ * + * .tensorflow.DataType tensor_dtype_value = 32; + */ + int getTensorDtypeValueValue(); + /** + *
+   * Represents an enum value for dtype.
+   * 
+ * + * .tensorflow.DataType tensor_dtype_value = 32; + */ + org.tensorflow.proto.framework.DataType getTensorDtypeValue(); + + /** + *
+   * Represents a value for tf.TensorSpec.
+   * 
+ * + * .tensorflow.TensorSpecProto tensor_spec_value = 33; + */ + boolean hasTensorSpecValue(); + /** + *
+   * Represents a value for tf.TensorSpec.
+   * 
+ * + * .tensorflow.TensorSpecProto tensor_spec_value = 33; + */ + org.tensorflow.proto.framework.TensorSpecProto getTensorSpecValue(); + /** + *
+   * Represents a value for tf.TensorSpec.
+   * 
+ * + * .tensorflow.TensorSpecProto tensor_spec_value = 33; + */ + org.tensorflow.proto.framework.TensorSpecProtoOrBuilder getTensorSpecValueOrBuilder(); + + /** + *
+   * Represents a value for tf.TypeSpec.
+   * 
+ * + * .tensorflow.TypeSpecProto type_spec_value = 34; + */ + boolean hasTypeSpecValue(); + /** + *
+   * Represents a value for tf.TypeSpec.
+   * 
+ * + * .tensorflow.TypeSpecProto type_spec_value = 34; + */ + org.tensorflow.proto.framework.TypeSpecProto getTypeSpecValue(); + /** + *
+   * Represents a value for tf.TypeSpec.
+   * 
+ * + * .tensorflow.TypeSpecProto type_spec_value = 34; + */ + org.tensorflow.proto.framework.TypeSpecProtoOrBuilder getTypeSpecValueOrBuilder(); + + /** + *
+   * Represents a list of `Value`.
+   * 
+ * + * .tensorflow.ListValue list_value = 51; + */ + boolean hasListValue(); + /** + *
+   * Represents a list of `Value`.
+   * 
+ * + * .tensorflow.ListValue list_value = 51; + */ + org.tensorflow.proto.framework.ListValue getListValue(); + /** + *
+   * Represents a list of `Value`.
+   * 
+ * + * .tensorflow.ListValue list_value = 51; + */ + org.tensorflow.proto.framework.ListValueOrBuilder getListValueOrBuilder(); + + /** + *
+   * Represents a tuple of `Value`.
+   * 
+ * + * .tensorflow.TupleValue tuple_value = 52; + */ + boolean hasTupleValue(); + /** + *
+   * Represents a tuple of `Value`.
+   * 
+ * + * .tensorflow.TupleValue tuple_value = 52; + */ + org.tensorflow.proto.framework.TupleValue getTupleValue(); + /** + *
+   * Represents a tuple of `Value`.
+   * 
+ * + * .tensorflow.TupleValue tuple_value = 52; + */ + org.tensorflow.proto.framework.TupleValueOrBuilder getTupleValueOrBuilder(); + + /** + *
+   * Represents a dict `Value`.
+   * 
+ * + * .tensorflow.DictValue dict_value = 53; + */ + boolean hasDictValue(); + /** + *
+   * Represents a dict `Value`.
+   * 
+ * + * .tensorflow.DictValue dict_value = 53; + */ + org.tensorflow.proto.framework.DictValue getDictValue(); + /** + *
+   * Represents a dict `Value`.
+   * 
+ * + * .tensorflow.DictValue dict_value = 53; + */ + org.tensorflow.proto.framework.DictValueOrBuilder getDictValueOrBuilder(); + + /** + *
+   * Represents Python's namedtuple.
+   * 
+ * + * .tensorflow.NamedTupleValue named_tuple_value = 54; + */ + boolean hasNamedTupleValue(); + /** + *
+   * Represents Python's namedtuple.
+   * 
+ * + * .tensorflow.NamedTupleValue named_tuple_value = 54; + */ + org.tensorflow.proto.framework.NamedTupleValue getNamedTupleValue(); + /** + *
+   * Represents Python's namedtuple.
+   * 
+ * + * .tensorflow.NamedTupleValue named_tuple_value = 54; + */ + org.tensorflow.proto.framework.NamedTupleValueOrBuilder getNamedTupleValueOrBuilder(); + + public org.tensorflow.proto.framework.StructuredValue.KindCase getKindCase(); +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/Summary.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/Summary.java new file mode 100644 index 00000000000..19c5c6664a3 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/proto/framework/Summary.java @@ -0,0 +1,4725 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/summary.proto + +package org.tensorflow.proto.framework; + +/** + *
+ * A Summary is a set of named values to be displayed by the
+ * visualizer.
+ * Summaries are produced regularly during training, as controlled by
+ * the "summary_interval_secs" attribute of the training operation.
+ * Summaries are also produced at the end of an evaluation.
+ * 
+ * + * Protobuf type {@code tensorflow.Summary} + */ +public final class Summary extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.Summary) + SummaryOrBuilder { +private static final long serialVersionUID = 0L; + // Use Summary.newBuilder() to construct. + private Summary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Summary() { + value_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Summary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Summary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + value_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + value_.add( + input.readMessage(org.tensorflow.proto.framework.Summary.Value.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + value_ = java.util.Collections.unmodifiableList(value_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_Summary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_Summary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.Summary.class, org.tensorflow.proto.framework.Summary.Builder.class); + } + + public interface ImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.Summary.Image) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Dimensions of the image.
+     * 
+ * + * int32 height = 1; + */ + int getHeight(); + + /** + * int32 width = 2; + */ + int getWidth(); + + /** + *
+     * Valid colorspace values are
+     *   1 - grayscale
+     *   2 - grayscale + alpha
+     *   3 - RGB
+     *   4 - RGBA
+     *   5 - DIGITAL_YUV
+     *   6 - BGRA
+     * 
+ * + * int32 colorspace = 3; + */ + int getColorspace(); + + /** + *
+     * Image data in encoded format.  All image formats supported by
+     * image_codec::CoderUtil can be stored here.
+     * 
+ * + * bytes encoded_image_string = 4; + */ + com.google.protobuf.ByteString getEncodedImageString(); + } + /** + * Protobuf type {@code tensorflow.Summary.Image} + */ + public static final class Image extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.Summary.Image) + ImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use Image.newBuilder() to construct. + private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Image() { + encodedImageString_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Image(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Image( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + height_ = input.readInt32(); + break; + } + case 16: { + + width_ = input.readInt32(); + break; + } + case 24: { + + colorspace_ = input.readInt32(); + break; + } + case 34: { + + encodedImageString_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_Summary_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_Summary_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.Summary.Image.class, org.tensorflow.proto.framework.Summary.Image.Builder.class); + } + + public static final int HEIGHT_FIELD_NUMBER = 1; + private int height_; + /** + *
+     * Dimensions of the image.
+     * 
+ * + * int32 height = 1; + */ + public int getHeight() { + return height_; + } + + public static final int WIDTH_FIELD_NUMBER = 2; + private int width_; + /** + * int32 width = 2; + */ + public int getWidth() { + return width_; + } + + public static final int COLORSPACE_FIELD_NUMBER = 3; + private int colorspace_; + /** + *
+     * Valid colorspace values are
+     *   1 - grayscale
+     *   2 - grayscale + alpha
+     *   3 - RGB
+     *   4 - RGBA
+     *   5 - DIGITAL_YUV
+     *   6 - BGRA
+     * 
+ * + * int32 colorspace = 3; + */ + public int getColorspace() { + return colorspace_; + } + + public static final int ENCODED_IMAGE_STRING_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString encodedImageString_; + /** + *
+     * Image data in encoded format.  All image formats supported by
+     * image_codec::CoderUtil can be stored here.
+     * 
+ * + * bytes encoded_image_string = 4; + */ + public com.google.protobuf.ByteString getEncodedImageString() { + return encodedImageString_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (height_ != 0) { + output.writeInt32(1, height_); + } + if (width_ != 0) { + output.writeInt32(2, width_); + } + if (colorspace_ != 0) { + output.writeInt32(3, colorspace_); + } + if (!encodedImageString_.isEmpty()) { + output.writeBytes(4, encodedImageString_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, height_); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, width_); + } + if (colorspace_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, colorspace_); + } + if (!encodedImageString_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, encodedImageString_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.Summary.Image)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.Summary.Image other = (org.tensorflow.proto.framework.Summary.Image) obj; + + if (getHeight() + != other.getHeight()) return false; + if (getWidth() + != other.getWidth()) return false; + if (getColorspace() + != other.getColorspace()) return false; + if (!getEncodedImageString() + .equals(other.getEncodedImageString())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + COLORSPACE_FIELD_NUMBER; + hash = (53 * hash) + getColorspace(); + hash = (37 * hash) + ENCODED_IMAGE_STRING_FIELD_NUMBER; + hash = (53 * hash) + getEncodedImageString().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.Summary.Image parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.Summary.Image parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.Summary.Image parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.Summary.Image parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.Summary.Image parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.Summary.Image parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.Summary.Image parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.Summary.Image parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.Summary.Image parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.Summary.Image parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.Summary.Image parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.Summary.Image parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.Summary.Image prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.Summary.Image} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.Summary.Image) + org.tensorflow.proto.framework.Summary.ImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_Summary_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_Summary_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.Summary.Image.class, org.tensorflow.proto.framework.Summary.Image.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.Summary.Image.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + height_ = 0; + + width_ = 0; + + colorspace_ = 0; + + encodedImageString_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_Summary_Image_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.Summary.Image getDefaultInstanceForType() { + return org.tensorflow.proto.framework.Summary.Image.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.Summary.Image build() { + org.tensorflow.proto.framework.Summary.Image result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.Summary.Image buildPartial() { + org.tensorflow.proto.framework.Summary.Image result = new org.tensorflow.proto.framework.Summary.Image(this); + result.height_ = height_; + result.width_ = width_; + result.colorspace_ = colorspace_; + result.encodedImageString_ = encodedImageString_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.Summary.Image) { + return mergeFrom((org.tensorflow.proto.framework.Summary.Image)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.Summary.Image other) { + if (other == org.tensorflow.proto.framework.Summary.Image.getDefaultInstance()) return this; + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getColorspace() != 0) { + setColorspace(other.getColorspace()); + } + if (other.getEncodedImageString() != com.google.protobuf.ByteString.EMPTY) { + setEncodedImageString(other.getEncodedImageString()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.Summary.Image parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.Summary.Image) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int height_ ; + /** + *
+       * Dimensions of the image.
+       * 
+ * + * int32 height = 1; + */ + public int getHeight() { + return height_; + } + /** + *
+       * Dimensions of the image.
+       * 
+ * + * int32 height = 1; + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+       * Dimensions of the image.
+       * 
+ * + * int32 height = 1; + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + + private int width_ ; + /** + * int32 width = 2; + */ + public int getWidth() { + return width_; + } + /** + * int32 width = 2; + */ + public Builder setWidth(int value) { + + width_ = value; + onChanged(); + return this; + } + /** + * int32 width = 2; + */ + public Builder clearWidth() { + + width_ = 0; + onChanged(); + return this; + } + + private int colorspace_ ; + /** + *
+       * Valid colorspace values are
+       *   1 - grayscale
+       *   2 - grayscale + alpha
+       *   3 - RGB
+       *   4 - RGBA
+       *   5 - DIGITAL_YUV
+       *   6 - BGRA
+       * 
+ * + * int32 colorspace = 3; + */ + public int getColorspace() { + return colorspace_; + } + /** + *
+       * Valid colorspace values are
+       *   1 - grayscale
+       *   2 - grayscale + alpha
+       *   3 - RGB
+       *   4 - RGBA
+       *   5 - DIGITAL_YUV
+       *   6 - BGRA
+       * 
+ * + * int32 colorspace = 3; + */ + public Builder setColorspace(int value) { + + colorspace_ = value; + onChanged(); + return this; + } + /** + *
+       * Valid colorspace values are
+       *   1 - grayscale
+       *   2 - grayscale + alpha
+       *   3 - RGB
+       *   4 - RGBA
+       *   5 - DIGITAL_YUV
+       *   6 - BGRA
+       * 
+ * + * int32 colorspace = 3; + */ + public Builder clearColorspace() { + + colorspace_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString encodedImageString_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * Image data in encoded format.  All image formats supported by
+       * image_codec::CoderUtil can be stored here.
+       * 
+ * + * bytes encoded_image_string = 4; + */ + public com.google.protobuf.ByteString getEncodedImageString() { + return encodedImageString_; + } + /** + *
+       * Image data in encoded format.  All image formats supported by
+       * image_codec::CoderUtil can be stored here.
+       * 
+ * + * bytes encoded_image_string = 4; + */ + public Builder setEncodedImageString(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + encodedImageString_ = value; + onChanged(); + return this; + } + /** + *
+       * Image data in encoded format.  All image formats supported by
+       * image_codec::CoderUtil can be stored here.
+       * 
+ * + * bytes encoded_image_string = 4; + */ + public Builder clearEncodedImageString() { + + encodedImageString_ = getDefaultInstance().getEncodedImageString(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.Summary.Image) + } + + // @@protoc_insertion_point(class_scope:tensorflow.Summary.Image) + private static final org.tensorflow.proto.framework.Summary.Image DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.Summary.Image(); + } + + public static org.tensorflow.proto.framework.Summary.Image getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Image parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Image(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.framework.Summary.Image getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AudioOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.Summary.Audio) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Sample rate of the audio in Hz.
+     * 
+ * + * float sample_rate = 1; + */ + float getSampleRate(); + + /** + *
+     * Number of channels of audio.
+     * 
+ * + * int64 num_channels = 2; + */ + long getNumChannels(); + + /** + *
+     * Length of the audio in frames (samples per channel).
+     * 
+ * + * int64 length_frames = 3; + */ + long getLengthFrames(); + + /** + *
+     * Encoded audio data and its associated RFC 2045 content type (e.g.
+     * "audio/wav").
+     * 
+ * + * bytes encoded_audio_string = 4; + */ + com.google.protobuf.ByteString getEncodedAudioString(); + + /** + * string content_type = 5; + */ + java.lang.String getContentType(); + /** + * string content_type = 5; + */ + com.google.protobuf.ByteString + getContentTypeBytes(); + } + /** + * Protobuf type {@code tensorflow.Summary.Audio} + */ + public static final class Audio extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tensorflow.Summary.Audio) + AudioOrBuilder { + private static final long serialVersionUID = 0L; + // Use Audio.newBuilder() to construct. + private Audio(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Audio() { + encodedAudioString_ = com.google.protobuf.ByteString.EMPTY; + contentType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Audio(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Audio( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + + sampleRate_ = input.readFloat(); + break; + } + case 16: { + + numChannels_ = input.readInt64(); + break; + } + case 24: { + + lengthFrames_ = input.readInt64(); + break; + } + case 34: { + + encodedAudioString_ = input.readBytes(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + contentType_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_Summary_Audio_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_Summary_Audio_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.Summary.Audio.class, org.tensorflow.proto.framework.Summary.Audio.Builder.class); + } + + public static final int SAMPLE_RATE_FIELD_NUMBER = 1; + private float sampleRate_; + /** + *
+     * Sample rate of the audio in Hz.
+     * 
+ * + * float sample_rate = 1; + */ + public float getSampleRate() { + return sampleRate_; + } + + public static final int NUM_CHANNELS_FIELD_NUMBER = 2; + private long numChannels_; + /** + *
+     * Number of channels of audio.
+     * 
+ * + * int64 num_channels = 2; + */ + public long getNumChannels() { + return numChannels_; + } + + public static final int LENGTH_FRAMES_FIELD_NUMBER = 3; + private long lengthFrames_; + /** + *
+     * Length of the audio in frames (samples per channel).
+     * 
+ * + * int64 length_frames = 3; + */ + public long getLengthFrames() { + return lengthFrames_; + } + + public static final int ENCODED_AUDIO_STRING_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString encodedAudioString_; + /** + *
+     * Encoded audio data and its associated RFC 2045 content type (e.g.
+     * "audio/wav").
+     * 
+ * + * bytes encoded_audio_string = 4; + */ + public com.google.protobuf.ByteString getEncodedAudioString() { + return encodedAudioString_; + } + + public static final int CONTENT_TYPE_FIELD_NUMBER = 5; + private volatile java.lang.Object contentType_; + /** + * string content_type = 5; + */ + public java.lang.String getContentType() { + java.lang.Object ref = contentType_; + 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(); + contentType_ = s; + return s; + } + } + /** + * string content_type = 5; + */ + public com.google.protobuf.ByteString + getContentTypeBytes() { + java.lang.Object ref = contentType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + contentType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (sampleRate_ != 0F) { + output.writeFloat(1, sampleRate_); + } + if (numChannels_ != 0L) { + output.writeInt64(2, numChannels_); + } + if (lengthFrames_ != 0L) { + output.writeInt64(3, lengthFrames_); + } + if (!encodedAudioString_.isEmpty()) { + output.writeBytes(4, encodedAudioString_); + } + if (!getContentTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, contentType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sampleRate_ != 0F) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, sampleRate_); + } + if (numChannels_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, numChannels_); + } + if (lengthFrames_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, lengthFrames_); + } + if (!encodedAudioString_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, encodedAudioString_); + } + if (!getContentTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, contentType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.framework.Summary.Audio)) { + return super.equals(obj); + } + org.tensorflow.proto.framework.Summary.Audio other = (org.tensorflow.proto.framework.Summary.Audio) obj; + + if (java.lang.Float.floatToIntBits(getSampleRate()) + != java.lang.Float.floatToIntBits( + other.getSampleRate())) return false; + if (getNumChannels() + != other.getNumChannels()) return false; + if (getLengthFrames() + != other.getLengthFrames()) return false; + if (!getEncodedAudioString() + .equals(other.getEncodedAudioString())) return false; + if (!getContentType() + .equals(other.getContentType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SAMPLE_RATE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getSampleRate()); + hash = (37 * hash) + NUM_CHANNELS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNumChannels()); + hash = (37 * hash) + LENGTH_FRAMES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLengthFrames()); + hash = (37 * hash) + ENCODED_AUDIO_STRING_FIELD_NUMBER; + hash = (53 * hash) + getEncodedAudioString().hashCode(); + hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getContentType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.framework.Summary.Audio parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.Summary.Audio parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.Summary.Audio parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.Summary.Audio 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.proto.framework.Summary.Audio parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.framework.Summary.Audio parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.framework.Summary.Audio parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.Summary.Audio parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.Summary.Audio parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.Summary.Audio parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.framework.Summary.Audio parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.framework.Summary.Audio parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.framework.Summary.Audio prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.Summary.Audio} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.Summary.Audio) + org.tensorflow.proto.framework.Summary.AudioOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_Summary_Audio_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_Summary_Audio_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.framework.Summary.Audio.class, org.tensorflow.proto.framework.Summary.Audio.Builder.class); + } + + // Construct using org.tensorflow.proto.framework.Summary.Audio.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + sampleRate_ = 0F; + + numChannels_ = 0L; + + lengthFrames_ = 0L; + + encodedAudioString_ = com.google.protobuf.ByteString.EMPTY; + + contentType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.framework.SummaryProtos.internal_static_tensorflow_Summary_Audio_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.framework.Summary.Audio getDefaultInstanceForType() { + return org.tensorflow.proto.framework.Summary.Audio.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.framework.Summary.Audio build() { + org.tensorflow.proto.framework.Summary.Audio result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.framework.Summary.Audio buildPartial() { + org.tensorflow.proto.framework.Summary.Audio result = new org.tensorflow.proto.framework.Summary.Audio(this); + result.sampleRate_ = sampleRate_; + result.numChannels_ = numChannels_; + result.lengthFrames_ = lengthFrames_; + result.encodedAudioString_ = encodedAudioString_; + result.contentType_ = contentType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.framework.Summary.Audio) { + return mergeFrom((org.tensorflow.proto.framework.Summary.Audio)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.framework.Summary.Audio other) { + if (other == org.tensorflow.proto.framework.Summary.Audio.getDefaultInstance()) return this; + if (other.getSampleRate() != 0F) { + setSampleRate(other.getSampleRate()); + } + if (other.getNumChannels() != 0L) { + setNumChannels(other.getNumChannels()); + } + if (other.getLengthFrames() != 0L) { + setLengthFrames(other.getLengthFrames()); + } + if (other.getEncodedAudioString() != com.google.protobuf.ByteString.EMPTY) { + setEncodedAudioString(other.getEncodedAudioString()); + } + if (!other.getContentType().isEmpty()) { + contentType_ = other.contentType_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.tensorflow.proto.framework.Summary.Audio parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.tensorflow.proto.framework.Summary.Audio) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float sampleRate_ ; + /** + *
+       * Sample rate of the audio in Hz.
+       * 
+ * + * float sample_rate = 1; + */ + public float getSampleRate() { + return sampleRate_; + } + /** + *
+       * Sample rate of the audio in Hz.
+       * 
+ * + * float sample_rate = 1; + */ + public Builder setSampleRate(float value) { + + sampleRate_ = value; + onChanged(); + return this; + } + /** + *
+       * Sample rate of the audio in Hz.
+       * 
+ * + * float sample_rate = 1; + */ + public Builder clearSampleRate() { + + sampleRate_ = 0F; + onChanged(); + return this; + } + + private long numChannels_ ; + /** + *
+       * Number of channels of audio.
+       * 
+ * + * int64 num_channels = 2; + */ + public long getNumChannels() { + return numChannels_; + } + /** + *
+       * Number of channels of audio.
+       * 
+ * + * int64 num_channels = 2; + */ + public Builder setNumChannels(long value) { + + numChannels_ = value; + onChanged(); + return this; + } + /** + *
+       * Number of channels of audio.
+       * 
+ * + * int64 num_channels = 2; + */ + public Builder clearNumChannels() { + + numChannels_ = 0L; + onChanged(); + return this; + } + + private long lengthFrames_ ; + /** + *
+       * Length of the audio in frames (samples per channel).
+       * 
+ * + * int64 length_frames = 3; + */ + public long getLengthFrames() { + return lengthFrames_; + } + /** + *
+       * Length of the audio in frames (samples per channel).
+       * 
+ * + * int64 length_frames = 3; + */ + public Builder setLengthFrames(long value) { + + lengthFrames_ = value; + onChanged(); + return this; + } + /** + *
+       * Length of the audio in frames (samples per channel).
+       * 
+ * + * int64 length_frames = 3; + */ + public Builder clearLengthFrames() { + + lengthFrames_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString encodedAudioString_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * Encoded audio data and its associated RFC 2045 content type (e.g.
+       * "audio/wav").
+       * 
+ * + * bytes encoded_audio_string = 4; + */ + public com.google.protobuf.ByteString getEncodedAudioString() { + return encodedAudioString_; + } + /** + *
+       * Encoded audio data and its associated RFC 2045 content type (e.g.
+       * "audio/wav").
+       * 
+ * + * bytes encoded_audio_string = 4; + */ + public Builder setEncodedAudioString(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + encodedAudioString_ = value; + onChanged(); + return this; + } + /** + *
+       * Encoded audio data and its associated RFC 2045 content type (e.g.
+       * "audio/wav").
+       * 
+ * + * bytes encoded_audio_string = 4; + */ + public Builder clearEncodedAudioString() { + + encodedAudioString_ = getDefaultInstance().getEncodedAudioString(); + onChanged(); + return this; + } + + private java.lang.Object contentType_ = ""; + /** + * string content_type = 5; + */ + public java.lang.String getContentType() { + java.lang.Object ref = contentType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contentType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string content_type = 5; + */ + public com.google.protobuf.ByteString + getContentTypeBytes() { + java.lang.Object ref = contentType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + contentType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string content_type = 5; + */ + public Builder setContentType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + contentType_ = value; + onChanged(); + return this; + } + /** + * string content_type = 5; + */ + public Builder clearContentType() { + + contentType_ = getDefaultInstance().getContentType(); + onChanged(); + return this; + } + /** + * string content_type = 5; + */ + public Builder setContentTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + contentType_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tensorflow.Summary.Audio) + } + + // @@protoc_insertion_point(class_scope:tensorflow.Summary.Audio) + private static final org.tensorflow.proto.framework.Summary.Audio DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.framework.Summary.Audio(); + } + + public static org.tensorflow.proto.framework.Summary.Audio getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser