diff --git a/modules/dnn/3rdparty/protobuf/CMakeLists.txt b/modules/dnn/3rdparty/protobuf/CMakeLists.txt index 54d549117..eb4ebbe72 100644 --- a/modules/dnn/3rdparty/protobuf/CMakeLists.txt +++ b/modules/dnn/3rdparty/protobuf/CMakeLists.txt @@ -16,9 +16,10 @@ if(MSVC) /wd4702 /wd4456 /wd4457 /wd4065 /wd4310 /wd4661 /wd4506 ) else() - ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-deprecated -Wmissing-prototypes -Wmissing-declarations -Wshadow -Wunused-parameter -Wunused-local-typedefs -Wsign-compare -Wsign-promo -Wundef - -Wtautological-undefined-compare - -Wignored-qualifiers -Wextra -Wunused-function -Wunused-const-variable + ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-deprecated -Wmissing-prototypes -Wmissing-declarations -Wshadow + -Wunused-parameter -Wunused-local-typedefs -Wsign-compare -Wsign-promo + -Wundef -Wtautological-undefined-compare -Wignored-qualifiers -Wextra + -Wunused-function -Wunused-const-variable ) endif() diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt index c61c97b79..71407459c 100644 --- a/modules/dnn/CMakeLists.txt +++ b/modules/dnn/CMakeLists.txt @@ -15,6 +15,20 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-shadow -Wno-parentheses -Wmaybe-uninit ) ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4701 /wd4100) +if(MSVC) + add_definitions( -D_CRT_SECURE_NO_WARNINGS=1 ) + ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 + /wd4305 /wd4127 /wd4100 /wd4512 /wd4125 /wd4389 /wd4510 /wd4610 + /wd4702 /wd4456 /wd4457 /wd4065 /wd4310 /wd4661 /wd4506 + ) +else() + ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-deprecated -Wmissing-prototypes -Wmissing-declarations -Wshadow + -Wunused-parameter -Wunused-local-typedefs -Wsign-compare -Wsign-promo + -Wundef -Wtautological-undefined-compare -Wignored-qualifiers -Wextra + -Wunused-function -Wunused-const-variable -Wdeprecated-declarations + ) +endif() + # ---------------------------------------------------------------------------- # Resolve libprotobuf dependency # ---------------------------------------------------------------------------- diff --git a/modules/dnn/cmake/OpenCVFindCBLAS.cmake b/modules/dnn/cmake/OpenCVFindCBLAS.cmake index 266c2bc35..2c4179b44 100644 --- a/modules/dnn/cmake/OpenCVFindCBLAS.cmake +++ b/modules/dnn/cmake/OpenCVFindCBLAS.cmake @@ -16,7 +16,7 @@ if(${the_module}_WITH_BLAS) endif() if(NOT HAVE_BLAS) include(cmake/OpenCVFindMKL.cmake) - if(MKL_FOUND) + if(HAVE_MKL) set(BLAS_INCLUDE_DIR ${MKL_INCLUDE_DIRS}) set(BLAS_LIBRARIES ${MKL_LIBRARIES} ) set(BLAS_CBLAS_H "mkl_cblas.h" ) diff --git a/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake b/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake index 02d521eb5..572770585 100644 --- a/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake +++ b/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake @@ -12,9 +12,9 @@ if(UPDATE_PROTO_FILES) endif() if(DEFINED PROTOBUF_PROTOC_EXECUTABLE AND EXISTS ${PROTOBUF_PROTOC_EXECUTABLE}) message(STATUS "The protocol buffer compiler is found (${PROTOBUF_PROTOC_EXECUTABLE})") - PROTOBUF_GENERATE_CPP(PROTOBUF_HDRS PROTOBUF_SRCS - src/caffe/caffe.proto - ) + file(GLOB proto_files src/tensorflow/*.proto) + list(APPEND proto_files src/caffe/caffe.proto) + PROTOBUF_GENERATE_CPP(PROTOBUF_HDRS PROTOBUF_SRCS ${proto_files}) else() message(FATAL_ERROR "The protocol buffer compiler is not found (PROTOBUF_PROTOC_EXECUTABLE='${PROTOBUF_PROTOC_EXECUTABLE}')") endif() @@ -34,13 +34,21 @@ else() endif() if(NOT UPDATE_PROTO_FILES) - list(APPEND PROTOBUF_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/misc/caffe/caffe.pb.cc) - list(APPEND PROTOBUF_HDRS ${CMAKE_CURRENT_SOURCE_DIR}/misc/caffe/caffe.pb.h) + file(GLOB fw_srcs ${CMAKE_CURRENT_SOURCE_DIR}/misc/tensorflow/*.cc) + file(GLOB fw_hdrs ${CMAKE_CURRENT_SOURCE_DIR}/misc/tensorflow/*.h) + list(APPEND fw_srcs ${CMAKE_CURRENT_SOURCE_DIR}/misc/caffe/caffe.pb.cc) + list(APPEND fw_hdrs ${CMAKE_CURRENT_SOURCE_DIR}/misc/caffe/caffe.pb.h) + list(APPEND PROTOBUF_SRCS ${fw_srcs}) + list(APPEND PROTOBUF_HDRS ${fw_hdrs}) list(APPEND PROTOBUF_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/misc/caffe) + list(APPEND PROTOBUF_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/misc/tensorflow) endif() add_definitions(-DHAVE_PROTOBUF=1) #supress warnings in autogenerated caffe.pb.* files -ocv_warnings_disable(CMAKE_CXX_FLAGS -Wunused-parameter -Wundef) -ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4125 /wd4267 /wd4127 /wd4244 /wd4512 /wd4702) +ocv_warnings_disable(CMAKE_CXX_FLAGS -Wunused-parameter -Wundef -Wignored-qualifiers -Wno-enum-compare + -Wdeprecated-declarations) +ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4125 /wd4267 /wd4127 /wd4244 /wd4512 /wd4702 + /wd4456 /wd4510 /wd4610 /wd4800 +) diff --git a/modules/dnn/include/opencv2/dnn/all_layers.hpp b/modules/dnn/include/opencv2/dnn/all_layers.hpp index 87d73812a..ace63ddfe 100644 --- a/modules/dnn/include/opencv2/dnn/all_layers.hpp +++ b/modules/dnn/include/opencv2/dnn/all_layers.hpp @@ -210,6 +210,7 @@ namespace dnn public: CV_PROP_RW Size kernel, stride, pad, dilation; + CV_PROP_RW String padMode; }; class CV_EXPORTS_W ConvolutionLayer : public BaseConvolutionLayer @@ -238,9 +239,12 @@ namespace dnn CV_PROP_RW int type; CV_PROP_RW int size; - CV_PROP_RW double alpha, beta; + CV_PROP_RW double alpha, beta, bias; + CV_PROP_RW bool normBySize; - static CV_WRAP Ptr create(int type = LRNLayer::CHANNEL_NRM, int size = 5, double alpha = 1, double beta = 0.75); + static CV_WRAP Ptr create(int type = LRNLayer::CHANNEL_NRM, int size = 5, + double alpha = 1, double beta = 0.75, double bias = 1, + bool normBySize = true); }; class CV_EXPORTS_W PoolingLayer : public Layer @@ -257,8 +261,11 @@ namespace dnn CV_PROP_RW int type; CV_PROP_RW Size kernel, stride, pad; CV_PROP_RW bool globalPooling; + CV_PROP_RW String padMode; - static CV_WRAP Ptr create(int type = PoolingLayer::MAX, Size kernel = Size(2, 2), Size stride = Size(1, 1), Size pad = Size(0, 0)); + static CV_WRAP Ptr create(int type = PoolingLayer::MAX, Size kernel = Size(2, 2), + Size stride = Size(1, 1), Size pad = Size(0, 0), + const cv::String& padMode = ""); static CV_WRAP Ptr createGlobal(int type = PoolingLayer::MAX); }; @@ -294,7 +301,8 @@ namespace dnn CV_PROP_RW BlobShape newShapeDesc; CV_PROP_RW Range newShapeRange; - static CV_WRAP Ptr create(const BlobShape &newShape, Range applyingRange = Range::all()); + static CV_WRAP Ptr create(const BlobShape &newShape, Range applyingRange = Range::all(), + bool enableReordering = false); }; class CV_EXPORTS_W ConcatLayer : public Layer diff --git a/modules/dnn/include/opencv2/dnn/dnn.hpp b/modules/dnn/include/opencv2/dnn/dnn.hpp index ce4b40e4f..ca4a6abd5 100644 --- a/modules/dnn/include/opencv2/dnn/dnn.hpp +++ b/modules/dnn/include/opencv2/dnn/dnn.hpp @@ -299,6 +299,12 @@ namespace dnn //! This namespace is used for dnn module functionlaity. */ CV_EXPORTS_W Net readNetFromCaffe(const String &prototxt, const String &caffeModel = String()); + /** @brief Creates the importer of TensorFlow framework network. + * @param model path to the .pb file with binary protobuf description of the network architecture. + * @returns Pointer to the created importer, NULL in failure cases. + */ + CV_EXPORTS Ptr createTensorflowImporter(const String &model); + /** @brief Creates the importer of Torch7 framework network. * @param filename path to the file, dumped from Torch by using torch.save() function. * @param isBinary specifies whether the network was serialized in ascii mode or binary. diff --git a/modules/dnn/misc/tensorflow/attr_value.pb.cc b/modules/dnn/misc/tensorflow/attr_value.pb.cc new file mode 100644 index 000000000..deb3320e1 --- /dev/null +++ b/modules/dnn/misc/tensorflow/attr_value.pb.cc @@ -0,0 +1,3014 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: attr_value.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "attr_value.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace tensorflow { + +namespace { + +const ::google::protobuf::Descriptor* AttrValue_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + AttrValue_reflection_ = NULL; +struct AttrValueOneofInstance { + ::google::protobuf::internal::ArenaStringPtr s_; + ::google::protobuf::int64 i_; + float f_; + bool b_; + int type_; + const ::tensorflow::TensorShapeProto* shape_; + const ::tensorflow::TensorProto* tensor_; + const ::tensorflow::AttrValue_ListValue* list_; + const ::tensorflow::NameAttrList* func_; + ::google::protobuf::internal::ArenaStringPtr placeholder_; +}* AttrValue_default_oneof_instance_ = NULL; +const ::google::protobuf::Descriptor* AttrValue_ListValue_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + AttrValue_ListValue_reflection_ = NULL; +const ::google::protobuf::Descriptor* NameAttrList_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + NameAttrList_reflection_ = NULL; +const ::google::protobuf::Descriptor* NameAttrList_AttrEntry_descriptor_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_attr_5fvalue_2eproto() GOOGLE_ATTRIBUTE_COLD; +void protobuf_AssignDesc_attr_5fvalue_2eproto() { + protobuf_AddDesc_attr_5fvalue_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "attr_value.proto"); + GOOGLE_CHECK(file != NULL); + AttrValue_descriptor_ = file->message_type(0); + static const int AttrValue_offsets_[11] = { + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(AttrValue_default_oneof_instance_, s_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(AttrValue_default_oneof_instance_, i_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(AttrValue_default_oneof_instance_, f_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(AttrValue_default_oneof_instance_, b_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(AttrValue_default_oneof_instance_, type_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(AttrValue_default_oneof_instance_, shape_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(AttrValue_default_oneof_instance_, tensor_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(AttrValue_default_oneof_instance_, list_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(AttrValue_default_oneof_instance_, func_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(AttrValue_default_oneof_instance_, placeholder_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrValue, value_), + }; + AttrValue_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + AttrValue_descriptor_, + AttrValue::internal_default_instance(), + AttrValue_offsets_, + -1, + -1, + -1, + AttrValue_default_oneof_instance_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrValue, _oneof_case_[0]), + sizeof(AttrValue), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrValue, _internal_metadata_)); + AttrValue_ListValue_descriptor_ = AttrValue_descriptor_->nested_type(0); + static const int AttrValue_ListValue_offsets_[7] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrValue_ListValue, s_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrValue_ListValue, i_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrValue_ListValue, f_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrValue_ListValue, b_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrValue_ListValue, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrValue_ListValue, shape_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrValue_ListValue, tensor_), + }; + AttrValue_ListValue_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + AttrValue_ListValue_descriptor_, + AttrValue_ListValue::internal_default_instance(), + AttrValue_ListValue_offsets_, + -1, + -1, + -1, + sizeof(AttrValue_ListValue), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrValue_ListValue, _internal_metadata_)); + NameAttrList_descriptor_ = file->message_type(1); + static const int NameAttrList_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NameAttrList, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NameAttrList, attr_), + }; + NameAttrList_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + NameAttrList_descriptor_, + NameAttrList::internal_default_instance(), + NameAttrList_offsets_, + -1, + -1, + -1, + sizeof(NameAttrList), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NameAttrList, _internal_metadata_)); + NameAttrList_AttrEntry_descriptor_ = NameAttrList_descriptor_->nested_type(0); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_attr_5fvalue_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + AttrValue_descriptor_, AttrValue::internal_default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + AttrValue_ListValue_descriptor_, AttrValue_ListValue::internal_default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + NameAttrList_descriptor_, NameAttrList::internal_default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + NameAttrList_AttrEntry_descriptor_, + ::google::protobuf::internal::MapEntry< + ::std::string, + ::tensorflow::AttrValue, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, + 0>::CreateDefaultInstance( + NameAttrList_AttrEntry_descriptor_)); +} + +} // namespace + +void protobuf_ShutdownFile_attr_5fvalue_2eproto() { + AttrValue_default_instance_.Shutdown(); + delete AttrValue_default_oneof_instance_; + delete AttrValue_reflection_; + AttrValue_ListValue_default_instance_.Shutdown(); + delete AttrValue_ListValue_reflection_; + NameAttrList_default_instance_.Shutdown(); + delete NameAttrList_reflection_; +} + +void protobuf_InitDefaults_attr_5fvalue_2eproto_impl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::tensorflow::protobuf_InitDefaults_tensor_2eproto(); + ::tensorflow::protobuf_InitDefaults_tensor_5fshape_2eproto(); + ::tensorflow::protobuf_InitDefaults_types_2eproto(); + ::google::protobuf::internal::GetEmptyString(); + AttrValue_default_instance_.DefaultConstruct(); + AttrValue_default_oneof_instance_ = new AttrValueOneofInstance(); + ::google::protobuf::internal::GetEmptyString(); + AttrValue_ListValue_default_instance_.DefaultConstruct(); + ::google::protobuf::internal::GetEmptyString(); + NameAttrList_default_instance_.DefaultConstruct(); + AttrValue_default_instance_.get_mutable()->InitAsDefaultInstance(); + AttrValue_ListValue_default_instance_.get_mutable()->InitAsDefaultInstance(); + NameAttrList_default_instance_.get_mutable()->InitAsDefaultInstance(); +} + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_InitDefaults_attr_5fvalue_2eproto_once_); +void protobuf_InitDefaults_attr_5fvalue_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_InitDefaults_attr_5fvalue_2eproto_once_, + &protobuf_InitDefaults_attr_5fvalue_2eproto_impl); +} +void protobuf_AddDesc_attr_5fvalue_2eproto_impl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + protobuf_InitDefaults_attr_5fvalue_2eproto(); + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\020attr_value.proto\022\ntensorflow\032\014tensor.p" + "roto\032\022tensor_shape.proto\032\013types.proto\"\376\003" + "\n\tAttrValue\022\013\n\001s\030\002 \001(\014H\000\022\013\n\001i\030\003 \001(\003H\000\022\013\n" + "\001f\030\004 \001(\002H\000\022\013\n\001b\030\005 \001(\010H\000\022$\n\004type\030\006 \001(\0162\024." + "tensorflow.DataTypeH\000\022-\n\005shape\030\007 \001(\0132\034.t" + "ensorflow.TensorShapeProtoH\000\022)\n\006tensor\030\010" + " \001(\0132\027.tensorflow.TensorProtoH\000\022/\n\004list\030" + "\001 \001(\0132\037.tensorflow.AttrValue.ListValueH\000" + "\022(\n\004func\030\n \001(\0132\030.tensorflow.NameAttrList" + "H\000\022\025\n\013placeholder\030\t \001(\tH\000\032\301\001\n\tListValue\022" + "\t\n\001s\030\002 \003(\014\022\r\n\001i\030\003 \003(\003B\002\020\001\022\r\n\001f\030\004 \003(\002B\002\020\001" + "\022\r\n\001b\030\005 \003(\010B\002\020\001\022&\n\004type\030\006 \003(\0162\024.tensorfl" + "ow.DataTypeB\002\020\001\022+\n\005shape\030\007 \003(\0132\034.tensorf" + "low.TensorShapeProto\022\'\n\006tensor\030\010 \003(\0132\027.t" + "ensorflow.TensorProtoB\007\n\005value\"\222\001\n\014NameA" + "ttrList\022\014\n\004name\030\001 \001(\t\0220\n\004attr\030\002 \003(\0132\".te" + "nsorflow.NameAttrList.AttrEntry\032B\n\tAttrE" + "ntry\022\013\n\003key\030\001 \001(\t\022$\n\005value\030\002 \001(\0132\025.tenso" + "rflow.AttrValue:\0028\001B0\n\030org.tensorflow.fr" + "ameworkB\017AttrValueProtosP\001\370\001\001b\006proto3", 797); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "attr_value.proto", &protobuf_RegisterTypes); + ::tensorflow::protobuf_AddDesc_tensor_2eproto(); + ::tensorflow::protobuf_AddDesc_tensor_5fshape_2eproto(); + ::tensorflow::protobuf_AddDesc_types_2eproto(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_attr_5fvalue_2eproto); +} + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_attr_5fvalue_2eproto_once_); +void protobuf_AddDesc_attr_5fvalue_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_attr_5fvalue_2eproto_once_, + &protobuf_AddDesc_attr_5fvalue_2eproto_impl); +} +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_attr_5fvalue_2eproto { + StaticDescriptorInitializer_attr_5fvalue_2eproto() { + protobuf_AddDesc_attr_5fvalue_2eproto(); + } +} static_descriptor_initializer_attr_5fvalue_2eproto_; + +namespace { + +static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD GOOGLE_ATTRIBUTE_NORETURN; +static void MergeFromFail(int line) { + ::google::protobuf::internal::MergeFromFail(__FILE__, line); +} + +} // namespace + + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int AttrValue_ListValue::kSFieldNumber; +const int AttrValue_ListValue::kIFieldNumber; +const int AttrValue_ListValue::kFFieldNumber; +const int AttrValue_ListValue::kBFieldNumber; +const int AttrValue_ListValue::kTypeFieldNumber; +const int AttrValue_ListValue::kShapeFieldNumber; +const int AttrValue_ListValue::kTensorFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +AttrValue_ListValue::AttrValue_ListValue() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_attr_5fvalue_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.AttrValue.ListValue) +} +AttrValue_ListValue::AttrValue_ListValue(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena), + s_(arena), + i_(arena), + f_(arena), + b_(arena), + type_(arena), + shape_(arena), + tensor_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_attr_5fvalue_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.AttrValue.ListValue) +} + +void AttrValue_ListValue::InitAsDefaultInstance() { +} + +AttrValue_ListValue::AttrValue_ListValue(const AttrValue_ListValue& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.AttrValue.ListValue) +} + +void AttrValue_ListValue::SharedCtor() { + _cached_size_ = 0; +} + +AttrValue_ListValue::~AttrValue_ListValue() { + // @@protoc_insertion_point(destructor:tensorflow.AttrValue.ListValue) + SharedDtor(); +} + +void AttrValue_ListValue::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + +} + +void AttrValue_ListValue::ArenaDtor(void* object) { + AttrValue_ListValue* _this = reinterpret_cast< AttrValue_ListValue* >(object); + (void)_this; +} +void AttrValue_ListValue::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void AttrValue_ListValue::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* AttrValue_ListValue::descriptor() { + protobuf_AssignDescriptorsOnce(); + return AttrValue_ListValue_descriptor_; +} + +const AttrValue_ListValue& AttrValue_ListValue::default_instance() { + protobuf_InitDefaults_attr_5fvalue_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed AttrValue_ListValue_default_instance_; + +AttrValue_ListValue* AttrValue_ListValue::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void AttrValue_ListValue::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.AttrValue.ListValue) + s_.Clear(); + i_.Clear(); + f_.Clear(); + b_.Clear(); + type_.Clear(); + shape_.Clear(); + tensor_.Clear(); +} + +bool AttrValue_ListValue::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.AttrValue.ListValue) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated bytes s = 2; + case 2: { + if (tag == 18) { + parse_s: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->add_s())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_s; + if (input->ExpectTag(26)) goto parse_i; + break; + } + + // repeated int64 i = 3 [packed = true]; + case 3: { + if (tag == 26) { + parse_i: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, this->mutable_i()))); + } else if (tag == 24) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + 1, 26, input, this->mutable_i()))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_f; + break; + } + + // repeated float f = 4 [packed = true]; + case 4: { + if (tag == 34) { + parse_f: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, this->mutable_f()))); + } else if (tag == 37) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + 1, 34, input, this->mutable_f()))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_b; + break; + } + + // repeated bool b = 5 [packed = true]; + case 5: { + if (tag == 42) { + parse_b: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, this->mutable_b()))); + } else if (tag == 40) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + 1, 42, input, this->mutable_b()))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(50)) goto parse_type; + break; + } + + // repeated .tensorflow.DataType type = 6 [packed = true]; + case 6: { + if (tag == 50) { + parse_type: + ::google::protobuf::uint32 length; + DO_(input->ReadVarint32(&length)); + ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length); + while (input->BytesUntilLimit() > 0) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + add_type(static_cast< ::tensorflow::DataType >(value)); + } + input->PopLimit(limit); + } else if (tag == 48) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + add_type(static_cast< ::tensorflow::DataType >(value)); + } else { + goto handle_unusual; + } + if (input->ExpectTag(58)) goto parse_shape; + break; + } + + // repeated .tensorflow.TensorShapeProto shape = 7; + case 7: { + if (tag == 58) { + parse_shape: + DO_(input->IncrementRecursionDepth()); + parse_loop_shape: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( + input, add_shape())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(58)) goto parse_loop_shape; + if (input->ExpectTag(66)) goto parse_loop_tensor; + input->UnsafeDecrementRecursionDepth(); + break; + } + + // repeated .tensorflow.TensorProto tensor = 8; + case 8: { + if (tag == 66) { + DO_(input->IncrementRecursionDepth()); + parse_loop_tensor: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( + input, add_tensor())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(66)) goto parse_loop_tensor; + input->UnsafeDecrementRecursionDepth(); + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.AttrValue.ListValue) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.AttrValue.ListValue) + return false; +#undef DO_ +} + +void AttrValue_ListValue::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.AttrValue.ListValue) + // repeated bytes s = 2; + for (int i = 0; i < this->s_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 2, this->s(i), output); + } + + // repeated int64 i = 3 [packed = true]; + if (this->i_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(3, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_i_cached_byte_size_); + } + for (int i = 0; i < this->i_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt64NoTag( + this->i(i), output); + } + + // repeated float f = 4 [packed = true]; + if (this->f_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(4, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_f_cached_byte_size_); + } + for (int i = 0; i < this->f_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteFloatNoTag( + this->f(i), output); + } + + // repeated bool b = 5 [packed = true]; + if (this->b_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(5, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_b_cached_byte_size_); + } + for (int i = 0; i < this->b_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteBoolNoTag( + this->b(i), output); + } + + // repeated .tensorflow.DataType type = 6 [packed = true]; + if (this->type_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag( + 6, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + output); + output->WriteVarint32(_type_cached_byte_size_); + } + for (int i = 0; i < this->type_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteEnumNoTag( + this->type(i), output); + } + + // repeated .tensorflow.TensorShapeProto shape = 7; + for (unsigned int i = 0, n = this->shape_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 7, this->shape(i), output); + } + + // repeated .tensorflow.TensorProto tensor = 8; + for (unsigned int i = 0, n = this->tensor_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 8, this->tensor(i), output); + } + + // @@protoc_insertion_point(serialize_end:tensorflow.AttrValue.ListValue) +} + +::google::protobuf::uint8* AttrValue_ListValue::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.AttrValue.ListValue) + // repeated bytes s = 2; + for (int i = 0; i < this->s_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteBytesToArray(2, this->s(i), target); + } + + // repeated int64 i = 3 [packed = true]; + if (this->i_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 3, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _i_cached_byte_size_, target); + } + for (int i = 0; i < this->i_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64NoTagToArray(this->i(i), target); + } + + // repeated float f = 4 [packed = true]; + if (this->f_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 4, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _f_cached_byte_size_, target); + } + for (int i = 0; i < this->f_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteFloatNoTagToArray(this->f(i), target); + } + + // repeated bool b = 5 [packed = true]; + if (this->b_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 5, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _b_cached_byte_size_, target); + } + for (int i = 0; i < this->b_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteBoolNoTagToArray(this->b(i), target); + } + + // repeated .tensorflow.DataType type = 6 [packed = true]; + if (this->type_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 6, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( _type_cached_byte_size_, target); + } + for (int i = 0; i < this->type_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumNoTagToArray( + this->type(i), target); + } + + // repeated .tensorflow.TensorShapeProto shape = 7; + for (unsigned int i = 0, n = this->shape_size(); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 7, this->shape(i), false, target); + } + + // repeated .tensorflow.TensorProto tensor = 8; + for (unsigned int i = 0, n = this->tensor_size(); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 8, this->tensor(i), false, target); + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.AttrValue.ListValue) + return target; +} + +size_t AttrValue_ListValue::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.AttrValue.ListValue) + size_t total_size = 0; + + // repeated bytes s = 2; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->s_size()); + for (int i = 0; i < this->s_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::BytesSize( + this->s(i)); + } + + // repeated int64 i = 3 [packed = true]; + { + size_t data_size = 0; + unsigned int count = this->i_size(); + for (unsigned int i = 0; i < count; i++) { + data_size += ::google::protobuf::internal::WireFormatLite:: + Int64Size(this->i(i)); + } + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _i_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated float f = 4 [packed = true]; + { + size_t data_size = 0; + unsigned int count = this->f_size(); + data_size = 4UL * count; + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _f_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated bool b = 5 [packed = true]; + { + size_t data_size = 0; + unsigned int count = this->b_size(); + data_size = 1UL * count; + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _b_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated .tensorflow.DataType type = 6 [packed = true]; + { + size_t data_size = 0; + unsigned int count = this->type_size();for (unsigned int i = 0; i < count; i++) { + data_size += ::google::protobuf::internal::WireFormatLite::EnumSize( + this->type(i)); + } + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _type_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated .tensorflow.TensorShapeProto shape = 7; + { + unsigned int count = this->shape_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->shape(i)); + } + } + + // repeated .tensorflow.TensorProto tensor = 8; + { + unsigned int count = this->tensor_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->tensor(i)); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void AttrValue_ListValue::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.AttrValue.ListValue) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const AttrValue_ListValue* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.AttrValue.ListValue) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.AttrValue.ListValue) + UnsafeMergeFrom(*source); + } +} + +void AttrValue_ListValue::MergeFrom(const AttrValue_ListValue& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.AttrValue.ListValue) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void AttrValue_ListValue::UnsafeMergeFrom(const AttrValue_ListValue& from) { + GOOGLE_DCHECK(&from != this); + s_.UnsafeMergeFrom(from.s_); + i_.UnsafeMergeFrom(from.i_); + f_.UnsafeMergeFrom(from.f_); + b_.UnsafeMergeFrom(from.b_); + type_.UnsafeMergeFrom(from.type_); + shape_.MergeFrom(from.shape_); + tensor_.MergeFrom(from.tensor_); +} + +void AttrValue_ListValue::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.AttrValue.ListValue) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AttrValue_ListValue::CopyFrom(const AttrValue_ListValue& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.AttrValue.ListValue) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool AttrValue_ListValue::IsInitialized() const { + + return true; +} + +void AttrValue_ListValue::Swap(AttrValue_ListValue* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + AttrValue_ListValue temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void AttrValue_ListValue::UnsafeArenaSwap(AttrValue_ListValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void AttrValue_ListValue::InternalSwap(AttrValue_ListValue* other) { + s_.UnsafeArenaSwap(&other->s_); + i_.UnsafeArenaSwap(&other->i_); + f_.UnsafeArenaSwap(&other->f_); + b_.UnsafeArenaSwap(&other->b_); + type_.UnsafeArenaSwap(&other->type_); + shape_.UnsafeArenaSwap(&other->shape_); + tensor_.UnsafeArenaSwap(&other->tensor_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata AttrValue_ListValue::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = AttrValue_ListValue_descriptor_; + metadata.reflection = AttrValue_ListValue_reflection_; + return metadata; +} + + +// ------------------------------------------------------------------- + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int AttrValue::kSFieldNumber; +const int AttrValue::kIFieldNumber; +const int AttrValue::kFFieldNumber; +const int AttrValue::kBFieldNumber; +const int AttrValue::kTypeFieldNumber; +const int AttrValue::kShapeFieldNumber; +const int AttrValue::kTensorFieldNumber; +const int AttrValue::kListFieldNumber; +const int AttrValue::kFuncFieldNumber; +const int AttrValue::kPlaceholderFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +AttrValue::AttrValue() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_attr_5fvalue_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.AttrValue) +} +AttrValue::AttrValue(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_attr_5fvalue_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.AttrValue) +} + +void AttrValue::InitAsDefaultInstance() { + AttrValue_default_oneof_instance_->s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + AttrValue_default_oneof_instance_->i_ = GOOGLE_LONGLONG(0); + AttrValue_default_oneof_instance_->f_ = 0; + AttrValue_default_oneof_instance_->b_ = false; + AttrValue_default_oneof_instance_->type_ = 0; + AttrValue_default_oneof_instance_->shape_ = const_cast< ::tensorflow::TensorShapeProto*>( + ::tensorflow::TensorShapeProto::internal_default_instance()); + AttrValue_default_oneof_instance_->tensor_ = const_cast< ::tensorflow::TensorProto*>( + ::tensorflow::TensorProto::internal_default_instance()); + AttrValue_default_oneof_instance_->list_ = const_cast< ::tensorflow::AttrValue_ListValue*>( + ::tensorflow::AttrValue_ListValue::internal_default_instance()); + AttrValue_default_oneof_instance_->func_ = const_cast< ::tensorflow::NameAttrList*>( + ::tensorflow::NameAttrList::internal_default_instance()); + AttrValue_default_oneof_instance_->placeholder_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +AttrValue::AttrValue(const AttrValue& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.AttrValue) +} + +void AttrValue::SharedCtor() { + clear_has_value(); + _cached_size_ = 0; +} + +AttrValue::~AttrValue() { + // @@protoc_insertion_point(destructor:tensorflow.AttrValue) + SharedDtor(); +} + +void AttrValue::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + + if (has_value()) { + clear_value(); + } +} + +void AttrValue::ArenaDtor(void* object) { + AttrValue* _this = reinterpret_cast< AttrValue* >(object); + (void)_this; +} +void AttrValue::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void AttrValue::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* AttrValue::descriptor() { + protobuf_AssignDescriptorsOnce(); + return AttrValue_descriptor_; +} + +const AttrValue& AttrValue::default_instance() { + protobuf_InitDefaults_attr_5fvalue_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed AttrValue_default_instance_; + +AttrValue* AttrValue::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void AttrValue::clear_value() { +// @@protoc_insertion_point(one_of_clear_start:tensorflow.AttrValue) + switch (value_case()) { + case kS: { + value_.s_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + break; + } + case kI: { + // No need to clear + break; + } + case kF: { + // No need to clear + break; + } + case kB: { + // No need to clear + break; + } + case kType: { + // No need to clear + break; + } + case kShape: { + if (GetArenaNoVirtual() == NULL) { + delete value_.shape_; + } + break; + } + case kTensor: { + if (GetArenaNoVirtual() == NULL) { + delete value_.tensor_; + } + break; + } + case kList: { + if (GetArenaNoVirtual() == NULL) { + delete value_.list_; + } + break; + } + case kFunc: { + if (GetArenaNoVirtual() == NULL) { + delete value_.func_; + } + break; + } + case kPlaceholder: { + value_.placeholder_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + break; + } + case VALUE_NOT_SET: { + break; + } + } + _oneof_case_[0] = VALUE_NOT_SET; +} + + +void AttrValue::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.AttrValue) + clear_value(); +} + +bool AttrValue::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.AttrValue) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional .tensorflow.AttrValue.ListValue list = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_list())); + } else { + goto handle_unusual; + } + goto after_func; + break; + } + + // optional bytes s = 2; + case 2: { + if (tag == 18) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_s())); + } else { + goto handle_unusual; + } + goto after_func; + break; + } + + // optional int64 i = 3; + case 3: { + if (tag == 24) { + clear_value(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &value_.i_))); + set_has_i(); + } else { + goto handle_unusual; + } + goto after_func; + break; + } + + // optional float f = 4; + case 4: { + if (tag == 37) { + clear_value(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, &value_.f_))); + set_has_f(); + } else { + goto handle_unusual; + } + goto after_func; + break; + } + + // optional bool b = 5; + case 5: { + if (tag == 40) { + clear_value(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &value_.b_))); + set_has_b(); + } else { + goto handle_unusual; + } + goto after_func; + break; + } + + // optional .tensorflow.DataType type = 6; + case 6: { + if (tag == 48) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + set_type(static_cast< ::tensorflow::DataType >(value)); + } else { + goto handle_unusual; + } + goto after_func; + break; + } + + // optional .tensorflow.TensorShapeProto shape = 7; + case 7: { + if (tag == 58) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_shape())); + } else { + goto handle_unusual; + } + goto after_func; + break; + } + + // optional .tensorflow.TensorProto tensor = 8; + case 8: { + if (tag == 66) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_tensor())); + } else { + goto handle_unusual; + } + goto after_func; + break; + } + + // optional string placeholder = 9; + case 9: { + if (tag == 74) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_placeholder())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->placeholder().data(), this->placeholder().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.AttrValue.placeholder")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(82)) goto parse_func; + break; + } + + // optional .tensorflow.NameAttrList func = 10; + case 10: { + if (tag == 82) { + parse_func: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_func())); + } else { + goto handle_unusual; + } + after_func: + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.AttrValue) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.AttrValue) + return false; +#undef DO_ +} + +void AttrValue::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.AttrValue) + // optional .tensorflow.AttrValue.ListValue list = 1; + if (has_list()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, *value_.list_, output); + } + + // optional bytes s = 2; + if (has_s()) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 2, this->s(), output); + } + + // optional int64 i = 3; + if (has_i()) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->i(), output); + } + + // optional float f = 4; + if (has_f()) { + ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->f(), output); + } + + // optional bool b = 5; + if (has_b()) { + ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->b(), output); + } + + // optional .tensorflow.DataType type = 6; + if (has_type()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 6, this->type(), output); + } + + // optional .tensorflow.TensorShapeProto shape = 7; + if (has_shape()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 7, *value_.shape_, output); + } + + // optional .tensorflow.TensorProto tensor = 8; + if (has_tensor()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 8, *value_.tensor_, output); + } + + // optional string placeholder = 9; + if (has_placeholder()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->placeholder().data(), this->placeholder().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.AttrValue.placeholder"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 9, this->placeholder(), output); + } + + // optional .tensorflow.NameAttrList func = 10; + if (has_func()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 10, *value_.func_, output); + } + + // @@protoc_insertion_point(serialize_end:tensorflow.AttrValue) +} + +::google::protobuf::uint8* AttrValue::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.AttrValue) + // optional .tensorflow.AttrValue.ListValue list = 1; + if (has_list()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 1, *value_.list_, false, target); + } + + // optional bytes s = 2; + if (has_s()) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 2, this->s(), target); + } + + // optional int64 i = 3; + if (has_i()) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->i(), target); + } + + // optional float f = 4; + if (has_f()) { + target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->f(), target); + } + + // optional bool b = 5; + if (has_b()) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->b(), target); + } + + // optional .tensorflow.DataType type = 6; + if (has_type()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 6, this->type(), target); + } + + // optional .tensorflow.TensorShapeProto shape = 7; + if (has_shape()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 7, *value_.shape_, false, target); + } + + // optional .tensorflow.TensorProto tensor = 8; + if (has_tensor()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 8, *value_.tensor_, false, target); + } + + // optional string placeholder = 9; + if (has_placeholder()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->placeholder().data(), this->placeholder().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.AttrValue.placeholder"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 9, this->placeholder(), target); + } + + // optional .tensorflow.NameAttrList func = 10; + if (has_func()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 10, *value_.func_, false, target); + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.AttrValue) + return target; +} + +size_t AttrValue::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.AttrValue) + size_t total_size = 0; + + switch (value_case()) { + // optional bytes s = 2; + case kS: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->s()); + break; + } + // optional int64 i = 3; + case kI: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->i()); + break; + } + // optional float f = 4; + case kF: { + total_size += 1 + 4; + break; + } + // optional bool b = 5; + case kB: { + total_size += 1 + 1; + break; + } + // optional .tensorflow.DataType type = 6; + case kType: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); + break; + } + // optional .tensorflow.TensorShapeProto shape = 7; + case kShape: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *value_.shape_); + break; + } + // optional .tensorflow.TensorProto tensor = 8; + case kTensor: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *value_.tensor_); + break; + } + // optional .tensorflow.AttrValue.ListValue list = 1; + case kList: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *value_.list_); + break; + } + // optional .tensorflow.NameAttrList func = 10; + case kFunc: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *value_.func_); + break; + } + // optional string placeholder = 9; + case kPlaceholder: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->placeholder()); + break; + } + case VALUE_NOT_SET: { + break; + } + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void AttrValue::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.AttrValue) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const AttrValue* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.AttrValue) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.AttrValue) + UnsafeMergeFrom(*source); + } +} + +void AttrValue::MergeFrom(const AttrValue& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.AttrValue) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void AttrValue::UnsafeMergeFrom(const AttrValue& from) { + GOOGLE_DCHECK(&from != this); + switch (from.value_case()) { + case kS: { + set_s(from.s()); + break; + } + case kI: { + set_i(from.i()); + break; + } + case kF: { + set_f(from.f()); + break; + } + case kB: { + set_b(from.b()); + break; + } + case kType: { + set_type(from.type()); + break; + } + case kShape: { + mutable_shape()->::tensorflow::TensorShapeProto::MergeFrom(from.shape()); + break; + } + case kTensor: { + mutable_tensor()->::tensorflow::TensorProto::MergeFrom(from.tensor()); + break; + } + case kList: { + mutable_list()->::tensorflow::AttrValue_ListValue::MergeFrom(from.list()); + break; + } + case kFunc: { + mutable_func()->::tensorflow::NameAttrList::MergeFrom(from.func()); + break; + } + case kPlaceholder: { + set_placeholder(from.placeholder()); + break; + } + case VALUE_NOT_SET: { + break; + } + } +} + +void AttrValue::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.AttrValue) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AttrValue::CopyFrom(const AttrValue& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.AttrValue) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool AttrValue::IsInitialized() const { + + return true; +} + +void AttrValue::Swap(AttrValue* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + AttrValue temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void AttrValue::UnsafeArenaSwap(AttrValue* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void AttrValue::InternalSwap(AttrValue* other) { + std::swap(value_, other->value_); + std::swap(_oneof_case_[0], other->_oneof_case_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata AttrValue::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = AttrValue_descriptor_; + metadata.reflection = AttrValue_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// AttrValue_ListValue + +// repeated bytes s = 2; +int AttrValue_ListValue::s_size() const { + return s_.size(); +} +void AttrValue_ListValue::clear_s() { + s_.Clear(); +} +const ::std::string& AttrValue_ListValue::s(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.s) + return s_.Get(index); +} +::std::string* AttrValue_ListValue::mutable_s(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.ListValue.s) + return s_.Mutable(index); +} +void AttrValue_ListValue::set_s(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.ListValue.s) + s_.Mutable(index)->assign(value); +} +void AttrValue_ListValue::set_s(int index, const char* value) { + s_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.AttrValue.ListValue.s) +} +void AttrValue_ListValue::set_s(int index, const void* value, size_t size) { + s_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.AttrValue.ListValue.s) +} +::std::string* AttrValue_ListValue::add_s() { + // @@protoc_insertion_point(field_add_mutable:tensorflow.AttrValue.ListValue.s) + return s_.Add(); +} +void AttrValue_ListValue::add_s(const ::std::string& value) { + s_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.s) +} +void AttrValue_ListValue::add_s(const char* value) { + s_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.AttrValue.ListValue.s) +} +void AttrValue_ListValue::add_s(const void* value, size_t size) { + s_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.AttrValue.ListValue.s) +} +const ::google::protobuf::RepeatedPtrField< ::std::string>& +AttrValue_ListValue::s() const { + // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.s) + return s_; +} +::google::protobuf::RepeatedPtrField< ::std::string>* +AttrValue_ListValue::mutable_s() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.s) + return &s_; +} + +// repeated int64 i = 3 [packed = true]; +int AttrValue_ListValue::i_size() const { + return i_.size(); +} +void AttrValue_ListValue::clear_i() { + i_.Clear(); +} +::google::protobuf::int64 AttrValue_ListValue::i(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.i) + return i_.Get(index); +} +void AttrValue_ListValue::set_i(int index, ::google::protobuf::int64 value) { + i_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.ListValue.i) +} +void AttrValue_ListValue::add_i(::google::protobuf::int64 value) { + i_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.i) +} +const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& +AttrValue_ListValue::i() const { + // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.i) + return i_; +} +::google::protobuf::RepeatedField< ::google::protobuf::int64 >* +AttrValue_ListValue::mutable_i() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.i) + return &i_; +} + +// repeated float f = 4 [packed = true]; +int AttrValue_ListValue::f_size() const { + return f_.size(); +} +void AttrValue_ListValue::clear_f() { + f_.Clear(); +} +float AttrValue_ListValue::f(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.f) + return f_.Get(index); +} +void AttrValue_ListValue::set_f(int index, float value) { + f_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.ListValue.f) +} +void AttrValue_ListValue::add_f(float value) { + f_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.f) +} +const ::google::protobuf::RepeatedField< float >& +AttrValue_ListValue::f() const { + // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.f) + return f_; +} +::google::protobuf::RepeatedField< float >* +AttrValue_ListValue::mutable_f() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.f) + return &f_; +} + +// repeated bool b = 5 [packed = true]; +int AttrValue_ListValue::b_size() const { + return b_.size(); +} +void AttrValue_ListValue::clear_b() { + b_.Clear(); +} +bool AttrValue_ListValue::b(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.b) + return b_.Get(index); +} +void AttrValue_ListValue::set_b(int index, bool value) { + b_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.ListValue.b) +} +void AttrValue_ListValue::add_b(bool value) { + b_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.b) +} +const ::google::protobuf::RepeatedField< bool >& +AttrValue_ListValue::b() const { + // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.b) + return b_; +} +::google::protobuf::RepeatedField< bool >* +AttrValue_ListValue::mutable_b() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.b) + return &b_; +} + +// repeated .tensorflow.DataType type = 6 [packed = true]; +int AttrValue_ListValue::type_size() const { + return type_.size(); +} +void AttrValue_ListValue::clear_type() { + type_.Clear(); +} +::tensorflow::DataType AttrValue_ListValue::type(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.type) + return static_cast< ::tensorflow::DataType >(type_.Get(index)); +} +void AttrValue_ListValue::set_type(int index, ::tensorflow::DataType value) { + type_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.ListValue.type) +} +void AttrValue_ListValue::add_type(::tensorflow::DataType value) { + type_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.type) +} +const ::google::protobuf::RepeatedField& +AttrValue_ListValue::type() const { + // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.type) + return type_; +} +::google::protobuf::RepeatedField* +AttrValue_ListValue::mutable_type() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.type) + return &type_; +} + +// repeated .tensorflow.TensorShapeProto shape = 7; +int AttrValue_ListValue::shape_size() const { + return shape_.size(); +} +void AttrValue_ListValue::clear_shape() { + shape_.Clear(); +} +const ::tensorflow::TensorShapeProto& AttrValue_ListValue::shape(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.shape) + return shape_.Get(index); +} +::tensorflow::TensorShapeProto* AttrValue_ListValue::mutable_shape(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.ListValue.shape) + return shape_.Mutable(index); +} +::tensorflow::TensorShapeProto* AttrValue_ListValue::add_shape() { + // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.shape) + return shape_.Add(); +} +::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto >* +AttrValue_ListValue::mutable_shape() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.shape) + return &shape_; +} +const ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto >& +AttrValue_ListValue::shape() const { + // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.shape) + return shape_; +} + +// repeated .tensorflow.TensorProto tensor = 8; +int AttrValue_ListValue::tensor_size() const { + return tensor_.size(); +} +void AttrValue_ListValue::clear_tensor() { + tensor_.Clear(); +} +const ::tensorflow::TensorProto& AttrValue_ListValue::tensor(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.tensor) + return tensor_.Get(index); +} +::tensorflow::TensorProto* AttrValue_ListValue::mutable_tensor(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.ListValue.tensor) + return tensor_.Mutable(index); +} +::tensorflow::TensorProto* AttrValue_ListValue::add_tensor() { + // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.tensor) + return tensor_.Add(); +} +::google::protobuf::RepeatedPtrField< ::tensorflow::TensorProto >* +AttrValue_ListValue::mutable_tensor() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.tensor) + return &tensor_; +} +const ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorProto >& +AttrValue_ListValue::tensor() const { + // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.tensor) + return tensor_; +} + +inline const AttrValue_ListValue* AttrValue_ListValue::internal_default_instance() { + return &AttrValue_ListValue_default_instance_.get(); +} +// ------------------------------------------------------------------- + +// AttrValue + +// optional bytes s = 2; +bool AttrValue::has_s() const { + return value_case() == kS; +} +void AttrValue::set_has_s() { + _oneof_case_[0] = kS; +} +void AttrValue::clear_s() { + if (has_s()) { + value_.s_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + clear_has_value(); + } +} +const ::std::string& AttrValue::s() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.s) + if (has_s()) { + return value_.s_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} +void AttrValue::set_s(const ::std::string& value) { + if (!has_s()) { + clear_value(); + set_has_s(); + value_.s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + value_.s_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.s) +} +void AttrValue::set_s(const char* value) { + if (!has_s()) { + clear_value(); + set_has_s(); + value_.s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + value_.s_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.AttrValue.s) +} +void AttrValue::set_s(const void* value, + size_t size) { + if (!has_s()) { + clear_value(); + set_has_s(); + value_.s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + value_.s_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.AttrValue.s) +} +::std::string* AttrValue::mutable_s() { + if (!has_s()) { + clear_value(); + set_has_s(); + value_.s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return value_.s_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.s) +} +::std::string* AttrValue::release_s() { + // @@protoc_insertion_point(field_release:tensorflow.AttrValue.s) + if (has_s()) { + clear_has_value(); + return value_.s_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + } else { + return NULL; + } +} +::std::string* AttrValue::unsafe_arena_release_s() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.s) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (has_s()) { + clear_has_value(); + return value_.s_.UnsafeArenaRelease( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + } else { + return NULL; + } +} +void AttrValue::set_allocated_s(::std::string* s) { + if (!has_s()) { + value_.s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_value(); + if (s != NULL) { + set_has_s(); + value_.s_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s, + GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.s) +} +void AttrValue::unsafe_arena_set_allocated_s(::std::string* s) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (!has_s()) { + value_.s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_value(); + if (s) { + set_has_s(); + value_.s_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s, GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.s) +} + +// optional int64 i = 3; +bool AttrValue::has_i() const { + return value_case() == kI; +} +void AttrValue::set_has_i() { + _oneof_case_[0] = kI; +} +void AttrValue::clear_i() { + if (has_i()) { + value_.i_ = GOOGLE_LONGLONG(0); + clear_has_value(); + } +} +::google::protobuf::int64 AttrValue::i() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.i) + if (has_i()) { + return value_.i_; + } + return GOOGLE_LONGLONG(0); +} +void AttrValue::set_i(::google::protobuf::int64 value) { + if (!has_i()) { + clear_value(); + set_has_i(); + } + value_.i_ = value; + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.i) +} + +// optional float f = 4; +bool AttrValue::has_f() const { + return value_case() == kF; +} +void AttrValue::set_has_f() { + _oneof_case_[0] = kF; +} +void AttrValue::clear_f() { + if (has_f()) { + value_.f_ = 0; + clear_has_value(); + } +} +float AttrValue::f() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.f) + if (has_f()) { + return value_.f_; + } + return 0; +} +void AttrValue::set_f(float value) { + if (!has_f()) { + clear_value(); + set_has_f(); + } + value_.f_ = value; + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.f) +} + +// optional bool b = 5; +bool AttrValue::has_b() const { + return value_case() == kB; +} +void AttrValue::set_has_b() { + _oneof_case_[0] = kB; +} +void AttrValue::clear_b() { + if (has_b()) { + value_.b_ = false; + clear_has_value(); + } +} +bool AttrValue::b() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.b) + if (has_b()) { + return value_.b_; + } + return false; +} +void AttrValue::set_b(bool value) { + if (!has_b()) { + clear_value(); + set_has_b(); + } + value_.b_ = value; + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.b) +} + +// optional .tensorflow.DataType type = 6; +bool AttrValue::has_type() const { + return value_case() == kType; +} +void AttrValue::set_has_type() { + _oneof_case_[0] = kType; +} +void AttrValue::clear_type() { + if (has_type()) { + value_.type_ = 0; + clear_has_value(); + } +} +::tensorflow::DataType AttrValue::type() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.type) + if (has_type()) { + return static_cast< ::tensorflow::DataType >(value_.type_); + } + return static_cast< ::tensorflow::DataType >(0); +} +void AttrValue::set_type(::tensorflow::DataType value) { + if (!has_type()) { + clear_value(); + set_has_type(); + } + value_.type_ = value; + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.type) +} + +// optional .tensorflow.TensorShapeProto shape = 7; +bool AttrValue::has_shape() const { + return value_case() == kShape; +} +void AttrValue::set_has_shape() { + _oneof_case_[0] = kShape; +} +void AttrValue::clear_shape() { + if (has_shape()) { + if (GetArenaNoVirtual() == NULL) { + delete value_.shape_; + } + clear_has_value(); + } +} + const ::tensorflow::TensorShapeProto& AttrValue::shape() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.shape) + return has_shape() + ? *value_.shape_ + : ::tensorflow::TensorShapeProto::default_instance(); +} +::tensorflow::TensorShapeProto* AttrValue::mutable_shape() { + if (!has_shape()) { + clear_value(); + set_has_shape(); + value_.shape_ = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::TensorShapeProto >( + GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.shape) + return value_.shape_; +} +::tensorflow::TensorShapeProto* AttrValue::release_shape() { + // @@protoc_insertion_point(field_release:tensorflow.AttrValue.shape) + if (has_shape()) { + clear_has_value(); + if (GetArenaNoVirtual() != NULL) { + ::tensorflow::TensorShapeProto* temp = new ::tensorflow::TensorShapeProto(*value_.shape_); + value_.shape_ = NULL; + return temp; + } else { + ::tensorflow::TensorShapeProto* temp = value_.shape_; + value_.shape_ = NULL; + return temp; + } + } else { + return NULL; + } +} +void AttrValue::set_allocated_shape(::tensorflow::TensorShapeProto* shape) { + clear_value(); + if (shape) { + if (GetArenaNoVirtual() != NULL && + ::google::protobuf::Arena::GetArena(shape) == NULL) { + GetArenaNoVirtual()->Own(shape); + } else if (GetArenaNoVirtual() != + ::google::protobuf::Arena::GetArena(shape)) { + ::tensorflow::TensorShapeProto* new_shape = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::TensorShapeProto >( + GetArenaNoVirtual()); + new_shape->CopyFrom(*shape); + shape = new_shape; + } + set_has_shape(); + value_.shape_ = shape; + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.shape) +} + ::tensorflow::TensorShapeProto* AttrValue::unsafe_arena_release_shape() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.shape) + if (has_shape()) { + clear_has_value(); + ::tensorflow::TensorShapeProto* temp = value_.shape_; + value_.shape_ = NULL; + return temp; + } else { + return NULL; + } +} + void AttrValue::unsafe_arena_set_allocated_shape(::tensorflow::TensorShapeProto* shape) { + clear_value(); + if (shape) { + set_has_shape(); + value_.shape_ = shape; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.shape) +} + +// optional .tensorflow.TensorProto tensor = 8; +bool AttrValue::has_tensor() const { + return value_case() == kTensor; +} +void AttrValue::set_has_tensor() { + _oneof_case_[0] = kTensor; +} +void AttrValue::clear_tensor() { + if (has_tensor()) { + if (GetArenaNoVirtual() == NULL) { + delete value_.tensor_; + } + clear_has_value(); + } +} + const ::tensorflow::TensorProto& AttrValue::tensor() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.tensor) + return has_tensor() + ? *value_.tensor_ + : ::tensorflow::TensorProto::default_instance(); +} +::tensorflow::TensorProto* AttrValue::mutable_tensor() { + if (!has_tensor()) { + clear_value(); + set_has_tensor(); + value_.tensor_ = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::TensorProto >( + GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.tensor) + return value_.tensor_; +} +::tensorflow::TensorProto* AttrValue::release_tensor() { + // @@protoc_insertion_point(field_release:tensorflow.AttrValue.tensor) + if (has_tensor()) { + clear_has_value(); + if (GetArenaNoVirtual() != NULL) { + ::tensorflow::TensorProto* temp = new ::tensorflow::TensorProto(*value_.tensor_); + value_.tensor_ = NULL; + return temp; + } else { + ::tensorflow::TensorProto* temp = value_.tensor_; + value_.tensor_ = NULL; + return temp; + } + } else { + return NULL; + } +} +void AttrValue::set_allocated_tensor(::tensorflow::TensorProto* tensor) { + clear_value(); + if (tensor) { + if (GetArenaNoVirtual() != NULL && + ::google::protobuf::Arena::GetArena(tensor) == NULL) { + GetArenaNoVirtual()->Own(tensor); + } else if (GetArenaNoVirtual() != + ::google::protobuf::Arena::GetArena(tensor)) { + ::tensorflow::TensorProto* new_tensor = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::TensorProto >( + GetArenaNoVirtual()); + new_tensor->CopyFrom(*tensor); + tensor = new_tensor; + } + set_has_tensor(); + value_.tensor_ = tensor; + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.tensor) +} + ::tensorflow::TensorProto* AttrValue::unsafe_arena_release_tensor() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.tensor) + if (has_tensor()) { + clear_has_value(); + ::tensorflow::TensorProto* temp = value_.tensor_; + value_.tensor_ = NULL; + return temp; + } else { + return NULL; + } +} + void AttrValue::unsafe_arena_set_allocated_tensor(::tensorflow::TensorProto* tensor) { + clear_value(); + if (tensor) { + set_has_tensor(); + value_.tensor_ = tensor; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.tensor) +} + +// optional .tensorflow.AttrValue.ListValue list = 1; +bool AttrValue::has_list() const { + return value_case() == kList; +} +void AttrValue::set_has_list() { + _oneof_case_[0] = kList; +} +void AttrValue::clear_list() { + if (has_list()) { + if (GetArenaNoVirtual() == NULL) { + delete value_.list_; + } + clear_has_value(); + } +} + const ::tensorflow::AttrValue_ListValue& AttrValue::list() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.list) + return has_list() + ? *value_.list_ + : ::tensorflow::AttrValue_ListValue::default_instance(); +} +::tensorflow::AttrValue_ListValue* AttrValue::mutable_list() { + if (!has_list()) { + clear_value(); + set_has_list(); + value_.list_ = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::AttrValue_ListValue >( + GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.list) + return value_.list_; +} +::tensorflow::AttrValue_ListValue* AttrValue::release_list() { + // @@protoc_insertion_point(field_release:tensorflow.AttrValue.list) + if (has_list()) { + clear_has_value(); + if (GetArenaNoVirtual() != NULL) { + ::tensorflow::AttrValue_ListValue* temp = new ::tensorflow::AttrValue_ListValue(*value_.list_); + value_.list_ = NULL; + return temp; + } else { + ::tensorflow::AttrValue_ListValue* temp = value_.list_; + value_.list_ = NULL; + return temp; + } + } else { + return NULL; + } +} +void AttrValue::set_allocated_list(::tensorflow::AttrValue_ListValue* list) { + clear_value(); + if (list) { + if (GetArenaNoVirtual() != NULL && + ::google::protobuf::Arena::GetArena(list) == NULL) { + GetArenaNoVirtual()->Own(list); + } else if (GetArenaNoVirtual() != + ::google::protobuf::Arena::GetArena(list)) { + ::tensorflow::AttrValue_ListValue* new_list = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::AttrValue_ListValue >( + GetArenaNoVirtual()); + new_list->CopyFrom(*list); + list = new_list; + } + set_has_list(); + value_.list_ = list; + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.list) +} + ::tensorflow::AttrValue_ListValue* AttrValue::unsafe_arena_release_list() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.list) + if (has_list()) { + clear_has_value(); + ::tensorflow::AttrValue_ListValue* temp = value_.list_; + value_.list_ = NULL; + return temp; + } else { + return NULL; + } +} + void AttrValue::unsafe_arena_set_allocated_list(::tensorflow::AttrValue_ListValue* list) { + clear_value(); + if (list) { + set_has_list(); + value_.list_ = list; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.list) +} + +// optional .tensorflow.NameAttrList func = 10; +bool AttrValue::has_func() const { + return value_case() == kFunc; +} +void AttrValue::set_has_func() { + _oneof_case_[0] = kFunc; +} +void AttrValue::clear_func() { + if (has_func()) { + if (GetArenaNoVirtual() == NULL) { + delete value_.func_; + } + clear_has_value(); + } +} + const ::tensorflow::NameAttrList& AttrValue::func() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.func) + return has_func() + ? *value_.func_ + : ::tensorflow::NameAttrList::default_instance(); +} +::tensorflow::NameAttrList* AttrValue::mutable_func() { + if (!has_func()) { + clear_value(); + set_has_func(); + value_.func_ = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::NameAttrList >( + GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.func) + return value_.func_; +} +::tensorflow::NameAttrList* AttrValue::release_func() { + // @@protoc_insertion_point(field_release:tensorflow.AttrValue.func) + if (has_func()) { + clear_has_value(); + if (GetArenaNoVirtual() != NULL) { + ::tensorflow::NameAttrList* temp = new ::tensorflow::NameAttrList(*value_.func_); + value_.func_ = NULL; + return temp; + } else { + ::tensorflow::NameAttrList* temp = value_.func_; + value_.func_ = NULL; + return temp; + } + } else { + return NULL; + } +} +void AttrValue::set_allocated_func(::tensorflow::NameAttrList* func) { + clear_value(); + if (func) { + if (GetArenaNoVirtual() != NULL && + ::google::protobuf::Arena::GetArena(func) == NULL) { + GetArenaNoVirtual()->Own(func); + } else if (GetArenaNoVirtual() != + ::google::protobuf::Arena::GetArena(func)) { + ::tensorflow::NameAttrList* new_func = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::NameAttrList >( + GetArenaNoVirtual()); + new_func->CopyFrom(*func); + func = new_func; + } + set_has_func(); + value_.func_ = func; + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.func) +} + ::tensorflow::NameAttrList* AttrValue::unsafe_arena_release_func() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.func) + if (has_func()) { + clear_has_value(); + ::tensorflow::NameAttrList* temp = value_.func_; + value_.func_ = NULL; + return temp; + } else { + return NULL; + } +} + void AttrValue::unsafe_arena_set_allocated_func(::tensorflow::NameAttrList* func) { + clear_value(); + if (func) { + set_has_func(); + value_.func_ = func; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.func) +} + +// optional string placeholder = 9; +bool AttrValue::has_placeholder() const { + return value_case() == kPlaceholder; +} +void AttrValue::set_has_placeholder() { + _oneof_case_[0] = kPlaceholder; +} +void AttrValue::clear_placeholder() { + if (has_placeholder()) { + value_.placeholder_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + clear_has_value(); + } +} +const ::std::string& AttrValue::placeholder() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.placeholder) + if (has_placeholder()) { + return value_.placeholder_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} +void AttrValue::set_placeholder(const ::std::string& value) { + if (!has_placeholder()) { + clear_value(); + set_has_placeholder(); + value_.placeholder_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + value_.placeholder_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.placeholder) +} +void AttrValue::set_placeholder(const char* value) { + if (!has_placeholder()) { + clear_value(); + set_has_placeholder(); + value_.placeholder_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + value_.placeholder_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.AttrValue.placeholder) +} +void AttrValue::set_placeholder(const char* value, + size_t size) { + if (!has_placeholder()) { + clear_value(); + set_has_placeholder(); + value_.placeholder_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + value_.placeholder_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.AttrValue.placeholder) +} +::std::string* AttrValue::mutable_placeholder() { + if (!has_placeholder()) { + clear_value(); + set_has_placeholder(); + value_.placeholder_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return value_.placeholder_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.placeholder) +} +::std::string* AttrValue::release_placeholder() { + // @@protoc_insertion_point(field_release:tensorflow.AttrValue.placeholder) + if (has_placeholder()) { + clear_has_value(); + return value_.placeholder_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + } else { + return NULL; + } +} +::std::string* AttrValue::unsafe_arena_release_placeholder() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.placeholder) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (has_placeholder()) { + clear_has_value(); + return value_.placeholder_.UnsafeArenaRelease( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + } else { + return NULL; + } +} +void AttrValue::set_allocated_placeholder(::std::string* placeholder) { + if (!has_placeholder()) { + value_.placeholder_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_value(); + if (placeholder != NULL) { + set_has_placeholder(); + value_.placeholder_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), placeholder, + GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.placeholder) +} +void AttrValue::unsafe_arena_set_allocated_placeholder(::std::string* placeholder) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (!has_placeholder()) { + value_.placeholder_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_value(); + if (placeholder) { + set_has_placeholder(); + value_.placeholder_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), placeholder, GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.placeholder) +} + +bool AttrValue::has_value() const { + return value_case() != VALUE_NOT_SET; +} +void AttrValue::clear_has_value() { + _oneof_case_[0] = VALUE_NOT_SET; +} +AttrValue::ValueCase AttrValue::value_case() const { + return AttrValue::ValueCase(_oneof_case_[0]); +} +inline const AttrValue* AttrValue::internal_default_instance() { + return &AttrValue_default_instance_.get(); +} +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int NameAttrList::kNameFieldNumber; +const int NameAttrList::kAttrFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +NameAttrList::NameAttrList() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_attr_5fvalue_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.NameAttrList) +} +NameAttrList::NameAttrList(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena), + attr_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_attr_5fvalue_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.NameAttrList) +} + +void NameAttrList::InitAsDefaultInstance() { +} + +NameAttrList::NameAttrList(const NameAttrList& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.NameAttrList) +} + +void NameAttrList::SharedCtor() { + attr_.SetAssignDescriptorCallback( + protobuf_AssignDescriptorsOnce); + attr_.SetEntryDescriptor( + &::tensorflow::NameAttrList_AttrEntry_descriptor_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _cached_size_ = 0; +} + +NameAttrList::~NameAttrList() { + // @@protoc_insertion_point(destructor:tensorflow.NameAttrList) + SharedDtor(); +} + +void NameAttrList::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + + name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); +} + +void NameAttrList::ArenaDtor(void* object) { + NameAttrList* _this = reinterpret_cast< NameAttrList* >(object); + (void)_this; +} +void NameAttrList::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void NameAttrList::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* NameAttrList::descriptor() { + protobuf_AssignDescriptorsOnce(); + return NameAttrList_descriptor_; +} + +const NameAttrList& NameAttrList::default_instance() { + protobuf_InitDefaults_attr_5fvalue_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed NameAttrList_default_instance_; + +NameAttrList* NameAttrList::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void NameAttrList::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.NameAttrList) + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + attr_.Clear(); +} + +bool NameAttrList::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.NameAttrList) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string name = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.NameAttrList.name")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_attr; + break; + } + + // map attr = 2; + case 2: { + if (tag == 18) { + parse_attr: + DO_(input->IncrementRecursionDepth()); + parse_loop_attr: + NameAttrList_AttrEntry::Parser< ::google::protobuf::internal::MapField< + ::std::string, ::tensorflow::AttrValue, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, + 0 >, + ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue > > parser(&attr_); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, &parser)); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + parser.key().data(), parser.key().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.NameAttrList.AttrEntry.key")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_loop_attr; + input->UnsafeDecrementRecursionDepth(); + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.NameAttrList) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.NameAttrList) + return false; +#undef DO_ +} + +void NameAttrList::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.NameAttrList) + // optional string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.NameAttrList.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // map attr = 2; + if (!this->attr().empty()) { + typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::google::protobuf::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), p->first.length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.NameAttrList.AttrEntry.key"); + } + }; + + if (output->IsSerializationDeterminstic() && + this->attr().size() > 1) { + ::google::protobuf::scoped_array items( + new SortItem[this->attr().size()]); + typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::size_type size_type; + size_type n = 0; + for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + it = this->attr().begin(); + it != this->attr().end(); ++it, ++n) { + items[n] = SortItem(&*it); + } + ::std::sort(&items[0], &items[n], Less()); + ::google::protobuf::scoped_ptr entry; + for (size_type i = 0; i < n; i++) { + entry.reset(attr_.NewEntryWrapper( + items[i]->first, items[i]->second)); + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, *entry, output); + if (entry->GetArena() != NULL) { + entry.release(); + } + Utf8Check::Check(items[i]); + } + } else { + ::google::protobuf::scoped_ptr entry; + for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + it = this->attr().begin(); + it != this->attr().end(); ++it) { + entry.reset(attr_.NewEntryWrapper( + it->first, it->second)); + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, *entry, output); + if (entry->GetArena() != NULL) { + entry.release(); + } + Utf8Check::Check(&*it); + } + } + } + + // @@protoc_insertion_point(serialize_end:tensorflow.NameAttrList) +} + +::google::protobuf::uint8* NameAttrList::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.NameAttrList) + // optional string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.NameAttrList.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // map attr = 2; + if (!this->attr().empty()) { + typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::google::protobuf::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), p->first.length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.NameAttrList.AttrEntry.key"); + } + }; + + if (deterministic && + this->attr().size() > 1) { + ::google::protobuf::scoped_array items( + new SortItem[this->attr().size()]); + typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::size_type size_type; + size_type n = 0; + for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + it = this->attr().begin(); + it != this->attr().end(); ++it, ++n) { + items[n] = SortItem(&*it); + } + ::std::sort(&items[0], &items[n], Less()); + ::google::protobuf::scoped_ptr entry; + for (size_type i = 0; i < n; i++) { + entry.reset(attr_.NewEntryWrapper( + items[i]->first, items[i]->second)); + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 2, *entry, deterministic, target); +; + if (entry->GetArena() != NULL) { + entry.release(); + } + Utf8Check::Check(items[i]); + } + } else { + ::google::protobuf::scoped_ptr entry; + for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + it = this->attr().begin(); + it != this->attr().end(); ++it) { + entry.reset(attr_.NewEntryWrapper( + it->first, it->second)); + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 2, *entry, deterministic, target); +; + if (entry->GetArena() != NULL) { + entry.release(); + } + Utf8Check::Check(&*it); + } + } + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.NameAttrList) + return target; +} + +size_t NameAttrList::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.NameAttrList) + size_t total_size = 0; + + // optional string name = 1; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // map attr = 2; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->attr_size()); + { + ::google::protobuf::scoped_ptr entry; + for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + it = this->attr().begin(); + it != this->attr().end(); ++it) { + if (entry.get() != NULL && entry->GetArena() != NULL) { + entry.release(); + } + entry.reset(attr_.NewEntryWrapper(it->first, it->second)); + total_size += ::google::protobuf::internal::WireFormatLite:: + MessageSizeNoVirtual(*entry); + } + if (entry.get() != NULL && entry->GetArena() != NULL) { + entry.release(); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void NameAttrList::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.NameAttrList) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const NameAttrList* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.NameAttrList) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.NameAttrList) + UnsafeMergeFrom(*source); + } +} + +void NameAttrList::MergeFrom(const NameAttrList& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.NameAttrList) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void NameAttrList::UnsafeMergeFrom(const NameAttrList& from) { + GOOGLE_DCHECK(&from != this); + attr_.MergeFrom(from.attr_); + if (from.name().size() > 0) { + set_name(from.name()); + } +} + +void NameAttrList::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.NameAttrList) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void NameAttrList::CopyFrom(const NameAttrList& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.NameAttrList) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool NameAttrList::IsInitialized() const { + + return true; +} + +void NameAttrList::Swap(NameAttrList* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + NameAttrList temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void NameAttrList::UnsafeArenaSwap(NameAttrList* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void NameAttrList::InternalSwap(NameAttrList* other) { + name_.Swap(&other->name_); + attr_.Swap(&other->attr_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata NameAttrList::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = NameAttrList_descriptor_; + metadata.reflection = NameAttrList_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// NameAttrList + +// optional string name = 1; +void NameAttrList::clear_name() { + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& NameAttrList::name() const { + // @@protoc_insertion_point(field_get:tensorflow.NameAttrList.name) + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void NameAttrList::set_name(const ::std::string& value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.NameAttrList.name) +} +void NameAttrList::set_name(const char* value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.NameAttrList.name) +} +void NameAttrList::set_name(const char* value, + size_t size) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.NameAttrList.name) +} +::std::string* NameAttrList::mutable_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.NameAttrList.name) + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* NameAttrList::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.NameAttrList.name) + + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* NameAttrList::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.NameAttrList.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void NameAttrList::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.NameAttrList.name) +} +void NameAttrList::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NameAttrList.name) +} + +// map attr = 2; +int NameAttrList::attr_size() const { + return attr_.size(); +} +void NameAttrList::clear_attr() { + attr_.Clear(); +} + const ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >& +NameAttrList::attr() const { + // @@protoc_insertion_point(field_map:tensorflow.NameAttrList.attr) + return attr_.GetMap(); +} + ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >* +NameAttrList::mutable_attr() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.NameAttrList.attr) + return attr_.MutableMap(); +} + +inline const NameAttrList* NameAttrList::internal_default_instance() { + return &NameAttrList_default_instance_.get(); +} +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/attr_value.pb.h b/modules/dnn/misc/tensorflow/attr_value.pb.h new file mode 100644 index 000000000..d37a724ab --- /dev/null +++ b/modules/dnn/misc/tensorflow/attr_value.pb.h @@ -0,0 +1,1697 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: attr_value.proto + +#ifndef PROTOBUF_attr_5fvalue_2eproto__INCLUDED +#define PROTOBUF_attr_5fvalue_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 3001000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "tensor.pb.h" +#include "tensor_shape.pb.h" +#include "types.pb.h" +// @@protoc_insertion_point(includes) + +namespace tensorflow { + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_attr_5fvalue_2eproto(); +void protobuf_InitDefaults_attr_5fvalue_2eproto(); +void protobuf_AssignDesc_attr_5fvalue_2eproto(); +void protobuf_ShutdownFile_attr_5fvalue_2eproto(); + +class AttrValue; +class AttrValue_ListValue; +class NameAttrList; + +// =================================================================== + +class AttrValue_ListValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.AttrValue.ListValue) */ { + public: + AttrValue_ListValue(); + virtual ~AttrValue_ListValue(); + + AttrValue_ListValue(const AttrValue_ListValue& from); + + inline AttrValue_ListValue& operator=(const AttrValue_ListValue& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const AttrValue_ListValue& default_instance(); + + static const AttrValue_ListValue* internal_default_instance(); + + void UnsafeArenaSwap(AttrValue_ListValue* other); + void Swap(AttrValue_ListValue* other); + + // implements Message ---------------------------------------------- + + inline AttrValue_ListValue* New() const { return New(NULL); } + + AttrValue_ListValue* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const AttrValue_ListValue& from); + void MergeFrom(const AttrValue_ListValue& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(AttrValue_ListValue* other); + void UnsafeMergeFrom(const AttrValue_ListValue& from); + protected: + explicit AttrValue_ListValue(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated bytes s = 2; + int s_size() const; + void clear_s(); + static const int kSFieldNumber = 2; + const ::std::string& s(int index) const; + ::std::string* mutable_s(int index); + void set_s(int index, const ::std::string& value); + void set_s(int index, const char* value); + void set_s(int index, const void* value, size_t size); + ::std::string* add_s(); + void add_s(const ::std::string& value); + void add_s(const char* value); + void add_s(const void* value, size_t size); + const ::google::protobuf::RepeatedPtrField< ::std::string>& s() const; + ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_s(); + + // repeated int64 i = 3 [packed = true]; + int i_size() const; + void clear_i(); + static const int kIFieldNumber = 3; + ::google::protobuf::int64 i(int index) const; + void set_i(int index, ::google::protobuf::int64 value); + void add_i(::google::protobuf::int64 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& + i() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* + mutable_i(); + + // repeated float f = 4 [packed = true]; + int f_size() const; + void clear_f(); + static const int kFFieldNumber = 4; + float f(int index) const; + void set_f(int index, float value); + void add_f(float value); + const ::google::protobuf::RepeatedField< float >& + f() const; + ::google::protobuf::RepeatedField< float >* + mutable_f(); + + // repeated bool b = 5 [packed = true]; + int b_size() const; + void clear_b(); + static const int kBFieldNumber = 5; + bool b(int index) const; + void set_b(int index, bool value); + void add_b(bool value); + const ::google::protobuf::RepeatedField< bool >& + b() const; + ::google::protobuf::RepeatedField< bool >* + mutable_b(); + + // repeated .tensorflow.DataType type = 6 [packed = true]; + int type_size() const; + void clear_type(); + static const int kTypeFieldNumber = 6; + ::tensorflow::DataType type(int index) const; + void set_type(int index, ::tensorflow::DataType value); + void add_type(::tensorflow::DataType value); + const ::google::protobuf::RepeatedField& type() const; + ::google::protobuf::RepeatedField* mutable_type(); + + // repeated .tensorflow.TensorShapeProto shape = 7; + int shape_size() const; + void clear_shape(); + static const int kShapeFieldNumber = 7; + const ::tensorflow::TensorShapeProto& shape(int index) const; + ::tensorflow::TensorShapeProto* mutable_shape(int index); + ::tensorflow::TensorShapeProto* add_shape(); + ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto >* + mutable_shape(); + const ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto >& + shape() const; + + // repeated .tensorflow.TensorProto tensor = 8; + int tensor_size() const; + void clear_tensor(); + static const int kTensorFieldNumber = 8; + const ::tensorflow::TensorProto& tensor(int index) const; + ::tensorflow::TensorProto* mutable_tensor(int index); + ::tensorflow::TensorProto* add_tensor(); + ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorProto >* + mutable_tensor(); + const ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorProto >& + tensor() const; + + // @@protoc_insertion_point(class_scope:tensorflow.AttrValue.ListValue) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::RepeatedPtrField< ::std::string> s_; + ::google::protobuf::RepeatedField< ::google::protobuf::int64 > i_; + mutable int _i_cached_byte_size_; + ::google::protobuf::RepeatedField< float > f_; + mutable int _f_cached_byte_size_; + ::google::protobuf::RepeatedField< bool > b_; + mutable int _b_cached_byte_size_; + ::google::protobuf::RepeatedField type_; + mutable int _type_cached_byte_size_; + ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto > shape_; + ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorProto > tensor_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_attr_5fvalue_2eproto_impl(); + friend void protobuf_AddDesc_attr_5fvalue_2eproto_impl(); + friend void protobuf_AssignDesc_attr_5fvalue_2eproto(); + friend void protobuf_ShutdownFile_attr_5fvalue_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed AttrValue_ListValue_default_instance_; + +// ------------------------------------------------------------------- + +class AttrValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.AttrValue) */ { + public: + AttrValue(); + virtual ~AttrValue(); + + AttrValue(const AttrValue& from); + + inline AttrValue& operator=(const AttrValue& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const AttrValue& default_instance(); + + enum ValueCase { + kS = 2, + kI = 3, + kF = 4, + kB = 5, + kType = 6, + kShape = 7, + kTensor = 8, + kList = 1, + kFunc = 10, + kPlaceholder = 9, + VALUE_NOT_SET = 0, + }; + + static const AttrValue* internal_default_instance(); + + void UnsafeArenaSwap(AttrValue* other); + void Swap(AttrValue* other); + + // implements Message ---------------------------------------------- + + inline AttrValue* New() const { return New(NULL); } + + AttrValue* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const AttrValue& from); + void MergeFrom(const AttrValue& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(AttrValue* other); + void UnsafeMergeFrom(const AttrValue& from); + protected: + explicit AttrValue(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef AttrValue_ListValue ListValue; + + // accessors ------------------------------------------------------- + + // optional bytes s = 2; + private: + bool has_s() const; + public: + void clear_s(); + static const int kSFieldNumber = 2; + const ::std::string& s() const; + void set_s(const ::std::string& value); + void set_s(const char* value); + void set_s(const void* value, size_t size); + ::std::string* mutable_s(); + ::std::string* release_s(); + void set_allocated_s(::std::string* s); + ::std::string* unsafe_arena_release_s(); + void unsafe_arena_set_allocated_s( + ::std::string* s); + + // optional int64 i = 3; + private: + bool has_i() const; + public: + void clear_i(); + static const int kIFieldNumber = 3; + ::google::protobuf::int64 i() const; + void set_i(::google::protobuf::int64 value); + + // optional float f = 4; + private: + bool has_f() const; + public: + void clear_f(); + static const int kFFieldNumber = 4; + float f() const; + void set_f(float value); + + // optional bool b = 5; + private: + bool has_b() const; + public: + void clear_b(); + static const int kBFieldNumber = 5; + bool b() const; + void set_b(bool value); + + // optional .tensorflow.DataType type = 6; + private: + bool has_type() const; + public: + void clear_type(); + static const int kTypeFieldNumber = 6; + ::tensorflow::DataType type() const; + void set_type(::tensorflow::DataType value); + + // optional .tensorflow.TensorShapeProto shape = 7; + bool has_shape() const; + void clear_shape(); + static const int kShapeFieldNumber = 7; + private: + void _slow_mutable_shape(); + void _slow_set_allocated_shape( + ::google::protobuf::Arena* message_arena, ::tensorflow::TensorShapeProto** shape); + ::tensorflow::TensorShapeProto* _slow_release_shape(); + public: + const ::tensorflow::TensorShapeProto& shape() const; + ::tensorflow::TensorShapeProto* mutable_shape(); + ::tensorflow::TensorShapeProto* release_shape(); + void set_allocated_shape(::tensorflow::TensorShapeProto* shape); + ::tensorflow::TensorShapeProto* unsafe_arena_release_shape(); + void unsafe_arena_set_allocated_shape( + ::tensorflow::TensorShapeProto* shape); + + // optional .tensorflow.TensorProto tensor = 8; + bool has_tensor() const; + void clear_tensor(); + static const int kTensorFieldNumber = 8; + private: + void _slow_mutable_tensor(); + void _slow_set_allocated_tensor( + ::google::protobuf::Arena* message_arena, ::tensorflow::TensorProto** tensor); + ::tensorflow::TensorProto* _slow_release_tensor(); + public: + const ::tensorflow::TensorProto& tensor() const; + ::tensorflow::TensorProto* mutable_tensor(); + ::tensorflow::TensorProto* release_tensor(); + void set_allocated_tensor(::tensorflow::TensorProto* tensor); + ::tensorflow::TensorProto* unsafe_arena_release_tensor(); + void unsafe_arena_set_allocated_tensor( + ::tensorflow::TensorProto* tensor); + + // optional .tensorflow.AttrValue.ListValue list = 1; + bool has_list() const; + void clear_list(); + static const int kListFieldNumber = 1; + private: + void _slow_mutable_list(); + void _slow_set_allocated_list( + ::google::protobuf::Arena* message_arena, ::tensorflow::AttrValue_ListValue** list); + ::tensorflow::AttrValue_ListValue* _slow_release_list(); + public: + const ::tensorflow::AttrValue_ListValue& list() const; + ::tensorflow::AttrValue_ListValue* mutable_list(); + ::tensorflow::AttrValue_ListValue* release_list(); + void set_allocated_list(::tensorflow::AttrValue_ListValue* list); + ::tensorflow::AttrValue_ListValue* unsafe_arena_release_list(); + void unsafe_arena_set_allocated_list( + ::tensorflow::AttrValue_ListValue* list); + + // optional .tensorflow.NameAttrList func = 10; + bool has_func() const; + void clear_func(); + static const int kFuncFieldNumber = 10; + private: + void _slow_mutable_func(); + void _slow_set_allocated_func( + ::google::protobuf::Arena* message_arena, ::tensorflow::NameAttrList** func); + ::tensorflow::NameAttrList* _slow_release_func(); + public: + const ::tensorflow::NameAttrList& func() const; + ::tensorflow::NameAttrList* mutable_func(); + ::tensorflow::NameAttrList* release_func(); + void set_allocated_func(::tensorflow::NameAttrList* func); + ::tensorflow::NameAttrList* unsafe_arena_release_func(); + void unsafe_arena_set_allocated_func( + ::tensorflow::NameAttrList* func); + + // optional string placeholder = 9; + private: + bool has_placeholder() const; + public: + void clear_placeholder(); + static const int kPlaceholderFieldNumber = 9; + const ::std::string& placeholder() const; + void set_placeholder(const ::std::string& value); + void set_placeholder(const char* value); + void set_placeholder(const char* value, size_t size); + ::std::string* mutable_placeholder(); + ::std::string* release_placeholder(); + void set_allocated_placeholder(::std::string* placeholder); + ::std::string* unsafe_arena_release_placeholder(); + void unsafe_arena_set_allocated_placeholder( + ::std::string* placeholder); + + ValueCase value_case() const; + // @@protoc_insertion_point(class_scope:tensorflow.AttrValue) + private: + inline void set_has_s(); + inline void set_has_i(); + inline void set_has_f(); + inline void set_has_b(); + inline void set_has_type(); + inline void set_has_shape(); + inline void set_has_tensor(); + inline void set_has_list(); + inline void set_has_func(); + inline void set_has_placeholder(); + + inline bool has_value() const; + void clear_value(); + inline void clear_has_value(); + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + union ValueUnion { + ValueUnion() {} + ::google::protobuf::internal::ArenaStringPtr s_; + ::google::protobuf::int64 i_; + float f_; + bool b_; + int type_; + ::tensorflow::TensorShapeProto* shape_; + ::tensorflow::TensorProto* tensor_; + ::tensorflow::AttrValue_ListValue* list_; + ::tensorflow::NameAttrList* func_; + ::google::protobuf::internal::ArenaStringPtr placeholder_; + } value_; + mutable int _cached_size_; + ::google::protobuf::uint32 _oneof_case_[1]; + + friend void protobuf_InitDefaults_attr_5fvalue_2eproto_impl(); + friend void protobuf_AddDesc_attr_5fvalue_2eproto_impl(); + friend void protobuf_AssignDesc_attr_5fvalue_2eproto(); + friend void protobuf_ShutdownFile_attr_5fvalue_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed AttrValue_default_instance_; + +// ------------------------------------------------------------------- + +class NameAttrList : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.NameAttrList) */ { + public: + NameAttrList(); + virtual ~NameAttrList(); + + NameAttrList(const NameAttrList& from); + + inline NameAttrList& operator=(const NameAttrList& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const NameAttrList& default_instance(); + + static const NameAttrList* internal_default_instance(); + + void UnsafeArenaSwap(NameAttrList* other); + void Swap(NameAttrList* other); + + // implements Message ---------------------------------------------- + + inline NameAttrList* New() const { return New(NULL); } + + NameAttrList* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const NameAttrList& from); + void MergeFrom(const NameAttrList& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(NameAttrList* other); + void UnsafeMergeFrom(const NameAttrList& from); + protected: + explicit NameAttrList(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + // optional string name = 1; + void clear_name(); + static const int kNameFieldNumber = 1; + const ::std::string& name() const; + void set_name(const ::std::string& value); + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + ::std::string* unsafe_arena_release_name(); + void unsafe_arena_set_allocated_name( + ::std::string* name); + + // map attr = 2; + int attr_size() const; + void clear_attr(); + static const int kAttrFieldNumber = 2; + const ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >& + attr() const; + ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >* + mutable_attr(); + + // @@protoc_insertion_point(class_scope:tensorflow.NameAttrList) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + typedef ::google::protobuf::internal::MapEntryLite< + ::std::string, ::tensorflow::AttrValue, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, + 0 > + NameAttrList_AttrEntry; + ::google::protobuf::internal::MapField< + ::std::string, ::tensorflow::AttrValue, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, + 0 > attr_; + ::google::protobuf::internal::ArenaStringPtr name_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_attr_5fvalue_2eproto_impl(); + friend void protobuf_AddDesc_attr_5fvalue_2eproto_impl(); + friend void protobuf_AssignDesc_attr_5fvalue_2eproto(); + friend void protobuf_ShutdownFile_attr_5fvalue_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed NameAttrList_default_instance_; + +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +// AttrValue_ListValue + +// repeated bytes s = 2; +inline int AttrValue_ListValue::s_size() const { + return s_.size(); +} +inline void AttrValue_ListValue::clear_s() { + s_.Clear(); +} +inline const ::std::string& AttrValue_ListValue::s(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.s) + return s_.Get(index); +} +inline ::std::string* AttrValue_ListValue::mutable_s(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.ListValue.s) + return s_.Mutable(index); +} +inline void AttrValue_ListValue::set_s(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.ListValue.s) + s_.Mutable(index)->assign(value); +} +inline void AttrValue_ListValue::set_s(int index, const char* value) { + s_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.AttrValue.ListValue.s) +} +inline void AttrValue_ListValue::set_s(int index, const void* value, size_t size) { + s_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.AttrValue.ListValue.s) +} +inline ::std::string* AttrValue_ListValue::add_s() { + // @@protoc_insertion_point(field_add_mutable:tensorflow.AttrValue.ListValue.s) + return s_.Add(); +} +inline void AttrValue_ListValue::add_s(const ::std::string& value) { + s_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.s) +} +inline void AttrValue_ListValue::add_s(const char* value) { + s_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.AttrValue.ListValue.s) +} +inline void AttrValue_ListValue::add_s(const void* value, size_t size) { + s_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.AttrValue.ListValue.s) +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +AttrValue_ListValue::s() const { + // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.s) + return s_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +AttrValue_ListValue::mutable_s() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.s) + return &s_; +} + +// repeated int64 i = 3 [packed = true]; +inline int AttrValue_ListValue::i_size() const { + return i_.size(); +} +inline void AttrValue_ListValue::clear_i() { + i_.Clear(); +} +inline ::google::protobuf::int64 AttrValue_ListValue::i(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.i) + return i_.Get(index); +} +inline void AttrValue_ListValue::set_i(int index, ::google::protobuf::int64 value) { + i_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.ListValue.i) +} +inline void AttrValue_ListValue::add_i(::google::protobuf::int64 value) { + i_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.i) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& +AttrValue_ListValue::i() const { + // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.i) + return i_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* +AttrValue_ListValue::mutable_i() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.i) + return &i_; +} + +// repeated float f = 4 [packed = true]; +inline int AttrValue_ListValue::f_size() const { + return f_.size(); +} +inline void AttrValue_ListValue::clear_f() { + f_.Clear(); +} +inline float AttrValue_ListValue::f(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.f) + return f_.Get(index); +} +inline void AttrValue_ListValue::set_f(int index, float value) { + f_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.ListValue.f) +} +inline void AttrValue_ListValue::add_f(float value) { + f_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.f) +} +inline const ::google::protobuf::RepeatedField< float >& +AttrValue_ListValue::f() const { + // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.f) + return f_; +} +inline ::google::protobuf::RepeatedField< float >* +AttrValue_ListValue::mutable_f() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.f) + return &f_; +} + +// repeated bool b = 5 [packed = true]; +inline int AttrValue_ListValue::b_size() const { + return b_.size(); +} +inline void AttrValue_ListValue::clear_b() { + b_.Clear(); +} +inline bool AttrValue_ListValue::b(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.b) + return b_.Get(index); +} +inline void AttrValue_ListValue::set_b(int index, bool value) { + b_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.ListValue.b) +} +inline void AttrValue_ListValue::add_b(bool value) { + b_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.b) +} +inline const ::google::protobuf::RepeatedField< bool >& +AttrValue_ListValue::b() const { + // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.b) + return b_; +} +inline ::google::protobuf::RepeatedField< bool >* +AttrValue_ListValue::mutable_b() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.b) + return &b_; +} + +// repeated .tensorflow.DataType type = 6 [packed = true]; +inline int AttrValue_ListValue::type_size() const { + return type_.size(); +} +inline void AttrValue_ListValue::clear_type() { + type_.Clear(); +} +inline ::tensorflow::DataType AttrValue_ListValue::type(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.type) + return static_cast< ::tensorflow::DataType >(type_.Get(index)); +} +inline void AttrValue_ListValue::set_type(int index, ::tensorflow::DataType value) { + type_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.ListValue.type) +} +inline void AttrValue_ListValue::add_type(::tensorflow::DataType value) { + type_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.type) +} +inline const ::google::protobuf::RepeatedField& +AttrValue_ListValue::type() const { + // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.type) + return type_; +} +inline ::google::protobuf::RepeatedField* +AttrValue_ListValue::mutable_type() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.type) + return &type_; +} + +// repeated .tensorflow.TensorShapeProto shape = 7; +inline int AttrValue_ListValue::shape_size() const { + return shape_.size(); +} +inline void AttrValue_ListValue::clear_shape() { + shape_.Clear(); +} +inline const ::tensorflow::TensorShapeProto& AttrValue_ListValue::shape(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.shape) + return shape_.Get(index); +} +inline ::tensorflow::TensorShapeProto* AttrValue_ListValue::mutable_shape(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.ListValue.shape) + return shape_.Mutable(index); +} +inline ::tensorflow::TensorShapeProto* AttrValue_ListValue::add_shape() { + // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.shape) + return shape_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto >* +AttrValue_ListValue::mutable_shape() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.shape) + return &shape_; +} +inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto >& +AttrValue_ListValue::shape() const { + // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.shape) + return shape_; +} + +// repeated .tensorflow.TensorProto tensor = 8; +inline int AttrValue_ListValue::tensor_size() const { + return tensor_.size(); +} +inline void AttrValue_ListValue::clear_tensor() { + tensor_.Clear(); +} +inline const ::tensorflow::TensorProto& AttrValue_ListValue::tensor(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.tensor) + return tensor_.Get(index); +} +inline ::tensorflow::TensorProto* AttrValue_ListValue::mutable_tensor(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.ListValue.tensor) + return tensor_.Mutable(index); +} +inline ::tensorflow::TensorProto* AttrValue_ListValue::add_tensor() { + // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.tensor) + return tensor_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorProto >* +AttrValue_ListValue::mutable_tensor() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.tensor) + return &tensor_; +} +inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorProto >& +AttrValue_ListValue::tensor() const { + // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.tensor) + return tensor_; +} + +inline const AttrValue_ListValue* AttrValue_ListValue::internal_default_instance() { + return &AttrValue_ListValue_default_instance_.get(); +} +// ------------------------------------------------------------------- + +// AttrValue + +// optional bytes s = 2; +inline bool AttrValue::has_s() const { + return value_case() == kS; +} +inline void AttrValue::set_has_s() { + _oneof_case_[0] = kS; +} +inline void AttrValue::clear_s() { + if (has_s()) { + value_.s_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + clear_has_value(); + } +} +inline const ::std::string& AttrValue::s() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.s) + if (has_s()) { + return value_.s_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} +inline void AttrValue::set_s(const ::std::string& value) { + if (!has_s()) { + clear_value(); + set_has_s(); + value_.s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + value_.s_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.s) +} +inline void AttrValue::set_s(const char* value) { + if (!has_s()) { + clear_value(); + set_has_s(); + value_.s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + value_.s_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.AttrValue.s) +} +inline void AttrValue::set_s(const void* value, + size_t size) { + if (!has_s()) { + clear_value(); + set_has_s(); + value_.s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + value_.s_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.AttrValue.s) +} +inline ::std::string* AttrValue::mutable_s() { + if (!has_s()) { + clear_value(); + set_has_s(); + value_.s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return value_.s_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.s) +} +inline ::std::string* AttrValue::release_s() { + // @@protoc_insertion_point(field_release:tensorflow.AttrValue.s) + if (has_s()) { + clear_has_value(); + return value_.s_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + } else { + return NULL; + } +} +inline ::std::string* AttrValue::unsafe_arena_release_s() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.s) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (has_s()) { + clear_has_value(); + return value_.s_.UnsafeArenaRelease( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + } else { + return NULL; + } +} +inline void AttrValue::set_allocated_s(::std::string* s) { + if (!has_s()) { + value_.s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_value(); + if (s != NULL) { + set_has_s(); + value_.s_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s, + GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.s) +} +inline void AttrValue::unsafe_arena_set_allocated_s(::std::string* s) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (!has_s()) { + value_.s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_value(); + if (s) { + set_has_s(); + value_.s_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s, GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.s) +} + +// optional int64 i = 3; +inline bool AttrValue::has_i() const { + return value_case() == kI; +} +inline void AttrValue::set_has_i() { + _oneof_case_[0] = kI; +} +inline void AttrValue::clear_i() { + if (has_i()) { + value_.i_ = GOOGLE_LONGLONG(0); + clear_has_value(); + } +} +inline ::google::protobuf::int64 AttrValue::i() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.i) + if (has_i()) { + return value_.i_; + } + return GOOGLE_LONGLONG(0); +} +inline void AttrValue::set_i(::google::protobuf::int64 value) { + if (!has_i()) { + clear_value(); + set_has_i(); + } + value_.i_ = value; + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.i) +} + +// optional float f = 4; +inline bool AttrValue::has_f() const { + return value_case() == kF; +} +inline void AttrValue::set_has_f() { + _oneof_case_[0] = kF; +} +inline void AttrValue::clear_f() { + if (has_f()) { + value_.f_ = 0; + clear_has_value(); + } +} +inline float AttrValue::f() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.f) + if (has_f()) { + return value_.f_; + } + return 0; +} +inline void AttrValue::set_f(float value) { + if (!has_f()) { + clear_value(); + set_has_f(); + } + value_.f_ = value; + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.f) +} + +// optional bool b = 5; +inline bool AttrValue::has_b() const { + return value_case() == kB; +} +inline void AttrValue::set_has_b() { + _oneof_case_[0] = kB; +} +inline void AttrValue::clear_b() { + if (has_b()) { + value_.b_ = false; + clear_has_value(); + } +} +inline bool AttrValue::b() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.b) + if (has_b()) { + return value_.b_; + } + return false; +} +inline void AttrValue::set_b(bool value) { + if (!has_b()) { + clear_value(); + set_has_b(); + } + value_.b_ = value; + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.b) +} + +// optional .tensorflow.DataType type = 6; +inline bool AttrValue::has_type() const { + return value_case() == kType; +} +inline void AttrValue::set_has_type() { + _oneof_case_[0] = kType; +} +inline void AttrValue::clear_type() { + if (has_type()) { + value_.type_ = 0; + clear_has_value(); + } +} +inline ::tensorflow::DataType AttrValue::type() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.type) + if (has_type()) { + return static_cast< ::tensorflow::DataType >(value_.type_); + } + return static_cast< ::tensorflow::DataType >(0); +} +inline void AttrValue::set_type(::tensorflow::DataType value) { + if (!has_type()) { + clear_value(); + set_has_type(); + } + value_.type_ = value; + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.type) +} + +// optional .tensorflow.TensorShapeProto shape = 7; +inline bool AttrValue::has_shape() const { + return value_case() == kShape; +} +inline void AttrValue::set_has_shape() { + _oneof_case_[0] = kShape; +} +inline void AttrValue::clear_shape() { + if (has_shape()) { + if (GetArenaNoVirtual() == NULL) { + delete value_.shape_; + } + clear_has_value(); + } +} +inline const ::tensorflow::TensorShapeProto& AttrValue::shape() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.shape) + return has_shape() + ? *value_.shape_ + : ::tensorflow::TensorShapeProto::default_instance(); +} +inline ::tensorflow::TensorShapeProto* AttrValue::mutable_shape() { + if (!has_shape()) { + clear_value(); + set_has_shape(); + value_.shape_ = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::TensorShapeProto >( + GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.shape) + return value_.shape_; +} +inline ::tensorflow::TensorShapeProto* AttrValue::release_shape() { + // @@protoc_insertion_point(field_release:tensorflow.AttrValue.shape) + if (has_shape()) { + clear_has_value(); + if (GetArenaNoVirtual() != NULL) { + ::tensorflow::TensorShapeProto* temp = new ::tensorflow::TensorShapeProto(*value_.shape_); + value_.shape_ = NULL; + return temp; + } else { + ::tensorflow::TensorShapeProto* temp = value_.shape_; + value_.shape_ = NULL; + return temp; + } + } else { + return NULL; + } +} +inline void AttrValue::set_allocated_shape(::tensorflow::TensorShapeProto* shape) { + clear_value(); + if (shape) { + if (GetArenaNoVirtual() != NULL && + ::google::protobuf::Arena::GetArena(shape) == NULL) { + GetArenaNoVirtual()->Own(shape); + } else if (GetArenaNoVirtual() != + ::google::protobuf::Arena::GetArena(shape)) { + ::tensorflow::TensorShapeProto* new_shape = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::TensorShapeProto >( + GetArenaNoVirtual()); + new_shape->CopyFrom(*shape); + shape = new_shape; + } + set_has_shape(); + value_.shape_ = shape; + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.shape) +} +inline ::tensorflow::TensorShapeProto* AttrValue::unsafe_arena_release_shape() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.shape) + if (has_shape()) { + clear_has_value(); + ::tensorflow::TensorShapeProto* temp = value_.shape_; + value_.shape_ = NULL; + return temp; + } else { + return NULL; + } +} +inline void AttrValue::unsafe_arena_set_allocated_shape(::tensorflow::TensorShapeProto* shape) { + clear_value(); + if (shape) { + set_has_shape(); + value_.shape_ = shape; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.shape) +} + +// optional .tensorflow.TensorProto tensor = 8; +inline bool AttrValue::has_tensor() const { + return value_case() == kTensor; +} +inline void AttrValue::set_has_tensor() { + _oneof_case_[0] = kTensor; +} +inline void AttrValue::clear_tensor() { + if (has_tensor()) { + if (GetArenaNoVirtual() == NULL) { + delete value_.tensor_; + } + clear_has_value(); + } +} +inline const ::tensorflow::TensorProto& AttrValue::tensor() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.tensor) + return has_tensor() + ? *value_.tensor_ + : ::tensorflow::TensorProto::default_instance(); +} +inline ::tensorflow::TensorProto* AttrValue::mutable_tensor() { + if (!has_tensor()) { + clear_value(); + set_has_tensor(); + value_.tensor_ = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::TensorProto >( + GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.tensor) + return value_.tensor_; +} +inline ::tensorflow::TensorProto* AttrValue::release_tensor() { + // @@protoc_insertion_point(field_release:tensorflow.AttrValue.tensor) + if (has_tensor()) { + clear_has_value(); + if (GetArenaNoVirtual() != NULL) { + ::tensorflow::TensorProto* temp = new ::tensorflow::TensorProto(*value_.tensor_); + value_.tensor_ = NULL; + return temp; + } else { + ::tensorflow::TensorProto* temp = value_.tensor_; + value_.tensor_ = NULL; + return temp; + } + } else { + return NULL; + } +} +inline void AttrValue::set_allocated_tensor(::tensorflow::TensorProto* tensor) { + clear_value(); + if (tensor) { + if (GetArenaNoVirtual() != NULL && + ::google::protobuf::Arena::GetArena(tensor) == NULL) { + GetArenaNoVirtual()->Own(tensor); + } else if (GetArenaNoVirtual() != + ::google::protobuf::Arena::GetArena(tensor)) { + ::tensorflow::TensorProto* new_tensor = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::TensorProto >( + GetArenaNoVirtual()); + new_tensor->CopyFrom(*tensor); + tensor = new_tensor; + } + set_has_tensor(); + value_.tensor_ = tensor; + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.tensor) +} +inline ::tensorflow::TensorProto* AttrValue::unsafe_arena_release_tensor() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.tensor) + if (has_tensor()) { + clear_has_value(); + ::tensorflow::TensorProto* temp = value_.tensor_; + value_.tensor_ = NULL; + return temp; + } else { + return NULL; + } +} +inline void AttrValue::unsafe_arena_set_allocated_tensor(::tensorflow::TensorProto* tensor) { + clear_value(); + if (tensor) { + set_has_tensor(); + value_.tensor_ = tensor; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.tensor) +} + +// optional .tensorflow.AttrValue.ListValue list = 1; +inline bool AttrValue::has_list() const { + return value_case() == kList; +} +inline void AttrValue::set_has_list() { + _oneof_case_[0] = kList; +} +inline void AttrValue::clear_list() { + if (has_list()) { + if (GetArenaNoVirtual() == NULL) { + delete value_.list_; + } + clear_has_value(); + } +} +inline const ::tensorflow::AttrValue_ListValue& AttrValue::list() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.list) + return has_list() + ? *value_.list_ + : ::tensorflow::AttrValue_ListValue::default_instance(); +} +inline ::tensorflow::AttrValue_ListValue* AttrValue::mutable_list() { + if (!has_list()) { + clear_value(); + set_has_list(); + value_.list_ = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::AttrValue_ListValue >( + GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.list) + return value_.list_; +} +inline ::tensorflow::AttrValue_ListValue* AttrValue::release_list() { + // @@protoc_insertion_point(field_release:tensorflow.AttrValue.list) + if (has_list()) { + clear_has_value(); + if (GetArenaNoVirtual() != NULL) { + ::tensorflow::AttrValue_ListValue* temp = new ::tensorflow::AttrValue_ListValue(*value_.list_); + value_.list_ = NULL; + return temp; + } else { + ::tensorflow::AttrValue_ListValue* temp = value_.list_; + value_.list_ = NULL; + return temp; + } + } else { + return NULL; + } +} +inline void AttrValue::set_allocated_list(::tensorflow::AttrValue_ListValue* list) { + clear_value(); + if (list) { + if (GetArenaNoVirtual() != NULL && + ::google::protobuf::Arena::GetArena(list) == NULL) { + GetArenaNoVirtual()->Own(list); + } else if (GetArenaNoVirtual() != + ::google::protobuf::Arena::GetArena(list)) { + ::tensorflow::AttrValue_ListValue* new_list = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::AttrValue_ListValue >( + GetArenaNoVirtual()); + new_list->CopyFrom(*list); + list = new_list; + } + set_has_list(); + value_.list_ = list; + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.list) +} +inline ::tensorflow::AttrValue_ListValue* AttrValue::unsafe_arena_release_list() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.list) + if (has_list()) { + clear_has_value(); + ::tensorflow::AttrValue_ListValue* temp = value_.list_; + value_.list_ = NULL; + return temp; + } else { + return NULL; + } +} +inline void AttrValue::unsafe_arena_set_allocated_list(::tensorflow::AttrValue_ListValue* list) { + clear_value(); + if (list) { + set_has_list(); + value_.list_ = list; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.list) +} + +// optional .tensorflow.NameAttrList func = 10; +inline bool AttrValue::has_func() const { + return value_case() == kFunc; +} +inline void AttrValue::set_has_func() { + _oneof_case_[0] = kFunc; +} +inline void AttrValue::clear_func() { + if (has_func()) { + if (GetArenaNoVirtual() == NULL) { + delete value_.func_; + } + clear_has_value(); + } +} +inline const ::tensorflow::NameAttrList& AttrValue::func() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.func) + return has_func() + ? *value_.func_ + : ::tensorflow::NameAttrList::default_instance(); +} +inline ::tensorflow::NameAttrList* AttrValue::mutable_func() { + if (!has_func()) { + clear_value(); + set_has_func(); + value_.func_ = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::NameAttrList >( + GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.func) + return value_.func_; +} +inline ::tensorflow::NameAttrList* AttrValue::release_func() { + // @@protoc_insertion_point(field_release:tensorflow.AttrValue.func) + if (has_func()) { + clear_has_value(); + if (GetArenaNoVirtual() != NULL) { + ::tensorflow::NameAttrList* temp = new ::tensorflow::NameAttrList(*value_.func_); + value_.func_ = NULL; + return temp; + } else { + ::tensorflow::NameAttrList* temp = value_.func_; + value_.func_ = NULL; + return temp; + } + } else { + return NULL; + } +} +inline void AttrValue::set_allocated_func(::tensorflow::NameAttrList* func) { + clear_value(); + if (func) { + if (GetArenaNoVirtual() != NULL && + ::google::protobuf::Arena::GetArena(func) == NULL) { + GetArenaNoVirtual()->Own(func); + } else if (GetArenaNoVirtual() != + ::google::protobuf::Arena::GetArena(func)) { + ::tensorflow::NameAttrList* new_func = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::NameAttrList >( + GetArenaNoVirtual()); + new_func->CopyFrom(*func); + func = new_func; + } + set_has_func(); + value_.func_ = func; + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.func) +} +inline ::tensorflow::NameAttrList* AttrValue::unsafe_arena_release_func() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.func) + if (has_func()) { + clear_has_value(); + ::tensorflow::NameAttrList* temp = value_.func_; + value_.func_ = NULL; + return temp; + } else { + return NULL; + } +} +inline void AttrValue::unsafe_arena_set_allocated_func(::tensorflow::NameAttrList* func) { + clear_value(); + if (func) { + set_has_func(); + value_.func_ = func; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.func) +} + +// optional string placeholder = 9; +inline bool AttrValue::has_placeholder() const { + return value_case() == kPlaceholder; +} +inline void AttrValue::set_has_placeholder() { + _oneof_case_[0] = kPlaceholder; +} +inline void AttrValue::clear_placeholder() { + if (has_placeholder()) { + value_.placeholder_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + clear_has_value(); + } +} +inline const ::std::string& AttrValue::placeholder() const { + // @@protoc_insertion_point(field_get:tensorflow.AttrValue.placeholder) + if (has_placeholder()) { + return value_.placeholder_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} +inline void AttrValue::set_placeholder(const ::std::string& value) { + if (!has_placeholder()) { + clear_value(); + set_has_placeholder(); + value_.placeholder_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + value_.placeholder_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.AttrValue.placeholder) +} +inline void AttrValue::set_placeholder(const char* value) { + if (!has_placeholder()) { + clear_value(); + set_has_placeholder(); + value_.placeholder_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + value_.placeholder_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.AttrValue.placeholder) +} +inline void AttrValue::set_placeholder(const char* value, + size_t size) { + if (!has_placeholder()) { + clear_value(); + set_has_placeholder(); + value_.placeholder_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + value_.placeholder_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.AttrValue.placeholder) +} +inline ::std::string* AttrValue::mutable_placeholder() { + if (!has_placeholder()) { + clear_value(); + set_has_placeholder(); + value_.placeholder_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return value_.placeholder_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.placeholder) +} +inline ::std::string* AttrValue::release_placeholder() { + // @@protoc_insertion_point(field_release:tensorflow.AttrValue.placeholder) + if (has_placeholder()) { + clear_has_value(); + return value_.placeholder_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + } else { + return NULL; + } +} +inline ::std::string* AttrValue::unsafe_arena_release_placeholder() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.placeholder) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (has_placeholder()) { + clear_has_value(); + return value_.placeholder_.UnsafeArenaRelease( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + } else { + return NULL; + } +} +inline void AttrValue::set_allocated_placeholder(::std::string* placeholder) { + if (!has_placeholder()) { + value_.placeholder_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_value(); + if (placeholder != NULL) { + set_has_placeholder(); + value_.placeholder_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), placeholder, + GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.placeholder) +} +inline void AttrValue::unsafe_arena_set_allocated_placeholder(::std::string* placeholder) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (!has_placeholder()) { + value_.placeholder_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_value(); + if (placeholder) { + set_has_placeholder(); + value_.placeholder_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), placeholder, GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.placeholder) +} + +inline bool AttrValue::has_value() const { + return value_case() != VALUE_NOT_SET; +} +inline void AttrValue::clear_has_value() { + _oneof_case_[0] = VALUE_NOT_SET; +} +inline AttrValue::ValueCase AttrValue::value_case() const { + return AttrValue::ValueCase(_oneof_case_[0]); +} +inline const AttrValue* AttrValue::internal_default_instance() { + return &AttrValue_default_instance_.get(); +} +// ------------------------------------------------------------------- + +// NameAttrList + +// optional string name = 1; +inline void NameAttrList::clear_name() { + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& NameAttrList::name() const { + // @@protoc_insertion_point(field_get:tensorflow.NameAttrList.name) + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void NameAttrList::set_name(const ::std::string& value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.NameAttrList.name) +} +inline void NameAttrList::set_name(const char* value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.NameAttrList.name) +} +inline void NameAttrList::set_name(const char* value, + size_t size) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.NameAttrList.name) +} +inline ::std::string* NameAttrList::mutable_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.NameAttrList.name) + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* NameAttrList::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.NameAttrList.name) + + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* NameAttrList::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.NameAttrList.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void NameAttrList::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.NameAttrList.name) +} +inline void NameAttrList::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NameAttrList.name) +} + +// map attr = 2; +inline int NameAttrList::attr_size() const { + return attr_.size(); +} +inline void NameAttrList::clear_attr() { + attr_.Clear(); +} +inline const ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >& +NameAttrList::attr() const { + // @@protoc_insertion_point(field_map:tensorflow.NameAttrList.attr) + return attr_.GetMap(); +} +inline ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >* +NameAttrList::mutable_attr() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.NameAttrList.attr) + return attr_.MutableMap(); +} + +inline const NameAttrList* NameAttrList::internal_default_instance() { + return &NameAttrList_default_instance_.get(); +} +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_attr_5fvalue_2eproto__INCLUDED diff --git a/modules/dnn/misc/tensorflow/function.pb.cc b/modules/dnn/misc/tensorflow/function.pb.cc new file mode 100644 index 000000000..408a07e39 --- /dev/null +++ b/modules/dnn/misc/tensorflow/function.pb.cc @@ -0,0 +1,2348 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: function.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "function.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace tensorflow { + +namespace { + +const ::google::protobuf::Descriptor* FunctionDefLibrary_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + FunctionDefLibrary_reflection_ = NULL; +const ::google::protobuf::Descriptor* FunctionDef_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + FunctionDef_reflection_ = NULL; +const ::google::protobuf::Descriptor* FunctionDef_Node_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + FunctionDef_Node_reflection_ = NULL; +const ::google::protobuf::Descriptor* FunctionDef_Node_AttrEntry_descriptor_ = NULL; +const ::google::protobuf::Descriptor* GradientDef_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + GradientDef_reflection_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_function_2eproto() GOOGLE_ATTRIBUTE_COLD; +void protobuf_AssignDesc_function_2eproto() { + protobuf_AddDesc_function_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "function.proto"); + GOOGLE_CHECK(file != NULL); + FunctionDefLibrary_descriptor_ = file->message_type(0); + static const int FunctionDefLibrary_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FunctionDefLibrary, function_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FunctionDefLibrary, gradient_), + }; + FunctionDefLibrary_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + FunctionDefLibrary_descriptor_, + FunctionDefLibrary::internal_default_instance(), + FunctionDefLibrary_offsets_, + -1, + -1, + -1, + sizeof(FunctionDefLibrary), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FunctionDefLibrary, _internal_metadata_)); + FunctionDef_descriptor_ = file->message_type(1); + static const int FunctionDef_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FunctionDef, signature_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FunctionDef, node_), + }; + FunctionDef_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + FunctionDef_descriptor_, + FunctionDef::internal_default_instance(), + FunctionDef_offsets_, + -1, + -1, + -1, + sizeof(FunctionDef), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FunctionDef, _internal_metadata_)); + FunctionDef_Node_descriptor_ = FunctionDef_descriptor_->nested_type(0); + static const int FunctionDef_Node_offsets_[5] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FunctionDef_Node, ret_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FunctionDef_Node, op_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FunctionDef_Node, arg_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FunctionDef_Node, dep_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FunctionDef_Node, attr_), + }; + FunctionDef_Node_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + FunctionDef_Node_descriptor_, + FunctionDef_Node::internal_default_instance(), + FunctionDef_Node_offsets_, + -1, + -1, + -1, + sizeof(FunctionDef_Node), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FunctionDef_Node, _internal_metadata_)); + FunctionDef_Node_AttrEntry_descriptor_ = FunctionDef_Node_descriptor_->nested_type(0); + GradientDef_descriptor_ = file->message_type(2); + static const int GradientDef_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GradientDef, function_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GradientDef, gradient_func_), + }; + GradientDef_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + GradientDef_descriptor_, + GradientDef::internal_default_instance(), + GradientDef_offsets_, + -1, + -1, + -1, + sizeof(GradientDef), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GradientDef, _internal_metadata_)); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_function_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + FunctionDefLibrary_descriptor_, FunctionDefLibrary::internal_default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + FunctionDef_descriptor_, FunctionDef::internal_default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + FunctionDef_Node_descriptor_, FunctionDef_Node::internal_default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + FunctionDef_Node_AttrEntry_descriptor_, + ::google::protobuf::internal::MapEntry< + ::std::string, + ::tensorflow::AttrValue, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, + 0>::CreateDefaultInstance( + FunctionDef_Node_AttrEntry_descriptor_)); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + GradientDef_descriptor_, GradientDef::internal_default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_function_2eproto() { + FunctionDefLibrary_default_instance_.Shutdown(); + delete FunctionDefLibrary_reflection_; + FunctionDef_default_instance_.Shutdown(); + delete FunctionDef_reflection_; + FunctionDef_Node_default_instance_.Shutdown(); + delete FunctionDef_Node_reflection_; + GradientDef_default_instance_.Shutdown(); + delete GradientDef_reflection_; +} + +void protobuf_InitDefaults_function_2eproto_impl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::tensorflow::protobuf_InitDefaults_attr_5fvalue_2eproto(); + ::tensorflow::protobuf_InitDefaults_op_5fdef_2eproto(); + FunctionDefLibrary_default_instance_.DefaultConstruct(); + FunctionDef_default_instance_.DefaultConstruct(); + ::google::protobuf::internal::GetEmptyString(); + FunctionDef_Node_default_instance_.DefaultConstruct(); + ::google::protobuf::internal::GetEmptyString(); + GradientDef_default_instance_.DefaultConstruct(); + FunctionDefLibrary_default_instance_.get_mutable()->InitAsDefaultInstance(); + FunctionDef_default_instance_.get_mutable()->InitAsDefaultInstance(); + FunctionDef_Node_default_instance_.get_mutable()->InitAsDefaultInstance(); + GradientDef_default_instance_.get_mutable()->InitAsDefaultInstance(); +} + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_InitDefaults_function_2eproto_once_); +void protobuf_InitDefaults_function_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_InitDefaults_function_2eproto_once_, + &protobuf_InitDefaults_function_2eproto_impl); +} +void protobuf_AddDesc_function_2eproto_impl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + protobuf_InitDefaults_function_2eproto(); + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\016function.proto\022\ntensorflow\032\020attr_value" + ".proto\032\014op_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\"\225\002\n\013FunctionDef\022$\n\tsignature\030\001 " + "\001(\0132\021.tensorflow.OpDef\022*\n\004node\030\002 \003(\0132\034.t" + "ensorflow.FunctionDef.Node\032\263\001\n\004Node\022\013\n\003r" + "et\030\001 \003(\t\022\n\n\002op\030\002 \001(\t\022\013\n\003arg\030\003 \003(\t\022\013\n\003dep" + "\030\004 \003(\t\0224\n\004attr\030\005 \003(\0132&.tensorflow.Functi" + "onDef.Node.AttrEntry\032B\n\tAttrEntry\022\013\n\003key" + "\030\001 \001(\t\022$\n\005value\030\002 \001(\0132\025.tensorflow.AttrV" + "alue:\0028\001\";\n\013GradientDef\022\025\n\rfunction_name" + "\030\001 \001(\t\022\025\n\rgradient_func\030\002 \001(\tB/\n\030org.ten" + "sorflow.frameworkB\016FunctionProtosP\001\370\001\001b\006" + "proto3", 566); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "function.proto", &protobuf_RegisterTypes); + ::tensorflow::protobuf_AddDesc_attr_5fvalue_2eproto(); + ::tensorflow::protobuf_AddDesc_op_5fdef_2eproto(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_function_2eproto); +} + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_function_2eproto_once_); +void protobuf_AddDesc_function_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_function_2eproto_once_, + &protobuf_AddDesc_function_2eproto_impl); +} +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_function_2eproto { + StaticDescriptorInitializer_function_2eproto() { + protobuf_AddDesc_function_2eproto(); + } +} static_descriptor_initializer_function_2eproto_; + +namespace { + +static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD GOOGLE_ATTRIBUTE_NORETURN; +static void MergeFromFail(int line) { + ::google::protobuf::internal::MergeFromFail(__FILE__, line); +} + +} // namespace + + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int FunctionDefLibrary::kFunctionFieldNumber; +const int FunctionDefLibrary::kGradientFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +FunctionDefLibrary::FunctionDefLibrary() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_function_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.FunctionDefLibrary) +} +FunctionDefLibrary::FunctionDefLibrary(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena), + function_(arena), + gradient_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_function_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.FunctionDefLibrary) +} + +void FunctionDefLibrary::InitAsDefaultInstance() { +} + +FunctionDefLibrary::FunctionDefLibrary(const FunctionDefLibrary& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.FunctionDefLibrary) +} + +void FunctionDefLibrary::SharedCtor() { + _cached_size_ = 0; +} + +FunctionDefLibrary::~FunctionDefLibrary() { + // @@protoc_insertion_point(destructor:tensorflow.FunctionDefLibrary) + SharedDtor(); +} + +void FunctionDefLibrary::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + +} + +void FunctionDefLibrary::ArenaDtor(void* object) { + FunctionDefLibrary* _this = reinterpret_cast< FunctionDefLibrary* >(object); + (void)_this; +} +void FunctionDefLibrary::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void FunctionDefLibrary::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* FunctionDefLibrary::descriptor() { + protobuf_AssignDescriptorsOnce(); + return FunctionDefLibrary_descriptor_; +} + +const FunctionDefLibrary& FunctionDefLibrary::default_instance() { + protobuf_InitDefaults_function_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed FunctionDefLibrary_default_instance_; + +FunctionDefLibrary* FunctionDefLibrary::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void FunctionDefLibrary::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.FunctionDefLibrary) + function_.Clear(); + gradient_.Clear(); +} + +bool FunctionDefLibrary::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.FunctionDefLibrary) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated .tensorflow.FunctionDef function = 1; + case 1: { + if (tag == 10) { + DO_(input->IncrementRecursionDepth()); + parse_loop_function: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( + input, add_function())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(10)) goto parse_loop_function; + if (input->ExpectTag(18)) goto parse_loop_gradient; + input->UnsafeDecrementRecursionDepth(); + break; + } + + // repeated .tensorflow.GradientDef gradient = 2; + case 2: { + if (tag == 18) { + DO_(input->IncrementRecursionDepth()); + parse_loop_gradient: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( + input, add_gradient())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_loop_gradient; + input->UnsafeDecrementRecursionDepth(); + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.FunctionDefLibrary) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.FunctionDefLibrary) + return false; +#undef DO_ +} + +void FunctionDefLibrary::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.FunctionDefLibrary) + // repeated .tensorflow.FunctionDef function = 1; + for (unsigned int i = 0, n = this->function_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->function(i), output); + } + + // repeated .tensorflow.GradientDef gradient = 2; + for (unsigned int i = 0, n = this->gradient_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->gradient(i), output); + } + + // @@protoc_insertion_point(serialize_end:tensorflow.FunctionDefLibrary) +} + +::google::protobuf::uint8* FunctionDefLibrary::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.FunctionDefLibrary) + // repeated .tensorflow.FunctionDef function = 1; + for (unsigned int i = 0, n = this->function_size(); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 1, this->function(i), false, target); + } + + // repeated .tensorflow.GradientDef gradient = 2; + for (unsigned int i = 0, n = this->gradient_size(); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 2, this->gradient(i), false, target); + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.FunctionDefLibrary) + return target; +} + +size_t FunctionDefLibrary::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.FunctionDefLibrary) + size_t total_size = 0; + + // repeated .tensorflow.FunctionDef function = 1; + { + unsigned int count = this->function_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->function(i)); + } + } + + // repeated .tensorflow.GradientDef gradient = 2; + { + unsigned int count = this->gradient_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->gradient(i)); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void FunctionDefLibrary::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.FunctionDefLibrary) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const FunctionDefLibrary* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.FunctionDefLibrary) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.FunctionDefLibrary) + UnsafeMergeFrom(*source); + } +} + +void FunctionDefLibrary::MergeFrom(const FunctionDefLibrary& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.FunctionDefLibrary) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void FunctionDefLibrary::UnsafeMergeFrom(const FunctionDefLibrary& from) { + GOOGLE_DCHECK(&from != this); + function_.MergeFrom(from.function_); + gradient_.MergeFrom(from.gradient_); +} + +void FunctionDefLibrary::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.FunctionDefLibrary) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void FunctionDefLibrary::CopyFrom(const FunctionDefLibrary& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.FunctionDefLibrary) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool FunctionDefLibrary::IsInitialized() const { + + return true; +} + +void FunctionDefLibrary::Swap(FunctionDefLibrary* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + FunctionDefLibrary temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void FunctionDefLibrary::UnsafeArenaSwap(FunctionDefLibrary* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void FunctionDefLibrary::InternalSwap(FunctionDefLibrary* other) { + function_.UnsafeArenaSwap(&other->function_); + gradient_.UnsafeArenaSwap(&other->gradient_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata FunctionDefLibrary::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = FunctionDefLibrary_descriptor_; + metadata.reflection = FunctionDefLibrary_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// FunctionDefLibrary + +// repeated .tensorflow.FunctionDef function = 1; +int FunctionDefLibrary::function_size() const { + return function_.size(); +} +void FunctionDefLibrary::clear_function() { + function_.Clear(); +} +const ::tensorflow::FunctionDef& FunctionDefLibrary::function(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionDefLibrary.function) + return function_.Get(index); +} +::tensorflow::FunctionDef* FunctionDefLibrary::mutable_function(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDefLibrary.function) + return function_.Mutable(index); +} +::tensorflow::FunctionDef* FunctionDefLibrary::add_function() { + // @@protoc_insertion_point(field_add:tensorflow.FunctionDefLibrary.function) + return function_.Add(); +} +::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef >* +FunctionDefLibrary::mutable_function() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDefLibrary.function) + return &function_; +} +const ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef >& +FunctionDefLibrary::function() const { + // @@protoc_insertion_point(field_list:tensorflow.FunctionDefLibrary.function) + return function_; +} + +// repeated .tensorflow.GradientDef gradient = 2; +int FunctionDefLibrary::gradient_size() const { + return gradient_.size(); +} +void FunctionDefLibrary::clear_gradient() { + gradient_.Clear(); +} +const ::tensorflow::GradientDef& FunctionDefLibrary::gradient(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionDefLibrary.gradient) + return gradient_.Get(index); +} +::tensorflow::GradientDef* FunctionDefLibrary::mutable_gradient(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDefLibrary.gradient) + return gradient_.Mutable(index); +} +::tensorflow::GradientDef* FunctionDefLibrary::add_gradient() { + // @@protoc_insertion_point(field_add:tensorflow.FunctionDefLibrary.gradient) + return gradient_.Add(); +} +::google::protobuf::RepeatedPtrField< ::tensorflow::GradientDef >* +FunctionDefLibrary::mutable_gradient() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDefLibrary.gradient) + return &gradient_; +} +const ::google::protobuf::RepeatedPtrField< ::tensorflow::GradientDef >& +FunctionDefLibrary::gradient() const { + // @@protoc_insertion_point(field_list:tensorflow.FunctionDefLibrary.gradient) + return gradient_; +} + +inline const FunctionDefLibrary* FunctionDefLibrary::internal_default_instance() { + return &FunctionDefLibrary_default_instance_.get(); +} +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int FunctionDef_Node::kRetFieldNumber; +const int FunctionDef_Node::kOpFieldNumber; +const int FunctionDef_Node::kArgFieldNumber; +const int FunctionDef_Node::kDepFieldNumber; +const int FunctionDef_Node::kAttrFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +FunctionDef_Node::FunctionDef_Node() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_function_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.FunctionDef.Node) +} +FunctionDef_Node::FunctionDef_Node(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena), + ret_(arena), + arg_(arena), + dep_(arena), + attr_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_function_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.FunctionDef.Node) +} + +void FunctionDef_Node::InitAsDefaultInstance() { +} + +FunctionDef_Node::FunctionDef_Node(const FunctionDef_Node& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.FunctionDef.Node) +} + +void FunctionDef_Node::SharedCtor() { + attr_.SetAssignDescriptorCallback( + protobuf_AssignDescriptorsOnce); + attr_.SetEntryDescriptor( + &::tensorflow::FunctionDef_Node_AttrEntry_descriptor_); + op_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _cached_size_ = 0; +} + +FunctionDef_Node::~FunctionDef_Node() { + // @@protoc_insertion_point(destructor:tensorflow.FunctionDef.Node) + SharedDtor(); +} + +void FunctionDef_Node::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + + op_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); +} + +void FunctionDef_Node::ArenaDtor(void* object) { + FunctionDef_Node* _this = reinterpret_cast< FunctionDef_Node* >(object); + (void)_this; +} +void FunctionDef_Node::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void FunctionDef_Node::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* FunctionDef_Node::descriptor() { + protobuf_AssignDescriptorsOnce(); + return FunctionDef_Node_descriptor_; +} + +const FunctionDef_Node& FunctionDef_Node::default_instance() { + protobuf_InitDefaults_function_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed FunctionDef_Node_default_instance_; + +FunctionDef_Node* FunctionDef_Node::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void FunctionDef_Node::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.FunctionDef.Node) + op_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + ret_.Clear(); + arg_.Clear(); + dep_.Clear(); + attr_.Clear(); +} + +bool FunctionDef_Node::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.FunctionDef.Node) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated string ret = 1; + case 1: { + if (tag == 10) { + parse_ret: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_ret())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->ret(this->ret_size() - 1).data(), + this->ret(this->ret_size() - 1).length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.FunctionDef.Node.ret")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(10)) goto parse_ret; + if (input->ExpectTag(18)) goto parse_op; + break; + } + + // optional string op = 2; + case 2: { + if (tag == 18) { + parse_op: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_op())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->op().data(), this->op().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.FunctionDef.Node.op")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_arg; + break; + } + + // repeated string arg = 3; + case 3: { + if (tag == 26) { + parse_arg: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_arg())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->arg(this->arg_size() - 1).data(), + this->arg(this->arg_size() - 1).length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.FunctionDef.Node.arg")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_arg; + if (input->ExpectTag(34)) goto parse_dep; + break; + } + + // repeated string dep = 4; + case 4: { + if (tag == 34) { + parse_dep: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_dep())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->dep(this->dep_size() - 1).data(), + this->dep(this->dep_size() - 1).length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.FunctionDef.Node.dep")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_dep; + if (input->ExpectTag(42)) goto parse_attr; + break; + } + + // map attr = 5; + case 5: { + if (tag == 42) { + parse_attr: + DO_(input->IncrementRecursionDepth()); + parse_loop_attr: + FunctionDef_Node_AttrEntry::Parser< ::google::protobuf::internal::MapField< + ::std::string, ::tensorflow::AttrValue, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, + 0 >, + ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue > > parser(&attr_); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, &parser)); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + parser.key().data(), parser.key().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.FunctionDef.Node.AttrEntry.key")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_loop_attr; + input->UnsafeDecrementRecursionDepth(); + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.FunctionDef.Node) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.FunctionDef.Node) + return false; +#undef DO_ +} + +void FunctionDef_Node::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.FunctionDef.Node) + // repeated string ret = 1; + for (int i = 0; i < this->ret_size(); i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->ret(i).data(), this->ret(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.FunctionDef.Node.ret"); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->ret(i), output); + } + + // optional string op = 2; + if (this->op().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->op().data(), this->op().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.FunctionDef.Node.op"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->op(), output); + } + + // repeated string arg = 3; + for (int i = 0; i < this->arg_size(); i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->arg(i).data(), this->arg(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.FunctionDef.Node.arg"); + ::google::protobuf::internal::WireFormatLite::WriteString( + 3, this->arg(i), output); + } + + // repeated string dep = 4; + for (int i = 0; i < this->dep_size(); i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->dep(i).data(), this->dep(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.FunctionDef.Node.dep"); + ::google::protobuf::internal::WireFormatLite::WriteString( + 4, this->dep(i), output); + } + + // map attr = 5; + if (!this->attr().empty()) { + typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::google::protobuf::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), p->first.length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.FunctionDef.Node.AttrEntry.key"); + } + }; + + if (output->IsSerializationDeterminstic() && + this->attr().size() > 1) { + ::google::protobuf::scoped_array items( + new SortItem[this->attr().size()]); + typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::size_type size_type; + size_type n = 0; + for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + it = this->attr().begin(); + it != this->attr().end(); ++it, ++n) { + items[n] = SortItem(&*it); + } + ::std::sort(&items[0], &items[n], Less()); + ::google::protobuf::scoped_ptr entry; + for (size_type i = 0; i < n; i++) { + entry.reset(attr_.NewEntryWrapper( + items[i]->first, items[i]->second)); + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, *entry, output); + if (entry->GetArena() != NULL) { + entry.release(); + } + Utf8Check::Check(items[i]); + } + } else { + ::google::protobuf::scoped_ptr entry; + for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + it = this->attr().begin(); + it != this->attr().end(); ++it) { + entry.reset(attr_.NewEntryWrapper( + it->first, it->second)); + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, *entry, output); + if (entry->GetArena() != NULL) { + entry.release(); + } + Utf8Check::Check(&*it); + } + } + } + + // @@protoc_insertion_point(serialize_end:tensorflow.FunctionDef.Node) +} + +::google::protobuf::uint8* FunctionDef_Node::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.FunctionDef.Node) + // repeated string ret = 1; + for (int i = 0; i < this->ret_size(); i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->ret(i).data(), this->ret(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.FunctionDef.Node.ret"); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(1, this->ret(i), target); + } + + // optional string op = 2; + if (this->op().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->op().data(), this->op().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.FunctionDef.Node.op"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->op(), target); + } + + // repeated string arg = 3; + for (int i = 0; i < this->arg_size(); i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->arg(i).data(), this->arg(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.FunctionDef.Node.arg"); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(3, this->arg(i), target); + } + + // repeated string dep = 4; + for (int i = 0; i < this->dep_size(); i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->dep(i).data(), this->dep(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.FunctionDef.Node.dep"); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(4, this->dep(i), target); + } + + // map attr = 5; + if (!this->attr().empty()) { + typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::google::protobuf::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), p->first.length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.FunctionDef.Node.AttrEntry.key"); + } + }; + + if (deterministic && + this->attr().size() > 1) { + ::google::protobuf::scoped_array items( + new SortItem[this->attr().size()]); + typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::size_type size_type; + size_type n = 0; + for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + it = this->attr().begin(); + it != this->attr().end(); ++it, ++n) { + items[n] = SortItem(&*it); + } + ::std::sort(&items[0], &items[n], Less()); + ::google::protobuf::scoped_ptr entry; + for (size_type i = 0; i < n; i++) { + entry.reset(attr_.NewEntryWrapper( + items[i]->first, items[i]->second)); + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 5, *entry, deterministic, target); +; + if (entry->GetArena() != NULL) { + entry.release(); + } + Utf8Check::Check(items[i]); + } + } else { + ::google::protobuf::scoped_ptr entry; + for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + it = this->attr().begin(); + it != this->attr().end(); ++it) { + entry.reset(attr_.NewEntryWrapper( + it->first, it->second)); + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 5, *entry, deterministic, target); +; + if (entry->GetArena() != NULL) { + entry.release(); + } + Utf8Check::Check(&*it); + } + } + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.FunctionDef.Node) + return target; +} + +size_t FunctionDef_Node::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.FunctionDef.Node) + size_t total_size = 0; + + // optional string op = 2; + if (this->op().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->op()); + } + + // repeated string ret = 1; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->ret_size()); + for (int i = 0; i < this->ret_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->ret(i)); + } + + // repeated string arg = 3; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->arg_size()); + for (int i = 0; i < this->arg_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->arg(i)); + } + + // repeated string dep = 4; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->dep_size()); + for (int i = 0; i < this->dep_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->dep(i)); + } + + // map attr = 5; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->attr_size()); + { + ::google::protobuf::scoped_ptr entry; + for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + it = this->attr().begin(); + it != this->attr().end(); ++it) { + if (entry.get() != NULL && entry->GetArena() != NULL) { + entry.release(); + } + entry.reset(attr_.NewEntryWrapper(it->first, it->second)); + total_size += ::google::protobuf::internal::WireFormatLite:: + MessageSizeNoVirtual(*entry); + } + if (entry.get() != NULL && entry->GetArena() != NULL) { + entry.release(); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void FunctionDef_Node::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.FunctionDef.Node) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const FunctionDef_Node* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.FunctionDef.Node) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.FunctionDef.Node) + UnsafeMergeFrom(*source); + } +} + +void FunctionDef_Node::MergeFrom(const FunctionDef_Node& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.FunctionDef.Node) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void FunctionDef_Node::UnsafeMergeFrom(const FunctionDef_Node& from) { + GOOGLE_DCHECK(&from != this); + ret_.UnsafeMergeFrom(from.ret_); + arg_.UnsafeMergeFrom(from.arg_); + dep_.UnsafeMergeFrom(from.dep_); + attr_.MergeFrom(from.attr_); + if (from.op().size() > 0) { + set_op(from.op()); + } +} + +void FunctionDef_Node::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.FunctionDef.Node) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void FunctionDef_Node::CopyFrom(const FunctionDef_Node& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.FunctionDef.Node) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool FunctionDef_Node::IsInitialized() const { + + return true; +} + +void FunctionDef_Node::Swap(FunctionDef_Node* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + FunctionDef_Node temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void FunctionDef_Node::UnsafeArenaSwap(FunctionDef_Node* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void FunctionDef_Node::InternalSwap(FunctionDef_Node* other) { + ret_.UnsafeArenaSwap(&other->ret_); + op_.Swap(&other->op_); + arg_.UnsafeArenaSwap(&other->arg_); + dep_.UnsafeArenaSwap(&other->dep_); + attr_.Swap(&other->attr_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata FunctionDef_Node::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = FunctionDef_Node_descriptor_; + metadata.reflection = FunctionDef_Node_reflection_; + return metadata; +} + + +// ------------------------------------------------------------------- + +void FunctionDef::_slow_mutable_signature() { + signature_ = ::google::protobuf::Arena::CreateMessage< ::tensorflow::OpDef >( + GetArenaNoVirtual()); +} +::tensorflow::OpDef* FunctionDef::_slow_release_signature() { + if (signature_ == NULL) { + return NULL; + } else { + ::tensorflow::OpDef* temp = new ::tensorflow::OpDef(*signature_); + signature_ = NULL; + return temp; + } +} +::tensorflow::OpDef* FunctionDef::unsafe_arena_release_signature() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.FunctionDef.signature) + + ::tensorflow::OpDef* temp = signature_; + signature_ = NULL; + return temp; +} +void FunctionDef::_slow_set_allocated_signature( + ::google::protobuf::Arena* message_arena, ::tensorflow::OpDef** signature) { + if (message_arena != NULL && + ::google::protobuf::Arena::GetArena(*signature) == NULL) { + message_arena->Own(*signature); + } else if (message_arena != + ::google::protobuf::Arena::GetArena(*signature)) { + ::tensorflow::OpDef* new_signature = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::OpDef >( + message_arena); + new_signature->CopyFrom(**signature); + *signature = new_signature; + } +} +void FunctionDef::unsafe_arena_set_allocated_signature( + ::tensorflow::OpDef* signature) { + if (GetArenaNoVirtual() == NULL) { + delete signature_; + } + signature_ = signature; + if (signature) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.FunctionDef.signature) +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int FunctionDef::kSignatureFieldNumber; +const int FunctionDef::kNodeFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +FunctionDef::FunctionDef() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_function_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.FunctionDef) +} +FunctionDef::FunctionDef(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena), + node_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_function_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.FunctionDef) +} + +void FunctionDef::InitAsDefaultInstance() { + signature_ = const_cast< ::tensorflow::OpDef*>( + ::tensorflow::OpDef::internal_default_instance()); +} + +FunctionDef::FunctionDef(const FunctionDef& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.FunctionDef) +} + +void FunctionDef::SharedCtor() { + signature_ = NULL; + _cached_size_ = 0; +} + +FunctionDef::~FunctionDef() { + // @@protoc_insertion_point(destructor:tensorflow.FunctionDef) + SharedDtor(); +} + +void FunctionDef::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + + if (this != &FunctionDef_default_instance_.get()) { + delete signature_; + } +} + +void FunctionDef::ArenaDtor(void* object) { + FunctionDef* _this = reinterpret_cast< FunctionDef* >(object); + (void)_this; +} +void FunctionDef::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void FunctionDef::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* FunctionDef::descriptor() { + protobuf_AssignDescriptorsOnce(); + return FunctionDef_descriptor_; +} + +const FunctionDef& FunctionDef::default_instance() { + protobuf_InitDefaults_function_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed FunctionDef_default_instance_; + +FunctionDef* FunctionDef::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void FunctionDef::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.FunctionDef) + if (GetArenaNoVirtual() == NULL && signature_ != NULL) delete signature_; + signature_ = NULL; + node_.Clear(); +} + +bool FunctionDef::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.FunctionDef) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional .tensorflow.OpDef signature = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_signature())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_node; + break; + } + + // repeated .tensorflow.FunctionDef.Node node = 2; + case 2: { + if (tag == 18) { + parse_node: + DO_(input->IncrementRecursionDepth()); + parse_loop_node: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( + input, add_node())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_loop_node; + input->UnsafeDecrementRecursionDepth(); + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.FunctionDef) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.FunctionDef) + return false; +#undef DO_ +} + +void FunctionDef::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.FunctionDef) + // optional .tensorflow.OpDef signature = 1; + if (this->has_signature()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, *this->signature_, output); + } + + // repeated .tensorflow.FunctionDef.Node node = 2; + for (unsigned int i = 0, n = this->node_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->node(i), output); + } + + // @@protoc_insertion_point(serialize_end:tensorflow.FunctionDef) +} + +::google::protobuf::uint8* FunctionDef::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.FunctionDef) + // optional .tensorflow.OpDef signature = 1; + if (this->has_signature()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 1, *this->signature_, false, target); + } + + // repeated .tensorflow.FunctionDef.Node node = 2; + for (unsigned int i = 0, n = this->node_size(); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 2, this->node(i), false, target); + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.FunctionDef) + return target; +} + +size_t FunctionDef::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.FunctionDef) + size_t total_size = 0; + + // optional .tensorflow.OpDef signature = 1; + if (this->has_signature()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->signature_); + } + + // repeated .tensorflow.FunctionDef.Node node = 2; + { + unsigned int count = this->node_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->node(i)); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void FunctionDef::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.FunctionDef) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const FunctionDef* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.FunctionDef) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.FunctionDef) + UnsafeMergeFrom(*source); + } +} + +void FunctionDef::MergeFrom(const FunctionDef& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.FunctionDef) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void FunctionDef::UnsafeMergeFrom(const FunctionDef& from) { + GOOGLE_DCHECK(&from != this); + node_.MergeFrom(from.node_); + if (from.has_signature()) { + mutable_signature()->::tensorflow::OpDef::MergeFrom(from.signature()); + } +} + +void FunctionDef::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.FunctionDef) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void FunctionDef::CopyFrom(const FunctionDef& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.FunctionDef) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool FunctionDef::IsInitialized() const { + + return true; +} + +void FunctionDef::Swap(FunctionDef* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + FunctionDef temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void FunctionDef::UnsafeArenaSwap(FunctionDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void FunctionDef::InternalSwap(FunctionDef* other) { + std::swap(signature_, other->signature_); + node_.UnsafeArenaSwap(&other->node_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata FunctionDef::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = FunctionDef_descriptor_; + metadata.reflection = FunctionDef_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// FunctionDef_Node + +// repeated string ret = 1; +int FunctionDef_Node::ret_size() const { + return ret_.size(); +} +void FunctionDef_Node::clear_ret() { + ret_.Clear(); +} +const ::std::string& FunctionDef_Node::ret(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.Node.ret) + return ret_.Get(index); +} +::std::string* FunctionDef_Node::mutable_ret(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.Node.ret) + return ret_.Mutable(index); +} +void FunctionDef_Node::set_ret(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:tensorflow.FunctionDef.Node.ret) + ret_.Mutable(index)->assign(value); +} +void FunctionDef_Node::set_ret(int index, const char* value) { + ret_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.FunctionDef.Node.ret) +} +void FunctionDef_Node::set_ret(int index, const char* value, size_t size) { + ret_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.FunctionDef.Node.ret) +} +::std::string* FunctionDef_Node::add_ret() { + // @@protoc_insertion_point(field_add_mutable:tensorflow.FunctionDef.Node.ret) + return ret_.Add(); +} +void FunctionDef_Node::add_ret(const ::std::string& value) { + ret_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.FunctionDef.Node.ret) +} +void FunctionDef_Node::add_ret(const char* value) { + ret_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.FunctionDef.Node.ret) +} +void FunctionDef_Node::add_ret(const char* value, size_t size) { + ret_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.FunctionDef.Node.ret) +} +const ::google::protobuf::RepeatedPtrField< ::std::string>& +FunctionDef_Node::ret() const { + // @@protoc_insertion_point(field_list:tensorflow.FunctionDef.Node.ret) + return ret_; +} +::google::protobuf::RepeatedPtrField< ::std::string>* +FunctionDef_Node::mutable_ret() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDef.Node.ret) + return &ret_; +} + +// optional string op = 2; +void FunctionDef_Node::clear_op() { + op_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& FunctionDef_Node::op() const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.Node.op) + return op_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void FunctionDef_Node::set_op(const ::std::string& value) { + + op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.FunctionDef.Node.op) +} +void FunctionDef_Node::set_op(const char* value) { + + op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.FunctionDef.Node.op) +} +void FunctionDef_Node::set_op(const char* value, + size_t size) { + + op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.FunctionDef.Node.op) +} +::std::string* FunctionDef_Node::mutable_op() { + + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.Node.op) + return op_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* FunctionDef_Node::release_op() { + // @@protoc_insertion_point(field_release:tensorflow.FunctionDef.Node.op) + + return op_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* FunctionDef_Node::unsafe_arena_release_op() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.FunctionDef.Node.op) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return op_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void FunctionDef_Node::set_allocated_op(::std::string* op) { + if (op != NULL) { + + } else { + + } + op_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), op, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.FunctionDef.Node.op) +} +void FunctionDef_Node::unsafe_arena_set_allocated_op( + ::std::string* op) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (op != NULL) { + + } else { + + } + op_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + op, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.FunctionDef.Node.op) +} + +// repeated string arg = 3; +int FunctionDef_Node::arg_size() const { + return arg_.size(); +} +void FunctionDef_Node::clear_arg() { + arg_.Clear(); +} +const ::std::string& FunctionDef_Node::arg(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.Node.arg) + return arg_.Get(index); +} +::std::string* FunctionDef_Node::mutable_arg(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.Node.arg) + return arg_.Mutable(index); +} +void FunctionDef_Node::set_arg(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:tensorflow.FunctionDef.Node.arg) + arg_.Mutable(index)->assign(value); +} +void FunctionDef_Node::set_arg(int index, const char* value) { + arg_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.FunctionDef.Node.arg) +} +void FunctionDef_Node::set_arg(int index, const char* value, size_t size) { + arg_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.FunctionDef.Node.arg) +} +::std::string* FunctionDef_Node::add_arg() { + // @@protoc_insertion_point(field_add_mutable:tensorflow.FunctionDef.Node.arg) + return arg_.Add(); +} +void FunctionDef_Node::add_arg(const ::std::string& value) { + arg_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.FunctionDef.Node.arg) +} +void FunctionDef_Node::add_arg(const char* value) { + arg_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.FunctionDef.Node.arg) +} +void FunctionDef_Node::add_arg(const char* value, size_t size) { + arg_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.FunctionDef.Node.arg) +} +const ::google::protobuf::RepeatedPtrField< ::std::string>& +FunctionDef_Node::arg() const { + // @@protoc_insertion_point(field_list:tensorflow.FunctionDef.Node.arg) + return arg_; +} +::google::protobuf::RepeatedPtrField< ::std::string>* +FunctionDef_Node::mutable_arg() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDef.Node.arg) + return &arg_; +} + +// repeated string dep = 4; +int FunctionDef_Node::dep_size() const { + return dep_.size(); +} +void FunctionDef_Node::clear_dep() { + dep_.Clear(); +} +const ::std::string& FunctionDef_Node::dep(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.Node.dep) + return dep_.Get(index); +} +::std::string* FunctionDef_Node::mutable_dep(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.Node.dep) + return dep_.Mutable(index); +} +void FunctionDef_Node::set_dep(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:tensorflow.FunctionDef.Node.dep) + dep_.Mutable(index)->assign(value); +} +void FunctionDef_Node::set_dep(int index, const char* value) { + dep_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.FunctionDef.Node.dep) +} +void FunctionDef_Node::set_dep(int index, const char* value, size_t size) { + dep_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.FunctionDef.Node.dep) +} +::std::string* FunctionDef_Node::add_dep() { + // @@protoc_insertion_point(field_add_mutable:tensorflow.FunctionDef.Node.dep) + return dep_.Add(); +} +void FunctionDef_Node::add_dep(const ::std::string& value) { + dep_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.FunctionDef.Node.dep) +} +void FunctionDef_Node::add_dep(const char* value) { + dep_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.FunctionDef.Node.dep) +} +void FunctionDef_Node::add_dep(const char* value, size_t size) { + dep_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.FunctionDef.Node.dep) +} +const ::google::protobuf::RepeatedPtrField< ::std::string>& +FunctionDef_Node::dep() const { + // @@protoc_insertion_point(field_list:tensorflow.FunctionDef.Node.dep) + return dep_; +} +::google::protobuf::RepeatedPtrField< ::std::string>* +FunctionDef_Node::mutable_dep() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDef.Node.dep) + return &dep_; +} + +// map attr = 5; +int FunctionDef_Node::attr_size() const { + return attr_.size(); +} +void FunctionDef_Node::clear_attr() { + attr_.Clear(); +} + const ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >& +FunctionDef_Node::attr() const { + // @@protoc_insertion_point(field_map:tensorflow.FunctionDef.Node.attr) + return attr_.GetMap(); +} + ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >* +FunctionDef_Node::mutable_attr() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.FunctionDef.Node.attr) + return attr_.MutableMap(); +} + +inline const FunctionDef_Node* FunctionDef_Node::internal_default_instance() { + return &FunctionDef_Node_default_instance_.get(); +} +// ------------------------------------------------------------------- + +// FunctionDef + +// optional .tensorflow.OpDef signature = 1; +bool FunctionDef::has_signature() const { + return this != internal_default_instance() && signature_ != NULL; +} +void FunctionDef::clear_signature() { + if (GetArenaNoVirtual() == NULL && signature_ != NULL) delete signature_; + signature_ = NULL; +} +const ::tensorflow::OpDef& FunctionDef::signature() const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.signature) + return signature_ != NULL ? *signature_ + : *::tensorflow::OpDef::internal_default_instance(); +} +::tensorflow::OpDef* FunctionDef::mutable_signature() { + + if (signature_ == NULL) { + _slow_mutable_signature(); + } + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.signature) + return signature_; +} +::tensorflow::OpDef* FunctionDef::release_signature() { + // @@protoc_insertion_point(field_release:tensorflow.FunctionDef.signature) + + if (GetArenaNoVirtual() != NULL) { + return _slow_release_signature(); + } else { + ::tensorflow::OpDef* temp = signature_; + signature_ = NULL; + return temp; + } +} + void FunctionDef::set_allocated_signature(::tensorflow::OpDef* signature) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete signature_; + } + if (signature != NULL) { + _slow_set_allocated_signature(message_arena, &signature); + } + signature_ = signature; + if (signature) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.FunctionDef.signature) +} + +// repeated .tensorflow.FunctionDef.Node node = 2; +int FunctionDef::node_size() const { + return node_.size(); +} +void FunctionDef::clear_node() { + node_.Clear(); +} +const ::tensorflow::FunctionDef_Node& FunctionDef::node(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.node) + return node_.Get(index); +} +::tensorflow::FunctionDef_Node* FunctionDef::mutable_node(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.node) + return node_.Mutable(index); +} +::tensorflow::FunctionDef_Node* FunctionDef::add_node() { + // @@protoc_insertion_point(field_add:tensorflow.FunctionDef.node) + return node_.Add(); +} +::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef_Node >* +FunctionDef::mutable_node() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDef.node) + return &node_; +} +const ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef_Node >& +FunctionDef::node() const { + // @@protoc_insertion_point(field_list:tensorflow.FunctionDef.node) + return node_; +} + +inline const FunctionDef* FunctionDef::internal_default_instance() { + return &FunctionDef_default_instance_.get(); +} +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int GradientDef::kFunctionNameFieldNumber; +const int GradientDef::kGradientFuncFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +GradientDef::GradientDef() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_function_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.GradientDef) +} +GradientDef::GradientDef(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_function_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.GradientDef) +} + +void GradientDef::InitAsDefaultInstance() { +} + +GradientDef::GradientDef(const GradientDef& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.GradientDef) +} + +void GradientDef::SharedCtor() { + function_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + gradient_func_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _cached_size_ = 0; +} + +GradientDef::~GradientDef() { + // @@protoc_insertion_point(destructor:tensorflow.GradientDef) + SharedDtor(); +} + +void GradientDef::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + + function_name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); + gradient_func_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); +} + +void GradientDef::ArenaDtor(void* object) { + GradientDef* _this = reinterpret_cast< GradientDef* >(object); + (void)_this; +} +void GradientDef::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void GradientDef::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* GradientDef::descriptor() { + protobuf_AssignDescriptorsOnce(); + return GradientDef_descriptor_; +} + +const GradientDef& GradientDef::default_instance() { + protobuf_InitDefaults_function_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed GradientDef_default_instance_; + +GradientDef* GradientDef::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void GradientDef::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.GradientDef) + function_name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + gradient_func_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} + +bool GradientDef::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.GradientDef) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string function_name = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_function_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->function_name().data(), this->function_name().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.GradientDef.function_name")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_gradient_func; + break; + } + + // optional string gradient_func = 2; + case 2: { + if (tag == 18) { + parse_gradient_func: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_gradient_func())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->gradient_func().data(), this->gradient_func().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.GradientDef.gradient_func")); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.GradientDef) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.GradientDef) + return false; +#undef DO_ +} + +void GradientDef::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.GradientDef) + // optional string function_name = 1; + if (this->function_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->function_name().data(), this->function_name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.GradientDef.function_name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->function_name(), output); + } + + // optional string gradient_func = 2; + if (this->gradient_func().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->gradient_func().data(), this->gradient_func().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.GradientDef.gradient_func"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->gradient_func(), output); + } + + // @@protoc_insertion_point(serialize_end:tensorflow.GradientDef) +} + +::google::protobuf::uint8* GradientDef::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.GradientDef) + // optional string function_name = 1; + if (this->function_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->function_name().data(), this->function_name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.GradientDef.function_name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->function_name(), target); + } + + // optional string gradient_func = 2; + if (this->gradient_func().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->gradient_func().data(), this->gradient_func().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.GradientDef.gradient_func"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->gradient_func(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.GradientDef) + return target; +} + +size_t GradientDef::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.GradientDef) + size_t total_size = 0; + + // optional string function_name = 1; + if (this->function_name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->function_name()); + } + + // optional string gradient_func = 2; + if (this->gradient_func().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->gradient_func()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void GradientDef::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.GradientDef) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const GradientDef* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.GradientDef) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.GradientDef) + UnsafeMergeFrom(*source); + } +} + +void GradientDef::MergeFrom(const GradientDef& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.GradientDef) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void GradientDef::UnsafeMergeFrom(const GradientDef& from) { + GOOGLE_DCHECK(&from != this); + if (from.function_name().size() > 0) { + set_function_name(from.function_name()); + } + if (from.gradient_func().size() > 0) { + set_gradient_func(from.gradient_func()); + } +} + +void GradientDef::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.GradientDef) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void GradientDef::CopyFrom(const GradientDef& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.GradientDef) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool GradientDef::IsInitialized() const { + + return true; +} + +void GradientDef::Swap(GradientDef* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + GradientDef temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void GradientDef::UnsafeArenaSwap(GradientDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void GradientDef::InternalSwap(GradientDef* other) { + function_name_.Swap(&other->function_name_); + gradient_func_.Swap(&other->gradient_func_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata GradientDef::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = GradientDef_descriptor_; + metadata.reflection = GradientDef_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// GradientDef + +// optional string function_name = 1; +void GradientDef::clear_function_name() { + function_name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& GradientDef::function_name() const { + // @@protoc_insertion_point(field_get:tensorflow.GradientDef.function_name) + return function_name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void GradientDef::set_function_name(const ::std::string& value) { + + function_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.GradientDef.function_name) +} +void GradientDef::set_function_name(const char* value) { + + function_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.GradientDef.function_name) +} +void GradientDef::set_function_name(const char* value, + size_t size) { + + function_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.GradientDef.function_name) +} +::std::string* GradientDef::mutable_function_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.GradientDef.function_name) + return function_name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* GradientDef::release_function_name() { + // @@protoc_insertion_point(field_release:tensorflow.GradientDef.function_name) + + return function_name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* GradientDef::unsafe_arena_release_function_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.GradientDef.function_name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return function_name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void GradientDef::set_allocated_function_name(::std::string* function_name) { + if (function_name != NULL) { + + } else { + + } + function_name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), function_name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.GradientDef.function_name) +} +void GradientDef::unsafe_arena_set_allocated_function_name( + ::std::string* function_name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (function_name != NULL) { + + } else { + + } + function_name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + function_name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.GradientDef.function_name) +} + +// optional string gradient_func = 2; +void GradientDef::clear_gradient_func() { + gradient_func_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& GradientDef::gradient_func() const { + // @@protoc_insertion_point(field_get:tensorflow.GradientDef.gradient_func) + return gradient_func_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void GradientDef::set_gradient_func(const ::std::string& value) { + + gradient_func_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.GradientDef.gradient_func) +} +void GradientDef::set_gradient_func(const char* value) { + + gradient_func_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.GradientDef.gradient_func) +} +void GradientDef::set_gradient_func(const char* value, + size_t size) { + + gradient_func_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.GradientDef.gradient_func) +} +::std::string* GradientDef::mutable_gradient_func() { + + // @@protoc_insertion_point(field_mutable:tensorflow.GradientDef.gradient_func) + return gradient_func_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* GradientDef::release_gradient_func() { + // @@protoc_insertion_point(field_release:tensorflow.GradientDef.gradient_func) + + return gradient_func_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* GradientDef::unsafe_arena_release_gradient_func() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.GradientDef.gradient_func) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return gradient_func_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void GradientDef::set_allocated_gradient_func(::std::string* gradient_func) { + if (gradient_func != NULL) { + + } else { + + } + gradient_func_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), gradient_func, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.GradientDef.gradient_func) +} +void GradientDef::unsafe_arena_set_allocated_gradient_func( + ::std::string* gradient_func) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (gradient_func != NULL) { + + } else { + + } + gradient_func_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + gradient_func, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.GradientDef.gradient_func) +} + +inline const GradientDef* GradientDef::internal_default_instance() { + return &GradientDef_default_instance_.get(); +} +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/function.pb.h b/modules/dnn/misc/tensorflow/function.pb.h new file mode 100644 index 000000000..3f89687b6 --- /dev/null +++ b/modules/dnn/misc/tensorflow/function.pb.h @@ -0,0 +1,1160 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: function.proto + +#ifndef PROTOBUF_function_2eproto__INCLUDED +#define PROTOBUF_function_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 3001000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "attr_value.pb.h" +#include "op_def.pb.h" +// @@protoc_insertion_point(includes) + +namespace tensorflow { + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_function_2eproto(); +void protobuf_InitDefaults_function_2eproto(); +void protobuf_AssignDesc_function_2eproto(); +void protobuf_ShutdownFile_function_2eproto(); + +class FunctionDef; +class FunctionDefLibrary; +class FunctionDef_Node; +class GradientDef; + +// =================================================================== + +class FunctionDefLibrary : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.FunctionDefLibrary) */ { + public: + FunctionDefLibrary(); + virtual ~FunctionDefLibrary(); + + FunctionDefLibrary(const FunctionDefLibrary& from); + + inline FunctionDefLibrary& operator=(const FunctionDefLibrary& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const FunctionDefLibrary& default_instance(); + + static const FunctionDefLibrary* internal_default_instance(); + + void UnsafeArenaSwap(FunctionDefLibrary* other); + void Swap(FunctionDefLibrary* other); + + // implements Message ---------------------------------------------- + + inline FunctionDefLibrary* New() const { return New(NULL); } + + FunctionDefLibrary* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const FunctionDefLibrary& from); + void MergeFrom(const FunctionDefLibrary& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FunctionDefLibrary* other); + void UnsafeMergeFrom(const FunctionDefLibrary& from); + protected: + explicit FunctionDefLibrary(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .tensorflow.FunctionDef function = 1; + int function_size() const; + void clear_function(); + static const int kFunctionFieldNumber = 1; + const ::tensorflow::FunctionDef& function(int index) const; + ::tensorflow::FunctionDef* mutable_function(int index); + ::tensorflow::FunctionDef* add_function(); + ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef >* + mutable_function(); + const ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef >& + function() const; + + // repeated .tensorflow.GradientDef gradient = 2; + int gradient_size() const; + void clear_gradient(); + static const int kGradientFieldNumber = 2; + const ::tensorflow::GradientDef& gradient(int index) const; + ::tensorflow::GradientDef* mutable_gradient(int index); + ::tensorflow::GradientDef* add_gradient(); + ::google::protobuf::RepeatedPtrField< ::tensorflow::GradientDef >* + mutable_gradient(); + const ::google::protobuf::RepeatedPtrField< ::tensorflow::GradientDef >& + gradient() const; + + // @@protoc_insertion_point(class_scope:tensorflow.FunctionDefLibrary) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef > function_; + ::google::protobuf::RepeatedPtrField< ::tensorflow::GradientDef > gradient_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_function_2eproto_impl(); + friend void protobuf_AddDesc_function_2eproto_impl(); + friend void protobuf_AssignDesc_function_2eproto(); + friend void protobuf_ShutdownFile_function_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed FunctionDefLibrary_default_instance_; + +// ------------------------------------------------------------------- + +class FunctionDef_Node : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.FunctionDef.Node) */ { + public: + FunctionDef_Node(); + virtual ~FunctionDef_Node(); + + FunctionDef_Node(const FunctionDef_Node& from); + + inline FunctionDef_Node& operator=(const FunctionDef_Node& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const FunctionDef_Node& default_instance(); + + static const FunctionDef_Node* internal_default_instance(); + + void UnsafeArenaSwap(FunctionDef_Node* other); + void Swap(FunctionDef_Node* other); + + // implements Message ---------------------------------------------- + + inline FunctionDef_Node* New() const { return New(NULL); } + + FunctionDef_Node* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const FunctionDef_Node& from); + void MergeFrom(const FunctionDef_Node& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FunctionDef_Node* other); + void UnsafeMergeFrom(const FunctionDef_Node& from); + protected: + explicit FunctionDef_Node(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + // repeated string ret = 1; + int ret_size() const; + void clear_ret(); + static const int kRetFieldNumber = 1; + const ::std::string& ret(int index) const; + ::std::string* mutable_ret(int index); + void set_ret(int index, const ::std::string& value); + void set_ret(int index, const char* value); + void set_ret(int index, const char* value, size_t size); + ::std::string* add_ret(); + void add_ret(const ::std::string& value); + void add_ret(const char* value); + void add_ret(const char* value, size_t size); + const ::google::protobuf::RepeatedPtrField< ::std::string>& ret() const; + ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_ret(); + + // optional string op = 2; + void clear_op(); + static const int kOpFieldNumber = 2; + const ::std::string& op() const; + void set_op(const ::std::string& value); + void set_op(const char* value); + void set_op(const char* value, size_t size); + ::std::string* mutable_op(); + ::std::string* release_op(); + void set_allocated_op(::std::string* op); + ::std::string* unsafe_arena_release_op(); + void unsafe_arena_set_allocated_op( + ::std::string* op); + + // repeated string arg = 3; + int arg_size() const; + void clear_arg(); + static const int kArgFieldNumber = 3; + const ::std::string& arg(int index) const; + ::std::string* mutable_arg(int index); + void set_arg(int index, const ::std::string& value); + void set_arg(int index, const char* value); + void set_arg(int index, const char* value, size_t size); + ::std::string* add_arg(); + void add_arg(const ::std::string& value); + void add_arg(const char* value); + void add_arg(const char* value, size_t size); + const ::google::protobuf::RepeatedPtrField< ::std::string>& arg() const; + ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_arg(); + + // repeated string dep = 4; + int dep_size() const; + void clear_dep(); + static const int kDepFieldNumber = 4; + const ::std::string& dep(int index) const; + ::std::string* mutable_dep(int index); + void set_dep(int index, const ::std::string& value); + void set_dep(int index, const char* value); + void set_dep(int index, const char* value, size_t size); + ::std::string* add_dep(); + void add_dep(const ::std::string& value); + void add_dep(const char* value); + void add_dep(const char* value, size_t size); + const ::google::protobuf::RepeatedPtrField< ::std::string>& dep() const; + ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_dep(); + + // map attr = 5; + int attr_size() const; + void clear_attr(); + static const int kAttrFieldNumber = 5; + const ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >& + attr() const; + ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >* + mutable_attr(); + + // @@protoc_insertion_point(class_scope:tensorflow.FunctionDef.Node) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::RepeatedPtrField< ::std::string> ret_; + ::google::protobuf::RepeatedPtrField< ::std::string> arg_; + ::google::protobuf::RepeatedPtrField< ::std::string> dep_; + typedef ::google::protobuf::internal::MapEntryLite< + ::std::string, ::tensorflow::AttrValue, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, + 0 > + FunctionDef_Node_AttrEntry; + ::google::protobuf::internal::MapField< + ::std::string, ::tensorflow::AttrValue, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, + 0 > attr_; + ::google::protobuf::internal::ArenaStringPtr op_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_function_2eproto_impl(); + friend void protobuf_AddDesc_function_2eproto_impl(); + friend void protobuf_AssignDesc_function_2eproto(); + friend void protobuf_ShutdownFile_function_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed FunctionDef_Node_default_instance_; + +// ------------------------------------------------------------------- + +class FunctionDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.FunctionDef) */ { + public: + FunctionDef(); + virtual ~FunctionDef(); + + FunctionDef(const FunctionDef& from); + + inline FunctionDef& operator=(const FunctionDef& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const FunctionDef& default_instance(); + + static const FunctionDef* internal_default_instance(); + + void UnsafeArenaSwap(FunctionDef* other); + void Swap(FunctionDef* other); + + // implements Message ---------------------------------------------- + + inline FunctionDef* New() const { return New(NULL); } + + FunctionDef* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const FunctionDef& from); + void MergeFrom(const FunctionDef& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FunctionDef* other); + void UnsafeMergeFrom(const FunctionDef& from); + protected: + explicit FunctionDef(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef FunctionDef_Node Node; + + // accessors ------------------------------------------------------- + + // optional .tensorflow.OpDef signature = 1; + bool has_signature() const; + void clear_signature(); + static const int kSignatureFieldNumber = 1; + private: + void _slow_mutable_signature(); + void _slow_set_allocated_signature( + ::google::protobuf::Arena* message_arena, ::tensorflow::OpDef** signature); + ::tensorflow::OpDef* _slow_release_signature(); + public: + const ::tensorflow::OpDef& signature() const; + ::tensorflow::OpDef* mutable_signature(); + ::tensorflow::OpDef* release_signature(); + void set_allocated_signature(::tensorflow::OpDef* signature); + ::tensorflow::OpDef* unsafe_arena_release_signature(); + void unsafe_arena_set_allocated_signature( + ::tensorflow::OpDef* signature); + + // repeated .tensorflow.FunctionDef.Node node = 2; + int node_size() const; + void clear_node(); + static const int kNodeFieldNumber = 2; + const ::tensorflow::FunctionDef_Node& node(int index) const; + ::tensorflow::FunctionDef_Node* mutable_node(int index); + ::tensorflow::FunctionDef_Node* add_node(); + ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef_Node >* + mutable_node(); + const ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef_Node >& + node() const; + + // @@protoc_insertion_point(class_scope:tensorflow.FunctionDef) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef_Node > node_; + ::tensorflow::OpDef* signature_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_function_2eproto_impl(); + friend void protobuf_AddDesc_function_2eproto_impl(); + friend void protobuf_AssignDesc_function_2eproto(); + friend void protobuf_ShutdownFile_function_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed FunctionDef_default_instance_; + +// ------------------------------------------------------------------- + +class GradientDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.GradientDef) */ { + public: + GradientDef(); + virtual ~GradientDef(); + + GradientDef(const GradientDef& from); + + inline GradientDef& operator=(const GradientDef& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const GradientDef& default_instance(); + + static const GradientDef* internal_default_instance(); + + void UnsafeArenaSwap(GradientDef* other); + void Swap(GradientDef* other); + + // implements Message ---------------------------------------------- + + inline GradientDef* New() const { return New(NULL); } + + GradientDef* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const GradientDef& from); + void MergeFrom(const GradientDef& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(GradientDef* other); + void UnsafeMergeFrom(const GradientDef& from); + protected: + explicit GradientDef(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string function_name = 1; + void clear_function_name(); + static const int kFunctionNameFieldNumber = 1; + const ::std::string& function_name() const; + void set_function_name(const ::std::string& value); + void set_function_name(const char* value); + void set_function_name(const char* value, size_t size); + ::std::string* mutable_function_name(); + ::std::string* release_function_name(); + void set_allocated_function_name(::std::string* function_name); + ::std::string* unsafe_arena_release_function_name(); + void unsafe_arena_set_allocated_function_name( + ::std::string* function_name); + + // optional string gradient_func = 2; + void clear_gradient_func(); + static const int kGradientFuncFieldNumber = 2; + const ::std::string& gradient_func() const; + void set_gradient_func(const ::std::string& value); + void set_gradient_func(const char* value); + void set_gradient_func(const char* value, size_t size); + ::std::string* mutable_gradient_func(); + ::std::string* release_gradient_func(); + void set_allocated_gradient_func(::std::string* gradient_func); + ::std::string* unsafe_arena_release_gradient_func(); + void unsafe_arena_set_allocated_gradient_func( + ::std::string* gradient_func); + + // @@protoc_insertion_point(class_scope:tensorflow.GradientDef) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::internal::ArenaStringPtr function_name_; + ::google::protobuf::internal::ArenaStringPtr gradient_func_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_function_2eproto_impl(); + friend void protobuf_AddDesc_function_2eproto_impl(); + friend void protobuf_AssignDesc_function_2eproto(); + friend void protobuf_ShutdownFile_function_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed GradientDef_default_instance_; + +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +// FunctionDefLibrary + +// repeated .tensorflow.FunctionDef function = 1; +inline int FunctionDefLibrary::function_size() const { + return function_.size(); +} +inline void FunctionDefLibrary::clear_function() { + function_.Clear(); +} +inline const ::tensorflow::FunctionDef& FunctionDefLibrary::function(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionDefLibrary.function) + return function_.Get(index); +} +inline ::tensorflow::FunctionDef* FunctionDefLibrary::mutable_function(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDefLibrary.function) + return function_.Mutable(index); +} +inline ::tensorflow::FunctionDef* FunctionDefLibrary::add_function() { + // @@protoc_insertion_point(field_add:tensorflow.FunctionDefLibrary.function) + return function_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef >* +FunctionDefLibrary::mutable_function() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDefLibrary.function) + return &function_; +} +inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef >& +FunctionDefLibrary::function() const { + // @@protoc_insertion_point(field_list:tensorflow.FunctionDefLibrary.function) + return function_; +} + +// repeated .tensorflow.GradientDef gradient = 2; +inline int FunctionDefLibrary::gradient_size() const { + return gradient_.size(); +} +inline void FunctionDefLibrary::clear_gradient() { + gradient_.Clear(); +} +inline const ::tensorflow::GradientDef& FunctionDefLibrary::gradient(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionDefLibrary.gradient) + return gradient_.Get(index); +} +inline ::tensorflow::GradientDef* FunctionDefLibrary::mutable_gradient(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDefLibrary.gradient) + return gradient_.Mutable(index); +} +inline ::tensorflow::GradientDef* FunctionDefLibrary::add_gradient() { + // @@protoc_insertion_point(field_add:tensorflow.FunctionDefLibrary.gradient) + return gradient_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::tensorflow::GradientDef >* +FunctionDefLibrary::mutable_gradient() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDefLibrary.gradient) + return &gradient_; +} +inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::GradientDef >& +FunctionDefLibrary::gradient() const { + // @@protoc_insertion_point(field_list:tensorflow.FunctionDefLibrary.gradient) + return gradient_; +} + +inline const FunctionDefLibrary* FunctionDefLibrary::internal_default_instance() { + return &FunctionDefLibrary_default_instance_.get(); +} +// ------------------------------------------------------------------- + +// FunctionDef_Node + +// repeated string ret = 1; +inline int FunctionDef_Node::ret_size() const { + return ret_.size(); +} +inline void FunctionDef_Node::clear_ret() { + ret_.Clear(); +} +inline const ::std::string& FunctionDef_Node::ret(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.Node.ret) + return ret_.Get(index); +} +inline ::std::string* FunctionDef_Node::mutable_ret(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.Node.ret) + return ret_.Mutable(index); +} +inline void FunctionDef_Node::set_ret(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:tensorflow.FunctionDef.Node.ret) + ret_.Mutable(index)->assign(value); +} +inline void FunctionDef_Node::set_ret(int index, const char* value) { + ret_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.FunctionDef.Node.ret) +} +inline void FunctionDef_Node::set_ret(int index, const char* value, size_t size) { + ret_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.FunctionDef.Node.ret) +} +inline ::std::string* FunctionDef_Node::add_ret() { + // @@protoc_insertion_point(field_add_mutable:tensorflow.FunctionDef.Node.ret) + return ret_.Add(); +} +inline void FunctionDef_Node::add_ret(const ::std::string& value) { + ret_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.FunctionDef.Node.ret) +} +inline void FunctionDef_Node::add_ret(const char* value) { + ret_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.FunctionDef.Node.ret) +} +inline void FunctionDef_Node::add_ret(const char* value, size_t size) { + ret_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.FunctionDef.Node.ret) +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +FunctionDef_Node::ret() const { + // @@protoc_insertion_point(field_list:tensorflow.FunctionDef.Node.ret) + return ret_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +FunctionDef_Node::mutable_ret() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDef.Node.ret) + return &ret_; +} + +// optional string op = 2; +inline void FunctionDef_Node::clear_op() { + op_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& FunctionDef_Node::op() const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.Node.op) + return op_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void FunctionDef_Node::set_op(const ::std::string& value) { + + op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.FunctionDef.Node.op) +} +inline void FunctionDef_Node::set_op(const char* value) { + + op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.FunctionDef.Node.op) +} +inline void FunctionDef_Node::set_op(const char* value, + size_t size) { + + op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.FunctionDef.Node.op) +} +inline ::std::string* FunctionDef_Node::mutable_op() { + + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.Node.op) + return op_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* FunctionDef_Node::release_op() { + // @@protoc_insertion_point(field_release:tensorflow.FunctionDef.Node.op) + + return op_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* FunctionDef_Node::unsafe_arena_release_op() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.FunctionDef.Node.op) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return op_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void FunctionDef_Node::set_allocated_op(::std::string* op) { + if (op != NULL) { + + } else { + + } + op_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), op, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.FunctionDef.Node.op) +} +inline void FunctionDef_Node::unsafe_arena_set_allocated_op( + ::std::string* op) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (op != NULL) { + + } else { + + } + op_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + op, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.FunctionDef.Node.op) +} + +// repeated string arg = 3; +inline int FunctionDef_Node::arg_size() const { + return arg_.size(); +} +inline void FunctionDef_Node::clear_arg() { + arg_.Clear(); +} +inline const ::std::string& FunctionDef_Node::arg(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.Node.arg) + return arg_.Get(index); +} +inline ::std::string* FunctionDef_Node::mutable_arg(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.Node.arg) + return arg_.Mutable(index); +} +inline void FunctionDef_Node::set_arg(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:tensorflow.FunctionDef.Node.arg) + arg_.Mutable(index)->assign(value); +} +inline void FunctionDef_Node::set_arg(int index, const char* value) { + arg_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.FunctionDef.Node.arg) +} +inline void FunctionDef_Node::set_arg(int index, const char* value, size_t size) { + arg_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.FunctionDef.Node.arg) +} +inline ::std::string* FunctionDef_Node::add_arg() { + // @@protoc_insertion_point(field_add_mutable:tensorflow.FunctionDef.Node.arg) + return arg_.Add(); +} +inline void FunctionDef_Node::add_arg(const ::std::string& value) { + arg_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.FunctionDef.Node.arg) +} +inline void FunctionDef_Node::add_arg(const char* value) { + arg_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.FunctionDef.Node.arg) +} +inline void FunctionDef_Node::add_arg(const char* value, size_t size) { + arg_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.FunctionDef.Node.arg) +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +FunctionDef_Node::arg() const { + // @@protoc_insertion_point(field_list:tensorflow.FunctionDef.Node.arg) + return arg_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +FunctionDef_Node::mutable_arg() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDef.Node.arg) + return &arg_; +} + +// repeated string dep = 4; +inline int FunctionDef_Node::dep_size() const { + return dep_.size(); +} +inline void FunctionDef_Node::clear_dep() { + dep_.Clear(); +} +inline const ::std::string& FunctionDef_Node::dep(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.Node.dep) + return dep_.Get(index); +} +inline ::std::string* FunctionDef_Node::mutable_dep(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.Node.dep) + return dep_.Mutable(index); +} +inline void FunctionDef_Node::set_dep(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:tensorflow.FunctionDef.Node.dep) + dep_.Mutable(index)->assign(value); +} +inline void FunctionDef_Node::set_dep(int index, const char* value) { + dep_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.FunctionDef.Node.dep) +} +inline void FunctionDef_Node::set_dep(int index, const char* value, size_t size) { + dep_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.FunctionDef.Node.dep) +} +inline ::std::string* FunctionDef_Node::add_dep() { + // @@protoc_insertion_point(field_add_mutable:tensorflow.FunctionDef.Node.dep) + return dep_.Add(); +} +inline void FunctionDef_Node::add_dep(const ::std::string& value) { + dep_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.FunctionDef.Node.dep) +} +inline void FunctionDef_Node::add_dep(const char* value) { + dep_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.FunctionDef.Node.dep) +} +inline void FunctionDef_Node::add_dep(const char* value, size_t size) { + dep_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.FunctionDef.Node.dep) +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +FunctionDef_Node::dep() const { + // @@protoc_insertion_point(field_list:tensorflow.FunctionDef.Node.dep) + return dep_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +FunctionDef_Node::mutable_dep() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDef.Node.dep) + return &dep_; +} + +// map attr = 5; +inline int FunctionDef_Node::attr_size() const { + return attr_.size(); +} +inline void FunctionDef_Node::clear_attr() { + attr_.Clear(); +} +inline const ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >& +FunctionDef_Node::attr() const { + // @@protoc_insertion_point(field_map:tensorflow.FunctionDef.Node.attr) + return attr_.GetMap(); +} +inline ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >* +FunctionDef_Node::mutable_attr() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.FunctionDef.Node.attr) + return attr_.MutableMap(); +} + +inline const FunctionDef_Node* FunctionDef_Node::internal_default_instance() { + return &FunctionDef_Node_default_instance_.get(); +} +// ------------------------------------------------------------------- + +// FunctionDef + +// optional .tensorflow.OpDef signature = 1; +inline bool FunctionDef::has_signature() const { + return this != internal_default_instance() && signature_ != NULL; +} +inline void FunctionDef::clear_signature() { + if (GetArenaNoVirtual() == NULL && signature_ != NULL) delete signature_; + signature_ = NULL; +} +inline const ::tensorflow::OpDef& FunctionDef::signature() const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.signature) + return signature_ != NULL ? *signature_ + : *::tensorflow::OpDef::internal_default_instance(); +} +inline ::tensorflow::OpDef* FunctionDef::mutable_signature() { + + if (signature_ == NULL) { + _slow_mutable_signature(); + } + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.signature) + return signature_; +} +inline ::tensorflow::OpDef* FunctionDef::release_signature() { + // @@protoc_insertion_point(field_release:tensorflow.FunctionDef.signature) + + if (GetArenaNoVirtual() != NULL) { + return _slow_release_signature(); + } else { + ::tensorflow::OpDef* temp = signature_; + signature_ = NULL; + return temp; + } +} +inline void FunctionDef::set_allocated_signature(::tensorflow::OpDef* signature) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete signature_; + } + if (signature != NULL) { + _slow_set_allocated_signature(message_arena, &signature); + } + signature_ = signature; + if (signature) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.FunctionDef.signature) +} + +// repeated .tensorflow.FunctionDef.Node node = 2; +inline int FunctionDef::node_size() const { + return node_.size(); +} +inline void FunctionDef::clear_node() { + node_.Clear(); +} +inline const ::tensorflow::FunctionDef_Node& FunctionDef::node(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.node) + return node_.Get(index); +} +inline ::tensorflow::FunctionDef_Node* FunctionDef::mutable_node(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.node) + return node_.Mutable(index); +} +inline ::tensorflow::FunctionDef_Node* FunctionDef::add_node() { + // @@protoc_insertion_point(field_add:tensorflow.FunctionDef.node) + return node_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef_Node >* +FunctionDef::mutable_node() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDef.node) + return &node_; +} +inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef_Node >& +FunctionDef::node() const { + // @@protoc_insertion_point(field_list:tensorflow.FunctionDef.node) + return node_; +} + +inline const FunctionDef* FunctionDef::internal_default_instance() { + return &FunctionDef_default_instance_.get(); +} +// ------------------------------------------------------------------- + +// GradientDef + +// optional string function_name = 1; +inline void GradientDef::clear_function_name() { + function_name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& GradientDef::function_name() const { + // @@protoc_insertion_point(field_get:tensorflow.GradientDef.function_name) + return function_name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void GradientDef::set_function_name(const ::std::string& value) { + + function_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.GradientDef.function_name) +} +inline void GradientDef::set_function_name(const char* value) { + + function_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.GradientDef.function_name) +} +inline void GradientDef::set_function_name(const char* value, + size_t size) { + + function_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.GradientDef.function_name) +} +inline ::std::string* GradientDef::mutable_function_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.GradientDef.function_name) + return function_name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* GradientDef::release_function_name() { + // @@protoc_insertion_point(field_release:tensorflow.GradientDef.function_name) + + return function_name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* GradientDef::unsafe_arena_release_function_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.GradientDef.function_name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return function_name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void GradientDef::set_allocated_function_name(::std::string* function_name) { + if (function_name != NULL) { + + } else { + + } + function_name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), function_name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.GradientDef.function_name) +} +inline void GradientDef::unsafe_arena_set_allocated_function_name( + ::std::string* function_name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (function_name != NULL) { + + } else { + + } + function_name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + function_name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.GradientDef.function_name) +} + +// optional string gradient_func = 2; +inline void GradientDef::clear_gradient_func() { + gradient_func_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& GradientDef::gradient_func() const { + // @@protoc_insertion_point(field_get:tensorflow.GradientDef.gradient_func) + return gradient_func_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void GradientDef::set_gradient_func(const ::std::string& value) { + + gradient_func_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.GradientDef.gradient_func) +} +inline void GradientDef::set_gradient_func(const char* value) { + + gradient_func_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.GradientDef.gradient_func) +} +inline void GradientDef::set_gradient_func(const char* value, + size_t size) { + + gradient_func_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.GradientDef.gradient_func) +} +inline ::std::string* GradientDef::mutable_gradient_func() { + + // @@protoc_insertion_point(field_mutable:tensorflow.GradientDef.gradient_func) + return gradient_func_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* GradientDef::release_gradient_func() { + // @@protoc_insertion_point(field_release:tensorflow.GradientDef.gradient_func) + + return gradient_func_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* GradientDef::unsafe_arena_release_gradient_func() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.GradientDef.gradient_func) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return gradient_func_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void GradientDef::set_allocated_gradient_func(::std::string* gradient_func) { + if (gradient_func != NULL) { + + } else { + + } + gradient_func_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), gradient_func, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.GradientDef.gradient_func) +} +inline void GradientDef::unsafe_arena_set_allocated_gradient_func( + ::std::string* gradient_func) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (gradient_func != NULL) { + + } else { + + } + gradient_func_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + gradient_func, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.GradientDef.gradient_func) +} + +inline const GradientDef* GradientDef::internal_default_instance() { + return &GradientDef_default_instance_.get(); +} +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_function_2eproto__INCLUDED diff --git a/modules/dnn/misc/tensorflow/graph.pb.cc b/modules/dnn/misc/tensorflow/graph.pb.cc new file mode 100644 index 000000000..21cec2e77 --- /dev/null +++ b/modules/dnn/misc/tensorflow/graph.pb.cc @@ -0,0 +1,1687 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: graph.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "graph.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace tensorflow { + +namespace { + +const ::google::protobuf::Descriptor* GraphDef_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + GraphDef_reflection_ = NULL; +const ::google::protobuf::Descriptor* NodeDef_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + NodeDef_reflection_ = NULL; +const ::google::protobuf::Descriptor* NodeDef_AttrEntry_descriptor_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_graph_2eproto() GOOGLE_ATTRIBUTE_COLD; +void protobuf_AssignDesc_graph_2eproto() { + protobuf_AddDesc_graph_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "graph.proto"); + GOOGLE_CHECK(file != NULL); + GraphDef_descriptor_ = file->message_type(0); + static const int GraphDef_offsets_[4] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GraphDef, node_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GraphDef, versions_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GraphDef, version_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GraphDef, library_), + }; + GraphDef_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + GraphDef_descriptor_, + GraphDef::internal_default_instance(), + GraphDef_offsets_, + -1, + -1, + -1, + sizeof(GraphDef), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GraphDef, _internal_metadata_)); + NodeDef_descriptor_ = file->message_type(1); + static const int NodeDef_offsets_[5] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NodeDef, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NodeDef, op_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NodeDef, input_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NodeDef, device_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NodeDef, attr_), + }; + NodeDef_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + NodeDef_descriptor_, + NodeDef::internal_default_instance(), + NodeDef_offsets_, + -1, + -1, + -1, + sizeof(NodeDef), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NodeDef, _internal_metadata_)); + NodeDef_AttrEntry_descriptor_ = NodeDef_descriptor_->nested_type(0); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_graph_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + GraphDef_descriptor_, GraphDef::internal_default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + NodeDef_descriptor_, NodeDef::internal_default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + NodeDef_AttrEntry_descriptor_, + ::google::protobuf::internal::MapEntry< + ::std::string, + ::tensorflow::AttrValue, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, + 0>::CreateDefaultInstance( + NodeDef_AttrEntry_descriptor_)); +} + +} // namespace + +void protobuf_ShutdownFile_graph_2eproto() { + GraphDef_default_instance_.Shutdown(); + delete GraphDef_reflection_; + NodeDef_default_instance_.Shutdown(); + delete NodeDef_reflection_; +} + +void protobuf_InitDefaults_graph_2eproto_impl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::tensorflow::protobuf_InitDefaults_attr_5fvalue_2eproto(); + ::tensorflow::protobuf_InitDefaults_function_2eproto(); + ::tensorflow::protobuf_InitDefaults_versions_2eproto(); + GraphDef_default_instance_.DefaultConstruct(); + ::google::protobuf::internal::GetEmptyString(); + NodeDef_default_instance_.DefaultConstruct(); + GraphDef_default_instance_.get_mutable()->InitAsDefaultInstance(); + NodeDef_default_instance_.get_mutable()->InitAsDefaultInstance(); +} + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_InitDefaults_graph_2eproto_once_); +void protobuf_InitDefaults_graph_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_InitDefaults_graph_2eproto_once_, + &protobuf_InitDefaults_graph_2eproto_impl); +} +void protobuf_AddDesc_graph_2eproto_impl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + protobuf_InitDefaults_graph_2eproto(); + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\013graph.proto\022\ntensorflow\032\020attr_value.pr" + "oto\032\016function.proto\032\016versions.proto\"\235\001\n\010" + "GraphDef\022!\n\004node\030\001 \003(\0132\023.tensorflow.Node" + "Def\022(\n\010versions\030\004 \001(\0132\026.tensorflow.Versi" + "onDef\022\023\n\007version\030\003 \001(\005B\002\030\001\022/\n\007library\030\002 " + "\001(\0132\036.tensorflow.FunctionDefLibrary\"\263\001\n\007" + "NodeDef\022\014\n\004name\030\001 \001(\t\022\n\n\002op\030\002 \001(\t\022\r\n\005inp" + "ut\030\003 \003(\t\022\016\n\006device\030\004 \001(\t\022+\n\004attr\030\005 \003(\0132\035" + ".tensorflow.NodeDef.AttrEntry\032B\n\tAttrEnt" + "ry\022\013\n\003key\030\001 \001(\t\022$\n\005value\030\002 \001(\0132\025.tensorf" + "low.AttrValue:\0028\001B,\n\030org.tensorflow.fram" + "eworkB\013GraphProtosP\001\370\001\001b\006proto3", 471); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "graph.proto", &protobuf_RegisterTypes); + ::tensorflow::protobuf_AddDesc_attr_5fvalue_2eproto(); + ::tensorflow::protobuf_AddDesc_function_2eproto(); + ::tensorflow::protobuf_AddDesc_versions_2eproto(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_graph_2eproto); +} + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_graph_2eproto_once_); +void protobuf_AddDesc_graph_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_graph_2eproto_once_, + &protobuf_AddDesc_graph_2eproto_impl); +} +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_graph_2eproto { + StaticDescriptorInitializer_graph_2eproto() { + protobuf_AddDesc_graph_2eproto(); + } +} static_descriptor_initializer_graph_2eproto_; + +namespace { + +static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD GOOGLE_ATTRIBUTE_NORETURN; +static void MergeFromFail(int line) { + ::google::protobuf::internal::MergeFromFail(__FILE__, line); +} + +} // namespace + + +// =================================================================== + +void GraphDef::_slow_mutable_versions() { + versions_ = ::google::protobuf::Arena::CreateMessage< ::tensorflow::VersionDef >( + GetArenaNoVirtual()); +} +::tensorflow::VersionDef* GraphDef::_slow_release_versions() { + if (versions_ == NULL) { + return NULL; + } else { + ::tensorflow::VersionDef* temp = new ::tensorflow::VersionDef(*versions_); + versions_ = NULL; + return temp; + } +} +::tensorflow::VersionDef* GraphDef::unsafe_arena_release_versions() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.GraphDef.versions) + + ::tensorflow::VersionDef* temp = versions_; + versions_ = NULL; + return temp; +} +void GraphDef::_slow_set_allocated_versions( + ::google::protobuf::Arena* message_arena, ::tensorflow::VersionDef** versions) { + if (message_arena != NULL && + ::google::protobuf::Arena::GetArena(*versions) == NULL) { + message_arena->Own(*versions); + } else if (message_arena != + ::google::protobuf::Arena::GetArena(*versions)) { + ::tensorflow::VersionDef* new_versions = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::VersionDef >( + message_arena); + new_versions->CopyFrom(**versions); + *versions = new_versions; + } +} +void GraphDef::unsafe_arena_set_allocated_versions( + ::tensorflow::VersionDef* versions) { + if (GetArenaNoVirtual() == NULL) { + delete versions_; + } + versions_ = versions; + if (versions) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.GraphDef.versions) +} +void GraphDef::_slow_mutable_library() { + library_ = ::google::protobuf::Arena::CreateMessage< ::tensorflow::FunctionDefLibrary >( + GetArenaNoVirtual()); +} +::tensorflow::FunctionDefLibrary* GraphDef::_slow_release_library() { + if (library_ == NULL) { + return NULL; + } else { + ::tensorflow::FunctionDefLibrary* temp = new ::tensorflow::FunctionDefLibrary(*library_); + library_ = NULL; + return temp; + } +} +::tensorflow::FunctionDefLibrary* GraphDef::unsafe_arena_release_library() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.GraphDef.library) + + ::tensorflow::FunctionDefLibrary* temp = library_; + library_ = NULL; + return temp; +} +void GraphDef::_slow_set_allocated_library( + ::google::protobuf::Arena* message_arena, ::tensorflow::FunctionDefLibrary** library) { + if (message_arena != NULL && + ::google::protobuf::Arena::GetArena(*library) == NULL) { + message_arena->Own(*library); + } else if (message_arena != + ::google::protobuf::Arena::GetArena(*library)) { + ::tensorflow::FunctionDefLibrary* new_library = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::FunctionDefLibrary >( + message_arena); + new_library->CopyFrom(**library); + *library = new_library; + } +} +void GraphDef::unsafe_arena_set_allocated_library( + ::tensorflow::FunctionDefLibrary* library) { + if (GetArenaNoVirtual() == NULL) { + delete library_; + } + library_ = library; + if (library) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.GraphDef.library) +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int GraphDef::kNodeFieldNumber; +const int GraphDef::kVersionsFieldNumber; +const int GraphDef::kVersionFieldNumber; +const int GraphDef::kLibraryFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +GraphDef::GraphDef() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_graph_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.GraphDef) +} +GraphDef::GraphDef(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena), + node_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_graph_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.GraphDef) +} + +void GraphDef::InitAsDefaultInstance() { + versions_ = const_cast< ::tensorflow::VersionDef*>( + ::tensorflow::VersionDef::internal_default_instance()); + library_ = const_cast< ::tensorflow::FunctionDefLibrary*>( + ::tensorflow::FunctionDefLibrary::internal_default_instance()); +} + +GraphDef::GraphDef(const GraphDef& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.GraphDef) +} + +void GraphDef::SharedCtor() { + versions_ = NULL; + library_ = NULL; + version_ = 0; + _cached_size_ = 0; +} + +GraphDef::~GraphDef() { + // @@protoc_insertion_point(destructor:tensorflow.GraphDef) + SharedDtor(); +} + +void GraphDef::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + + if (this != &GraphDef_default_instance_.get()) { + delete versions_; + delete library_; + } +} + +void GraphDef::ArenaDtor(void* object) { + GraphDef* _this = reinterpret_cast< GraphDef* >(object); + (void)_this; +} +void GraphDef::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void GraphDef::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* GraphDef::descriptor() { + protobuf_AssignDescriptorsOnce(); + return GraphDef_descriptor_; +} + +const GraphDef& GraphDef::default_instance() { + protobuf_InitDefaults_graph_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed GraphDef_default_instance_; + +GraphDef* GraphDef::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void GraphDef::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.GraphDef) + if (GetArenaNoVirtual() == NULL && versions_ != NULL) delete versions_; + versions_ = NULL; + version_ = 0; + if (GetArenaNoVirtual() == NULL && library_ != NULL) delete library_; + library_ = NULL; + node_.Clear(); +} + +bool GraphDef::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.GraphDef) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated .tensorflow.NodeDef node = 1; + case 1: { + if (tag == 10) { + DO_(input->IncrementRecursionDepth()); + parse_loop_node: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( + input, add_node())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(10)) goto parse_loop_node; + input->UnsafeDecrementRecursionDepth(); + if (input->ExpectTag(18)) goto parse_library; + break; + } + + // optional .tensorflow.FunctionDefLibrary library = 2; + case 2: { + if (tag == 18) { + parse_library: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_library())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_version; + break; + } + + // optional int32 version = 3 [deprecated = true]; + case 3: { + if (tag == 24) { + parse_version: + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &version_))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_versions; + break; + } + + // optional .tensorflow.VersionDef versions = 4; + case 4: { + if (tag == 34) { + parse_versions: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_versions())); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.GraphDef) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.GraphDef) + return false; +#undef DO_ +} + +void GraphDef::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.GraphDef) + // repeated .tensorflow.NodeDef node = 1; + for (unsigned int i = 0, n = this->node_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->node(i), output); + } + + // optional .tensorflow.FunctionDefLibrary library = 2; + if (this->has_library()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, *this->library_, output); + } + + // optional int32 version = 3 [deprecated = true]; + if (this->version() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->version(), output); + } + + // optional .tensorflow.VersionDef versions = 4; + if (this->has_versions()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, *this->versions_, output); + } + + // @@protoc_insertion_point(serialize_end:tensorflow.GraphDef) +} + +::google::protobuf::uint8* GraphDef::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.GraphDef) + // repeated .tensorflow.NodeDef node = 1; + for (unsigned int i = 0, n = this->node_size(); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 1, this->node(i), false, target); + } + + // optional .tensorflow.FunctionDefLibrary library = 2; + if (this->has_library()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 2, *this->library_, false, target); + } + + // optional int32 version = 3 [deprecated = true]; + if (this->version() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->version(), target); + } + + // optional .tensorflow.VersionDef versions = 4; + if (this->has_versions()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 4, *this->versions_, false, target); + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.GraphDef) + return target; +} + +size_t GraphDef::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.GraphDef) + size_t total_size = 0; + + // optional .tensorflow.VersionDef versions = 4; + if (this->has_versions()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->versions_); + } + + // optional int32 version = 3 [deprecated = true]; + if (this->version() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->version()); + } + + // optional .tensorflow.FunctionDefLibrary library = 2; + if (this->has_library()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->library_); + } + + // repeated .tensorflow.NodeDef node = 1; + { + unsigned int count = this->node_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->node(i)); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void GraphDef::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.GraphDef) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const GraphDef* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.GraphDef) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.GraphDef) + UnsafeMergeFrom(*source); + } +} + +void GraphDef::MergeFrom(const GraphDef& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.GraphDef) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void GraphDef::UnsafeMergeFrom(const GraphDef& from) { + GOOGLE_DCHECK(&from != this); + node_.MergeFrom(from.node_); + if (from.has_versions()) { + mutable_versions()->::tensorflow::VersionDef::MergeFrom(from.versions()); + } + if (from.version() != 0) { + set_version(from.version()); + } + if (from.has_library()) { + mutable_library()->::tensorflow::FunctionDefLibrary::MergeFrom(from.library()); + } +} + +void GraphDef::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.GraphDef) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void GraphDef::CopyFrom(const GraphDef& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.GraphDef) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool GraphDef::IsInitialized() const { + + return true; +} + +void GraphDef::Swap(GraphDef* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + GraphDef temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void GraphDef::UnsafeArenaSwap(GraphDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void GraphDef::InternalSwap(GraphDef* other) { + node_.UnsafeArenaSwap(&other->node_); + std::swap(versions_, other->versions_); + std::swap(version_, other->version_); + std::swap(library_, other->library_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata GraphDef::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = GraphDef_descriptor_; + metadata.reflection = GraphDef_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// GraphDef + +// repeated .tensorflow.NodeDef node = 1; +int GraphDef::node_size() const { + return node_.size(); +} +void GraphDef::clear_node() { + node_.Clear(); +} +const ::tensorflow::NodeDef& GraphDef::node(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.GraphDef.node) + return node_.Get(index); +} +::tensorflow::NodeDef* GraphDef::mutable_node(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.GraphDef.node) + return node_.Mutable(index); +} +::tensorflow::NodeDef* GraphDef::add_node() { + // @@protoc_insertion_point(field_add:tensorflow.GraphDef.node) + return node_.Add(); +} +::google::protobuf::RepeatedPtrField< ::tensorflow::NodeDef >* +GraphDef::mutable_node() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.GraphDef.node) + return &node_; +} +const ::google::protobuf::RepeatedPtrField< ::tensorflow::NodeDef >& +GraphDef::node() const { + // @@protoc_insertion_point(field_list:tensorflow.GraphDef.node) + return node_; +} + +// optional .tensorflow.VersionDef versions = 4; +bool GraphDef::has_versions() const { + return this != internal_default_instance() && versions_ != NULL; +} +void GraphDef::clear_versions() { + if (GetArenaNoVirtual() == NULL && versions_ != NULL) delete versions_; + versions_ = NULL; +} +const ::tensorflow::VersionDef& GraphDef::versions() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphDef.versions) + return versions_ != NULL ? *versions_ + : *::tensorflow::VersionDef::internal_default_instance(); +} +::tensorflow::VersionDef* GraphDef::mutable_versions() { + + if (versions_ == NULL) { + _slow_mutable_versions(); + } + // @@protoc_insertion_point(field_mutable:tensorflow.GraphDef.versions) + return versions_; +} +::tensorflow::VersionDef* GraphDef::release_versions() { + // @@protoc_insertion_point(field_release:tensorflow.GraphDef.versions) + + if (GetArenaNoVirtual() != NULL) { + return _slow_release_versions(); + } else { + ::tensorflow::VersionDef* temp = versions_; + versions_ = NULL; + return temp; + } +} + void GraphDef::set_allocated_versions(::tensorflow::VersionDef* versions) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete versions_; + } + if (versions != NULL) { + _slow_set_allocated_versions(message_arena, &versions); + } + versions_ = versions; + if (versions) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphDef.versions) +} + +// optional int32 version = 3 [deprecated = true]; +void GraphDef::clear_version() { + version_ = 0; +} +::google::protobuf::int32 GraphDef::version() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphDef.version) + return version_; +} +void GraphDef::set_version(::google::protobuf::int32 value) { + + version_ = value; + // @@protoc_insertion_point(field_set:tensorflow.GraphDef.version) +} + +// optional .tensorflow.FunctionDefLibrary library = 2; +bool GraphDef::has_library() const { + return this != internal_default_instance() && library_ != NULL; +} +void GraphDef::clear_library() { + if (GetArenaNoVirtual() == NULL && library_ != NULL) delete library_; + library_ = NULL; +} +const ::tensorflow::FunctionDefLibrary& GraphDef::library() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphDef.library) + return library_ != NULL ? *library_ + : *::tensorflow::FunctionDefLibrary::internal_default_instance(); +} +::tensorflow::FunctionDefLibrary* GraphDef::mutable_library() { + + if (library_ == NULL) { + _slow_mutable_library(); + } + // @@protoc_insertion_point(field_mutable:tensorflow.GraphDef.library) + return library_; +} +::tensorflow::FunctionDefLibrary* GraphDef::release_library() { + // @@protoc_insertion_point(field_release:tensorflow.GraphDef.library) + + if (GetArenaNoVirtual() != NULL) { + return _slow_release_library(); + } else { + ::tensorflow::FunctionDefLibrary* temp = library_; + library_ = NULL; + return temp; + } +} + void GraphDef::set_allocated_library(::tensorflow::FunctionDefLibrary* library) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete library_; + } + if (library != NULL) { + _slow_set_allocated_library(message_arena, &library); + } + library_ = library; + if (library) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphDef.library) +} + +inline const GraphDef* GraphDef::internal_default_instance() { + return &GraphDef_default_instance_.get(); +} +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int NodeDef::kNameFieldNumber; +const int NodeDef::kOpFieldNumber; +const int NodeDef::kInputFieldNumber; +const int NodeDef::kDeviceFieldNumber; +const int NodeDef::kAttrFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +NodeDef::NodeDef() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_graph_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.NodeDef) +} +NodeDef::NodeDef(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena), + input_(arena), + attr_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_graph_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.NodeDef) +} + +void NodeDef::InitAsDefaultInstance() { +} + +NodeDef::NodeDef(const NodeDef& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.NodeDef) +} + +void NodeDef::SharedCtor() { + attr_.SetAssignDescriptorCallback( + protobuf_AssignDescriptorsOnce); + attr_.SetEntryDescriptor( + &::tensorflow::NodeDef_AttrEntry_descriptor_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + op_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + device_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _cached_size_ = 0; +} + +NodeDef::~NodeDef() { + // @@protoc_insertion_point(destructor:tensorflow.NodeDef) + SharedDtor(); +} + +void NodeDef::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + + name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); + op_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); + device_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); +} + +void NodeDef::ArenaDtor(void* object) { + NodeDef* _this = reinterpret_cast< NodeDef* >(object); + (void)_this; +} +void NodeDef::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void NodeDef::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* NodeDef::descriptor() { + protobuf_AssignDescriptorsOnce(); + return NodeDef_descriptor_; +} + +const NodeDef& NodeDef::default_instance() { + protobuf_InitDefaults_graph_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed NodeDef_default_instance_; + +NodeDef* NodeDef::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void NodeDef::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.NodeDef) + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + op_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + device_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + input_.Clear(); + attr_.Clear(); +} + +bool NodeDef::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.NodeDef) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string name = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.NodeDef.name")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_op; + break; + } + + // optional string op = 2; + case 2: { + if (tag == 18) { + parse_op: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_op())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->op().data(), this->op().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.NodeDef.op")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_input; + break; + } + + // repeated string input = 3; + case 3: { + if (tag == 26) { + parse_input: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_input())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->input(this->input_size() - 1).data(), + this->input(this->input_size() - 1).length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.NodeDef.input")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_input; + if (input->ExpectTag(34)) goto parse_device; + break; + } + + // optional string device = 4; + case 4: { + if (tag == 34) { + parse_device: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_device())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->device().data(), this->device().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.NodeDef.device")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_attr; + break; + } + + // map attr = 5; + case 5: { + if (tag == 42) { + parse_attr: + DO_(input->IncrementRecursionDepth()); + parse_loop_attr: + NodeDef_AttrEntry::Parser< ::google::protobuf::internal::MapField< + ::std::string, ::tensorflow::AttrValue, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, + 0 >, + ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue > > parser(&attr_); + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, &parser)); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + parser.key().data(), parser.key().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.NodeDef.AttrEntry.key")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_loop_attr; + input->UnsafeDecrementRecursionDepth(); + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.NodeDef) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.NodeDef) + return false; +#undef DO_ +} + +void NodeDef::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.NodeDef) + // optional string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.NodeDef.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // optional string op = 2; + if (this->op().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->op().data(), this->op().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.NodeDef.op"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->op(), output); + } + + // repeated string input = 3; + for (int i = 0; i < this->input_size(); i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->input(i).data(), this->input(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.NodeDef.input"); + ::google::protobuf::internal::WireFormatLite::WriteString( + 3, this->input(i), output); + } + + // optional string device = 4; + if (this->device().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->device().data(), this->device().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.NodeDef.device"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->device(), output); + } + + // map attr = 5; + if (!this->attr().empty()) { + typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::google::protobuf::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), p->first.length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.NodeDef.AttrEntry.key"); + } + }; + + if (output->IsSerializationDeterminstic() && + this->attr().size() > 1) { + ::google::protobuf::scoped_array items( + new SortItem[this->attr().size()]); + typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::size_type size_type; + size_type n = 0; + for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + it = this->attr().begin(); + it != this->attr().end(); ++it, ++n) { + items[n] = SortItem(&*it); + } + ::std::sort(&items[0], &items[n], Less()); + ::google::protobuf::scoped_ptr entry; + for (size_type i = 0; i < n; i++) { + entry.reset(attr_.NewEntryWrapper( + items[i]->first, items[i]->second)); + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, *entry, output); + if (entry->GetArena() != NULL) { + entry.release(); + } + Utf8Check::Check(items[i]); + } + } else { + ::google::protobuf::scoped_ptr entry; + for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + it = this->attr().begin(); + it != this->attr().end(); ++it) { + entry.reset(attr_.NewEntryWrapper( + it->first, it->second)); + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, *entry, output); + if (entry->GetArena() != NULL) { + entry.release(); + } + Utf8Check::Check(&*it); + } + } + } + + // @@protoc_insertion_point(serialize_end:tensorflow.NodeDef) +} + +::google::protobuf::uint8* NodeDef::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.NodeDef) + // optional string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.NodeDef.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // optional string op = 2; + if (this->op().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->op().data(), this->op().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.NodeDef.op"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->op(), target); + } + + // repeated string input = 3; + for (int i = 0; i < this->input_size(); i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->input(i).data(), this->input(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.NodeDef.input"); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(3, this->input(i), target); + } + + // optional string device = 4; + if (this->device().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->device().data(), this->device().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.NodeDef.device"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->device(), target); + } + + // map attr = 5; + if (!this->attr().empty()) { + typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::google::protobuf::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), p->first.length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.NodeDef.AttrEntry.key"); + } + }; + + if (deterministic && + this->attr().size() > 1) { + ::google::protobuf::scoped_array items( + new SortItem[this->attr().size()]); + typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::size_type size_type; + size_type n = 0; + for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + it = this->attr().begin(); + it != this->attr().end(); ++it, ++n) { + items[n] = SortItem(&*it); + } + ::std::sort(&items[0], &items[n], Less()); + ::google::protobuf::scoped_ptr entry; + for (size_type i = 0; i < n; i++) { + entry.reset(attr_.NewEntryWrapper( + items[i]->first, items[i]->second)); + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 5, *entry, deterministic, target); +; + if (entry->GetArena() != NULL) { + entry.release(); + } + Utf8Check::Check(items[i]); + } + } else { + ::google::protobuf::scoped_ptr entry; + for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + it = this->attr().begin(); + it != this->attr().end(); ++it) { + entry.reset(attr_.NewEntryWrapper( + it->first, it->second)); + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 5, *entry, deterministic, target); +; + if (entry->GetArena() != NULL) { + entry.release(); + } + Utf8Check::Check(&*it); + } + } + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.NodeDef) + return target; +} + +size_t NodeDef::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.NodeDef) + size_t total_size = 0; + + // optional string name = 1; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // optional string op = 2; + if (this->op().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->op()); + } + + // optional string device = 4; + if (this->device().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->device()); + } + + // repeated string input = 3; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->input_size()); + for (int i = 0; i < this->input_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->input(i)); + } + + // map attr = 5; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->attr_size()); + { + ::google::protobuf::scoped_ptr entry; + for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + it = this->attr().begin(); + it != this->attr().end(); ++it) { + if (entry.get() != NULL && entry->GetArena() != NULL) { + entry.release(); + } + entry.reset(attr_.NewEntryWrapper(it->first, it->second)); + total_size += ::google::protobuf::internal::WireFormatLite:: + MessageSizeNoVirtual(*entry); + } + if (entry.get() != NULL && entry->GetArena() != NULL) { + entry.release(); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void NodeDef::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.NodeDef) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const NodeDef* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.NodeDef) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.NodeDef) + UnsafeMergeFrom(*source); + } +} + +void NodeDef::MergeFrom(const NodeDef& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.NodeDef) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void NodeDef::UnsafeMergeFrom(const NodeDef& from) { + GOOGLE_DCHECK(&from != this); + input_.UnsafeMergeFrom(from.input_); + attr_.MergeFrom(from.attr_); + if (from.name().size() > 0) { + set_name(from.name()); + } + if (from.op().size() > 0) { + set_op(from.op()); + } + if (from.device().size() > 0) { + set_device(from.device()); + } +} + +void NodeDef::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.NodeDef) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void NodeDef::CopyFrom(const NodeDef& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.NodeDef) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool NodeDef::IsInitialized() const { + + return true; +} + +void NodeDef::Swap(NodeDef* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + NodeDef temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void NodeDef::UnsafeArenaSwap(NodeDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void NodeDef::InternalSwap(NodeDef* other) { + name_.Swap(&other->name_); + op_.Swap(&other->op_); + input_.UnsafeArenaSwap(&other->input_); + device_.Swap(&other->device_); + attr_.Swap(&other->attr_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata NodeDef::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = NodeDef_descriptor_; + metadata.reflection = NodeDef_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// NodeDef + +// optional string name = 1; +void NodeDef::clear_name() { + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& NodeDef::name() const { + // @@protoc_insertion_point(field_get:tensorflow.NodeDef.name) + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void NodeDef::set_name(const ::std::string& value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.NodeDef.name) +} +void NodeDef::set_name(const char* value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.NodeDef.name) +} +void NodeDef::set_name(const char* value, + size_t size) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.NodeDef.name) +} +::std::string* NodeDef::mutable_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.NodeDef.name) + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* NodeDef::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.NodeDef.name) + + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* NodeDef::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.NodeDef.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void NodeDef::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.NodeDef.name) +} +void NodeDef::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NodeDef.name) +} + +// optional string op = 2; +void NodeDef::clear_op() { + op_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& NodeDef::op() const { + // @@protoc_insertion_point(field_get:tensorflow.NodeDef.op) + return op_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void NodeDef::set_op(const ::std::string& value) { + + op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.NodeDef.op) +} +void NodeDef::set_op(const char* value) { + + op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.NodeDef.op) +} +void NodeDef::set_op(const char* value, + size_t size) { + + op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.NodeDef.op) +} +::std::string* NodeDef::mutable_op() { + + // @@protoc_insertion_point(field_mutable:tensorflow.NodeDef.op) + return op_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* NodeDef::release_op() { + // @@protoc_insertion_point(field_release:tensorflow.NodeDef.op) + + return op_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* NodeDef::unsafe_arena_release_op() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.NodeDef.op) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return op_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void NodeDef::set_allocated_op(::std::string* op) { + if (op != NULL) { + + } else { + + } + op_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), op, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.NodeDef.op) +} +void NodeDef::unsafe_arena_set_allocated_op( + ::std::string* op) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (op != NULL) { + + } else { + + } + op_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + op, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NodeDef.op) +} + +// repeated string input = 3; +int NodeDef::input_size() const { + return input_.size(); +} +void NodeDef::clear_input() { + input_.Clear(); +} +const ::std::string& NodeDef::input(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.NodeDef.input) + return input_.Get(index); +} +::std::string* NodeDef::mutable_input(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.NodeDef.input) + return input_.Mutable(index); +} +void NodeDef::set_input(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:tensorflow.NodeDef.input) + input_.Mutable(index)->assign(value); +} +void NodeDef::set_input(int index, const char* value) { + input_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.NodeDef.input) +} +void NodeDef::set_input(int index, const char* value, size_t size) { + input_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.NodeDef.input) +} +::std::string* NodeDef::add_input() { + // @@protoc_insertion_point(field_add_mutable:tensorflow.NodeDef.input) + return input_.Add(); +} +void NodeDef::add_input(const ::std::string& value) { + input_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.NodeDef.input) +} +void NodeDef::add_input(const char* value) { + input_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.NodeDef.input) +} +void NodeDef::add_input(const char* value, size_t size) { + input_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.NodeDef.input) +} +const ::google::protobuf::RepeatedPtrField< ::std::string>& +NodeDef::input() const { + // @@protoc_insertion_point(field_list:tensorflow.NodeDef.input) + return input_; +} +::google::protobuf::RepeatedPtrField< ::std::string>* +NodeDef::mutable_input() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.NodeDef.input) + return &input_; +} + +// optional string device = 4; +void NodeDef::clear_device() { + device_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& NodeDef::device() const { + // @@protoc_insertion_point(field_get:tensorflow.NodeDef.device) + return device_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void NodeDef::set_device(const ::std::string& value) { + + device_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.NodeDef.device) +} +void NodeDef::set_device(const char* value) { + + device_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.NodeDef.device) +} +void NodeDef::set_device(const char* value, + size_t size) { + + device_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.NodeDef.device) +} +::std::string* NodeDef::mutable_device() { + + // @@protoc_insertion_point(field_mutable:tensorflow.NodeDef.device) + return device_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* NodeDef::release_device() { + // @@protoc_insertion_point(field_release:tensorflow.NodeDef.device) + + return device_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* NodeDef::unsafe_arena_release_device() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.NodeDef.device) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return device_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void NodeDef::set_allocated_device(::std::string* device) { + if (device != NULL) { + + } else { + + } + device_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), device, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.NodeDef.device) +} +void NodeDef::unsafe_arena_set_allocated_device( + ::std::string* device) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (device != NULL) { + + } else { + + } + device_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + device, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NodeDef.device) +} + +// map attr = 5; +int NodeDef::attr_size() const { + return attr_.size(); +} +void NodeDef::clear_attr() { + attr_.Clear(); +} + const ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >& +NodeDef::attr() const { + // @@protoc_insertion_point(field_map:tensorflow.NodeDef.attr) + return attr_.GetMap(); +} + ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >* +NodeDef::mutable_attr() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.NodeDef.attr) + return attr_.MutableMap(); +} + +inline const NodeDef* NodeDef::internal_default_instance() { + return &NodeDef_default_instance_.get(); +} +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/graph.pb.h b/modules/dnn/misc/tensorflow/graph.pb.h new file mode 100644 index 000000000..f4d54bc7f --- /dev/null +++ b/modules/dnn/misc/tensorflow/graph.pb.h @@ -0,0 +1,814 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: graph.proto + +#ifndef PROTOBUF_graph_2eproto__INCLUDED +#define PROTOBUF_graph_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 3001000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "attr_value.pb.h" +#include "function.pb.h" +#include "versions.pb.h" +// @@protoc_insertion_point(includes) + +namespace tensorflow { + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_graph_2eproto(); +void protobuf_InitDefaults_graph_2eproto(); +void protobuf_AssignDesc_graph_2eproto(); +void protobuf_ShutdownFile_graph_2eproto(); + +class GraphDef; +class NodeDef; + +// =================================================================== + +class GraphDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.GraphDef) */ { + public: + GraphDef(); + virtual ~GraphDef(); + + GraphDef(const GraphDef& from); + + inline GraphDef& operator=(const GraphDef& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const GraphDef& default_instance(); + + static const GraphDef* internal_default_instance(); + + void UnsafeArenaSwap(GraphDef* other); + void Swap(GraphDef* other); + + // implements Message ---------------------------------------------- + + inline GraphDef* New() const { return New(NULL); } + + GraphDef* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const GraphDef& from); + void MergeFrom(const GraphDef& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(GraphDef* other); + void UnsafeMergeFrom(const GraphDef& from); + protected: + explicit GraphDef(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .tensorflow.NodeDef node = 1; + int node_size() const; + void clear_node(); + static const int kNodeFieldNumber = 1; + const ::tensorflow::NodeDef& node(int index) const; + ::tensorflow::NodeDef* mutable_node(int index); + ::tensorflow::NodeDef* add_node(); + ::google::protobuf::RepeatedPtrField< ::tensorflow::NodeDef >* + mutable_node(); + const ::google::protobuf::RepeatedPtrField< ::tensorflow::NodeDef >& + node() const; + + // optional .tensorflow.VersionDef versions = 4; + bool has_versions() const; + void clear_versions(); + static const int kVersionsFieldNumber = 4; + private: + void _slow_mutable_versions(); + void _slow_set_allocated_versions( + ::google::protobuf::Arena* message_arena, ::tensorflow::VersionDef** versions); + ::tensorflow::VersionDef* _slow_release_versions(); + public: + const ::tensorflow::VersionDef& versions() const; + ::tensorflow::VersionDef* mutable_versions(); + ::tensorflow::VersionDef* release_versions(); + void set_allocated_versions(::tensorflow::VersionDef* versions); + ::tensorflow::VersionDef* unsafe_arena_release_versions(); + void unsafe_arena_set_allocated_versions( + ::tensorflow::VersionDef* versions); + + // optional int32 version = 3 [deprecated = true]; + GOOGLE_PROTOBUF_DEPRECATED_ATTR void clear_version(); + GOOGLE_PROTOBUF_DEPRECATED_ATTR static const int kVersionFieldNumber = 3; + GOOGLE_PROTOBUF_DEPRECATED_ATTR ::google::protobuf::int32 version() const; + GOOGLE_PROTOBUF_DEPRECATED_ATTR void set_version(::google::protobuf::int32 value); + + // optional .tensorflow.FunctionDefLibrary library = 2; + bool has_library() const; + void clear_library(); + static const int kLibraryFieldNumber = 2; + private: + void _slow_mutable_library(); + void _slow_set_allocated_library( + ::google::protobuf::Arena* message_arena, ::tensorflow::FunctionDefLibrary** library); + ::tensorflow::FunctionDefLibrary* _slow_release_library(); + public: + const ::tensorflow::FunctionDefLibrary& library() const; + ::tensorflow::FunctionDefLibrary* mutable_library(); + ::tensorflow::FunctionDefLibrary* release_library(); + void set_allocated_library(::tensorflow::FunctionDefLibrary* library); + ::tensorflow::FunctionDefLibrary* unsafe_arena_release_library(); + void unsafe_arena_set_allocated_library( + ::tensorflow::FunctionDefLibrary* library); + + // @@protoc_insertion_point(class_scope:tensorflow.GraphDef) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::RepeatedPtrField< ::tensorflow::NodeDef > node_; + ::tensorflow::VersionDef* versions_; + ::tensorflow::FunctionDefLibrary* library_; + ::google::protobuf::int32 version_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_graph_2eproto_impl(); + friend void protobuf_AddDesc_graph_2eproto_impl(); + friend void protobuf_AssignDesc_graph_2eproto(); + friend void protobuf_ShutdownFile_graph_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed GraphDef_default_instance_; + +// ------------------------------------------------------------------- + +class NodeDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.NodeDef) */ { + public: + NodeDef(); + virtual ~NodeDef(); + + NodeDef(const NodeDef& from); + + inline NodeDef& operator=(const NodeDef& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const NodeDef& default_instance(); + + static const NodeDef* internal_default_instance(); + + void UnsafeArenaSwap(NodeDef* other); + void Swap(NodeDef* other); + + // implements Message ---------------------------------------------- + + inline NodeDef* New() const { return New(NULL); } + + NodeDef* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const NodeDef& from); + void MergeFrom(const NodeDef& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(NodeDef* other); + void UnsafeMergeFrom(const NodeDef& from); + protected: + explicit NodeDef(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + // optional string name = 1; + void clear_name(); + static const int kNameFieldNumber = 1; + const ::std::string& name() const; + void set_name(const ::std::string& value); + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + ::std::string* unsafe_arena_release_name(); + void unsafe_arena_set_allocated_name( + ::std::string* name); + + // optional string op = 2; + void clear_op(); + static const int kOpFieldNumber = 2; + const ::std::string& op() const; + void set_op(const ::std::string& value); + void set_op(const char* value); + void set_op(const char* value, size_t size); + ::std::string* mutable_op(); + ::std::string* release_op(); + void set_allocated_op(::std::string* op); + ::std::string* unsafe_arena_release_op(); + void unsafe_arena_set_allocated_op( + ::std::string* op); + + // repeated string input = 3; + int input_size() const; + void clear_input(); + static const int kInputFieldNumber = 3; + const ::std::string& input(int index) const; + ::std::string* mutable_input(int index); + void set_input(int index, const ::std::string& value); + void set_input(int index, const char* value); + void set_input(int index, const char* value, size_t size); + ::std::string* add_input(); + void add_input(const ::std::string& value); + void add_input(const char* value); + void add_input(const char* value, size_t size); + const ::google::protobuf::RepeatedPtrField< ::std::string>& input() const; + ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_input(); + + // optional string device = 4; + void clear_device(); + static const int kDeviceFieldNumber = 4; + const ::std::string& device() const; + void set_device(const ::std::string& value); + void set_device(const char* value); + void set_device(const char* value, size_t size); + ::std::string* mutable_device(); + ::std::string* release_device(); + void set_allocated_device(::std::string* device); + ::std::string* unsafe_arena_release_device(); + void unsafe_arena_set_allocated_device( + ::std::string* device); + + // map attr = 5; + int attr_size() const; + void clear_attr(); + static const int kAttrFieldNumber = 5; + const ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >& + attr() const; + ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >* + mutable_attr(); + + // @@protoc_insertion_point(class_scope:tensorflow.NodeDef) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::RepeatedPtrField< ::std::string> input_; + typedef ::google::protobuf::internal::MapEntryLite< + ::std::string, ::tensorflow::AttrValue, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, + 0 > + NodeDef_AttrEntry; + ::google::protobuf::internal::MapField< + ::std::string, ::tensorflow::AttrValue, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, + 0 > attr_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr op_; + ::google::protobuf::internal::ArenaStringPtr device_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_graph_2eproto_impl(); + friend void protobuf_AddDesc_graph_2eproto_impl(); + friend void protobuf_AssignDesc_graph_2eproto(); + friend void protobuf_ShutdownFile_graph_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed NodeDef_default_instance_; + +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +// GraphDef + +// repeated .tensorflow.NodeDef node = 1; +inline int GraphDef::node_size() const { + return node_.size(); +} +inline void GraphDef::clear_node() { + node_.Clear(); +} +inline const ::tensorflow::NodeDef& GraphDef::node(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.GraphDef.node) + return node_.Get(index); +} +inline ::tensorflow::NodeDef* GraphDef::mutable_node(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.GraphDef.node) + return node_.Mutable(index); +} +inline ::tensorflow::NodeDef* GraphDef::add_node() { + // @@protoc_insertion_point(field_add:tensorflow.GraphDef.node) + return node_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::tensorflow::NodeDef >* +GraphDef::mutable_node() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.GraphDef.node) + return &node_; +} +inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::NodeDef >& +GraphDef::node() const { + // @@protoc_insertion_point(field_list:tensorflow.GraphDef.node) + return node_; +} + +// optional .tensorflow.VersionDef versions = 4; +inline bool GraphDef::has_versions() const { + return this != internal_default_instance() && versions_ != NULL; +} +inline void GraphDef::clear_versions() { + if (GetArenaNoVirtual() == NULL && versions_ != NULL) delete versions_; + versions_ = NULL; +} +inline const ::tensorflow::VersionDef& GraphDef::versions() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphDef.versions) + return versions_ != NULL ? *versions_ + : *::tensorflow::VersionDef::internal_default_instance(); +} +inline ::tensorflow::VersionDef* GraphDef::mutable_versions() { + + if (versions_ == NULL) { + _slow_mutable_versions(); + } + // @@protoc_insertion_point(field_mutable:tensorflow.GraphDef.versions) + return versions_; +} +inline ::tensorflow::VersionDef* GraphDef::release_versions() { + // @@protoc_insertion_point(field_release:tensorflow.GraphDef.versions) + + if (GetArenaNoVirtual() != NULL) { + return _slow_release_versions(); + } else { + ::tensorflow::VersionDef* temp = versions_; + versions_ = NULL; + return temp; + } +} +inline void GraphDef::set_allocated_versions(::tensorflow::VersionDef* versions) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete versions_; + } + if (versions != NULL) { + _slow_set_allocated_versions(message_arena, &versions); + } + versions_ = versions; + if (versions) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphDef.versions) +} + +// optional int32 version = 3 [deprecated = true]; +inline void GraphDef::clear_version() { + version_ = 0; +} +inline ::google::protobuf::int32 GraphDef::version() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphDef.version) + return version_; +} +inline void GraphDef::set_version(::google::protobuf::int32 value) { + + version_ = value; + // @@protoc_insertion_point(field_set:tensorflow.GraphDef.version) +} + +// optional .tensorflow.FunctionDefLibrary library = 2; +inline bool GraphDef::has_library() const { + return this != internal_default_instance() && library_ != NULL; +} +inline void GraphDef::clear_library() { + if (GetArenaNoVirtual() == NULL && library_ != NULL) delete library_; + library_ = NULL; +} +inline const ::tensorflow::FunctionDefLibrary& GraphDef::library() const { + // @@protoc_insertion_point(field_get:tensorflow.GraphDef.library) + return library_ != NULL ? *library_ + : *::tensorflow::FunctionDefLibrary::internal_default_instance(); +} +inline ::tensorflow::FunctionDefLibrary* GraphDef::mutable_library() { + + if (library_ == NULL) { + _slow_mutable_library(); + } + // @@protoc_insertion_point(field_mutable:tensorflow.GraphDef.library) + return library_; +} +inline ::tensorflow::FunctionDefLibrary* GraphDef::release_library() { + // @@protoc_insertion_point(field_release:tensorflow.GraphDef.library) + + if (GetArenaNoVirtual() != NULL) { + return _slow_release_library(); + } else { + ::tensorflow::FunctionDefLibrary* temp = library_; + library_ = NULL; + return temp; + } +} +inline void GraphDef::set_allocated_library(::tensorflow::FunctionDefLibrary* library) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete library_; + } + if (library != NULL) { + _slow_set_allocated_library(message_arena, &library); + } + library_ = library; + if (library) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphDef.library) +} + +inline const GraphDef* GraphDef::internal_default_instance() { + return &GraphDef_default_instance_.get(); +} +// ------------------------------------------------------------------- + +// NodeDef + +// optional string name = 1; +inline void NodeDef::clear_name() { + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& NodeDef::name() const { + // @@protoc_insertion_point(field_get:tensorflow.NodeDef.name) + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void NodeDef::set_name(const ::std::string& value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.NodeDef.name) +} +inline void NodeDef::set_name(const char* value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.NodeDef.name) +} +inline void NodeDef::set_name(const char* value, + size_t size) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.NodeDef.name) +} +inline ::std::string* NodeDef::mutable_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.NodeDef.name) + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* NodeDef::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.NodeDef.name) + + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* NodeDef::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.NodeDef.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void NodeDef::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.NodeDef.name) +} +inline void NodeDef::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NodeDef.name) +} + +// optional string op = 2; +inline void NodeDef::clear_op() { + op_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& NodeDef::op() const { + // @@protoc_insertion_point(field_get:tensorflow.NodeDef.op) + return op_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void NodeDef::set_op(const ::std::string& value) { + + op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.NodeDef.op) +} +inline void NodeDef::set_op(const char* value) { + + op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.NodeDef.op) +} +inline void NodeDef::set_op(const char* value, + size_t size) { + + op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.NodeDef.op) +} +inline ::std::string* NodeDef::mutable_op() { + + // @@protoc_insertion_point(field_mutable:tensorflow.NodeDef.op) + return op_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* NodeDef::release_op() { + // @@protoc_insertion_point(field_release:tensorflow.NodeDef.op) + + return op_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* NodeDef::unsafe_arena_release_op() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.NodeDef.op) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return op_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void NodeDef::set_allocated_op(::std::string* op) { + if (op != NULL) { + + } else { + + } + op_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), op, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.NodeDef.op) +} +inline void NodeDef::unsafe_arena_set_allocated_op( + ::std::string* op) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (op != NULL) { + + } else { + + } + op_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + op, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NodeDef.op) +} + +// repeated string input = 3; +inline int NodeDef::input_size() const { + return input_.size(); +} +inline void NodeDef::clear_input() { + input_.Clear(); +} +inline const ::std::string& NodeDef::input(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.NodeDef.input) + return input_.Get(index); +} +inline ::std::string* NodeDef::mutable_input(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.NodeDef.input) + return input_.Mutable(index); +} +inline void NodeDef::set_input(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:tensorflow.NodeDef.input) + input_.Mutable(index)->assign(value); +} +inline void NodeDef::set_input(int index, const char* value) { + input_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.NodeDef.input) +} +inline void NodeDef::set_input(int index, const char* value, size_t size) { + input_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.NodeDef.input) +} +inline ::std::string* NodeDef::add_input() { + // @@protoc_insertion_point(field_add_mutable:tensorflow.NodeDef.input) + return input_.Add(); +} +inline void NodeDef::add_input(const ::std::string& value) { + input_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.NodeDef.input) +} +inline void NodeDef::add_input(const char* value) { + input_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.NodeDef.input) +} +inline void NodeDef::add_input(const char* value, size_t size) { + input_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.NodeDef.input) +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +NodeDef::input() const { + // @@protoc_insertion_point(field_list:tensorflow.NodeDef.input) + return input_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +NodeDef::mutable_input() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.NodeDef.input) + return &input_; +} + +// optional string device = 4; +inline void NodeDef::clear_device() { + device_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& NodeDef::device() const { + // @@protoc_insertion_point(field_get:tensorflow.NodeDef.device) + return device_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void NodeDef::set_device(const ::std::string& value) { + + device_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.NodeDef.device) +} +inline void NodeDef::set_device(const char* value) { + + device_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.NodeDef.device) +} +inline void NodeDef::set_device(const char* value, + size_t size) { + + device_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.NodeDef.device) +} +inline ::std::string* NodeDef::mutable_device() { + + // @@protoc_insertion_point(field_mutable:tensorflow.NodeDef.device) + return device_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* NodeDef::release_device() { + // @@protoc_insertion_point(field_release:tensorflow.NodeDef.device) + + return device_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* NodeDef::unsafe_arena_release_device() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.NodeDef.device) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return device_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void NodeDef::set_allocated_device(::std::string* device) { + if (device != NULL) { + + } else { + + } + device_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), device, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.NodeDef.device) +} +inline void NodeDef::unsafe_arena_set_allocated_device( + ::std::string* device) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (device != NULL) { + + } else { + + } + device_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + device, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NodeDef.device) +} + +// map attr = 5; +inline int NodeDef::attr_size() const { + return attr_.size(); +} +inline void NodeDef::clear_attr() { + attr_.Clear(); +} +inline const ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >& +NodeDef::attr() const { + // @@protoc_insertion_point(field_map:tensorflow.NodeDef.attr) + return attr_.GetMap(); +} +inline ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >* +NodeDef::mutable_attr() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.NodeDef.attr) + return attr_.MutableMap(); +} + +inline const NodeDef* NodeDef::internal_default_instance() { + return &NodeDef_default_instance_.get(); +} +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_graph_2eproto__INCLUDED diff --git a/modules/dnn/misc/tensorflow/op_def.pb.cc b/modules/dnn/misc/tensorflow/op_def.pb.cc new file mode 100644 index 000000000..1a9cae3ce --- /dev/null +++ b/modules/dnn/misc/tensorflow/op_def.pb.cc @@ -0,0 +1,4045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: op_def.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "op_def.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace tensorflow { + +namespace { + +const ::google::protobuf::Descriptor* OpDef_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + OpDef_reflection_ = NULL; +const ::google::protobuf::Descriptor* OpDef_ArgDef_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + OpDef_ArgDef_reflection_ = NULL; +const ::google::protobuf::Descriptor* OpDef_AttrDef_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + OpDef_AttrDef_reflection_ = NULL; +const ::google::protobuf::Descriptor* OpDeprecation_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + OpDeprecation_reflection_ = NULL; +const ::google::protobuf::Descriptor* OpList_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + OpList_reflection_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_op_5fdef_2eproto() GOOGLE_ATTRIBUTE_COLD; +void protobuf_AssignDesc_op_5fdef_2eproto() { + protobuf_AddDesc_op_5fdef_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "op_def.proto"); + GOOGLE_CHECK(file != NULL); + OpDef_descriptor_ = file->message_type(0); + static const int OpDef_offsets_[11] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef, input_arg_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef, output_arg_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef, attr_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef, deprecation_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef, summary_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef, description_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef, is_commutative_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef, is_aggregate_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef, is_stateful_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef, allows_uninitialized_input_), + }; + OpDef_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + OpDef_descriptor_, + OpDef::internal_default_instance(), + OpDef_offsets_, + -1, + -1, + -1, + sizeof(OpDef), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef, _internal_metadata_)); + OpDef_ArgDef_descriptor_ = OpDef_descriptor_->nested_type(0); + static const int OpDef_ArgDef_offsets_[7] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef_ArgDef, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef_ArgDef, description_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef_ArgDef, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef_ArgDef, type_attr_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef_ArgDef, number_attr_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef_ArgDef, type_list_attr_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef_ArgDef, is_ref_), + }; + OpDef_ArgDef_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + OpDef_ArgDef_descriptor_, + OpDef_ArgDef::internal_default_instance(), + OpDef_ArgDef_offsets_, + -1, + -1, + -1, + sizeof(OpDef_ArgDef), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef_ArgDef, _internal_metadata_)); + OpDef_AttrDef_descriptor_ = OpDef_descriptor_->nested_type(1); + static const int OpDef_AttrDef_offsets_[7] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef_AttrDef, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef_AttrDef, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef_AttrDef, default_value_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef_AttrDef, description_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef_AttrDef, has_minimum_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef_AttrDef, minimum_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef_AttrDef, allowed_values_), + }; + OpDef_AttrDef_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + OpDef_AttrDef_descriptor_, + OpDef_AttrDef::internal_default_instance(), + OpDef_AttrDef_offsets_, + -1, + -1, + -1, + sizeof(OpDef_AttrDef), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDef_AttrDef, _internal_metadata_)); + OpDeprecation_descriptor_ = file->message_type(1); + static const int OpDeprecation_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDeprecation, version_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDeprecation, explanation_), + }; + OpDeprecation_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + OpDeprecation_descriptor_, + OpDeprecation::internal_default_instance(), + OpDeprecation_offsets_, + -1, + -1, + -1, + sizeof(OpDeprecation), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpDeprecation, _internal_metadata_)); + OpList_descriptor_ = file->message_type(2); + static const int OpList_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpList, op_), + }; + OpList_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + OpList_descriptor_, + OpList::internal_default_instance(), + OpList_offsets_, + -1, + -1, + -1, + sizeof(OpList), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OpList, _internal_metadata_)); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_op_5fdef_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + OpDef_descriptor_, OpDef::internal_default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + OpDef_ArgDef_descriptor_, OpDef_ArgDef::internal_default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + OpDef_AttrDef_descriptor_, OpDef_AttrDef::internal_default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + OpDeprecation_descriptor_, OpDeprecation::internal_default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + OpList_descriptor_, OpList::internal_default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_op_5fdef_2eproto() { + OpDef_default_instance_.Shutdown(); + delete OpDef_reflection_; + OpDef_ArgDef_default_instance_.Shutdown(); + delete OpDef_ArgDef_reflection_; + OpDef_AttrDef_default_instance_.Shutdown(); + delete OpDef_AttrDef_reflection_; + OpDeprecation_default_instance_.Shutdown(); + delete OpDeprecation_reflection_; + OpList_default_instance_.Shutdown(); + delete OpList_reflection_; +} + +void protobuf_InitDefaults_op_5fdef_2eproto_impl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::tensorflow::protobuf_InitDefaults_attr_5fvalue_2eproto(); + ::tensorflow::protobuf_InitDefaults_types_2eproto(); + ::google::protobuf::internal::GetEmptyString(); + OpDef_default_instance_.DefaultConstruct(); + ::google::protobuf::internal::GetEmptyString(); + OpDef_ArgDef_default_instance_.DefaultConstruct(); + ::google::protobuf::internal::GetEmptyString(); + OpDef_AttrDef_default_instance_.DefaultConstruct(); + ::google::protobuf::internal::GetEmptyString(); + OpDeprecation_default_instance_.DefaultConstruct(); + OpList_default_instance_.DefaultConstruct(); + OpDef_default_instance_.get_mutable()->InitAsDefaultInstance(); + OpDef_ArgDef_default_instance_.get_mutable()->InitAsDefaultInstance(); + OpDef_AttrDef_default_instance_.get_mutable()->InitAsDefaultInstance(); + OpDeprecation_default_instance_.get_mutable()->InitAsDefaultInstance(); + OpList_default_instance_.get_mutable()->InitAsDefaultInstance(); +} + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_InitDefaults_op_5fdef_2eproto_once_); +void protobuf_InitDefaults_op_5fdef_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_InitDefaults_op_5fdef_2eproto_once_, + &protobuf_InitDefaults_op_5fdef_2eproto_impl); +} +void protobuf_AddDesc_op_5fdef_2eproto_impl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + protobuf_InitDefaults_op_5fdef_2eproto(); + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\014op_def.proto\022\ntensorflow\032\020attr_value.p" + "roto\032\013types.proto\"\270\005\n\005OpDef\022\014\n\004name\030\001 \001(" + "\t\022+\n\tinput_arg\030\002 \003(\0132\030.tensorflow.OpDef." + "ArgDef\022,\n\noutput_arg\030\003 \003(\0132\030.tensorflow." + "OpDef.ArgDef\022\'\n\004attr\030\004 \003(\0132\031.tensorflow." + "OpDef.AttrDef\022.\n\013deprecation\030\010 \001(\0132\031.ten" + "sorflow.OpDeprecation\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_aggregate\030\020 \001(\010\022\023\n\013is_stateful" + "\030\021 \001(\010\022\"\n\032allows_uninitialized_input\030\023 \001" + "(\010\032\237\001\n\006ArgDef\022\014\n\004name\030\001 \001(\t\022\023\n\013descripti" + "on\030\002 \001(\t\022\"\n\004type\030\003 \001(\0162\024.tensorflow.Data" + "Type\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_value\030\003 \001(\0132\025.tensorflow" + ".AttrValue\022\023\n\013description\030\004 \001(\t\022\023\n\013has_m" + "inimum\030\005 \001(\010\022\017\n\007minimum\030\006 \001(\003\022-\n\016allowed" + "_values\030\007 \001(\0132\025.tensorflow.AttrValue\"5\n\r" + "OpDeprecation\022\017\n\007version\030\001 \001(\005\022\023\n\013explan" + "ation\030\002 \001(\t\"\'\n\006OpList\022\035\n\002op\030\001 \003(\0132\021.tens" + "orflow.OpDefB,\n\030org.tensorflow.framework" + "B\013OpDefProtosP\001\370\001\001b\006proto3", 906); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "op_def.proto", &protobuf_RegisterTypes); + ::tensorflow::protobuf_AddDesc_attr_5fvalue_2eproto(); + ::tensorflow::protobuf_AddDesc_types_2eproto(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_op_5fdef_2eproto); +} + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_op_5fdef_2eproto_once_); +void protobuf_AddDesc_op_5fdef_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_op_5fdef_2eproto_once_, + &protobuf_AddDesc_op_5fdef_2eproto_impl); +} +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_op_5fdef_2eproto { + StaticDescriptorInitializer_op_5fdef_2eproto() { + protobuf_AddDesc_op_5fdef_2eproto(); + } +} static_descriptor_initializer_op_5fdef_2eproto_; + +namespace { + +static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD GOOGLE_ATTRIBUTE_NORETURN; +static void MergeFromFail(int line) { + ::google::protobuf::internal::MergeFromFail(__FILE__, line); +} + +} // namespace + + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int OpDef_ArgDef::kNameFieldNumber; +const int OpDef_ArgDef::kDescriptionFieldNumber; +const int OpDef_ArgDef::kTypeFieldNumber; +const int OpDef_ArgDef::kTypeAttrFieldNumber; +const int OpDef_ArgDef::kNumberAttrFieldNumber; +const int OpDef_ArgDef::kTypeListAttrFieldNumber; +const int OpDef_ArgDef::kIsRefFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +OpDef_ArgDef::OpDef_ArgDef() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_op_5fdef_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.OpDef.ArgDef) +} +OpDef_ArgDef::OpDef_ArgDef(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_op_5fdef_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.OpDef.ArgDef) +} + +void OpDef_ArgDef::InitAsDefaultInstance() { +} + +OpDef_ArgDef::OpDef_ArgDef(const OpDef_ArgDef& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.OpDef.ArgDef) +} + +void OpDef_ArgDef::SharedCtor() { + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + type_attr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + number_attr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + type_list_attr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(&type_, 0, reinterpret_cast(&is_ref_) - + reinterpret_cast(&type_) + sizeof(is_ref_)); + _cached_size_ = 0; +} + +OpDef_ArgDef::~OpDef_ArgDef() { + // @@protoc_insertion_point(destructor:tensorflow.OpDef.ArgDef) + SharedDtor(); +} + +void OpDef_ArgDef::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + + name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); + description_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); + type_attr_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); + number_attr_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); + type_list_attr_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); +} + +void OpDef_ArgDef::ArenaDtor(void* object) { + OpDef_ArgDef* _this = reinterpret_cast< OpDef_ArgDef* >(object); + (void)_this; +} +void OpDef_ArgDef::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void OpDef_ArgDef::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* OpDef_ArgDef::descriptor() { + protobuf_AssignDescriptorsOnce(); + return OpDef_ArgDef_descriptor_; +} + +const OpDef_ArgDef& OpDef_ArgDef::default_instance() { + protobuf_InitDefaults_op_5fdef_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed OpDef_ArgDef_default_instance_; + +OpDef_ArgDef* OpDef_ArgDef::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void OpDef_ArgDef::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.OpDef.ArgDef) +#if defined(__clang__) +#define ZR_HELPER_(f) \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \ + __builtin_offsetof(OpDef_ArgDef, f) \ + _Pragma("clang diagnostic pop") +#else +#define ZR_HELPER_(f) reinterpret_cast(\ + &reinterpret_cast(16)->f) +#endif + +#define ZR_(first, last) do {\ + ::memset(&(first), 0,\ + ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ +} while (0) + + ZR_(type_, is_ref_); + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + description_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + type_attr_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + number_attr_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + type_list_attr_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + +#undef ZR_HELPER_ +#undef ZR_ + +} + +bool OpDef_ArgDef::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.OpDef.ArgDef) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string name = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.OpDef.ArgDef.name")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_description; + break; + } + + // optional string description = 2; + case 2: { + if (tag == 18) { + parse_description: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_description())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->description().data(), this->description().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.OpDef.ArgDef.description")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_type; + break; + } + + // optional .tensorflow.DataType type = 3; + case 3: { + if (tag == 24) { + parse_type: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + set_type(static_cast< ::tensorflow::DataType >(value)); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_type_attr; + break; + } + + // optional string type_attr = 4; + case 4: { + if (tag == 34) { + parse_type_attr: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_type_attr())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type_attr().data(), this->type_attr().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.OpDef.ArgDef.type_attr")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_number_attr; + break; + } + + // optional string number_attr = 5; + case 5: { + if (tag == 42) { + parse_number_attr: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_number_attr())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->number_attr().data(), this->number_attr().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.OpDef.ArgDef.number_attr")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(50)) goto parse_type_list_attr; + break; + } + + // optional string type_list_attr = 6; + case 6: { + if (tag == 50) { + parse_type_list_attr: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_type_list_attr())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type_list_attr().data(), this->type_list_attr().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.OpDef.ArgDef.type_list_attr")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(128)) goto parse_is_ref; + break; + } + + // optional bool is_ref = 16; + case 16: { + if (tag == 128) { + parse_is_ref: + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &is_ref_))); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.OpDef.ArgDef) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.OpDef.ArgDef) + return false; +#undef DO_ +} + +void OpDef_ArgDef::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.OpDef.ArgDef) + // optional string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.ArgDef.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // optional string description = 2; + if (this->description().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->description().data(), this->description().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.ArgDef.description"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->description(), output); + } + + // optional .tensorflow.DataType type = 3; + if (this->type() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 3, this->type(), output); + } + + // optional string type_attr = 4; + if (this->type_attr().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type_attr().data(), this->type_attr().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.ArgDef.type_attr"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->type_attr(), output); + } + + // optional string number_attr = 5; + if (this->number_attr().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->number_attr().data(), this->number_attr().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.ArgDef.number_attr"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 5, this->number_attr(), output); + } + + // optional string type_list_attr = 6; + if (this->type_list_attr().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type_list_attr().data(), this->type_list_attr().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.ArgDef.type_list_attr"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 6, this->type_list_attr(), output); + } + + // optional bool is_ref = 16; + if (this->is_ref() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteBool(16, this->is_ref(), output); + } + + // @@protoc_insertion_point(serialize_end:tensorflow.OpDef.ArgDef) +} + +::google::protobuf::uint8* OpDef_ArgDef::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.OpDef.ArgDef) + // optional string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.ArgDef.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // optional string description = 2; + if (this->description().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->description().data(), this->description().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.ArgDef.description"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->description(), target); + } + + // optional .tensorflow.DataType type = 3; + if (this->type() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 3, this->type(), target); + } + + // optional string type_attr = 4; + if (this->type_attr().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type_attr().data(), this->type_attr().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.ArgDef.type_attr"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->type_attr(), target); + } + + // optional string number_attr = 5; + if (this->number_attr().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->number_attr().data(), this->number_attr().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.ArgDef.number_attr"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 5, this->number_attr(), target); + } + + // optional string type_list_attr = 6; + if (this->type_list_attr().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type_list_attr().data(), this->type_list_attr().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.ArgDef.type_list_attr"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 6, this->type_list_attr(), target); + } + + // optional bool is_ref = 16; + if (this->is_ref() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(16, this->is_ref(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.OpDef.ArgDef) + return target; +} + +size_t OpDef_ArgDef::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.OpDef.ArgDef) + size_t total_size = 0; + + // optional string name = 1; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // optional string description = 2; + if (this->description().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->description()); + } + + // optional .tensorflow.DataType type = 3; + if (this->type() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); + } + + // optional string type_attr = 4; + if (this->type_attr().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->type_attr()); + } + + // optional string number_attr = 5; + if (this->number_attr().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->number_attr()); + } + + // optional string type_list_attr = 6; + if (this->type_list_attr().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->type_list_attr()); + } + + // optional bool is_ref = 16; + if (this->is_ref() != 0) { + total_size += 2 + 1; + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void OpDef_ArgDef::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.OpDef.ArgDef) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const OpDef_ArgDef* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.OpDef.ArgDef) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.OpDef.ArgDef) + UnsafeMergeFrom(*source); + } +} + +void OpDef_ArgDef::MergeFrom(const OpDef_ArgDef& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.OpDef.ArgDef) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void OpDef_ArgDef::UnsafeMergeFrom(const OpDef_ArgDef& from) { + GOOGLE_DCHECK(&from != this); + if (from.name().size() > 0) { + set_name(from.name()); + } + if (from.description().size() > 0) { + set_description(from.description()); + } + if (from.type() != 0) { + set_type(from.type()); + } + if (from.type_attr().size() > 0) { + set_type_attr(from.type_attr()); + } + if (from.number_attr().size() > 0) { + set_number_attr(from.number_attr()); + } + if (from.type_list_attr().size() > 0) { + set_type_list_attr(from.type_list_attr()); + } + if (from.is_ref() != 0) { + set_is_ref(from.is_ref()); + } +} + +void OpDef_ArgDef::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.OpDef.ArgDef) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void OpDef_ArgDef::CopyFrom(const OpDef_ArgDef& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.OpDef.ArgDef) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool OpDef_ArgDef::IsInitialized() const { + + return true; +} + +void OpDef_ArgDef::Swap(OpDef_ArgDef* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + OpDef_ArgDef temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void OpDef_ArgDef::UnsafeArenaSwap(OpDef_ArgDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void OpDef_ArgDef::InternalSwap(OpDef_ArgDef* other) { + name_.Swap(&other->name_); + description_.Swap(&other->description_); + std::swap(type_, other->type_); + type_attr_.Swap(&other->type_attr_); + number_attr_.Swap(&other->number_attr_); + type_list_attr_.Swap(&other->type_list_attr_); + std::swap(is_ref_, other->is_ref_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata OpDef_ArgDef::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = OpDef_ArgDef_descriptor_; + metadata.reflection = OpDef_ArgDef_reflection_; + return metadata; +} + + +// ------------------------------------------------------------------- + +void OpDef_AttrDef::_slow_mutable_default_value() { + default_value_ = ::google::protobuf::Arena::CreateMessage< ::tensorflow::AttrValue >( + GetArenaNoVirtual()); +} +::tensorflow::AttrValue* OpDef_AttrDef::_slow_release_default_value() { + if (default_value_ == NULL) { + return NULL; + } else { + ::tensorflow::AttrValue* temp = new ::tensorflow::AttrValue(*default_value_); + default_value_ = NULL; + return temp; + } +} +::tensorflow::AttrValue* OpDef_AttrDef::unsafe_arena_release_default_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.AttrDef.default_value) + + ::tensorflow::AttrValue* temp = default_value_; + default_value_ = NULL; + return temp; +} +void OpDef_AttrDef::_slow_set_allocated_default_value( + ::google::protobuf::Arena* message_arena, ::tensorflow::AttrValue** default_value) { + if (message_arena != NULL && + ::google::protobuf::Arena::GetArena(*default_value) == NULL) { + message_arena->Own(*default_value); + } else if (message_arena != + ::google::protobuf::Arena::GetArena(*default_value)) { + ::tensorflow::AttrValue* new_default_value = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::AttrValue >( + message_arena); + new_default_value->CopyFrom(**default_value); + *default_value = new_default_value; + } +} +void OpDef_AttrDef::unsafe_arena_set_allocated_default_value( + ::tensorflow::AttrValue* default_value) { + if (GetArenaNoVirtual() == NULL) { + delete default_value_; + } + default_value_ = default_value; + if (default_value) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.AttrDef.default_value) +} +void OpDef_AttrDef::_slow_mutable_allowed_values() { + allowed_values_ = ::google::protobuf::Arena::CreateMessage< ::tensorflow::AttrValue >( + GetArenaNoVirtual()); +} +::tensorflow::AttrValue* OpDef_AttrDef::_slow_release_allowed_values() { + if (allowed_values_ == NULL) { + return NULL; + } else { + ::tensorflow::AttrValue* temp = new ::tensorflow::AttrValue(*allowed_values_); + allowed_values_ = NULL; + return temp; + } +} +::tensorflow::AttrValue* OpDef_AttrDef::unsafe_arena_release_allowed_values() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.AttrDef.allowed_values) + + ::tensorflow::AttrValue* temp = allowed_values_; + allowed_values_ = NULL; + return temp; +} +void OpDef_AttrDef::_slow_set_allocated_allowed_values( + ::google::protobuf::Arena* message_arena, ::tensorflow::AttrValue** allowed_values) { + if (message_arena != NULL && + ::google::protobuf::Arena::GetArena(*allowed_values) == NULL) { + message_arena->Own(*allowed_values); + } else if (message_arena != + ::google::protobuf::Arena::GetArena(*allowed_values)) { + ::tensorflow::AttrValue* new_allowed_values = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::AttrValue >( + message_arena); + new_allowed_values->CopyFrom(**allowed_values); + *allowed_values = new_allowed_values; + } +} +void OpDef_AttrDef::unsafe_arena_set_allocated_allowed_values( + ::tensorflow::AttrValue* allowed_values) { + if (GetArenaNoVirtual() == NULL) { + delete allowed_values_; + } + allowed_values_ = allowed_values; + if (allowed_values) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.AttrDef.allowed_values) +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int OpDef_AttrDef::kNameFieldNumber; +const int OpDef_AttrDef::kTypeFieldNumber; +const int OpDef_AttrDef::kDefaultValueFieldNumber; +const int OpDef_AttrDef::kDescriptionFieldNumber; +const int OpDef_AttrDef::kHasMinimumFieldNumber; +const int OpDef_AttrDef::kMinimumFieldNumber; +const int OpDef_AttrDef::kAllowedValuesFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +OpDef_AttrDef::OpDef_AttrDef() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_op_5fdef_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.OpDef.AttrDef) +} +OpDef_AttrDef::OpDef_AttrDef(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_op_5fdef_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.OpDef.AttrDef) +} + +void OpDef_AttrDef::InitAsDefaultInstance() { + default_value_ = const_cast< ::tensorflow::AttrValue*>( + ::tensorflow::AttrValue::internal_default_instance()); + allowed_values_ = const_cast< ::tensorflow::AttrValue*>( + ::tensorflow::AttrValue::internal_default_instance()); +} + +OpDef_AttrDef::OpDef_AttrDef(const OpDef_AttrDef& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.OpDef.AttrDef) +} + +void OpDef_AttrDef::SharedCtor() { + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + default_value_ = NULL; + allowed_values_ = NULL; + ::memset(&minimum_, 0, reinterpret_cast(&has_minimum_) - + reinterpret_cast(&minimum_) + sizeof(has_minimum_)); + _cached_size_ = 0; +} + +OpDef_AttrDef::~OpDef_AttrDef() { + // @@protoc_insertion_point(destructor:tensorflow.OpDef.AttrDef) + SharedDtor(); +} + +void OpDef_AttrDef::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + + name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); + type_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); + description_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); + if (this != &OpDef_AttrDef_default_instance_.get()) { + delete default_value_; + delete allowed_values_; + } +} + +void OpDef_AttrDef::ArenaDtor(void* object) { + OpDef_AttrDef* _this = reinterpret_cast< OpDef_AttrDef* >(object); + (void)_this; +} +void OpDef_AttrDef::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void OpDef_AttrDef::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* OpDef_AttrDef::descriptor() { + protobuf_AssignDescriptorsOnce(); + return OpDef_AttrDef_descriptor_; +} + +const OpDef_AttrDef& OpDef_AttrDef::default_instance() { + protobuf_InitDefaults_op_5fdef_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed OpDef_AttrDef_default_instance_; + +OpDef_AttrDef* OpDef_AttrDef::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void OpDef_AttrDef::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.OpDef.AttrDef) +#if defined(__clang__) +#define ZR_HELPER_(f) \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \ + __builtin_offsetof(OpDef_AttrDef, f) \ + _Pragma("clang diagnostic pop") +#else +#define ZR_HELPER_(f) reinterpret_cast(\ + &reinterpret_cast(16)->f) +#endif + +#define ZR_(first, last) do {\ + ::memset(&(first), 0,\ + ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ +} while (0) + + ZR_(minimum_, has_minimum_); + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + type_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + if (GetArenaNoVirtual() == NULL && default_value_ != NULL) delete default_value_; + default_value_ = NULL; + description_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + if (GetArenaNoVirtual() == NULL && allowed_values_ != NULL) delete allowed_values_; + allowed_values_ = NULL; + +#undef ZR_HELPER_ +#undef ZR_ + +} + +bool OpDef_AttrDef::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.OpDef.AttrDef) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string name = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.OpDef.AttrDef.name")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_type; + break; + } + + // optional string type = 2; + case 2: { + if (tag == 18) { + parse_type: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_type())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type().data(), this->type().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.OpDef.AttrDef.type")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_default_value; + break; + } + + // optional .tensorflow.AttrValue default_value = 3; + case 3: { + if (tag == 26) { + parse_default_value: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_default_value())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_description; + break; + } + + // optional string description = 4; + case 4: { + if (tag == 34) { + parse_description: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_description())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->description().data(), this->description().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.OpDef.AttrDef.description")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(40)) goto parse_has_minimum; + break; + } + + // optional bool has_minimum = 5; + case 5: { + if (tag == 40) { + parse_has_minimum: + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &has_minimum_))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(48)) goto parse_minimum; + break; + } + + // optional int64 minimum = 6; + case 6: { + if (tag == 48) { + parse_minimum: + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &minimum_))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(58)) goto parse_allowed_values; + break; + } + + // optional .tensorflow.AttrValue allowed_values = 7; + case 7: { + if (tag == 58) { + parse_allowed_values: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_allowed_values())); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.OpDef.AttrDef) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.OpDef.AttrDef) + return false; +#undef DO_ +} + +void OpDef_AttrDef::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.OpDef.AttrDef) + // optional string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.AttrDef.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // optional string type = 2; + if (this->type().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type().data(), this->type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.AttrDef.type"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->type(), output); + } + + // optional .tensorflow.AttrValue default_value = 3; + if (this->has_default_value()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, *this->default_value_, output); + } + + // optional string description = 4; + if (this->description().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->description().data(), this->description().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.AttrDef.description"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->description(), output); + } + + // optional bool has_minimum = 5; + if (this->has_minimum() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->has_minimum(), output); + } + + // optional int64 minimum = 6; + if (this->minimum() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(6, this->minimum(), output); + } + + // optional .tensorflow.AttrValue allowed_values = 7; + if (this->has_allowed_values()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 7, *this->allowed_values_, output); + } + + // @@protoc_insertion_point(serialize_end:tensorflow.OpDef.AttrDef) +} + +::google::protobuf::uint8* OpDef_AttrDef::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.OpDef.AttrDef) + // optional string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.AttrDef.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // optional string type = 2; + if (this->type().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type().data(), this->type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.AttrDef.type"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->type(), target); + } + + // optional .tensorflow.AttrValue default_value = 3; + if (this->has_default_value()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 3, *this->default_value_, false, target); + } + + // optional string description = 4; + if (this->description().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->description().data(), this->description().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.AttrDef.description"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->description(), target); + } + + // optional bool has_minimum = 5; + if (this->has_minimum() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->has_minimum(), target); + } + + // optional int64 minimum = 6; + if (this->minimum() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(6, this->minimum(), target); + } + + // optional .tensorflow.AttrValue allowed_values = 7; + if (this->has_allowed_values()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 7, *this->allowed_values_, false, target); + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.OpDef.AttrDef) + return target; +} + +size_t OpDef_AttrDef::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.OpDef.AttrDef) + size_t total_size = 0; + + // optional string name = 1; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // optional string type = 2; + if (this->type().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->type()); + } + + // optional .tensorflow.AttrValue default_value = 3; + if (this->has_default_value()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->default_value_); + } + + // optional string description = 4; + if (this->description().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->description()); + } + + // optional bool has_minimum = 5; + if (this->has_minimum() != 0) { + total_size += 1 + 1; + } + + // optional int64 minimum = 6; + if (this->minimum() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->minimum()); + } + + // optional .tensorflow.AttrValue allowed_values = 7; + if (this->has_allowed_values()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->allowed_values_); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void OpDef_AttrDef::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.OpDef.AttrDef) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const OpDef_AttrDef* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.OpDef.AttrDef) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.OpDef.AttrDef) + UnsafeMergeFrom(*source); + } +} + +void OpDef_AttrDef::MergeFrom(const OpDef_AttrDef& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.OpDef.AttrDef) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void OpDef_AttrDef::UnsafeMergeFrom(const OpDef_AttrDef& from) { + GOOGLE_DCHECK(&from != this); + if (from.name().size() > 0) { + set_name(from.name()); + } + if (from.type().size() > 0) { + set_type(from.type()); + } + if (from.has_default_value()) { + mutable_default_value()->::tensorflow::AttrValue::MergeFrom(from.default_value()); + } + if (from.description().size() > 0) { + set_description(from.description()); + } + if (from.has_minimum() != 0) { + set_has_minimum(from.has_minimum()); + } + if (from.minimum() != 0) { + set_minimum(from.minimum()); + } + if (from.has_allowed_values()) { + mutable_allowed_values()->::tensorflow::AttrValue::MergeFrom(from.allowed_values()); + } +} + +void OpDef_AttrDef::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.OpDef.AttrDef) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void OpDef_AttrDef::CopyFrom(const OpDef_AttrDef& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.OpDef.AttrDef) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool OpDef_AttrDef::IsInitialized() const { + + return true; +} + +void OpDef_AttrDef::Swap(OpDef_AttrDef* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + OpDef_AttrDef temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void OpDef_AttrDef::UnsafeArenaSwap(OpDef_AttrDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void OpDef_AttrDef::InternalSwap(OpDef_AttrDef* other) { + name_.Swap(&other->name_); + type_.Swap(&other->type_); + std::swap(default_value_, other->default_value_); + description_.Swap(&other->description_); + std::swap(has_minimum_, other->has_minimum_); + std::swap(minimum_, other->minimum_); + std::swap(allowed_values_, other->allowed_values_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata OpDef_AttrDef::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = OpDef_AttrDef_descriptor_; + metadata.reflection = OpDef_AttrDef_reflection_; + return metadata; +} + + +// ------------------------------------------------------------------- + +void OpDef::_slow_mutable_deprecation() { + deprecation_ = ::google::protobuf::Arena::CreateMessage< ::tensorflow::OpDeprecation >( + GetArenaNoVirtual()); +} +::tensorflow::OpDeprecation* OpDef::_slow_release_deprecation() { + if (deprecation_ == NULL) { + return NULL; + } else { + ::tensorflow::OpDeprecation* temp = new ::tensorflow::OpDeprecation(*deprecation_); + deprecation_ = NULL; + return temp; + } +} +::tensorflow::OpDeprecation* OpDef::unsafe_arena_release_deprecation() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.deprecation) + + ::tensorflow::OpDeprecation* temp = deprecation_; + deprecation_ = NULL; + return temp; +} +void OpDef::_slow_set_allocated_deprecation( + ::google::protobuf::Arena* message_arena, ::tensorflow::OpDeprecation** deprecation) { + if (message_arena != NULL && + ::google::protobuf::Arena::GetArena(*deprecation) == NULL) { + message_arena->Own(*deprecation); + } else if (message_arena != + ::google::protobuf::Arena::GetArena(*deprecation)) { + ::tensorflow::OpDeprecation* new_deprecation = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::OpDeprecation >( + message_arena); + new_deprecation->CopyFrom(**deprecation); + *deprecation = new_deprecation; + } +} +void OpDef::unsafe_arena_set_allocated_deprecation( + ::tensorflow::OpDeprecation* deprecation) { + if (GetArenaNoVirtual() == NULL) { + delete deprecation_; + } + deprecation_ = deprecation; + if (deprecation) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.deprecation) +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int OpDef::kNameFieldNumber; +const int OpDef::kInputArgFieldNumber; +const int OpDef::kOutputArgFieldNumber; +const int OpDef::kAttrFieldNumber; +const int OpDef::kDeprecationFieldNumber; +const int OpDef::kSummaryFieldNumber; +const int OpDef::kDescriptionFieldNumber; +const int OpDef::kIsCommutativeFieldNumber; +const int OpDef::kIsAggregateFieldNumber; +const int OpDef::kIsStatefulFieldNumber; +const int OpDef::kAllowsUninitializedInputFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +OpDef::OpDef() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_op_5fdef_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.OpDef) +} +OpDef::OpDef(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena), + input_arg_(arena), + output_arg_(arena), + attr_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_op_5fdef_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.OpDef) +} + +void OpDef::InitAsDefaultInstance() { + deprecation_ = const_cast< ::tensorflow::OpDeprecation*>( + ::tensorflow::OpDeprecation::internal_default_instance()); +} + +OpDef::OpDef(const OpDef& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.OpDef) +} + +void OpDef::SharedCtor() { + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + summary_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + deprecation_ = NULL; + ::memset(&is_commutative_, 0, reinterpret_cast(&allows_uninitialized_input_) - + reinterpret_cast(&is_commutative_) + sizeof(allows_uninitialized_input_)); + _cached_size_ = 0; +} + +OpDef::~OpDef() { + // @@protoc_insertion_point(destructor:tensorflow.OpDef) + SharedDtor(); +} + +void OpDef::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + + name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); + summary_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); + description_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); + if (this != &OpDef_default_instance_.get()) { + delete deprecation_; + } +} + +void OpDef::ArenaDtor(void* object) { + OpDef* _this = reinterpret_cast< OpDef* >(object); + (void)_this; +} +void OpDef::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void OpDef::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* OpDef::descriptor() { + protobuf_AssignDescriptorsOnce(); + return OpDef_descriptor_; +} + +const OpDef& OpDef::default_instance() { + protobuf_InitDefaults_op_5fdef_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed OpDef_default_instance_; + +OpDef* OpDef::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void OpDef::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.OpDef) +#if defined(__clang__) +#define ZR_HELPER_(f) \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \ + __builtin_offsetof(OpDef, f) \ + _Pragma("clang diagnostic pop") +#else +#define ZR_HELPER_(f) reinterpret_cast(\ + &reinterpret_cast(16)->f) +#endif + +#define ZR_(first, last) do {\ + ::memset(&(first), 0,\ + ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ +} while (0) + + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + if (GetArenaNoVirtual() == NULL && deprecation_ != NULL) delete deprecation_; + deprecation_ = NULL; + summary_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + description_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + is_commutative_ = false; + ZR_(is_aggregate_, allows_uninitialized_input_); + +#undef ZR_HELPER_ +#undef ZR_ + + input_arg_.Clear(); + output_arg_.Clear(); + attr_.Clear(); +} + +bool OpDef::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.OpDef) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string name = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.OpDef.name")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_input_arg; + break; + } + + // repeated .tensorflow.OpDef.ArgDef input_arg = 2; + case 2: { + if (tag == 18) { + parse_input_arg: + DO_(input->IncrementRecursionDepth()); + parse_loop_input_arg: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( + input, add_input_arg())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_loop_input_arg; + if (input->ExpectTag(26)) goto parse_loop_output_arg; + input->UnsafeDecrementRecursionDepth(); + break; + } + + // repeated .tensorflow.OpDef.ArgDef output_arg = 3; + case 3: { + if (tag == 26) { + DO_(input->IncrementRecursionDepth()); + parse_loop_output_arg: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( + input, add_output_arg())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_loop_output_arg; + if (input->ExpectTag(34)) goto parse_loop_attr; + input->UnsafeDecrementRecursionDepth(); + break; + } + + // repeated .tensorflow.OpDef.AttrDef attr = 4; + case 4: { + if (tag == 34) { + DO_(input->IncrementRecursionDepth()); + parse_loop_attr: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( + input, add_attr())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_loop_attr; + input->UnsafeDecrementRecursionDepth(); + if (input->ExpectTag(42)) goto parse_summary; + break; + } + + // optional string summary = 5; + case 5: { + if (tag == 42) { + parse_summary: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_summary())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->summary().data(), this->summary().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.OpDef.summary")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(50)) goto parse_description; + break; + } + + // optional string description = 6; + case 6: { + if (tag == 50) { + parse_description: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_description())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->description().data(), this->description().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.OpDef.description")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(66)) goto parse_deprecation; + break; + } + + // optional .tensorflow.OpDeprecation deprecation = 8; + case 8: { + if (tag == 66) { + parse_deprecation: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_deprecation())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(128)) goto parse_is_aggregate; + break; + } + + // optional bool is_aggregate = 16; + case 16: { + if (tag == 128) { + parse_is_aggregate: + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &is_aggregate_))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(136)) goto parse_is_stateful; + break; + } + + // optional bool is_stateful = 17; + case 17: { + if (tag == 136) { + parse_is_stateful: + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &is_stateful_))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(144)) goto parse_is_commutative; + break; + } + + // optional bool is_commutative = 18; + case 18: { + if (tag == 144) { + parse_is_commutative: + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &is_commutative_))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(152)) goto parse_allows_uninitialized_input; + break; + } + + // optional bool allows_uninitialized_input = 19; + case 19: { + if (tag == 152) { + parse_allows_uninitialized_input: + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &allows_uninitialized_input_))); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.OpDef) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.OpDef) + return false; +#undef DO_ +} + +void OpDef::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.OpDef) + // optional string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // repeated .tensorflow.OpDef.ArgDef input_arg = 2; + for (unsigned int i = 0, n = this->input_arg_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->input_arg(i), output); + } + + // repeated .tensorflow.OpDef.ArgDef output_arg = 3; + for (unsigned int i = 0, n = this->output_arg_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, this->output_arg(i), output); + } + + // repeated .tensorflow.OpDef.AttrDef attr = 4; + for (unsigned int i = 0, n = this->attr_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, this->attr(i), output); + } + + // optional string summary = 5; + if (this->summary().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->summary().data(), this->summary().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.summary"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 5, this->summary(), output); + } + + // optional string description = 6; + if (this->description().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->description().data(), this->description().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.description"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 6, this->description(), output); + } + + // optional .tensorflow.OpDeprecation deprecation = 8; + if (this->has_deprecation()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 8, *this->deprecation_, output); + } + + // optional bool is_aggregate = 16; + if (this->is_aggregate() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteBool(16, this->is_aggregate(), output); + } + + // optional bool is_stateful = 17; + if (this->is_stateful() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteBool(17, this->is_stateful(), output); + } + + // optional bool is_commutative = 18; + if (this->is_commutative() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteBool(18, this->is_commutative(), output); + } + + // optional bool allows_uninitialized_input = 19; + if (this->allows_uninitialized_input() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteBool(19, this->allows_uninitialized_input(), output); + } + + // @@protoc_insertion_point(serialize_end:tensorflow.OpDef) +} + +::google::protobuf::uint8* OpDef::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.OpDef) + // optional string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // repeated .tensorflow.OpDef.ArgDef input_arg = 2; + for (unsigned int i = 0, n = this->input_arg_size(); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 2, this->input_arg(i), false, target); + } + + // repeated .tensorflow.OpDef.ArgDef output_arg = 3; + for (unsigned int i = 0, n = this->output_arg_size(); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 3, this->output_arg(i), false, target); + } + + // repeated .tensorflow.OpDef.AttrDef attr = 4; + for (unsigned int i = 0, n = this->attr_size(); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 4, this->attr(i), false, target); + } + + // optional string summary = 5; + if (this->summary().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->summary().data(), this->summary().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.summary"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 5, this->summary(), target); + } + + // optional string description = 6; + if (this->description().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->description().data(), this->description().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDef.description"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 6, this->description(), target); + } + + // optional .tensorflow.OpDeprecation deprecation = 8; + if (this->has_deprecation()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 8, *this->deprecation_, false, target); + } + + // optional bool is_aggregate = 16; + if (this->is_aggregate() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(16, this->is_aggregate(), target); + } + + // optional bool is_stateful = 17; + if (this->is_stateful() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(17, this->is_stateful(), target); + } + + // optional bool is_commutative = 18; + if (this->is_commutative() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(18, this->is_commutative(), target); + } + + // optional bool allows_uninitialized_input = 19; + if (this->allows_uninitialized_input() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(19, this->allows_uninitialized_input(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.OpDef) + return target; +} + +size_t OpDef::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.OpDef) + size_t total_size = 0; + + // optional string name = 1; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // optional .tensorflow.OpDeprecation deprecation = 8; + if (this->has_deprecation()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->deprecation_); + } + + // optional string summary = 5; + if (this->summary().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->summary()); + } + + // optional string description = 6; + if (this->description().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->description()); + } + + // optional bool is_commutative = 18; + if (this->is_commutative() != 0) { + total_size += 2 + 1; + } + + // optional bool is_aggregate = 16; + if (this->is_aggregate() != 0) { + total_size += 2 + 1; + } + + // optional bool is_stateful = 17; + if (this->is_stateful() != 0) { + total_size += 2 + 1; + } + + // optional bool allows_uninitialized_input = 19; + if (this->allows_uninitialized_input() != 0) { + total_size += 2 + 1; + } + + // repeated .tensorflow.OpDef.ArgDef input_arg = 2; + { + unsigned int count = this->input_arg_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->input_arg(i)); + } + } + + // repeated .tensorflow.OpDef.ArgDef output_arg = 3; + { + unsigned int count = this->output_arg_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->output_arg(i)); + } + } + + // repeated .tensorflow.OpDef.AttrDef attr = 4; + { + unsigned int count = this->attr_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->attr(i)); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void OpDef::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.OpDef) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const OpDef* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.OpDef) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.OpDef) + UnsafeMergeFrom(*source); + } +} + +void OpDef::MergeFrom(const OpDef& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.OpDef) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void OpDef::UnsafeMergeFrom(const OpDef& from) { + GOOGLE_DCHECK(&from != this); + input_arg_.MergeFrom(from.input_arg_); + output_arg_.MergeFrom(from.output_arg_); + attr_.MergeFrom(from.attr_); + if (from.name().size() > 0) { + set_name(from.name()); + } + if (from.has_deprecation()) { + mutable_deprecation()->::tensorflow::OpDeprecation::MergeFrom(from.deprecation()); + } + if (from.summary().size() > 0) { + set_summary(from.summary()); + } + if (from.description().size() > 0) { + set_description(from.description()); + } + if (from.is_commutative() != 0) { + set_is_commutative(from.is_commutative()); + } + if (from.is_aggregate() != 0) { + set_is_aggregate(from.is_aggregate()); + } + if (from.is_stateful() != 0) { + set_is_stateful(from.is_stateful()); + } + if (from.allows_uninitialized_input() != 0) { + set_allows_uninitialized_input(from.allows_uninitialized_input()); + } +} + +void OpDef::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.OpDef) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void OpDef::CopyFrom(const OpDef& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.OpDef) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool OpDef::IsInitialized() const { + + return true; +} + +void OpDef::Swap(OpDef* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + OpDef temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void OpDef::UnsafeArenaSwap(OpDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void OpDef::InternalSwap(OpDef* other) { + name_.Swap(&other->name_); + input_arg_.UnsafeArenaSwap(&other->input_arg_); + output_arg_.UnsafeArenaSwap(&other->output_arg_); + attr_.UnsafeArenaSwap(&other->attr_); + std::swap(deprecation_, other->deprecation_); + summary_.Swap(&other->summary_); + description_.Swap(&other->description_); + std::swap(is_commutative_, other->is_commutative_); + std::swap(is_aggregate_, other->is_aggregate_); + std::swap(is_stateful_, other->is_stateful_); + std::swap(allows_uninitialized_input_, other->allows_uninitialized_input_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata OpDef::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = OpDef_descriptor_; + metadata.reflection = OpDef_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// OpDef_ArgDef + +// optional string name = 1; +void OpDef_ArgDef::clear_name() { + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& OpDef_ArgDef::name() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.name) + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void OpDef_ArgDef::set_name(const ::std::string& value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.name) +} +void OpDef_ArgDef::set_name(const char* value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.ArgDef.name) +} +void OpDef_ArgDef::set_name(const char* value, + size_t size) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.ArgDef.name) +} +::std::string* OpDef_ArgDef::mutable_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.ArgDef.name) + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef_ArgDef::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.ArgDef.name) + + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef_ArgDef::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.ArgDef.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void OpDef_ArgDef::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.ArgDef.name) +} +void OpDef_ArgDef::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.ArgDef.name) +} + +// optional string description = 2; +void OpDef_ArgDef::clear_description() { + description_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& OpDef_ArgDef::description() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.description) + return description_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void OpDef_ArgDef::set_description(const ::std::string& value) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.description) +} +void OpDef_ArgDef::set_description(const char* value) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.ArgDef.description) +} +void OpDef_ArgDef::set_description(const char* value, + size_t size) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.ArgDef.description) +} +::std::string* OpDef_ArgDef::mutable_description() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.ArgDef.description) + return description_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef_ArgDef::release_description() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.ArgDef.description) + + return description_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef_ArgDef::unsafe_arena_release_description() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.ArgDef.description) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return description_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void OpDef_ArgDef::set_allocated_description(::std::string* description) { + if (description != NULL) { + + } else { + + } + description_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), description, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.ArgDef.description) +} +void OpDef_ArgDef::unsafe_arena_set_allocated_description( + ::std::string* description) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (description != NULL) { + + } else { + + } + description_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + description, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.ArgDef.description) +} + +// optional .tensorflow.DataType type = 3; +void OpDef_ArgDef::clear_type() { + type_ = 0; +} +::tensorflow::DataType OpDef_ArgDef::type() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.type) + return static_cast< ::tensorflow::DataType >(type_); +} +void OpDef_ArgDef::set_type(::tensorflow::DataType value) { + + type_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.type) +} + +// optional string type_attr = 4; +void OpDef_ArgDef::clear_type_attr() { + type_attr_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& OpDef_ArgDef::type_attr() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.type_attr) + return type_attr_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void OpDef_ArgDef::set_type_attr(const ::std::string& value) { + + type_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.type_attr) +} +void OpDef_ArgDef::set_type_attr(const char* value) { + + type_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.ArgDef.type_attr) +} +void OpDef_ArgDef::set_type_attr(const char* value, + size_t size) { + + type_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.ArgDef.type_attr) +} +::std::string* OpDef_ArgDef::mutable_type_attr() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.ArgDef.type_attr) + return type_attr_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef_ArgDef::release_type_attr() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.ArgDef.type_attr) + + return type_attr_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef_ArgDef::unsafe_arena_release_type_attr() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.ArgDef.type_attr) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return type_attr_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void OpDef_ArgDef::set_allocated_type_attr(::std::string* type_attr) { + if (type_attr != NULL) { + + } else { + + } + type_attr_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_attr, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.ArgDef.type_attr) +} +void OpDef_ArgDef::unsafe_arena_set_allocated_type_attr( + ::std::string* type_attr) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (type_attr != NULL) { + + } else { + + } + type_attr_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + type_attr, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.ArgDef.type_attr) +} + +// optional string number_attr = 5; +void OpDef_ArgDef::clear_number_attr() { + number_attr_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& OpDef_ArgDef::number_attr() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.number_attr) + return number_attr_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void OpDef_ArgDef::set_number_attr(const ::std::string& value) { + + number_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.number_attr) +} +void OpDef_ArgDef::set_number_attr(const char* value) { + + number_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.ArgDef.number_attr) +} +void OpDef_ArgDef::set_number_attr(const char* value, + size_t size) { + + number_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.ArgDef.number_attr) +} +::std::string* OpDef_ArgDef::mutable_number_attr() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.ArgDef.number_attr) + return number_attr_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef_ArgDef::release_number_attr() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.ArgDef.number_attr) + + return number_attr_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef_ArgDef::unsafe_arena_release_number_attr() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.ArgDef.number_attr) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return number_attr_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void OpDef_ArgDef::set_allocated_number_attr(::std::string* number_attr) { + if (number_attr != NULL) { + + } else { + + } + number_attr_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), number_attr, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.ArgDef.number_attr) +} +void OpDef_ArgDef::unsafe_arena_set_allocated_number_attr( + ::std::string* number_attr) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (number_attr != NULL) { + + } else { + + } + number_attr_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + number_attr, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.ArgDef.number_attr) +} + +// optional string type_list_attr = 6; +void OpDef_ArgDef::clear_type_list_attr() { + type_list_attr_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& OpDef_ArgDef::type_list_attr() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.type_list_attr) + return type_list_attr_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void OpDef_ArgDef::set_type_list_attr(const ::std::string& value) { + + type_list_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.type_list_attr) +} +void OpDef_ArgDef::set_type_list_attr(const char* value) { + + type_list_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.ArgDef.type_list_attr) +} +void OpDef_ArgDef::set_type_list_attr(const char* value, + size_t size) { + + type_list_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.ArgDef.type_list_attr) +} +::std::string* OpDef_ArgDef::mutable_type_list_attr() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.ArgDef.type_list_attr) + return type_list_attr_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef_ArgDef::release_type_list_attr() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.ArgDef.type_list_attr) + + return type_list_attr_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef_ArgDef::unsafe_arena_release_type_list_attr() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.ArgDef.type_list_attr) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return type_list_attr_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void OpDef_ArgDef::set_allocated_type_list_attr(::std::string* type_list_attr) { + if (type_list_attr != NULL) { + + } else { + + } + type_list_attr_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_list_attr, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.ArgDef.type_list_attr) +} +void OpDef_ArgDef::unsafe_arena_set_allocated_type_list_attr( + ::std::string* type_list_attr) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (type_list_attr != NULL) { + + } else { + + } + type_list_attr_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + type_list_attr, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.ArgDef.type_list_attr) +} + +// optional bool is_ref = 16; +void OpDef_ArgDef::clear_is_ref() { + is_ref_ = false; +} +bool OpDef_ArgDef::is_ref() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.is_ref) + return is_ref_; +} +void OpDef_ArgDef::set_is_ref(bool value) { + + is_ref_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.is_ref) +} + +inline const OpDef_ArgDef* OpDef_ArgDef::internal_default_instance() { + return &OpDef_ArgDef_default_instance_.get(); +} +// ------------------------------------------------------------------- + +// OpDef_AttrDef + +// optional string name = 1; +void OpDef_AttrDef::clear_name() { + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& OpDef_AttrDef::name() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.name) + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void OpDef_AttrDef::set_name(const ::std::string& value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.AttrDef.name) +} +void OpDef_AttrDef::set_name(const char* value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.AttrDef.name) +} +void OpDef_AttrDef::set_name(const char* value, + size_t size) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.AttrDef.name) +} +::std::string* OpDef_AttrDef::mutable_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.AttrDef.name) + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef_AttrDef::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.AttrDef.name) + + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef_AttrDef::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.AttrDef.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void OpDef_AttrDef::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.AttrDef.name) +} +void OpDef_AttrDef::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.AttrDef.name) +} + +// optional string type = 2; +void OpDef_AttrDef::clear_type() { + type_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& OpDef_AttrDef::type() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.type) + return type_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void OpDef_AttrDef::set_type(const ::std::string& value) { + + type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.AttrDef.type) +} +void OpDef_AttrDef::set_type(const char* value) { + + type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.AttrDef.type) +} +void OpDef_AttrDef::set_type(const char* value, + size_t size) { + + type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.AttrDef.type) +} +::std::string* OpDef_AttrDef::mutable_type() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.AttrDef.type) + return type_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef_AttrDef::release_type() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.AttrDef.type) + + return type_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef_AttrDef::unsafe_arena_release_type() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.AttrDef.type) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return type_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void OpDef_AttrDef::set_allocated_type(::std::string* type) { + if (type != NULL) { + + } else { + + } + type_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.AttrDef.type) +} +void OpDef_AttrDef::unsafe_arena_set_allocated_type( + ::std::string* type) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (type != NULL) { + + } else { + + } + type_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + type, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.AttrDef.type) +} + +// optional .tensorflow.AttrValue default_value = 3; +bool OpDef_AttrDef::has_default_value() const { + return this != internal_default_instance() && default_value_ != NULL; +} +void OpDef_AttrDef::clear_default_value() { + if (GetArenaNoVirtual() == NULL && default_value_ != NULL) delete default_value_; + default_value_ = NULL; +} +const ::tensorflow::AttrValue& OpDef_AttrDef::default_value() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.default_value) + return default_value_ != NULL ? *default_value_ + : *::tensorflow::AttrValue::internal_default_instance(); +} +::tensorflow::AttrValue* OpDef_AttrDef::mutable_default_value() { + + if (default_value_ == NULL) { + _slow_mutable_default_value(); + } + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.AttrDef.default_value) + return default_value_; +} +::tensorflow::AttrValue* OpDef_AttrDef::release_default_value() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.AttrDef.default_value) + + if (GetArenaNoVirtual() != NULL) { + return _slow_release_default_value(); + } else { + ::tensorflow::AttrValue* temp = default_value_; + default_value_ = NULL; + return temp; + } +} + void OpDef_AttrDef::set_allocated_default_value(::tensorflow::AttrValue* default_value) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete default_value_; + } + if (default_value != NULL) { + _slow_set_allocated_default_value(message_arena, &default_value); + } + default_value_ = default_value; + if (default_value) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.AttrDef.default_value) +} + +// optional string description = 4; +void OpDef_AttrDef::clear_description() { + description_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& OpDef_AttrDef::description() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.description) + return description_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void OpDef_AttrDef::set_description(const ::std::string& value) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.AttrDef.description) +} +void OpDef_AttrDef::set_description(const char* value) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.AttrDef.description) +} +void OpDef_AttrDef::set_description(const char* value, + size_t size) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.AttrDef.description) +} +::std::string* OpDef_AttrDef::mutable_description() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.AttrDef.description) + return description_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef_AttrDef::release_description() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.AttrDef.description) + + return description_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef_AttrDef::unsafe_arena_release_description() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.AttrDef.description) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return description_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void OpDef_AttrDef::set_allocated_description(::std::string* description) { + if (description != NULL) { + + } else { + + } + description_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), description, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.AttrDef.description) +} +void OpDef_AttrDef::unsafe_arena_set_allocated_description( + ::std::string* description) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (description != NULL) { + + } else { + + } + description_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + description, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.AttrDef.description) +} + +// optional bool has_minimum = 5; +void OpDef_AttrDef::clear_has_minimum() { + has_minimum_ = false; +} +bool OpDef_AttrDef::has_minimum() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.has_minimum) + return has_minimum_; +} +void OpDef_AttrDef::set_has_minimum(bool value) { + + has_minimum_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDef.AttrDef.has_minimum) +} + +// optional int64 minimum = 6; +void OpDef_AttrDef::clear_minimum() { + minimum_ = GOOGLE_LONGLONG(0); +} +::google::protobuf::int64 OpDef_AttrDef::minimum() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.minimum) + return minimum_; +} +void OpDef_AttrDef::set_minimum(::google::protobuf::int64 value) { + + minimum_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDef.AttrDef.minimum) +} + +// optional .tensorflow.AttrValue allowed_values = 7; +bool OpDef_AttrDef::has_allowed_values() const { + return this != internal_default_instance() && allowed_values_ != NULL; +} +void OpDef_AttrDef::clear_allowed_values() { + if (GetArenaNoVirtual() == NULL && allowed_values_ != NULL) delete allowed_values_; + allowed_values_ = NULL; +} +const ::tensorflow::AttrValue& OpDef_AttrDef::allowed_values() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.allowed_values) + return allowed_values_ != NULL ? *allowed_values_ + : *::tensorflow::AttrValue::internal_default_instance(); +} +::tensorflow::AttrValue* OpDef_AttrDef::mutable_allowed_values() { + + if (allowed_values_ == NULL) { + _slow_mutable_allowed_values(); + } + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.AttrDef.allowed_values) + return allowed_values_; +} +::tensorflow::AttrValue* OpDef_AttrDef::release_allowed_values() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.AttrDef.allowed_values) + + if (GetArenaNoVirtual() != NULL) { + return _slow_release_allowed_values(); + } else { + ::tensorflow::AttrValue* temp = allowed_values_; + allowed_values_ = NULL; + return temp; + } +} + void OpDef_AttrDef::set_allocated_allowed_values(::tensorflow::AttrValue* allowed_values) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete allowed_values_; + } + if (allowed_values != NULL) { + _slow_set_allocated_allowed_values(message_arena, &allowed_values); + } + allowed_values_ = allowed_values; + if (allowed_values) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.AttrDef.allowed_values) +} + +inline const OpDef_AttrDef* OpDef_AttrDef::internal_default_instance() { + return &OpDef_AttrDef_default_instance_.get(); +} +// ------------------------------------------------------------------- + +// OpDef + +// optional string name = 1; +void OpDef::clear_name() { + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& OpDef::name() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.name) + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void OpDef::set_name(const ::std::string& value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.name) +} +void OpDef::set_name(const char* value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.name) +} +void OpDef::set_name(const char* value, + size_t size) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.name) +} +::std::string* OpDef::mutable_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.name) + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.name) + + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void OpDef::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.name) +} +void OpDef::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.name) +} + +// repeated .tensorflow.OpDef.ArgDef input_arg = 2; +int OpDef::input_arg_size() const { + return input_arg_.size(); +} +void OpDef::clear_input_arg() { + input_arg_.Clear(); +} +const ::tensorflow::OpDef_ArgDef& OpDef::input_arg(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.input_arg) + return input_arg_.Get(index); +} +::tensorflow::OpDef_ArgDef* OpDef::mutable_input_arg(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.input_arg) + return input_arg_.Mutable(index); +} +::tensorflow::OpDef_ArgDef* OpDef::add_input_arg() { + // @@protoc_insertion_point(field_add:tensorflow.OpDef.input_arg) + return input_arg_.Add(); +} +::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >* +OpDef::mutable_input_arg() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.OpDef.input_arg) + return &input_arg_; +} +const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >& +OpDef::input_arg() const { + // @@protoc_insertion_point(field_list:tensorflow.OpDef.input_arg) + return input_arg_; +} + +// repeated .tensorflow.OpDef.ArgDef output_arg = 3; +int OpDef::output_arg_size() const { + return output_arg_.size(); +} +void OpDef::clear_output_arg() { + output_arg_.Clear(); +} +const ::tensorflow::OpDef_ArgDef& OpDef::output_arg(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.output_arg) + return output_arg_.Get(index); +} +::tensorflow::OpDef_ArgDef* OpDef::mutable_output_arg(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.output_arg) + return output_arg_.Mutable(index); +} +::tensorflow::OpDef_ArgDef* OpDef::add_output_arg() { + // @@protoc_insertion_point(field_add:tensorflow.OpDef.output_arg) + return output_arg_.Add(); +} +::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >* +OpDef::mutable_output_arg() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.OpDef.output_arg) + return &output_arg_; +} +const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >& +OpDef::output_arg() const { + // @@protoc_insertion_point(field_list:tensorflow.OpDef.output_arg) + return output_arg_; +} + +// repeated .tensorflow.OpDef.AttrDef attr = 4; +int OpDef::attr_size() const { + return attr_.size(); +} +void OpDef::clear_attr() { + attr_.Clear(); +} +const ::tensorflow::OpDef_AttrDef& OpDef::attr(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.attr) + return attr_.Get(index); +} +::tensorflow::OpDef_AttrDef* OpDef::mutable_attr(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.attr) + return attr_.Mutable(index); +} +::tensorflow::OpDef_AttrDef* OpDef::add_attr() { + // @@protoc_insertion_point(field_add:tensorflow.OpDef.attr) + return attr_.Add(); +} +::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_AttrDef >* +OpDef::mutable_attr() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.OpDef.attr) + return &attr_; +} +const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_AttrDef >& +OpDef::attr() const { + // @@protoc_insertion_point(field_list:tensorflow.OpDef.attr) + return attr_; +} + +// optional .tensorflow.OpDeprecation deprecation = 8; +bool OpDef::has_deprecation() const { + return this != internal_default_instance() && deprecation_ != NULL; +} +void OpDef::clear_deprecation() { + if (GetArenaNoVirtual() == NULL && deprecation_ != NULL) delete deprecation_; + deprecation_ = NULL; +} +const ::tensorflow::OpDeprecation& OpDef::deprecation() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.deprecation) + return deprecation_ != NULL ? *deprecation_ + : *::tensorflow::OpDeprecation::internal_default_instance(); +} +::tensorflow::OpDeprecation* OpDef::mutable_deprecation() { + + if (deprecation_ == NULL) { + _slow_mutable_deprecation(); + } + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.deprecation) + return deprecation_; +} +::tensorflow::OpDeprecation* OpDef::release_deprecation() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.deprecation) + + if (GetArenaNoVirtual() != NULL) { + return _slow_release_deprecation(); + } else { + ::tensorflow::OpDeprecation* temp = deprecation_; + deprecation_ = NULL; + return temp; + } +} + void OpDef::set_allocated_deprecation(::tensorflow::OpDeprecation* deprecation) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete deprecation_; + } + if (deprecation != NULL) { + _slow_set_allocated_deprecation(message_arena, &deprecation); + } + deprecation_ = deprecation; + if (deprecation) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.deprecation) +} + +// optional string summary = 5; +void OpDef::clear_summary() { + summary_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& OpDef::summary() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.summary) + return summary_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void OpDef::set_summary(const ::std::string& value) { + + summary_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.summary) +} +void OpDef::set_summary(const char* value) { + + summary_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.summary) +} +void OpDef::set_summary(const char* value, + size_t size) { + + summary_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.summary) +} +::std::string* OpDef::mutable_summary() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.summary) + return summary_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef::release_summary() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.summary) + + return summary_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef::unsafe_arena_release_summary() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.summary) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return summary_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void OpDef::set_allocated_summary(::std::string* summary) { + if (summary != NULL) { + + } else { + + } + summary_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), summary, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.summary) +} +void OpDef::unsafe_arena_set_allocated_summary( + ::std::string* summary) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (summary != NULL) { + + } else { + + } + summary_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + summary, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.summary) +} + +// optional string description = 6; +void OpDef::clear_description() { + description_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& OpDef::description() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.description) + return description_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void OpDef::set_description(const ::std::string& value) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.description) +} +void OpDef::set_description(const char* value) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.description) +} +void OpDef::set_description(const char* value, + size_t size) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.description) +} +::std::string* OpDef::mutable_description() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.description) + return description_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef::release_description() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.description) + + return description_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDef::unsafe_arena_release_description() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.description) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return description_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void OpDef::set_allocated_description(::std::string* description) { + if (description != NULL) { + + } else { + + } + description_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), description, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.description) +} +void OpDef::unsafe_arena_set_allocated_description( + ::std::string* description) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (description != NULL) { + + } else { + + } + description_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + description, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.description) +} + +// optional bool is_commutative = 18; +void OpDef::clear_is_commutative() { + is_commutative_ = false; +} +bool OpDef::is_commutative() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.is_commutative) + return is_commutative_; +} +void OpDef::set_is_commutative(bool value) { + + is_commutative_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDef.is_commutative) +} + +// optional bool is_aggregate = 16; +void OpDef::clear_is_aggregate() { + is_aggregate_ = false; +} +bool OpDef::is_aggregate() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.is_aggregate) + return is_aggregate_; +} +void OpDef::set_is_aggregate(bool value) { + + is_aggregate_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDef.is_aggregate) +} + +// optional bool is_stateful = 17; +void OpDef::clear_is_stateful() { + is_stateful_ = false; +} +bool OpDef::is_stateful() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.is_stateful) + return is_stateful_; +} +void OpDef::set_is_stateful(bool value) { + + is_stateful_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDef.is_stateful) +} + +// optional bool allows_uninitialized_input = 19; +void OpDef::clear_allows_uninitialized_input() { + allows_uninitialized_input_ = false; +} +bool OpDef::allows_uninitialized_input() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.allows_uninitialized_input) + return allows_uninitialized_input_; +} +void OpDef::set_allows_uninitialized_input(bool value) { + + allows_uninitialized_input_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDef.allows_uninitialized_input) +} + +inline const OpDef* OpDef::internal_default_instance() { + return &OpDef_default_instance_.get(); +} +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int OpDeprecation::kVersionFieldNumber; +const int OpDeprecation::kExplanationFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +OpDeprecation::OpDeprecation() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_op_5fdef_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.OpDeprecation) +} +OpDeprecation::OpDeprecation(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_op_5fdef_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.OpDeprecation) +} + +void OpDeprecation::InitAsDefaultInstance() { +} + +OpDeprecation::OpDeprecation(const OpDeprecation& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.OpDeprecation) +} + +void OpDeprecation::SharedCtor() { + explanation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + version_ = 0; + _cached_size_ = 0; +} + +OpDeprecation::~OpDeprecation() { + // @@protoc_insertion_point(destructor:tensorflow.OpDeprecation) + SharedDtor(); +} + +void OpDeprecation::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + + explanation_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); +} + +void OpDeprecation::ArenaDtor(void* object) { + OpDeprecation* _this = reinterpret_cast< OpDeprecation* >(object); + (void)_this; +} +void OpDeprecation::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void OpDeprecation::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* OpDeprecation::descriptor() { + protobuf_AssignDescriptorsOnce(); + return OpDeprecation_descriptor_; +} + +const OpDeprecation& OpDeprecation::default_instance() { + protobuf_InitDefaults_op_5fdef_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed OpDeprecation_default_instance_; + +OpDeprecation* OpDeprecation::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void OpDeprecation::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.OpDeprecation) + version_ = 0; + explanation_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} + +bool OpDeprecation::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.OpDeprecation) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional int32 version = 1; + case 1: { + if (tag == 8) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &version_))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_explanation; + break; + } + + // optional string explanation = 2; + case 2: { + if (tag == 18) { + parse_explanation: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_explanation())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->explanation().data(), this->explanation().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.OpDeprecation.explanation")); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.OpDeprecation) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.OpDeprecation) + return false; +#undef DO_ +} + +void OpDeprecation::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.OpDeprecation) + // optional int32 version = 1; + if (this->version() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->version(), output); + } + + // optional string explanation = 2; + if (this->explanation().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->explanation().data(), this->explanation().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDeprecation.explanation"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->explanation(), output); + } + + // @@protoc_insertion_point(serialize_end:tensorflow.OpDeprecation) +} + +::google::protobuf::uint8* OpDeprecation::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.OpDeprecation) + // optional int32 version = 1; + if (this->version() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->version(), target); + } + + // optional string explanation = 2; + if (this->explanation().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->explanation().data(), this->explanation().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.OpDeprecation.explanation"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->explanation(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.OpDeprecation) + return target; +} + +size_t OpDeprecation::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.OpDeprecation) + size_t total_size = 0; + + // optional int32 version = 1; + if (this->version() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->version()); + } + + // optional string explanation = 2; + if (this->explanation().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->explanation()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void OpDeprecation::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.OpDeprecation) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const OpDeprecation* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.OpDeprecation) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.OpDeprecation) + UnsafeMergeFrom(*source); + } +} + +void OpDeprecation::MergeFrom(const OpDeprecation& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.OpDeprecation) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void OpDeprecation::UnsafeMergeFrom(const OpDeprecation& from) { + GOOGLE_DCHECK(&from != this); + if (from.version() != 0) { + set_version(from.version()); + } + if (from.explanation().size() > 0) { + set_explanation(from.explanation()); + } +} + +void OpDeprecation::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.OpDeprecation) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void OpDeprecation::CopyFrom(const OpDeprecation& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.OpDeprecation) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool OpDeprecation::IsInitialized() const { + + return true; +} + +void OpDeprecation::Swap(OpDeprecation* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + OpDeprecation temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void OpDeprecation::UnsafeArenaSwap(OpDeprecation* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void OpDeprecation::InternalSwap(OpDeprecation* other) { + std::swap(version_, other->version_); + explanation_.Swap(&other->explanation_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata OpDeprecation::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = OpDeprecation_descriptor_; + metadata.reflection = OpDeprecation_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// OpDeprecation + +// optional int32 version = 1; +void OpDeprecation::clear_version() { + version_ = 0; +} +::google::protobuf::int32 OpDeprecation::version() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDeprecation.version) + return version_; +} +void OpDeprecation::set_version(::google::protobuf::int32 value) { + + version_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDeprecation.version) +} + +// optional string explanation = 2; +void OpDeprecation::clear_explanation() { + explanation_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& OpDeprecation::explanation() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDeprecation.explanation) + return explanation_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void OpDeprecation::set_explanation(const ::std::string& value) { + + explanation_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDeprecation.explanation) +} +void OpDeprecation::set_explanation(const char* value) { + + explanation_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDeprecation.explanation) +} +void OpDeprecation::set_explanation(const char* value, + size_t size) { + + explanation_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDeprecation.explanation) +} +::std::string* OpDeprecation::mutable_explanation() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDeprecation.explanation) + return explanation_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDeprecation::release_explanation() { + // @@protoc_insertion_point(field_release:tensorflow.OpDeprecation.explanation) + + return explanation_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* OpDeprecation::unsafe_arena_release_explanation() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDeprecation.explanation) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return explanation_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void OpDeprecation::set_allocated_explanation(::std::string* explanation) { + if (explanation != NULL) { + + } else { + + } + explanation_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), explanation, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDeprecation.explanation) +} +void OpDeprecation::unsafe_arena_set_allocated_explanation( + ::std::string* explanation) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (explanation != NULL) { + + } else { + + } + explanation_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + explanation, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDeprecation.explanation) +} + +inline const OpDeprecation* OpDeprecation::internal_default_instance() { + return &OpDeprecation_default_instance_.get(); +} +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int OpList::kOpFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +OpList::OpList() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_op_5fdef_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.OpList) +} +OpList::OpList(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena), + op_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_op_5fdef_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.OpList) +} + +void OpList::InitAsDefaultInstance() { +} + +OpList::OpList(const OpList& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.OpList) +} + +void OpList::SharedCtor() { + _cached_size_ = 0; +} + +OpList::~OpList() { + // @@protoc_insertion_point(destructor:tensorflow.OpList) + SharedDtor(); +} + +void OpList::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + +} + +void OpList::ArenaDtor(void* object) { + OpList* _this = reinterpret_cast< OpList* >(object); + (void)_this; +} +void OpList::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void OpList::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* OpList::descriptor() { + protobuf_AssignDescriptorsOnce(); + return OpList_descriptor_; +} + +const OpList& OpList::default_instance() { + protobuf_InitDefaults_op_5fdef_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed OpList_default_instance_; + +OpList* OpList::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void OpList::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.OpList) + op_.Clear(); +} + +bool OpList::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.OpList) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated .tensorflow.OpDef op = 1; + case 1: { + if (tag == 10) { + DO_(input->IncrementRecursionDepth()); + parse_loop_op: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( + input, add_op())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(10)) goto parse_loop_op; + input->UnsafeDecrementRecursionDepth(); + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.OpList) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.OpList) + return false; +#undef DO_ +} + +void OpList::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.OpList) + // repeated .tensorflow.OpDef op = 1; + for (unsigned int i = 0, n = this->op_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->op(i), output); + } + + // @@protoc_insertion_point(serialize_end:tensorflow.OpList) +} + +::google::protobuf::uint8* OpList::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.OpList) + // repeated .tensorflow.OpDef op = 1; + for (unsigned int i = 0, n = this->op_size(); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 1, this->op(i), false, target); + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.OpList) + return target; +} + +size_t OpList::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.OpList) + size_t total_size = 0; + + // repeated .tensorflow.OpDef op = 1; + { + unsigned int count = this->op_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->op(i)); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void OpList::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.OpList) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const OpList* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.OpList) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.OpList) + UnsafeMergeFrom(*source); + } +} + +void OpList::MergeFrom(const OpList& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.OpList) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void OpList::UnsafeMergeFrom(const OpList& from) { + GOOGLE_DCHECK(&from != this); + op_.MergeFrom(from.op_); +} + +void OpList::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.OpList) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void OpList::CopyFrom(const OpList& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.OpList) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool OpList::IsInitialized() const { + + return true; +} + +void OpList::Swap(OpList* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + OpList temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void OpList::UnsafeArenaSwap(OpList* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void OpList::InternalSwap(OpList* other) { + op_.UnsafeArenaSwap(&other->op_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata OpList::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = OpList_descriptor_; + metadata.reflection = OpList_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// OpList + +// repeated .tensorflow.OpDef op = 1; +int OpList::op_size() const { + return op_.size(); +} +void OpList::clear_op() { + op_.Clear(); +} +const ::tensorflow::OpDef& OpList::op(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.OpList.op) + return op_.Get(index); +} +::tensorflow::OpDef* OpList::mutable_op(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.OpList.op) + return op_.Mutable(index); +} +::tensorflow::OpDef* OpList::add_op() { + // @@protoc_insertion_point(field_add:tensorflow.OpList.op) + return op_.Add(); +} +::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef >* +OpList::mutable_op() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.OpList.op) + return &op_; +} +const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef >& +OpList::op() const { + // @@protoc_insertion_point(field_list:tensorflow.OpList.op) + return op_; +} + +inline const OpList* OpList::internal_default_instance() { + return &OpList_default_instance_.get(); +} +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/op_def.pb.h b/modules/dnn/misc/tensorflow/op_def.pb.h new file mode 100644 index 000000000..71956e4d2 --- /dev/null +++ b/modules/dnn/misc/tensorflow/op_def.pb.h @@ -0,0 +1,2103 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: op_def.proto + +#ifndef PROTOBUF_op_5fdef_2eproto__INCLUDED +#define PROTOBUF_op_5fdef_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 3001000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include "attr_value.pb.h" +#include "types.pb.h" +// @@protoc_insertion_point(includes) + +namespace tensorflow { + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_op_5fdef_2eproto(); +void protobuf_InitDefaults_op_5fdef_2eproto(); +void protobuf_AssignDesc_op_5fdef_2eproto(); +void protobuf_ShutdownFile_op_5fdef_2eproto(); + +class OpDef; +class OpDef_ArgDef; +class OpDef_AttrDef; +class OpDeprecation; +class OpList; + +// =================================================================== + +class OpDef_ArgDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.OpDef.ArgDef) */ { + public: + OpDef_ArgDef(); + virtual ~OpDef_ArgDef(); + + OpDef_ArgDef(const OpDef_ArgDef& from); + + inline OpDef_ArgDef& operator=(const OpDef_ArgDef& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const OpDef_ArgDef& default_instance(); + + static const OpDef_ArgDef* internal_default_instance(); + + void UnsafeArenaSwap(OpDef_ArgDef* other); + void Swap(OpDef_ArgDef* other); + + // implements Message ---------------------------------------------- + + inline OpDef_ArgDef* New() const { return New(NULL); } + + OpDef_ArgDef* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const OpDef_ArgDef& from); + void MergeFrom(const OpDef_ArgDef& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(OpDef_ArgDef* other); + void UnsafeMergeFrom(const OpDef_ArgDef& from); + protected: + explicit OpDef_ArgDef(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string name = 1; + void clear_name(); + static const int kNameFieldNumber = 1; + const ::std::string& name() const; + void set_name(const ::std::string& value); + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + ::std::string* unsafe_arena_release_name(); + void unsafe_arena_set_allocated_name( + ::std::string* name); + + // optional string description = 2; + void clear_description(); + static const int kDescriptionFieldNumber = 2; + const ::std::string& description() const; + void set_description(const ::std::string& value); + void set_description(const char* value); + void set_description(const char* value, size_t size); + ::std::string* mutable_description(); + ::std::string* release_description(); + void set_allocated_description(::std::string* description); + ::std::string* unsafe_arena_release_description(); + void unsafe_arena_set_allocated_description( + ::std::string* description); + + // optional .tensorflow.DataType type = 3; + void clear_type(); + static const int kTypeFieldNumber = 3; + ::tensorflow::DataType type() const; + void set_type(::tensorflow::DataType value); + + // optional string type_attr = 4; + void clear_type_attr(); + static const int kTypeAttrFieldNumber = 4; + const ::std::string& type_attr() const; + void set_type_attr(const ::std::string& value); + void set_type_attr(const char* value); + void set_type_attr(const char* value, size_t size); + ::std::string* mutable_type_attr(); + ::std::string* release_type_attr(); + void set_allocated_type_attr(::std::string* type_attr); + ::std::string* unsafe_arena_release_type_attr(); + void unsafe_arena_set_allocated_type_attr( + ::std::string* type_attr); + + // optional string number_attr = 5; + void clear_number_attr(); + static const int kNumberAttrFieldNumber = 5; + const ::std::string& number_attr() const; + void set_number_attr(const ::std::string& value); + void set_number_attr(const char* value); + void set_number_attr(const char* value, size_t size); + ::std::string* mutable_number_attr(); + ::std::string* release_number_attr(); + void set_allocated_number_attr(::std::string* number_attr); + ::std::string* unsafe_arena_release_number_attr(); + void unsafe_arena_set_allocated_number_attr( + ::std::string* number_attr); + + // optional string type_list_attr = 6; + void clear_type_list_attr(); + static const int kTypeListAttrFieldNumber = 6; + const ::std::string& type_list_attr() const; + void set_type_list_attr(const ::std::string& value); + void set_type_list_attr(const char* value); + void set_type_list_attr(const char* value, size_t size); + ::std::string* mutable_type_list_attr(); + ::std::string* release_type_list_attr(); + void set_allocated_type_list_attr(::std::string* type_list_attr); + ::std::string* unsafe_arena_release_type_list_attr(); + void unsafe_arena_set_allocated_type_list_attr( + ::std::string* type_list_attr); + + // optional bool is_ref = 16; + void clear_is_ref(); + static const int kIsRefFieldNumber = 16; + bool is_ref() const; + void set_is_ref(bool value); + + // @@protoc_insertion_point(class_scope:tensorflow.OpDef.ArgDef) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr description_; + ::google::protobuf::internal::ArenaStringPtr type_attr_; + ::google::protobuf::internal::ArenaStringPtr number_attr_; + ::google::protobuf::internal::ArenaStringPtr type_list_attr_; + int type_; + bool is_ref_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_op_5fdef_2eproto_impl(); + friend void protobuf_AddDesc_op_5fdef_2eproto_impl(); + friend void protobuf_AssignDesc_op_5fdef_2eproto(); + friend void protobuf_ShutdownFile_op_5fdef_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed OpDef_ArgDef_default_instance_; + +// ------------------------------------------------------------------- + +class OpDef_AttrDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.OpDef.AttrDef) */ { + public: + OpDef_AttrDef(); + virtual ~OpDef_AttrDef(); + + OpDef_AttrDef(const OpDef_AttrDef& from); + + inline OpDef_AttrDef& operator=(const OpDef_AttrDef& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const OpDef_AttrDef& default_instance(); + + static const OpDef_AttrDef* internal_default_instance(); + + void UnsafeArenaSwap(OpDef_AttrDef* other); + void Swap(OpDef_AttrDef* other); + + // implements Message ---------------------------------------------- + + inline OpDef_AttrDef* New() const { return New(NULL); } + + OpDef_AttrDef* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const OpDef_AttrDef& from); + void MergeFrom(const OpDef_AttrDef& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(OpDef_AttrDef* other); + void UnsafeMergeFrom(const OpDef_AttrDef& from); + protected: + explicit OpDef_AttrDef(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string name = 1; + void clear_name(); + static const int kNameFieldNumber = 1; + const ::std::string& name() const; + void set_name(const ::std::string& value); + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + ::std::string* unsafe_arena_release_name(); + void unsafe_arena_set_allocated_name( + ::std::string* name); + + // optional string type = 2; + void clear_type(); + static const int kTypeFieldNumber = 2; + const ::std::string& type() const; + void set_type(const ::std::string& value); + void set_type(const char* value); + void set_type(const char* value, size_t size); + ::std::string* mutable_type(); + ::std::string* release_type(); + void set_allocated_type(::std::string* type); + ::std::string* unsafe_arena_release_type(); + void unsafe_arena_set_allocated_type( + ::std::string* type); + + // optional .tensorflow.AttrValue default_value = 3; + bool has_default_value() const; + void clear_default_value(); + static const int kDefaultValueFieldNumber = 3; + private: + void _slow_mutable_default_value(); + void _slow_set_allocated_default_value( + ::google::protobuf::Arena* message_arena, ::tensorflow::AttrValue** default_value); + ::tensorflow::AttrValue* _slow_release_default_value(); + public: + const ::tensorflow::AttrValue& default_value() const; + ::tensorflow::AttrValue* mutable_default_value(); + ::tensorflow::AttrValue* release_default_value(); + void set_allocated_default_value(::tensorflow::AttrValue* default_value); + ::tensorflow::AttrValue* unsafe_arena_release_default_value(); + void unsafe_arena_set_allocated_default_value( + ::tensorflow::AttrValue* default_value); + + // optional string description = 4; + void clear_description(); + static const int kDescriptionFieldNumber = 4; + const ::std::string& description() const; + void set_description(const ::std::string& value); + void set_description(const char* value); + void set_description(const char* value, size_t size); + ::std::string* mutable_description(); + ::std::string* release_description(); + void set_allocated_description(::std::string* description); + ::std::string* unsafe_arena_release_description(); + void unsafe_arena_set_allocated_description( + ::std::string* description); + + // optional bool has_minimum = 5; + void clear_has_minimum(); + static const int kHasMinimumFieldNumber = 5; + bool has_minimum() const; + void set_has_minimum(bool value); + + // optional int64 minimum = 6; + void clear_minimum(); + static const int kMinimumFieldNumber = 6; + ::google::protobuf::int64 minimum() const; + void set_minimum(::google::protobuf::int64 value); + + // optional .tensorflow.AttrValue allowed_values = 7; + bool has_allowed_values() const; + void clear_allowed_values(); + static const int kAllowedValuesFieldNumber = 7; + private: + void _slow_mutable_allowed_values(); + void _slow_set_allocated_allowed_values( + ::google::protobuf::Arena* message_arena, ::tensorflow::AttrValue** allowed_values); + ::tensorflow::AttrValue* _slow_release_allowed_values(); + public: + const ::tensorflow::AttrValue& allowed_values() const; + ::tensorflow::AttrValue* mutable_allowed_values(); + ::tensorflow::AttrValue* release_allowed_values(); + void set_allocated_allowed_values(::tensorflow::AttrValue* allowed_values); + ::tensorflow::AttrValue* unsafe_arena_release_allowed_values(); + void unsafe_arena_set_allocated_allowed_values( + ::tensorflow::AttrValue* allowed_values); + + // @@protoc_insertion_point(class_scope:tensorflow.OpDef.AttrDef) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr type_; + ::google::protobuf::internal::ArenaStringPtr description_; + ::tensorflow::AttrValue* default_value_; + ::tensorflow::AttrValue* allowed_values_; + ::google::protobuf::int64 minimum_; + bool has_minimum_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_op_5fdef_2eproto_impl(); + friend void protobuf_AddDesc_op_5fdef_2eproto_impl(); + friend void protobuf_AssignDesc_op_5fdef_2eproto(); + friend void protobuf_ShutdownFile_op_5fdef_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed OpDef_AttrDef_default_instance_; + +// ------------------------------------------------------------------- + +class OpDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.OpDef) */ { + public: + OpDef(); + virtual ~OpDef(); + + OpDef(const OpDef& from); + + inline OpDef& operator=(const OpDef& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const OpDef& default_instance(); + + static const OpDef* internal_default_instance(); + + void UnsafeArenaSwap(OpDef* other); + void Swap(OpDef* other); + + // implements Message ---------------------------------------------- + + inline OpDef* New() const { return New(NULL); } + + OpDef* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const OpDef& from); + void MergeFrom(const OpDef& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(OpDef* other); + void UnsafeMergeFrom(const OpDef& from); + protected: + explicit OpDef(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef OpDef_ArgDef ArgDef; + typedef OpDef_AttrDef AttrDef; + + // accessors ------------------------------------------------------- + + // optional string name = 1; + void clear_name(); + static const int kNameFieldNumber = 1; + const ::std::string& name() const; + void set_name(const ::std::string& value); + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + ::std::string* unsafe_arena_release_name(); + void unsafe_arena_set_allocated_name( + ::std::string* name); + + // repeated .tensorflow.OpDef.ArgDef input_arg = 2; + int input_arg_size() const; + void clear_input_arg(); + static const int kInputArgFieldNumber = 2; + const ::tensorflow::OpDef_ArgDef& input_arg(int index) const; + ::tensorflow::OpDef_ArgDef* mutable_input_arg(int index); + ::tensorflow::OpDef_ArgDef* add_input_arg(); + ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >* + mutable_input_arg(); + const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >& + input_arg() const; + + // repeated .tensorflow.OpDef.ArgDef output_arg = 3; + int output_arg_size() const; + void clear_output_arg(); + static const int kOutputArgFieldNumber = 3; + const ::tensorflow::OpDef_ArgDef& output_arg(int index) const; + ::tensorflow::OpDef_ArgDef* mutable_output_arg(int index); + ::tensorflow::OpDef_ArgDef* add_output_arg(); + ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >* + mutable_output_arg(); + const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >& + output_arg() const; + + // repeated .tensorflow.OpDef.AttrDef attr = 4; + int attr_size() const; + void clear_attr(); + static const int kAttrFieldNumber = 4; + const ::tensorflow::OpDef_AttrDef& attr(int index) const; + ::tensorflow::OpDef_AttrDef* mutable_attr(int index); + ::tensorflow::OpDef_AttrDef* add_attr(); + ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_AttrDef >* + mutable_attr(); + const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_AttrDef >& + attr() const; + + // optional .tensorflow.OpDeprecation deprecation = 8; + bool has_deprecation() const; + void clear_deprecation(); + static const int kDeprecationFieldNumber = 8; + private: + void _slow_mutable_deprecation(); + void _slow_set_allocated_deprecation( + ::google::protobuf::Arena* message_arena, ::tensorflow::OpDeprecation** deprecation); + ::tensorflow::OpDeprecation* _slow_release_deprecation(); + public: + const ::tensorflow::OpDeprecation& deprecation() const; + ::tensorflow::OpDeprecation* mutable_deprecation(); + ::tensorflow::OpDeprecation* release_deprecation(); + void set_allocated_deprecation(::tensorflow::OpDeprecation* deprecation); + ::tensorflow::OpDeprecation* unsafe_arena_release_deprecation(); + void unsafe_arena_set_allocated_deprecation( + ::tensorflow::OpDeprecation* deprecation); + + // optional string summary = 5; + void clear_summary(); + static const int kSummaryFieldNumber = 5; + const ::std::string& summary() const; + void set_summary(const ::std::string& value); + void set_summary(const char* value); + void set_summary(const char* value, size_t size); + ::std::string* mutable_summary(); + ::std::string* release_summary(); + void set_allocated_summary(::std::string* summary); + ::std::string* unsafe_arena_release_summary(); + void unsafe_arena_set_allocated_summary( + ::std::string* summary); + + // optional string description = 6; + void clear_description(); + static const int kDescriptionFieldNumber = 6; + const ::std::string& description() const; + void set_description(const ::std::string& value); + void set_description(const char* value); + void set_description(const char* value, size_t size); + ::std::string* mutable_description(); + ::std::string* release_description(); + void set_allocated_description(::std::string* description); + ::std::string* unsafe_arena_release_description(); + void unsafe_arena_set_allocated_description( + ::std::string* description); + + // optional bool is_commutative = 18; + void clear_is_commutative(); + static const int kIsCommutativeFieldNumber = 18; + bool is_commutative() const; + void set_is_commutative(bool value); + + // optional bool is_aggregate = 16; + void clear_is_aggregate(); + static const int kIsAggregateFieldNumber = 16; + bool is_aggregate() const; + void set_is_aggregate(bool value); + + // optional bool is_stateful = 17; + void clear_is_stateful(); + static const int kIsStatefulFieldNumber = 17; + bool is_stateful() const; + void set_is_stateful(bool value); + + // optional bool allows_uninitialized_input = 19; + void clear_allows_uninitialized_input(); + static const int kAllowsUninitializedInputFieldNumber = 19; + bool allows_uninitialized_input() const; + void set_allows_uninitialized_input(bool value); + + // @@protoc_insertion_point(class_scope:tensorflow.OpDef) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef > input_arg_; + ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef > output_arg_; + ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_AttrDef > attr_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr summary_; + ::google::protobuf::internal::ArenaStringPtr description_; + ::tensorflow::OpDeprecation* deprecation_; + bool is_commutative_; + bool is_aggregate_; + bool is_stateful_; + bool allows_uninitialized_input_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_op_5fdef_2eproto_impl(); + friend void protobuf_AddDesc_op_5fdef_2eproto_impl(); + friend void protobuf_AssignDesc_op_5fdef_2eproto(); + friend void protobuf_ShutdownFile_op_5fdef_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed OpDef_default_instance_; + +// ------------------------------------------------------------------- + +class OpDeprecation : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.OpDeprecation) */ { + public: + OpDeprecation(); + virtual ~OpDeprecation(); + + OpDeprecation(const OpDeprecation& from); + + inline OpDeprecation& operator=(const OpDeprecation& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const OpDeprecation& default_instance(); + + static const OpDeprecation* internal_default_instance(); + + void UnsafeArenaSwap(OpDeprecation* other); + void Swap(OpDeprecation* other); + + // implements Message ---------------------------------------------- + + inline OpDeprecation* New() const { return New(NULL); } + + OpDeprecation* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const OpDeprecation& from); + void MergeFrom(const OpDeprecation& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(OpDeprecation* other); + void UnsafeMergeFrom(const OpDeprecation& from); + protected: + explicit OpDeprecation(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional int32 version = 1; + void clear_version(); + static const int kVersionFieldNumber = 1; + ::google::protobuf::int32 version() const; + void set_version(::google::protobuf::int32 value); + + // optional string explanation = 2; + void clear_explanation(); + static const int kExplanationFieldNumber = 2; + const ::std::string& explanation() const; + void set_explanation(const ::std::string& value); + void set_explanation(const char* value); + void set_explanation(const char* value, size_t size); + ::std::string* mutable_explanation(); + ::std::string* release_explanation(); + void set_allocated_explanation(::std::string* explanation); + ::std::string* unsafe_arena_release_explanation(); + void unsafe_arena_set_allocated_explanation( + ::std::string* explanation); + + // @@protoc_insertion_point(class_scope:tensorflow.OpDeprecation) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::internal::ArenaStringPtr explanation_; + ::google::protobuf::int32 version_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_op_5fdef_2eproto_impl(); + friend void protobuf_AddDesc_op_5fdef_2eproto_impl(); + friend void protobuf_AssignDesc_op_5fdef_2eproto(); + friend void protobuf_ShutdownFile_op_5fdef_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed OpDeprecation_default_instance_; + +// ------------------------------------------------------------------- + +class OpList : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.OpList) */ { + public: + OpList(); + virtual ~OpList(); + + OpList(const OpList& from); + + inline OpList& operator=(const OpList& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const OpList& default_instance(); + + static const OpList* internal_default_instance(); + + void UnsafeArenaSwap(OpList* other); + void Swap(OpList* other); + + // implements Message ---------------------------------------------- + + inline OpList* New() const { return New(NULL); } + + OpList* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const OpList& from); + void MergeFrom(const OpList& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(OpList* other); + void UnsafeMergeFrom(const OpList& from); + protected: + explicit OpList(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .tensorflow.OpDef op = 1; + int op_size() const; + void clear_op(); + static const int kOpFieldNumber = 1; + const ::tensorflow::OpDef& op(int index) const; + ::tensorflow::OpDef* mutable_op(int index); + ::tensorflow::OpDef* add_op(); + ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef >* + mutable_op(); + const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef >& + op() const; + + // @@protoc_insertion_point(class_scope:tensorflow.OpList) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef > op_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_op_5fdef_2eproto_impl(); + friend void protobuf_AddDesc_op_5fdef_2eproto_impl(); + friend void protobuf_AssignDesc_op_5fdef_2eproto(); + friend void protobuf_ShutdownFile_op_5fdef_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed OpList_default_instance_; + +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +// OpDef_ArgDef + +// optional string name = 1; +inline void OpDef_ArgDef::clear_name() { + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& OpDef_ArgDef::name() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.name) + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void OpDef_ArgDef::set_name(const ::std::string& value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.name) +} +inline void OpDef_ArgDef::set_name(const char* value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.ArgDef.name) +} +inline void OpDef_ArgDef::set_name(const char* value, + size_t size) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.ArgDef.name) +} +inline ::std::string* OpDef_ArgDef::mutable_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.ArgDef.name) + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef_ArgDef::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.ArgDef.name) + + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef_ArgDef::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.ArgDef.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void OpDef_ArgDef::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.ArgDef.name) +} +inline void OpDef_ArgDef::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.ArgDef.name) +} + +// optional string description = 2; +inline void OpDef_ArgDef::clear_description() { + description_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& OpDef_ArgDef::description() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.description) + return description_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void OpDef_ArgDef::set_description(const ::std::string& value) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.description) +} +inline void OpDef_ArgDef::set_description(const char* value) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.ArgDef.description) +} +inline void OpDef_ArgDef::set_description(const char* value, + size_t size) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.ArgDef.description) +} +inline ::std::string* OpDef_ArgDef::mutable_description() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.ArgDef.description) + return description_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef_ArgDef::release_description() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.ArgDef.description) + + return description_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef_ArgDef::unsafe_arena_release_description() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.ArgDef.description) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return description_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void OpDef_ArgDef::set_allocated_description(::std::string* description) { + if (description != NULL) { + + } else { + + } + description_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), description, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.ArgDef.description) +} +inline void OpDef_ArgDef::unsafe_arena_set_allocated_description( + ::std::string* description) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (description != NULL) { + + } else { + + } + description_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + description, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.ArgDef.description) +} + +// optional .tensorflow.DataType type = 3; +inline void OpDef_ArgDef::clear_type() { + type_ = 0; +} +inline ::tensorflow::DataType OpDef_ArgDef::type() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.type) + return static_cast< ::tensorflow::DataType >(type_); +} +inline void OpDef_ArgDef::set_type(::tensorflow::DataType value) { + + type_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.type) +} + +// optional string type_attr = 4; +inline void OpDef_ArgDef::clear_type_attr() { + type_attr_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& OpDef_ArgDef::type_attr() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.type_attr) + return type_attr_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void OpDef_ArgDef::set_type_attr(const ::std::string& value) { + + type_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.type_attr) +} +inline void OpDef_ArgDef::set_type_attr(const char* value) { + + type_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.ArgDef.type_attr) +} +inline void OpDef_ArgDef::set_type_attr(const char* value, + size_t size) { + + type_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.ArgDef.type_attr) +} +inline ::std::string* OpDef_ArgDef::mutable_type_attr() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.ArgDef.type_attr) + return type_attr_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef_ArgDef::release_type_attr() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.ArgDef.type_attr) + + return type_attr_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef_ArgDef::unsafe_arena_release_type_attr() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.ArgDef.type_attr) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return type_attr_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void OpDef_ArgDef::set_allocated_type_attr(::std::string* type_attr) { + if (type_attr != NULL) { + + } else { + + } + type_attr_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_attr, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.ArgDef.type_attr) +} +inline void OpDef_ArgDef::unsafe_arena_set_allocated_type_attr( + ::std::string* type_attr) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (type_attr != NULL) { + + } else { + + } + type_attr_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + type_attr, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.ArgDef.type_attr) +} + +// optional string number_attr = 5; +inline void OpDef_ArgDef::clear_number_attr() { + number_attr_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& OpDef_ArgDef::number_attr() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.number_attr) + return number_attr_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void OpDef_ArgDef::set_number_attr(const ::std::string& value) { + + number_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.number_attr) +} +inline void OpDef_ArgDef::set_number_attr(const char* value) { + + number_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.ArgDef.number_attr) +} +inline void OpDef_ArgDef::set_number_attr(const char* value, + size_t size) { + + number_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.ArgDef.number_attr) +} +inline ::std::string* OpDef_ArgDef::mutable_number_attr() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.ArgDef.number_attr) + return number_attr_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef_ArgDef::release_number_attr() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.ArgDef.number_attr) + + return number_attr_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef_ArgDef::unsafe_arena_release_number_attr() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.ArgDef.number_attr) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return number_attr_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void OpDef_ArgDef::set_allocated_number_attr(::std::string* number_attr) { + if (number_attr != NULL) { + + } else { + + } + number_attr_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), number_attr, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.ArgDef.number_attr) +} +inline void OpDef_ArgDef::unsafe_arena_set_allocated_number_attr( + ::std::string* number_attr) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (number_attr != NULL) { + + } else { + + } + number_attr_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + number_attr, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.ArgDef.number_attr) +} + +// optional string type_list_attr = 6; +inline void OpDef_ArgDef::clear_type_list_attr() { + type_list_attr_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& OpDef_ArgDef::type_list_attr() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.type_list_attr) + return type_list_attr_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void OpDef_ArgDef::set_type_list_attr(const ::std::string& value) { + + type_list_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.type_list_attr) +} +inline void OpDef_ArgDef::set_type_list_attr(const char* value) { + + type_list_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.ArgDef.type_list_attr) +} +inline void OpDef_ArgDef::set_type_list_attr(const char* value, + size_t size) { + + type_list_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.ArgDef.type_list_attr) +} +inline ::std::string* OpDef_ArgDef::mutable_type_list_attr() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.ArgDef.type_list_attr) + return type_list_attr_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef_ArgDef::release_type_list_attr() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.ArgDef.type_list_attr) + + return type_list_attr_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef_ArgDef::unsafe_arena_release_type_list_attr() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.ArgDef.type_list_attr) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return type_list_attr_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void OpDef_ArgDef::set_allocated_type_list_attr(::std::string* type_list_attr) { + if (type_list_attr != NULL) { + + } else { + + } + type_list_attr_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_list_attr, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.ArgDef.type_list_attr) +} +inline void OpDef_ArgDef::unsafe_arena_set_allocated_type_list_attr( + ::std::string* type_list_attr) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (type_list_attr != NULL) { + + } else { + + } + type_list_attr_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + type_list_attr, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.ArgDef.type_list_attr) +} + +// optional bool is_ref = 16; +inline void OpDef_ArgDef::clear_is_ref() { + is_ref_ = false; +} +inline bool OpDef_ArgDef::is_ref() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.is_ref) + return is_ref_; +} +inline void OpDef_ArgDef::set_is_ref(bool value) { + + is_ref_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.is_ref) +} + +inline const OpDef_ArgDef* OpDef_ArgDef::internal_default_instance() { + return &OpDef_ArgDef_default_instance_.get(); +} +// ------------------------------------------------------------------- + +// OpDef_AttrDef + +// optional string name = 1; +inline void OpDef_AttrDef::clear_name() { + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& OpDef_AttrDef::name() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.name) + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void OpDef_AttrDef::set_name(const ::std::string& value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.AttrDef.name) +} +inline void OpDef_AttrDef::set_name(const char* value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.AttrDef.name) +} +inline void OpDef_AttrDef::set_name(const char* value, + size_t size) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.AttrDef.name) +} +inline ::std::string* OpDef_AttrDef::mutable_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.AttrDef.name) + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef_AttrDef::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.AttrDef.name) + + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef_AttrDef::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.AttrDef.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void OpDef_AttrDef::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.AttrDef.name) +} +inline void OpDef_AttrDef::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.AttrDef.name) +} + +// optional string type = 2; +inline void OpDef_AttrDef::clear_type() { + type_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& OpDef_AttrDef::type() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.type) + return type_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void OpDef_AttrDef::set_type(const ::std::string& value) { + + type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.AttrDef.type) +} +inline void OpDef_AttrDef::set_type(const char* value) { + + type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.AttrDef.type) +} +inline void OpDef_AttrDef::set_type(const char* value, + size_t size) { + + type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.AttrDef.type) +} +inline ::std::string* OpDef_AttrDef::mutable_type() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.AttrDef.type) + return type_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef_AttrDef::release_type() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.AttrDef.type) + + return type_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef_AttrDef::unsafe_arena_release_type() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.AttrDef.type) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return type_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void OpDef_AttrDef::set_allocated_type(::std::string* type) { + if (type != NULL) { + + } else { + + } + type_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.AttrDef.type) +} +inline void OpDef_AttrDef::unsafe_arena_set_allocated_type( + ::std::string* type) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (type != NULL) { + + } else { + + } + type_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + type, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.AttrDef.type) +} + +// optional .tensorflow.AttrValue default_value = 3; +inline bool OpDef_AttrDef::has_default_value() const { + return this != internal_default_instance() && default_value_ != NULL; +} +inline void OpDef_AttrDef::clear_default_value() { + if (GetArenaNoVirtual() == NULL && default_value_ != NULL) delete default_value_; + default_value_ = NULL; +} +inline const ::tensorflow::AttrValue& OpDef_AttrDef::default_value() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.default_value) + return default_value_ != NULL ? *default_value_ + : *::tensorflow::AttrValue::internal_default_instance(); +} +inline ::tensorflow::AttrValue* OpDef_AttrDef::mutable_default_value() { + + if (default_value_ == NULL) { + _slow_mutable_default_value(); + } + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.AttrDef.default_value) + return default_value_; +} +inline ::tensorflow::AttrValue* OpDef_AttrDef::release_default_value() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.AttrDef.default_value) + + if (GetArenaNoVirtual() != NULL) { + return _slow_release_default_value(); + } else { + ::tensorflow::AttrValue* temp = default_value_; + default_value_ = NULL; + return temp; + } +} +inline void OpDef_AttrDef::set_allocated_default_value(::tensorflow::AttrValue* default_value) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete default_value_; + } + if (default_value != NULL) { + _slow_set_allocated_default_value(message_arena, &default_value); + } + default_value_ = default_value; + if (default_value) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.AttrDef.default_value) +} + +// optional string description = 4; +inline void OpDef_AttrDef::clear_description() { + description_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& OpDef_AttrDef::description() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.description) + return description_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void OpDef_AttrDef::set_description(const ::std::string& value) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.AttrDef.description) +} +inline void OpDef_AttrDef::set_description(const char* value) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.AttrDef.description) +} +inline void OpDef_AttrDef::set_description(const char* value, + size_t size) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.AttrDef.description) +} +inline ::std::string* OpDef_AttrDef::mutable_description() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.AttrDef.description) + return description_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef_AttrDef::release_description() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.AttrDef.description) + + return description_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef_AttrDef::unsafe_arena_release_description() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.AttrDef.description) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return description_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void OpDef_AttrDef::set_allocated_description(::std::string* description) { + if (description != NULL) { + + } else { + + } + description_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), description, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.AttrDef.description) +} +inline void OpDef_AttrDef::unsafe_arena_set_allocated_description( + ::std::string* description) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (description != NULL) { + + } else { + + } + description_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + description, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.AttrDef.description) +} + +// optional bool has_minimum = 5; +inline void OpDef_AttrDef::clear_has_minimum() { + has_minimum_ = false; +} +inline bool OpDef_AttrDef::has_minimum() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.has_minimum) + return has_minimum_; +} +inline void OpDef_AttrDef::set_has_minimum(bool value) { + + has_minimum_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDef.AttrDef.has_minimum) +} + +// optional int64 minimum = 6; +inline void OpDef_AttrDef::clear_minimum() { + minimum_ = GOOGLE_LONGLONG(0); +} +inline ::google::protobuf::int64 OpDef_AttrDef::minimum() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.minimum) + return minimum_; +} +inline void OpDef_AttrDef::set_minimum(::google::protobuf::int64 value) { + + minimum_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDef.AttrDef.minimum) +} + +// optional .tensorflow.AttrValue allowed_values = 7; +inline bool OpDef_AttrDef::has_allowed_values() const { + return this != internal_default_instance() && allowed_values_ != NULL; +} +inline void OpDef_AttrDef::clear_allowed_values() { + if (GetArenaNoVirtual() == NULL && allowed_values_ != NULL) delete allowed_values_; + allowed_values_ = NULL; +} +inline const ::tensorflow::AttrValue& OpDef_AttrDef::allowed_values() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.allowed_values) + return allowed_values_ != NULL ? *allowed_values_ + : *::tensorflow::AttrValue::internal_default_instance(); +} +inline ::tensorflow::AttrValue* OpDef_AttrDef::mutable_allowed_values() { + + if (allowed_values_ == NULL) { + _slow_mutable_allowed_values(); + } + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.AttrDef.allowed_values) + return allowed_values_; +} +inline ::tensorflow::AttrValue* OpDef_AttrDef::release_allowed_values() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.AttrDef.allowed_values) + + if (GetArenaNoVirtual() != NULL) { + return _slow_release_allowed_values(); + } else { + ::tensorflow::AttrValue* temp = allowed_values_; + allowed_values_ = NULL; + return temp; + } +} +inline void OpDef_AttrDef::set_allocated_allowed_values(::tensorflow::AttrValue* allowed_values) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete allowed_values_; + } + if (allowed_values != NULL) { + _slow_set_allocated_allowed_values(message_arena, &allowed_values); + } + allowed_values_ = allowed_values; + if (allowed_values) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.AttrDef.allowed_values) +} + +inline const OpDef_AttrDef* OpDef_AttrDef::internal_default_instance() { + return &OpDef_AttrDef_default_instance_.get(); +} +// ------------------------------------------------------------------- + +// OpDef + +// optional string name = 1; +inline void OpDef::clear_name() { + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& OpDef::name() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.name) + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void OpDef::set_name(const ::std::string& value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.name) +} +inline void OpDef::set_name(const char* value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.name) +} +inline void OpDef::set_name(const char* value, + size_t size) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.name) +} +inline ::std::string* OpDef::mutable_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.name) + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.name) + + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void OpDef::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.name) +} +inline void OpDef::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.name) +} + +// repeated .tensorflow.OpDef.ArgDef input_arg = 2; +inline int OpDef::input_arg_size() const { + return input_arg_.size(); +} +inline void OpDef::clear_input_arg() { + input_arg_.Clear(); +} +inline const ::tensorflow::OpDef_ArgDef& OpDef::input_arg(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.input_arg) + return input_arg_.Get(index); +} +inline ::tensorflow::OpDef_ArgDef* OpDef::mutable_input_arg(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.input_arg) + return input_arg_.Mutable(index); +} +inline ::tensorflow::OpDef_ArgDef* OpDef::add_input_arg() { + // @@protoc_insertion_point(field_add:tensorflow.OpDef.input_arg) + return input_arg_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >* +OpDef::mutable_input_arg() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.OpDef.input_arg) + return &input_arg_; +} +inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >& +OpDef::input_arg() const { + // @@protoc_insertion_point(field_list:tensorflow.OpDef.input_arg) + return input_arg_; +} + +// repeated .tensorflow.OpDef.ArgDef output_arg = 3; +inline int OpDef::output_arg_size() const { + return output_arg_.size(); +} +inline void OpDef::clear_output_arg() { + output_arg_.Clear(); +} +inline const ::tensorflow::OpDef_ArgDef& OpDef::output_arg(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.output_arg) + return output_arg_.Get(index); +} +inline ::tensorflow::OpDef_ArgDef* OpDef::mutable_output_arg(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.output_arg) + return output_arg_.Mutable(index); +} +inline ::tensorflow::OpDef_ArgDef* OpDef::add_output_arg() { + // @@protoc_insertion_point(field_add:tensorflow.OpDef.output_arg) + return output_arg_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >* +OpDef::mutable_output_arg() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.OpDef.output_arg) + return &output_arg_; +} +inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >& +OpDef::output_arg() const { + // @@protoc_insertion_point(field_list:tensorflow.OpDef.output_arg) + return output_arg_; +} + +// repeated .tensorflow.OpDef.AttrDef attr = 4; +inline int OpDef::attr_size() const { + return attr_.size(); +} +inline void OpDef::clear_attr() { + attr_.Clear(); +} +inline const ::tensorflow::OpDef_AttrDef& OpDef::attr(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.attr) + return attr_.Get(index); +} +inline ::tensorflow::OpDef_AttrDef* OpDef::mutable_attr(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.attr) + return attr_.Mutable(index); +} +inline ::tensorflow::OpDef_AttrDef* OpDef::add_attr() { + // @@protoc_insertion_point(field_add:tensorflow.OpDef.attr) + return attr_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_AttrDef >* +OpDef::mutable_attr() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.OpDef.attr) + return &attr_; +} +inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_AttrDef >& +OpDef::attr() const { + // @@protoc_insertion_point(field_list:tensorflow.OpDef.attr) + return attr_; +} + +// optional .tensorflow.OpDeprecation deprecation = 8; +inline bool OpDef::has_deprecation() const { + return this != internal_default_instance() && deprecation_ != NULL; +} +inline void OpDef::clear_deprecation() { + if (GetArenaNoVirtual() == NULL && deprecation_ != NULL) delete deprecation_; + deprecation_ = NULL; +} +inline const ::tensorflow::OpDeprecation& OpDef::deprecation() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.deprecation) + return deprecation_ != NULL ? *deprecation_ + : *::tensorflow::OpDeprecation::internal_default_instance(); +} +inline ::tensorflow::OpDeprecation* OpDef::mutable_deprecation() { + + if (deprecation_ == NULL) { + _slow_mutable_deprecation(); + } + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.deprecation) + return deprecation_; +} +inline ::tensorflow::OpDeprecation* OpDef::release_deprecation() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.deprecation) + + if (GetArenaNoVirtual() != NULL) { + return _slow_release_deprecation(); + } else { + ::tensorflow::OpDeprecation* temp = deprecation_; + deprecation_ = NULL; + return temp; + } +} +inline void OpDef::set_allocated_deprecation(::tensorflow::OpDeprecation* deprecation) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete deprecation_; + } + if (deprecation != NULL) { + _slow_set_allocated_deprecation(message_arena, &deprecation); + } + deprecation_ = deprecation; + if (deprecation) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.deprecation) +} + +// optional string summary = 5; +inline void OpDef::clear_summary() { + summary_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& OpDef::summary() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.summary) + return summary_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void OpDef::set_summary(const ::std::string& value) { + + summary_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.summary) +} +inline void OpDef::set_summary(const char* value) { + + summary_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.summary) +} +inline void OpDef::set_summary(const char* value, + size_t size) { + + summary_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.summary) +} +inline ::std::string* OpDef::mutable_summary() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.summary) + return summary_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef::release_summary() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.summary) + + return summary_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef::unsafe_arena_release_summary() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.summary) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return summary_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void OpDef::set_allocated_summary(::std::string* summary) { + if (summary != NULL) { + + } else { + + } + summary_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), summary, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.summary) +} +inline void OpDef::unsafe_arena_set_allocated_summary( + ::std::string* summary) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (summary != NULL) { + + } else { + + } + summary_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + summary, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.summary) +} + +// optional string description = 6; +inline void OpDef::clear_description() { + description_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& OpDef::description() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.description) + return description_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void OpDef::set_description(const ::std::string& value) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDef.description) +} +inline void OpDef::set_description(const char* value) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.description) +} +inline void OpDef::set_description(const char* value, + size_t size) { + + description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.description) +} +inline ::std::string* OpDef::mutable_description() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.description) + return description_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef::release_description() { + // @@protoc_insertion_point(field_release:tensorflow.OpDef.description) + + return description_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDef::unsafe_arena_release_description() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.description) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return description_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void OpDef::set_allocated_description(::std::string* description) { + if (description != NULL) { + + } else { + + } + description_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), description, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.description) +} +inline void OpDef::unsafe_arena_set_allocated_description( + ::std::string* description) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (description != NULL) { + + } else { + + } + description_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + description, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.description) +} + +// optional bool is_commutative = 18; +inline void OpDef::clear_is_commutative() { + is_commutative_ = false; +} +inline bool OpDef::is_commutative() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.is_commutative) + return is_commutative_; +} +inline void OpDef::set_is_commutative(bool value) { + + is_commutative_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDef.is_commutative) +} + +// optional bool is_aggregate = 16; +inline void OpDef::clear_is_aggregate() { + is_aggregate_ = false; +} +inline bool OpDef::is_aggregate() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.is_aggregate) + return is_aggregate_; +} +inline void OpDef::set_is_aggregate(bool value) { + + is_aggregate_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDef.is_aggregate) +} + +// optional bool is_stateful = 17; +inline void OpDef::clear_is_stateful() { + is_stateful_ = false; +} +inline bool OpDef::is_stateful() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.is_stateful) + return is_stateful_; +} +inline void OpDef::set_is_stateful(bool value) { + + is_stateful_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDef.is_stateful) +} + +// optional bool allows_uninitialized_input = 19; +inline void OpDef::clear_allows_uninitialized_input() { + allows_uninitialized_input_ = false; +} +inline bool OpDef::allows_uninitialized_input() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDef.allows_uninitialized_input) + return allows_uninitialized_input_; +} +inline void OpDef::set_allows_uninitialized_input(bool value) { + + allows_uninitialized_input_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDef.allows_uninitialized_input) +} + +inline const OpDef* OpDef::internal_default_instance() { + return &OpDef_default_instance_.get(); +} +// ------------------------------------------------------------------- + +// OpDeprecation + +// optional int32 version = 1; +inline void OpDeprecation::clear_version() { + version_ = 0; +} +inline ::google::protobuf::int32 OpDeprecation::version() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDeprecation.version) + return version_; +} +inline void OpDeprecation::set_version(::google::protobuf::int32 value) { + + version_ = value; + // @@protoc_insertion_point(field_set:tensorflow.OpDeprecation.version) +} + +// optional string explanation = 2; +inline void OpDeprecation::clear_explanation() { + explanation_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& OpDeprecation::explanation() const { + // @@protoc_insertion_point(field_get:tensorflow.OpDeprecation.explanation) + return explanation_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void OpDeprecation::set_explanation(const ::std::string& value) { + + explanation_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.OpDeprecation.explanation) +} +inline void OpDeprecation::set_explanation(const char* value) { + + explanation_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.OpDeprecation.explanation) +} +inline void OpDeprecation::set_explanation(const char* value, + size_t size) { + + explanation_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDeprecation.explanation) +} +inline ::std::string* OpDeprecation::mutable_explanation() { + + // @@protoc_insertion_point(field_mutable:tensorflow.OpDeprecation.explanation) + return explanation_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDeprecation::release_explanation() { + // @@protoc_insertion_point(field_release:tensorflow.OpDeprecation.explanation) + + return explanation_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* OpDeprecation::unsafe_arena_release_explanation() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDeprecation.explanation) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return explanation_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void OpDeprecation::set_allocated_explanation(::std::string* explanation) { + if (explanation != NULL) { + + } else { + + } + explanation_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), explanation, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDeprecation.explanation) +} +inline void OpDeprecation::unsafe_arena_set_allocated_explanation( + ::std::string* explanation) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (explanation != NULL) { + + } else { + + } + explanation_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + explanation, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDeprecation.explanation) +} + +inline const OpDeprecation* OpDeprecation::internal_default_instance() { + return &OpDeprecation_default_instance_.get(); +} +// ------------------------------------------------------------------- + +// OpList + +// repeated .tensorflow.OpDef op = 1; +inline int OpList::op_size() const { + return op_.size(); +} +inline void OpList::clear_op() { + op_.Clear(); +} +inline const ::tensorflow::OpDef& OpList::op(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.OpList.op) + return op_.Get(index); +} +inline ::tensorflow::OpDef* OpList::mutable_op(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.OpList.op) + return op_.Mutable(index); +} +inline ::tensorflow::OpDef* OpList::add_op() { + // @@protoc_insertion_point(field_add:tensorflow.OpList.op) + return op_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef >* +OpList::mutable_op() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.OpList.op) + return &op_; +} +inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef >& +OpList::op() const { + // @@protoc_insertion_point(field_list:tensorflow.OpList.op) + return op_; +} + +inline const OpList* OpList::internal_default_instance() { + return &OpList_default_instance_.get(); +} +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_op_5fdef_2eproto__INCLUDED diff --git a/modules/dnn/misc/tensorflow/tensor.pb.cc b/modules/dnn/misc/tensorflow/tensor.pb.cc new file mode 100644 index 000000000..e9851095b --- /dev/null +++ b/modules/dnn/misc/tensorflow/tensor.pb.cc @@ -0,0 +1,1596 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensor.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "tensor.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace tensorflow { + +namespace { + +const ::google::protobuf::Descriptor* TensorProto_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + TensorProto_reflection_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_tensor_2eproto() GOOGLE_ATTRIBUTE_COLD; +void protobuf_AssignDesc_tensor_2eproto() { + protobuf_AddDesc_tensor_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "tensor.proto"); + GOOGLE_CHECK(file != NULL); + TensorProto_descriptor_ = file->message_type(0); + static const int TensorProto_offsets_[13] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorProto, dtype_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorProto, tensor_shape_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorProto, version_number_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorProto, tensor_content_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorProto, half_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorProto, float_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorProto, double_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorProto, int_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorProto, string_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorProto, scomplex_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorProto, int64_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorProto, bool_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorProto, dcomplex_val_), + }; + TensorProto_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + TensorProto_descriptor_, + TensorProto::internal_default_instance(), + TensorProto_offsets_, + -1, + -1, + -1, + sizeof(TensorProto), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorProto, _internal_metadata_)); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_tensor_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + TensorProto_descriptor_, TensorProto::internal_default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_tensor_2eproto() { + TensorProto_default_instance_.Shutdown(); + delete TensorProto_reflection_; +} + +void protobuf_InitDefaults_tensor_2eproto_impl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::tensorflow::protobuf_InitDefaults_tensor_5fshape_2eproto(); + ::tensorflow::protobuf_InitDefaults_types_2eproto(); + ::google::protobuf::internal::GetEmptyString(); + TensorProto_default_instance_.DefaultConstruct(); + TensorProto_default_instance_.get_mutable()->InitAsDefaultInstance(); +} + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_InitDefaults_tensor_2eproto_once_); +void protobuf_InitDefaults_tensor_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_InitDefaults_tensor_2eproto_once_, + &protobuf_InitDefaults_tensor_2eproto_impl); +} +void protobuf_AddDesc_tensor_2eproto_impl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + protobuf_InitDefaults_tensor_2eproto(); + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\014tensor.proto\022\ntensorflow\032\022tensor_shape" + ".proto\032\013types.proto\"\345\002\n\013TensorProto\022#\n\005d" + "type\030\001 \001(\0162\024.tensorflow.DataType\0222\n\014tens" + "or_shape\030\002 \001(\0132\034.tensorflow.TensorShapeP" + "roto\022\026\n\016version_number\030\003 \001(\005\022\026\n\016tensor_c" + "ontent\030\004 \001(\014\022\024\n\010half_val\030\r \003(\005B\002\020\001\022\025\n\tfl" + "oat_val\030\005 \003(\002B\002\020\001\022\026\n\ndouble_val\030\006 \003(\001B\002\020" + "\001\022\023\n\007int_val\030\007 \003(\005B\002\020\001\022\022\n\nstring_val\030\010 \003" + "(\014\022\030\n\014scomplex_val\030\t \003(\002B\002\020\001\022\025\n\tint64_va" + "l\030\n \003(\003B\002\020\001\022\024\n\010bool_val\030\013 \003(\010B\002\020\001\022\030\n\014dco" + "mplex_val\030\014 \003(\001B\002\020\001B-\n\030org.tensorflow.fr" + "ameworkB\014TensorProtosP\001\370\001\001b\006proto3", 474); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "tensor.proto", &protobuf_RegisterTypes); + ::tensorflow::protobuf_AddDesc_tensor_5fshape_2eproto(); + ::tensorflow::protobuf_AddDesc_types_2eproto(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_tensor_2eproto); +} + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_tensor_2eproto_once_); +void protobuf_AddDesc_tensor_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_tensor_2eproto_once_, + &protobuf_AddDesc_tensor_2eproto_impl); +} +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_tensor_2eproto { + StaticDescriptorInitializer_tensor_2eproto() { + protobuf_AddDesc_tensor_2eproto(); + } +} static_descriptor_initializer_tensor_2eproto_; + +namespace { + +static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD GOOGLE_ATTRIBUTE_NORETURN; +static void MergeFromFail(int line) { + ::google::protobuf::internal::MergeFromFail(__FILE__, line); +} + +} // namespace + + +// =================================================================== + +void TensorProto::_slow_mutable_tensor_shape() { + tensor_shape_ = ::google::protobuf::Arena::CreateMessage< ::tensorflow::TensorShapeProto >( + GetArenaNoVirtual()); +} +::tensorflow::TensorShapeProto* TensorProto::_slow_release_tensor_shape() { + if (tensor_shape_ == NULL) { + return NULL; + } else { + ::tensorflow::TensorShapeProto* temp = new ::tensorflow::TensorShapeProto(*tensor_shape_); + tensor_shape_ = NULL; + return temp; + } +} +::tensorflow::TensorShapeProto* TensorProto::unsafe_arena_release_tensor_shape() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.TensorProto.tensor_shape) + + ::tensorflow::TensorShapeProto* temp = tensor_shape_; + tensor_shape_ = NULL; + return temp; +} +void TensorProto::_slow_set_allocated_tensor_shape( + ::google::protobuf::Arena* message_arena, ::tensorflow::TensorShapeProto** tensor_shape) { + if (message_arena != NULL && + ::google::protobuf::Arena::GetArena(*tensor_shape) == NULL) { + message_arena->Own(*tensor_shape); + } else if (message_arena != + ::google::protobuf::Arena::GetArena(*tensor_shape)) { + ::tensorflow::TensorShapeProto* new_tensor_shape = + ::google::protobuf::Arena::CreateMessage< ::tensorflow::TensorShapeProto >( + message_arena); + new_tensor_shape->CopyFrom(**tensor_shape); + *tensor_shape = new_tensor_shape; + } +} +void TensorProto::unsafe_arena_set_allocated_tensor_shape( + ::tensorflow::TensorShapeProto* tensor_shape) { + if (GetArenaNoVirtual() == NULL) { + delete tensor_shape_; + } + tensor_shape_ = tensor_shape; + if (tensor_shape) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TensorProto.tensor_shape) +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TensorProto::kDtypeFieldNumber; +const int TensorProto::kTensorShapeFieldNumber; +const int TensorProto::kVersionNumberFieldNumber; +const int TensorProto::kTensorContentFieldNumber; +const int TensorProto::kHalfValFieldNumber; +const int TensorProto::kFloatValFieldNumber; +const int TensorProto::kDoubleValFieldNumber; +const int TensorProto::kIntValFieldNumber; +const int TensorProto::kStringValFieldNumber; +const int TensorProto::kScomplexValFieldNumber; +const int TensorProto::kInt64ValFieldNumber; +const int TensorProto::kBoolValFieldNumber; +const int TensorProto::kDcomplexValFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TensorProto::TensorProto() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_tensor_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.TensorProto) +} +TensorProto::TensorProto(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena), + half_val_(arena), + float_val_(arena), + double_val_(arena), + int_val_(arena), + string_val_(arena), + scomplex_val_(arena), + int64_val_(arena), + bool_val_(arena), + dcomplex_val_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_tensor_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.TensorProto) +} + +void TensorProto::InitAsDefaultInstance() { + tensor_shape_ = const_cast< ::tensorflow::TensorShapeProto*>( + ::tensorflow::TensorShapeProto::internal_default_instance()); +} + +TensorProto::TensorProto(const TensorProto& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.TensorProto) +} + +void TensorProto::SharedCtor() { + tensor_content_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + tensor_shape_ = NULL; + ::memset(&dtype_, 0, reinterpret_cast(&version_number_) - + reinterpret_cast(&dtype_) + sizeof(version_number_)); + _cached_size_ = 0; +} + +TensorProto::~TensorProto() { + // @@protoc_insertion_point(destructor:tensorflow.TensorProto) + SharedDtor(); +} + +void TensorProto::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + + tensor_content_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); + if (this != &TensorProto_default_instance_.get()) { + delete tensor_shape_; + } +} + +void TensorProto::ArenaDtor(void* object) { + TensorProto* _this = reinterpret_cast< TensorProto* >(object); + (void)_this; +} +void TensorProto::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void TensorProto::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* TensorProto::descriptor() { + protobuf_AssignDescriptorsOnce(); + return TensorProto_descriptor_; +} + +const TensorProto& TensorProto::default_instance() { + protobuf_InitDefaults_tensor_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed TensorProto_default_instance_; + +TensorProto* TensorProto::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void TensorProto::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.TensorProto) +#if defined(__clang__) +#define ZR_HELPER_(f) \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \ + __builtin_offsetof(TensorProto, f) \ + _Pragma("clang diagnostic pop") +#else +#define ZR_HELPER_(f) reinterpret_cast(\ + &reinterpret_cast(16)->f) +#endif + +#define ZR_(first, last) do {\ + ::memset(&(first), 0,\ + ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ +} while (0) + + ZR_(dtype_, version_number_); + if (GetArenaNoVirtual() == NULL && tensor_shape_ != NULL) delete tensor_shape_; + tensor_shape_ = NULL; + tensor_content_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + +#undef ZR_HELPER_ +#undef ZR_ + + half_val_.Clear(); + float_val_.Clear(); + double_val_.Clear(); + int_val_.Clear(); + string_val_.Clear(); + scomplex_val_.Clear(); + int64_val_.Clear(); + bool_val_.Clear(); + dcomplex_val_.Clear(); +} + +bool TensorProto::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.TensorProto) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional .tensorflow.DataType dtype = 1; + case 1: { + if (tag == 8) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + set_dtype(static_cast< ::tensorflow::DataType >(value)); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_tensor_shape; + break; + } + + // optional .tensorflow.TensorShapeProto tensor_shape = 2; + case 2: { + if (tag == 18) { + parse_tensor_shape: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_tensor_shape())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_version_number; + break; + } + + // optional int32 version_number = 3; + case 3: { + if (tag == 24) { + parse_version_number: + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &version_number_))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_tensor_content; + break; + } + + // optional bytes tensor_content = 4; + case 4: { + if (tag == 34) { + parse_tensor_content: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_tensor_content())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_float_val; + break; + } + + // repeated float float_val = 5 [packed = true]; + case 5: { + if (tag == 42) { + parse_float_val: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, this->mutable_float_val()))); + } else if (tag == 45) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + 1, 42, input, this->mutable_float_val()))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(50)) goto parse_double_val; + break; + } + + // repeated double double_val = 6 [packed = true]; + case 6: { + if (tag == 50) { + parse_double_val: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + input, this->mutable_double_val()))); + } else if (tag == 49) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + 1, 50, input, this->mutable_double_val()))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(58)) goto parse_int_val; + break; + } + + // repeated int32 int_val = 7 [packed = true]; + case 7: { + if (tag == 58) { + parse_int_val: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_int_val()))); + } else if (tag == 56) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 58, input, this->mutable_int_val()))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(66)) goto parse_string_val; + break; + } + + // repeated bytes string_val = 8; + case 8: { + if (tag == 66) { + parse_string_val: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->add_string_val())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(66)) goto parse_string_val; + if (input->ExpectTag(74)) goto parse_scomplex_val; + break; + } + + // repeated float scomplex_val = 9 [packed = true]; + case 9: { + if (tag == 74) { + parse_scomplex_val: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, this->mutable_scomplex_val()))); + } else if (tag == 77) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + 1, 74, input, this->mutable_scomplex_val()))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(82)) goto parse_int64_val; + break; + } + + // repeated int64 int64_val = 10 [packed = true]; + case 10: { + if (tag == 82) { + parse_int64_val: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, this->mutable_int64_val()))); + } else if (tag == 80) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + 1, 82, input, this->mutable_int64_val()))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(90)) goto parse_bool_val; + break; + } + + // repeated bool bool_val = 11 [packed = true]; + case 11: { + if (tag == 90) { + parse_bool_val: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, this->mutable_bool_val()))); + } else if (tag == 88) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + 1, 90, input, this->mutable_bool_val()))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(98)) goto parse_dcomplex_val; + break; + } + + // repeated double dcomplex_val = 12 [packed = true]; + case 12: { + if (tag == 98) { + parse_dcomplex_val: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + input, this->mutable_dcomplex_val()))); + } else if (tag == 97) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + 1, 98, input, this->mutable_dcomplex_val()))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(106)) goto parse_half_val; + break; + } + + // repeated int32 half_val = 13 [packed = true]; + case 13: { + if (tag == 106) { + parse_half_val: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_half_val()))); + } else if (tag == 104) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 106, input, this->mutable_half_val()))); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.TensorProto) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.TensorProto) + return false; +#undef DO_ +} + +void TensorProto::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.TensorProto) + // optional .tensorflow.DataType dtype = 1; + if (this->dtype() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->dtype(), output); + } + + // optional .tensorflow.TensorShapeProto tensor_shape = 2; + if (this->has_tensor_shape()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, *this->tensor_shape_, output); + } + + // optional int32 version_number = 3; + if (this->version_number() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->version_number(), output); + } + + // optional bytes tensor_content = 4; + if (this->tensor_content().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 4, this->tensor_content(), output); + } + + // repeated float float_val = 5 [packed = true]; + if (this->float_val_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(5, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_float_val_cached_byte_size_); + } + for (int i = 0; i < this->float_val_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteFloatNoTag( + this->float_val(i), output); + } + + // repeated double double_val = 6 [packed = true]; + if (this->double_val_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(6, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_double_val_cached_byte_size_); + } + for (int i = 0; i < this->double_val_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteDoubleNoTag( + this->double_val(i), output); + } + + // repeated int32 int_val = 7 [packed = true]; + if (this->int_val_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(7, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_int_val_cached_byte_size_); + } + for (int i = 0; i < this->int_val_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + this->int_val(i), output); + } + + // repeated bytes string_val = 8; + for (int i = 0; i < this->string_val_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 8, this->string_val(i), output); + } + + // repeated float scomplex_val = 9 [packed = true]; + if (this->scomplex_val_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(9, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_scomplex_val_cached_byte_size_); + } + for (int i = 0; i < this->scomplex_val_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteFloatNoTag( + this->scomplex_val(i), output); + } + + // repeated int64 int64_val = 10 [packed = true]; + if (this->int64_val_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(10, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_int64_val_cached_byte_size_); + } + for (int i = 0; i < this->int64_val_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt64NoTag( + this->int64_val(i), output); + } + + // repeated bool bool_val = 11 [packed = true]; + if (this->bool_val_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(11, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_bool_val_cached_byte_size_); + } + for (int i = 0; i < this->bool_val_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteBoolNoTag( + this->bool_val(i), output); + } + + // repeated double dcomplex_val = 12 [packed = true]; + if (this->dcomplex_val_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(12, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_dcomplex_val_cached_byte_size_); + } + for (int i = 0; i < this->dcomplex_val_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteDoubleNoTag( + this->dcomplex_val(i), output); + } + + // repeated int32 half_val = 13 [packed = true]; + if (this->half_val_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(13, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_half_val_cached_byte_size_); + } + for (int i = 0; i < this->half_val_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + this->half_val(i), output); + } + + // @@protoc_insertion_point(serialize_end:tensorflow.TensorProto) +} + +::google::protobuf::uint8* TensorProto::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TensorProto) + // optional .tensorflow.DataType dtype = 1; + if (this->dtype() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->dtype(), target); + } + + // optional .tensorflow.TensorShapeProto tensor_shape = 2; + if (this->has_tensor_shape()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 2, *this->tensor_shape_, false, target); + } + + // optional int32 version_number = 3; + if (this->version_number() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->version_number(), target); + } + + // optional bytes tensor_content = 4; + if (this->tensor_content().size() > 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 4, this->tensor_content(), target); + } + + // repeated float float_val = 5 [packed = true]; + if (this->float_val_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 5, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _float_val_cached_byte_size_, target); + } + for (int i = 0; i < this->float_val_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteFloatNoTagToArray(this->float_val(i), target); + } + + // repeated double double_val = 6 [packed = true]; + if (this->double_val_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 6, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _double_val_cached_byte_size_, target); + } + for (int i = 0; i < this->double_val_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteDoubleNoTagToArray(this->double_val(i), target); + } + + // repeated int32 int_val = 7 [packed = true]; + if (this->int_val_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 7, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _int_val_cached_byte_size_, target); + } + for (int i = 0; i < this->int_val_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->int_val(i), target); + } + + // repeated bytes string_val = 8; + for (int i = 0; i < this->string_val_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteBytesToArray(8, this->string_val(i), target); + } + + // repeated float scomplex_val = 9 [packed = true]; + if (this->scomplex_val_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 9, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _scomplex_val_cached_byte_size_, target); + } + for (int i = 0; i < this->scomplex_val_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteFloatNoTagToArray(this->scomplex_val(i), target); + } + + // repeated int64 int64_val = 10 [packed = true]; + if (this->int64_val_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 10, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _int64_val_cached_byte_size_, target); + } + for (int i = 0; i < this->int64_val_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64NoTagToArray(this->int64_val(i), target); + } + + // repeated bool bool_val = 11 [packed = true]; + if (this->bool_val_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 11, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _bool_val_cached_byte_size_, target); + } + for (int i = 0; i < this->bool_val_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteBoolNoTagToArray(this->bool_val(i), target); + } + + // repeated double dcomplex_val = 12 [packed = true]; + if (this->dcomplex_val_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 12, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _dcomplex_val_cached_byte_size_, target); + } + for (int i = 0; i < this->dcomplex_val_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteDoubleNoTagToArray(this->dcomplex_val(i), target); + } + + // repeated int32 half_val = 13 [packed = true]; + if (this->half_val_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 13, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _half_val_cached_byte_size_, target); + } + for (int i = 0; i < this->half_val_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->half_val(i), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TensorProto) + return target; +} + +size_t TensorProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.TensorProto) + size_t total_size = 0; + + // optional .tensorflow.DataType dtype = 1; + if (this->dtype() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->dtype()); + } + + // optional .tensorflow.TensorShapeProto tensor_shape = 2; + if (this->has_tensor_shape()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->tensor_shape_); + } + + // optional int32 version_number = 3; + if (this->version_number() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->version_number()); + } + + // optional bytes tensor_content = 4; + if (this->tensor_content().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->tensor_content()); + } + + // repeated int32 half_val = 13 [packed = true]; + { + size_t data_size = 0; + unsigned int count = this->half_val_size(); + for (unsigned int i = 0; i < count; i++) { + data_size += ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->half_val(i)); + } + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _half_val_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated float float_val = 5 [packed = true]; + { + size_t data_size = 0; + unsigned int count = this->float_val_size(); + data_size = 4UL * count; + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _float_val_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated double double_val = 6 [packed = true]; + { + size_t data_size = 0; + unsigned int count = this->double_val_size(); + data_size = 8UL * count; + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _double_val_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated int32 int_val = 7 [packed = true]; + { + size_t data_size = 0; + unsigned int count = this->int_val_size(); + for (unsigned int i = 0; i < count; i++) { + data_size += ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->int_val(i)); + } + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _int_val_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated bytes string_val = 8; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->string_val_size()); + for (int i = 0; i < this->string_val_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::BytesSize( + this->string_val(i)); + } + + // repeated float scomplex_val = 9 [packed = true]; + { + size_t data_size = 0; + unsigned int count = this->scomplex_val_size(); + data_size = 4UL * count; + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _scomplex_val_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated int64 int64_val = 10 [packed = true]; + { + size_t data_size = 0; + unsigned int count = this->int64_val_size(); + for (unsigned int i = 0; i < count; i++) { + data_size += ::google::protobuf::internal::WireFormatLite:: + Int64Size(this->int64_val(i)); + } + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _int64_val_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated bool bool_val = 11 [packed = true]; + { + size_t data_size = 0; + unsigned int count = this->bool_val_size(); + data_size = 1UL * count; + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _bool_val_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated double dcomplex_val = 12 [packed = true]; + { + size_t data_size = 0; + unsigned int count = this->dcomplex_val_size(); + data_size = 8UL * count; + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _dcomplex_val_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void TensorProto::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.TensorProto) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const TensorProto* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.TensorProto) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.TensorProto) + UnsafeMergeFrom(*source); + } +} + +void TensorProto::MergeFrom(const TensorProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TensorProto) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void TensorProto::UnsafeMergeFrom(const TensorProto& from) { + GOOGLE_DCHECK(&from != this); + half_val_.UnsafeMergeFrom(from.half_val_); + float_val_.UnsafeMergeFrom(from.float_val_); + double_val_.UnsafeMergeFrom(from.double_val_); + int_val_.UnsafeMergeFrom(from.int_val_); + string_val_.UnsafeMergeFrom(from.string_val_); + scomplex_val_.UnsafeMergeFrom(from.scomplex_val_); + int64_val_.UnsafeMergeFrom(from.int64_val_); + bool_val_.UnsafeMergeFrom(from.bool_val_); + dcomplex_val_.UnsafeMergeFrom(from.dcomplex_val_); + if (from.dtype() != 0) { + set_dtype(from.dtype()); + } + if (from.has_tensor_shape()) { + mutable_tensor_shape()->::tensorflow::TensorShapeProto::MergeFrom(from.tensor_shape()); + } + if (from.version_number() != 0) { + set_version_number(from.version_number()); + } + if (from.tensor_content().size() > 0) { + set_tensor_content(from.tensor_content()); + } +} + +void TensorProto::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.TensorProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TensorProto::CopyFrom(const TensorProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TensorProto) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool TensorProto::IsInitialized() const { + + return true; +} + +void TensorProto::Swap(TensorProto* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + TensorProto temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void TensorProto::UnsafeArenaSwap(TensorProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void TensorProto::InternalSwap(TensorProto* other) { + std::swap(dtype_, other->dtype_); + std::swap(tensor_shape_, other->tensor_shape_); + std::swap(version_number_, other->version_number_); + tensor_content_.Swap(&other->tensor_content_); + half_val_.UnsafeArenaSwap(&other->half_val_); + float_val_.UnsafeArenaSwap(&other->float_val_); + double_val_.UnsafeArenaSwap(&other->double_val_); + int_val_.UnsafeArenaSwap(&other->int_val_); + string_val_.UnsafeArenaSwap(&other->string_val_); + scomplex_val_.UnsafeArenaSwap(&other->scomplex_val_); + int64_val_.UnsafeArenaSwap(&other->int64_val_); + bool_val_.UnsafeArenaSwap(&other->bool_val_); + dcomplex_val_.UnsafeArenaSwap(&other->dcomplex_val_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata TensorProto::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = TensorProto_descriptor_; + metadata.reflection = TensorProto_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// TensorProto + +// optional .tensorflow.DataType dtype = 1; +void TensorProto::clear_dtype() { + dtype_ = 0; +} +::tensorflow::DataType TensorProto::dtype() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.dtype) + return static_cast< ::tensorflow::DataType >(dtype_); +} +void TensorProto::set_dtype(::tensorflow::DataType value) { + + dtype_ = value; + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.dtype) +} + +// optional .tensorflow.TensorShapeProto tensor_shape = 2; +bool TensorProto::has_tensor_shape() const { + return this != internal_default_instance() && tensor_shape_ != NULL; +} +void TensorProto::clear_tensor_shape() { + if (GetArenaNoVirtual() == NULL && tensor_shape_ != NULL) delete tensor_shape_; + tensor_shape_ = NULL; +} +const ::tensorflow::TensorShapeProto& TensorProto::tensor_shape() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.tensor_shape) + return tensor_shape_ != NULL ? *tensor_shape_ + : *::tensorflow::TensorShapeProto::internal_default_instance(); +} +::tensorflow::TensorShapeProto* TensorProto::mutable_tensor_shape() { + + if (tensor_shape_ == NULL) { + _slow_mutable_tensor_shape(); + } + // @@protoc_insertion_point(field_mutable:tensorflow.TensorProto.tensor_shape) + return tensor_shape_; +} +::tensorflow::TensorShapeProto* TensorProto::release_tensor_shape() { + // @@protoc_insertion_point(field_release:tensorflow.TensorProto.tensor_shape) + + if (GetArenaNoVirtual() != NULL) { + return _slow_release_tensor_shape(); + } else { + ::tensorflow::TensorShapeProto* temp = tensor_shape_; + tensor_shape_ = NULL; + return temp; + } +} + void TensorProto::set_allocated_tensor_shape(::tensorflow::TensorShapeProto* tensor_shape) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete tensor_shape_; + } + if (tensor_shape != NULL) { + _slow_set_allocated_tensor_shape(message_arena, &tensor_shape); + } + tensor_shape_ = tensor_shape; + if (tensor_shape) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorProto.tensor_shape) +} + +// optional int32 version_number = 3; +void TensorProto::clear_version_number() { + version_number_ = 0; +} +::google::protobuf::int32 TensorProto::version_number() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.version_number) + return version_number_; +} +void TensorProto::set_version_number(::google::protobuf::int32 value) { + + version_number_ = value; + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.version_number) +} + +// optional bytes tensor_content = 4; +void TensorProto::clear_tensor_content() { + tensor_content_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& TensorProto::tensor_content() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.tensor_content) + return tensor_content_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void TensorProto::set_tensor_content(const ::std::string& value) { + + tensor_content_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.tensor_content) +} +void TensorProto::set_tensor_content(const char* value) { + + tensor_content_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.TensorProto.tensor_content) +} +void TensorProto::set_tensor_content(const void* value, + size_t size) { + + tensor_content_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.TensorProto.tensor_content) +} +::std::string* TensorProto::mutable_tensor_content() { + + // @@protoc_insertion_point(field_mutable:tensorflow.TensorProto.tensor_content) + return tensor_content_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* TensorProto::release_tensor_content() { + // @@protoc_insertion_point(field_release:tensorflow.TensorProto.tensor_content) + + return tensor_content_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* TensorProto::unsafe_arena_release_tensor_content() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.TensorProto.tensor_content) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return tensor_content_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void TensorProto::set_allocated_tensor_content(::std::string* tensor_content) { + if (tensor_content != NULL) { + + } else { + + } + tensor_content_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), tensor_content, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorProto.tensor_content) +} +void TensorProto::unsafe_arena_set_allocated_tensor_content( + ::std::string* tensor_content) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (tensor_content != NULL) { + + } else { + + } + tensor_content_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + tensor_content, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TensorProto.tensor_content) +} + +// repeated int32 half_val = 13 [packed = true]; +int TensorProto::half_val_size() const { + return half_val_.size(); +} +void TensorProto::clear_half_val() { + half_val_.Clear(); +} +::google::protobuf::int32 TensorProto::half_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.half_val) + return half_val_.Get(index); +} +void TensorProto::set_half_val(int index, ::google::protobuf::int32 value) { + half_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.half_val) +} +void TensorProto::add_half_val(::google::protobuf::int32 value) { + half_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.half_val) +} +const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +TensorProto::half_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.half_val) + return half_val_; +} +::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +TensorProto::mutable_half_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.half_val) + return &half_val_; +} + +// repeated float float_val = 5 [packed = true]; +int TensorProto::float_val_size() const { + return float_val_.size(); +} +void TensorProto::clear_float_val() { + float_val_.Clear(); +} +float TensorProto::float_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.float_val) + return float_val_.Get(index); +} +void TensorProto::set_float_val(int index, float value) { + float_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.float_val) +} +void TensorProto::add_float_val(float value) { + float_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.float_val) +} +const ::google::protobuf::RepeatedField< float >& +TensorProto::float_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.float_val) + return float_val_; +} +::google::protobuf::RepeatedField< float >* +TensorProto::mutable_float_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.float_val) + return &float_val_; +} + +// repeated double double_val = 6 [packed = true]; +int TensorProto::double_val_size() const { + return double_val_.size(); +} +void TensorProto::clear_double_val() { + double_val_.Clear(); +} +double TensorProto::double_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.double_val) + return double_val_.Get(index); +} +void TensorProto::set_double_val(int index, double value) { + double_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.double_val) +} +void TensorProto::add_double_val(double value) { + double_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.double_val) +} +const ::google::protobuf::RepeatedField< double >& +TensorProto::double_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.double_val) + return double_val_; +} +::google::protobuf::RepeatedField< double >* +TensorProto::mutable_double_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.double_val) + return &double_val_; +} + +// repeated int32 int_val = 7 [packed = true]; +int TensorProto::int_val_size() const { + return int_val_.size(); +} +void TensorProto::clear_int_val() { + int_val_.Clear(); +} +::google::protobuf::int32 TensorProto::int_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.int_val) + return int_val_.Get(index); +} +void TensorProto::set_int_val(int index, ::google::protobuf::int32 value) { + int_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.int_val) +} +void TensorProto::add_int_val(::google::protobuf::int32 value) { + int_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.int_val) +} +const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +TensorProto::int_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.int_val) + return int_val_; +} +::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +TensorProto::mutable_int_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.int_val) + return &int_val_; +} + +// repeated bytes string_val = 8; +int TensorProto::string_val_size() const { + return string_val_.size(); +} +void TensorProto::clear_string_val() { + string_val_.Clear(); +} +const ::std::string& TensorProto::string_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.string_val) + return string_val_.Get(index); +} +::std::string* TensorProto::mutable_string_val(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.TensorProto.string_val) + return string_val_.Mutable(index); +} +void TensorProto::set_string_val(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.string_val) + string_val_.Mutable(index)->assign(value); +} +void TensorProto::set_string_val(int index, const char* value) { + string_val_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.TensorProto.string_val) +} +void TensorProto::set_string_val(int index, const void* value, size_t size) { + string_val_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.TensorProto.string_val) +} +::std::string* TensorProto::add_string_val() { + // @@protoc_insertion_point(field_add_mutable:tensorflow.TensorProto.string_val) + return string_val_.Add(); +} +void TensorProto::add_string_val(const ::std::string& value) { + string_val_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.string_val) +} +void TensorProto::add_string_val(const char* value) { + string_val_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.TensorProto.string_val) +} +void TensorProto::add_string_val(const void* value, size_t size) { + string_val_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.TensorProto.string_val) +} +const ::google::protobuf::RepeatedPtrField< ::std::string>& +TensorProto::string_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.string_val) + return string_val_; +} +::google::protobuf::RepeatedPtrField< ::std::string>* +TensorProto::mutable_string_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.string_val) + return &string_val_; +} + +// repeated float scomplex_val = 9 [packed = true]; +int TensorProto::scomplex_val_size() const { + return scomplex_val_.size(); +} +void TensorProto::clear_scomplex_val() { + scomplex_val_.Clear(); +} +float TensorProto::scomplex_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.scomplex_val) + return scomplex_val_.Get(index); +} +void TensorProto::set_scomplex_val(int index, float value) { + scomplex_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.scomplex_val) +} +void TensorProto::add_scomplex_val(float value) { + scomplex_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.scomplex_val) +} +const ::google::protobuf::RepeatedField< float >& +TensorProto::scomplex_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.scomplex_val) + return scomplex_val_; +} +::google::protobuf::RepeatedField< float >* +TensorProto::mutable_scomplex_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.scomplex_val) + return &scomplex_val_; +} + +// repeated int64 int64_val = 10 [packed = true]; +int TensorProto::int64_val_size() const { + return int64_val_.size(); +} +void TensorProto::clear_int64_val() { + int64_val_.Clear(); +} +::google::protobuf::int64 TensorProto::int64_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.int64_val) + return int64_val_.Get(index); +} +void TensorProto::set_int64_val(int index, ::google::protobuf::int64 value) { + int64_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.int64_val) +} +void TensorProto::add_int64_val(::google::protobuf::int64 value) { + int64_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.int64_val) +} +const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& +TensorProto::int64_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.int64_val) + return int64_val_; +} +::google::protobuf::RepeatedField< ::google::protobuf::int64 >* +TensorProto::mutable_int64_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.int64_val) + return &int64_val_; +} + +// repeated bool bool_val = 11 [packed = true]; +int TensorProto::bool_val_size() const { + return bool_val_.size(); +} +void TensorProto::clear_bool_val() { + bool_val_.Clear(); +} +bool TensorProto::bool_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.bool_val) + return bool_val_.Get(index); +} +void TensorProto::set_bool_val(int index, bool value) { + bool_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.bool_val) +} +void TensorProto::add_bool_val(bool value) { + bool_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.bool_val) +} +const ::google::protobuf::RepeatedField< bool >& +TensorProto::bool_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.bool_val) + return bool_val_; +} +::google::protobuf::RepeatedField< bool >* +TensorProto::mutable_bool_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.bool_val) + return &bool_val_; +} + +// repeated double dcomplex_val = 12 [packed = true]; +int TensorProto::dcomplex_val_size() const { + return dcomplex_val_.size(); +} +void TensorProto::clear_dcomplex_val() { + dcomplex_val_.Clear(); +} +double TensorProto::dcomplex_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.dcomplex_val) + return dcomplex_val_.Get(index); +} +void TensorProto::set_dcomplex_val(int index, double value) { + dcomplex_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.dcomplex_val) +} +void TensorProto::add_dcomplex_val(double value) { + dcomplex_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.dcomplex_val) +} +const ::google::protobuf::RepeatedField< double >& +TensorProto::dcomplex_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.dcomplex_val) + return dcomplex_val_; +} +::google::protobuf::RepeatedField< double >* +TensorProto::mutable_dcomplex_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.dcomplex_val) + return &dcomplex_val_; +} + +inline const TensorProto* TensorProto::internal_default_instance() { + return &TensorProto_default_instance_.get(); +} +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/tensor.pb.h b/modules/dnn/misc/tensorflow/tensor.pb.h new file mode 100644 index 000000000..362821f56 --- /dev/null +++ b/modules/dnn/misc/tensorflow/tensor.pb.h @@ -0,0 +1,770 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensor.proto + +#ifndef PROTOBUF_tensor_2eproto__INCLUDED +#define PROTOBUF_tensor_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 3001000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include "tensor_shape.pb.h" +#include "types.pb.h" +// @@protoc_insertion_point(includes) + +namespace tensorflow { + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_tensor_2eproto(); +void protobuf_InitDefaults_tensor_2eproto(); +void protobuf_AssignDesc_tensor_2eproto(); +void protobuf_ShutdownFile_tensor_2eproto(); + +class TensorProto; + +// =================================================================== + +class TensorProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.TensorProto) */ { + public: + TensorProto(); + virtual ~TensorProto(); + + TensorProto(const TensorProto& from); + + inline TensorProto& operator=(const TensorProto& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const TensorProto& default_instance(); + + static const TensorProto* internal_default_instance(); + + void UnsafeArenaSwap(TensorProto* other); + void Swap(TensorProto* other); + + // implements Message ---------------------------------------------- + + inline TensorProto* New() const { return New(NULL); } + + TensorProto* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const TensorProto& from); + void MergeFrom(const TensorProto& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(TensorProto* other); + void UnsafeMergeFrom(const TensorProto& from); + protected: + explicit TensorProto(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional .tensorflow.DataType dtype = 1; + void clear_dtype(); + static const int kDtypeFieldNumber = 1; + ::tensorflow::DataType dtype() const; + void set_dtype(::tensorflow::DataType value); + + // optional .tensorflow.TensorShapeProto tensor_shape = 2; + bool has_tensor_shape() const; + void clear_tensor_shape(); + static const int kTensorShapeFieldNumber = 2; + private: + void _slow_mutable_tensor_shape(); + void _slow_set_allocated_tensor_shape( + ::google::protobuf::Arena* message_arena, ::tensorflow::TensorShapeProto** tensor_shape); + ::tensorflow::TensorShapeProto* _slow_release_tensor_shape(); + public: + const ::tensorflow::TensorShapeProto& tensor_shape() const; + ::tensorflow::TensorShapeProto* mutable_tensor_shape(); + ::tensorflow::TensorShapeProto* release_tensor_shape(); + void set_allocated_tensor_shape(::tensorflow::TensorShapeProto* tensor_shape); + ::tensorflow::TensorShapeProto* unsafe_arena_release_tensor_shape(); + void unsafe_arena_set_allocated_tensor_shape( + ::tensorflow::TensorShapeProto* tensor_shape); + + // optional int32 version_number = 3; + void clear_version_number(); + static const int kVersionNumberFieldNumber = 3; + ::google::protobuf::int32 version_number() const; + void set_version_number(::google::protobuf::int32 value); + + // optional bytes tensor_content = 4; + void clear_tensor_content(); + static const int kTensorContentFieldNumber = 4; + const ::std::string& tensor_content() const; + void set_tensor_content(const ::std::string& value); + void set_tensor_content(const char* value); + void set_tensor_content(const void* value, size_t size); + ::std::string* mutable_tensor_content(); + ::std::string* release_tensor_content(); + void set_allocated_tensor_content(::std::string* tensor_content); + ::std::string* unsafe_arena_release_tensor_content(); + void unsafe_arena_set_allocated_tensor_content( + ::std::string* tensor_content); + + // repeated int32 half_val = 13 [packed = true]; + int half_val_size() const; + void clear_half_val(); + static const int kHalfValFieldNumber = 13; + ::google::protobuf::int32 half_val(int index) const; + void set_half_val(int index, ::google::protobuf::int32 value); + void add_half_val(::google::protobuf::int32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + half_val() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_half_val(); + + // repeated float float_val = 5 [packed = true]; + int float_val_size() const; + void clear_float_val(); + static const int kFloatValFieldNumber = 5; + float float_val(int index) const; + void set_float_val(int index, float value); + void add_float_val(float value); + const ::google::protobuf::RepeatedField< float >& + float_val() const; + ::google::protobuf::RepeatedField< float >* + mutable_float_val(); + + // repeated double double_val = 6 [packed = true]; + int double_val_size() const; + void clear_double_val(); + static const int kDoubleValFieldNumber = 6; + double double_val(int index) const; + void set_double_val(int index, double value); + void add_double_val(double value); + const ::google::protobuf::RepeatedField< double >& + double_val() const; + ::google::protobuf::RepeatedField< double >* + mutable_double_val(); + + // repeated int32 int_val = 7 [packed = true]; + int int_val_size() const; + void clear_int_val(); + static const int kIntValFieldNumber = 7; + ::google::protobuf::int32 int_val(int index) const; + void set_int_val(int index, ::google::protobuf::int32 value); + void add_int_val(::google::protobuf::int32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + int_val() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_int_val(); + + // repeated bytes string_val = 8; + int string_val_size() const; + void clear_string_val(); + static const int kStringValFieldNumber = 8; + const ::std::string& string_val(int index) const; + ::std::string* mutable_string_val(int index); + void set_string_val(int index, const ::std::string& value); + void set_string_val(int index, const char* value); + void set_string_val(int index, const void* value, size_t size); + ::std::string* add_string_val(); + void add_string_val(const ::std::string& value); + void add_string_val(const char* value); + void add_string_val(const void* value, size_t size); + const ::google::protobuf::RepeatedPtrField< ::std::string>& string_val() const; + ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_string_val(); + + // repeated float scomplex_val = 9 [packed = true]; + int scomplex_val_size() const; + void clear_scomplex_val(); + static const int kScomplexValFieldNumber = 9; + float scomplex_val(int index) const; + void set_scomplex_val(int index, float value); + void add_scomplex_val(float value); + const ::google::protobuf::RepeatedField< float >& + scomplex_val() const; + ::google::protobuf::RepeatedField< float >* + mutable_scomplex_val(); + + // repeated int64 int64_val = 10 [packed = true]; + int int64_val_size() const; + void clear_int64_val(); + static const int kInt64ValFieldNumber = 10; + ::google::protobuf::int64 int64_val(int index) const; + void set_int64_val(int index, ::google::protobuf::int64 value); + void add_int64_val(::google::protobuf::int64 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& + int64_val() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* + mutable_int64_val(); + + // repeated bool bool_val = 11 [packed = true]; + int bool_val_size() const; + void clear_bool_val(); + static const int kBoolValFieldNumber = 11; + bool bool_val(int index) const; + void set_bool_val(int index, bool value); + void add_bool_val(bool value); + const ::google::protobuf::RepeatedField< bool >& + bool_val() const; + ::google::protobuf::RepeatedField< bool >* + mutable_bool_val(); + + // repeated double dcomplex_val = 12 [packed = true]; + int dcomplex_val_size() const; + void clear_dcomplex_val(); + static const int kDcomplexValFieldNumber = 12; + double dcomplex_val(int index) const; + void set_dcomplex_val(int index, double value); + void add_dcomplex_val(double value); + const ::google::protobuf::RepeatedField< double >& + dcomplex_val() const; + ::google::protobuf::RepeatedField< double >* + mutable_dcomplex_val(); + + // @@protoc_insertion_point(class_scope:tensorflow.TensorProto) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > half_val_; + mutable int _half_val_cached_byte_size_; + ::google::protobuf::RepeatedField< float > float_val_; + mutable int _float_val_cached_byte_size_; + ::google::protobuf::RepeatedField< double > double_val_; + mutable int _double_val_cached_byte_size_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > int_val_; + mutable int _int_val_cached_byte_size_; + ::google::protobuf::RepeatedPtrField< ::std::string> string_val_; + ::google::protobuf::RepeatedField< float > scomplex_val_; + mutable int _scomplex_val_cached_byte_size_; + ::google::protobuf::RepeatedField< ::google::protobuf::int64 > int64_val_; + mutable int _int64_val_cached_byte_size_; + ::google::protobuf::RepeatedField< bool > bool_val_; + mutable int _bool_val_cached_byte_size_; + ::google::protobuf::RepeatedField< double > dcomplex_val_; + mutable int _dcomplex_val_cached_byte_size_; + ::google::protobuf::internal::ArenaStringPtr tensor_content_; + ::tensorflow::TensorShapeProto* tensor_shape_; + int dtype_; + ::google::protobuf::int32 version_number_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_tensor_2eproto_impl(); + friend void protobuf_AddDesc_tensor_2eproto_impl(); + friend void protobuf_AssignDesc_tensor_2eproto(); + friend void protobuf_ShutdownFile_tensor_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed TensorProto_default_instance_; + +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +// TensorProto + +// optional .tensorflow.DataType dtype = 1; +inline void TensorProto::clear_dtype() { + dtype_ = 0; +} +inline ::tensorflow::DataType TensorProto::dtype() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.dtype) + return static_cast< ::tensorflow::DataType >(dtype_); +} +inline void TensorProto::set_dtype(::tensorflow::DataType value) { + + dtype_ = value; + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.dtype) +} + +// optional .tensorflow.TensorShapeProto tensor_shape = 2; +inline bool TensorProto::has_tensor_shape() const { + return this != internal_default_instance() && tensor_shape_ != NULL; +} +inline void TensorProto::clear_tensor_shape() { + if (GetArenaNoVirtual() == NULL && tensor_shape_ != NULL) delete tensor_shape_; + tensor_shape_ = NULL; +} +inline const ::tensorflow::TensorShapeProto& TensorProto::tensor_shape() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.tensor_shape) + return tensor_shape_ != NULL ? *tensor_shape_ + : *::tensorflow::TensorShapeProto::internal_default_instance(); +} +inline ::tensorflow::TensorShapeProto* TensorProto::mutable_tensor_shape() { + + if (tensor_shape_ == NULL) { + _slow_mutable_tensor_shape(); + } + // @@protoc_insertion_point(field_mutable:tensorflow.TensorProto.tensor_shape) + return tensor_shape_; +} +inline ::tensorflow::TensorShapeProto* TensorProto::release_tensor_shape() { + // @@protoc_insertion_point(field_release:tensorflow.TensorProto.tensor_shape) + + if (GetArenaNoVirtual() != NULL) { + return _slow_release_tensor_shape(); + } else { + ::tensorflow::TensorShapeProto* temp = tensor_shape_; + tensor_shape_ = NULL; + return temp; + } +} +inline void TensorProto::set_allocated_tensor_shape(::tensorflow::TensorShapeProto* tensor_shape) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete tensor_shape_; + } + if (tensor_shape != NULL) { + _slow_set_allocated_tensor_shape(message_arena, &tensor_shape); + } + tensor_shape_ = tensor_shape; + if (tensor_shape) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorProto.tensor_shape) +} + +// optional int32 version_number = 3; +inline void TensorProto::clear_version_number() { + version_number_ = 0; +} +inline ::google::protobuf::int32 TensorProto::version_number() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.version_number) + return version_number_; +} +inline void TensorProto::set_version_number(::google::protobuf::int32 value) { + + version_number_ = value; + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.version_number) +} + +// optional bytes tensor_content = 4; +inline void TensorProto::clear_tensor_content() { + tensor_content_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& TensorProto::tensor_content() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.tensor_content) + return tensor_content_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void TensorProto::set_tensor_content(const ::std::string& value) { + + tensor_content_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.tensor_content) +} +inline void TensorProto::set_tensor_content(const char* value) { + + tensor_content_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.TensorProto.tensor_content) +} +inline void TensorProto::set_tensor_content(const void* value, + size_t size) { + + tensor_content_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.TensorProto.tensor_content) +} +inline ::std::string* TensorProto::mutable_tensor_content() { + + // @@protoc_insertion_point(field_mutable:tensorflow.TensorProto.tensor_content) + return tensor_content_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* TensorProto::release_tensor_content() { + // @@protoc_insertion_point(field_release:tensorflow.TensorProto.tensor_content) + + return tensor_content_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* TensorProto::unsafe_arena_release_tensor_content() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.TensorProto.tensor_content) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return tensor_content_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void TensorProto::set_allocated_tensor_content(::std::string* tensor_content) { + if (tensor_content != NULL) { + + } else { + + } + tensor_content_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), tensor_content, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorProto.tensor_content) +} +inline void TensorProto::unsafe_arena_set_allocated_tensor_content( + ::std::string* tensor_content) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (tensor_content != NULL) { + + } else { + + } + tensor_content_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + tensor_content, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TensorProto.tensor_content) +} + +// repeated int32 half_val = 13 [packed = true]; +inline int TensorProto::half_val_size() const { + return half_val_.size(); +} +inline void TensorProto::clear_half_val() { + half_val_.Clear(); +} +inline ::google::protobuf::int32 TensorProto::half_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.half_val) + return half_val_.Get(index); +} +inline void TensorProto::set_half_val(int index, ::google::protobuf::int32 value) { + half_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.half_val) +} +inline void TensorProto::add_half_val(::google::protobuf::int32 value) { + half_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.half_val) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +TensorProto::half_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.half_val) + return half_val_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +TensorProto::mutable_half_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.half_val) + return &half_val_; +} + +// repeated float float_val = 5 [packed = true]; +inline int TensorProto::float_val_size() const { + return float_val_.size(); +} +inline void TensorProto::clear_float_val() { + float_val_.Clear(); +} +inline float TensorProto::float_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.float_val) + return float_val_.Get(index); +} +inline void TensorProto::set_float_val(int index, float value) { + float_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.float_val) +} +inline void TensorProto::add_float_val(float value) { + float_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.float_val) +} +inline const ::google::protobuf::RepeatedField< float >& +TensorProto::float_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.float_val) + return float_val_; +} +inline ::google::protobuf::RepeatedField< float >* +TensorProto::mutable_float_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.float_val) + return &float_val_; +} + +// repeated double double_val = 6 [packed = true]; +inline int TensorProto::double_val_size() const { + return double_val_.size(); +} +inline void TensorProto::clear_double_val() { + double_val_.Clear(); +} +inline double TensorProto::double_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.double_val) + return double_val_.Get(index); +} +inline void TensorProto::set_double_val(int index, double value) { + double_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.double_val) +} +inline void TensorProto::add_double_val(double value) { + double_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.double_val) +} +inline const ::google::protobuf::RepeatedField< double >& +TensorProto::double_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.double_val) + return double_val_; +} +inline ::google::protobuf::RepeatedField< double >* +TensorProto::mutable_double_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.double_val) + return &double_val_; +} + +// repeated int32 int_val = 7 [packed = true]; +inline int TensorProto::int_val_size() const { + return int_val_.size(); +} +inline void TensorProto::clear_int_val() { + int_val_.Clear(); +} +inline ::google::protobuf::int32 TensorProto::int_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.int_val) + return int_val_.Get(index); +} +inline void TensorProto::set_int_val(int index, ::google::protobuf::int32 value) { + int_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.int_val) +} +inline void TensorProto::add_int_val(::google::protobuf::int32 value) { + int_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.int_val) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +TensorProto::int_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.int_val) + return int_val_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +TensorProto::mutable_int_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.int_val) + return &int_val_; +} + +// repeated bytes string_val = 8; +inline int TensorProto::string_val_size() const { + return string_val_.size(); +} +inline void TensorProto::clear_string_val() { + string_val_.Clear(); +} +inline const ::std::string& TensorProto::string_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.string_val) + return string_val_.Get(index); +} +inline ::std::string* TensorProto::mutable_string_val(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.TensorProto.string_val) + return string_val_.Mutable(index); +} +inline void TensorProto::set_string_val(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.string_val) + string_val_.Mutable(index)->assign(value); +} +inline void TensorProto::set_string_val(int index, const char* value) { + string_val_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.TensorProto.string_val) +} +inline void TensorProto::set_string_val(int index, const void* value, size_t size) { + string_val_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.TensorProto.string_val) +} +inline ::std::string* TensorProto::add_string_val() { + // @@protoc_insertion_point(field_add_mutable:tensorflow.TensorProto.string_val) + return string_val_.Add(); +} +inline void TensorProto::add_string_val(const ::std::string& value) { + string_val_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.string_val) +} +inline void TensorProto::add_string_val(const char* value) { + string_val_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.TensorProto.string_val) +} +inline void TensorProto::add_string_val(const void* value, size_t size) { + string_val_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.TensorProto.string_val) +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +TensorProto::string_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.string_val) + return string_val_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +TensorProto::mutable_string_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.string_val) + return &string_val_; +} + +// repeated float scomplex_val = 9 [packed = true]; +inline int TensorProto::scomplex_val_size() const { + return scomplex_val_.size(); +} +inline void TensorProto::clear_scomplex_val() { + scomplex_val_.Clear(); +} +inline float TensorProto::scomplex_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.scomplex_val) + return scomplex_val_.Get(index); +} +inline void TensorProto::set_scomplex_val(int index, float value) { + scomplex_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.scomplex_val) +} +inline void TensorProto::add_scomplex_val(float value) { + scomplex_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.scomplex_val) +} +inline const ::google::protobuf::RepeatedField< float >& +TensorProto::scomplex_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.scomplex_val) + return scomplex_val_; +} +inline ::google::protobuf::RepeatedField< float >* +TensorProto::mutable_scomplex_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.scomplex_val) + return &scomplex_val_; +} + +// repeated int64 int64_val = 10 [packed = true]; +inline int TensorProto::int64_val_size() const { + return int64_val_.size(); +} +inline void TensorProto::clear_int64_val() { + int64_val_.Clear(); +} +inline ::google::protobuf::int64 TensorProto::int64_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.int64_val) + return int64_val_.Get(index); +} +inline void TensorProto::set_int64_val(int index, ::google::protobuf::int64 value) { + int64_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.int64_val) +} +inline void TensorProto::add_int64_val(::google::protobuf::int64 value) { + int64_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.int64_val) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& +TensorProto::int64_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.int64_val) + return int64_val_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* +TensorProto::mutable_int64_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.int64_val) + return &int64_val_; +} + +// repeated bool bool_val = 11 [packed = true]; +inline int TensorProto::bool_val_size() const { + return bool_val_.size(); +} +inline void TensorProto::clear_bool_val() { + bool_val_.Clear(); +} +inline bool TensorProto::bool_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.bool_val) + return bool_val_.Get(index); +} +inline void TensorProto::set_bool_val(int index, bool value) { + bool_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.bool_val) +} +inline void TensorProto::add_bool_val(bool value) { + bool_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.bool_val) +} +inline const ::google::protobuf::RepeatedField< bool >& +TensorProto::bool_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.bool_val) + return bool_val_; +} +inline ::google::protobuf::RepeatedField< bool >* +TensorProto::mutable_bool_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.bool_val) + return &bool_val_; +} + +// repeated double dcomplex_val = 12 [packed = true]; +inline int TensorProto::dcomplex_val_size() const { + return dcomplex_val_.size(); +} +inline void TensorProto::clear_dcomplex_val() { + dcomplex_val_.Clear(); +} +inline double TensorProto::dcomplex_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.dcomplex_val) + return dcomplex_val_.Get(index); +} +inline void TensorProto::set_dcomplex_val(int index, double value) { + dcomplex_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.dcomplex_val) +} +inline void TensorProto::add_dcomplex_val(double value) { + dcomplex_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.dcomplex_val) +} +inline const ::google::protobuf::RepeatedField< double >& +TensorProto::dcomplex_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.dcomplex_val) + return dcomplex_val_; +} +inline ::google::protobuf::RepeatedField< double >* +TensorProto::mutable_dcomplex_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.dcomplex_val) + return &dcomplex_val_; +} + +inline const TensorProto* TensorProto::internal_default_instance() { + return &TensorProto_default_instance_.get(); +} +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_tensor_2eproto__INCLUDED diff --git a/modules/dnn/misc/tensorflow/tensor_shape.pb.cc b/modules/dnn/misc/tensorflow/tensor_shape.pb.cc new file mode 100644 index 000000000..1e92ff884 --- /dev/null +++ b/modules/dnn/misc/tensorflow/tensor_shape.pb.cc @@ -0,0 +1,895 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensor_shape.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "tensor_shape.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace tensorflow { + +namespace { + +const ::google::protobuf::Descriptor* TensorShapeProto_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + TensorShapeProto_reflection_ = NULL; +const ::google::protobuf::Descriptor* TensorShapeProto_Dim_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + TensorShapeProto_Dim_reflection_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_tensor_5fshape_2eproto() GOOGLE_ATTRIBUTE_COLD; +void protobuf_AssignDesc_tensor_5fshape_2eproto() { + protobuf_AddDesc_tensor_5fshape_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "tensor_shape.proto"); + GOOGLE_CHECK(file != NULL); + TensorShapeProto_descriptor_ = file->message_type(0); + static const int TensorShapeProto_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorShapeProto, dim_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorShapeProto, unknown_rank_), + }; + TensorShapeProto_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + TensorShapeProto_descriptor_, + TensorShapeProto::internal_default_instance(), + TensorShapeProto_offsets_, + -1, + -1, + -1, + sizeof(TensorShapeProto), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorShapeProto, _internal_metadata_)); + TensorShapeProto_Dim_descriptor_ = TensorShapeProto_descriptor_->nested_type(0); + static const int TensorShapeProto_Dim_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorShapeProto_Dim, size_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorShapeProto_Dim, name_), + }; + TensorShapeProto_Dim_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + TensorShapeProto_Dim_descriptor_, + TensorShapeProto_Dim::internal_default_instance(), + TensorShapeProto_Dim_offsets_, + -1, + -1, + -1, + sizeof(TensorShapeProto_Dim), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TensorShapeProto_Dim, _internal_metadata_)); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_tensor_5fshape_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + TensorShapeProto_descriptor_, TensorShapeProto::internal_default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + TensorShapeProto_Dim_descriptor_, TensorShapeProto_Dim::internal_default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_tensor_5fshape_2eproto() { + TensorShapeProto_default_instance_.Shutdown(); + delete TensorShapeProto_reflection_; + TensorShapeProto_Dim_default_instance_.Shutdown(); + delete TensorShapeProto_Dim_reflection_; +} + +void protobuf_InitDefaults_tensor_5fshape_2eproto_impl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + TensorShapeProto_default_instance_.DefaultConstruct(); + ::google::protobuf::internal::GetEmptyString(); + TensorShapeProto_Dim_default_instance_.DefaultConstruct(); + TensorShapeProto_default_instance_.get_mutable()->InitAsDefaultInstance(); + TensorShapeProto_Dim_default_instance_.get_mutable()->InitAsDefaultInstance(); +} + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_InitDefaults_tensor_5fshape_2eproto_once_); +void protobuf_InitDefaults_tensor_5fshape_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_InitDefaults_tensor_5fshape_2eproto_once_, + &protobuf_InitDefaults_tensor_5fshape_2eproto_impl); +} +void protobuf_AddDesc_tensor_5fshape_2eproto_impl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + protobuf_InitDefaults_tensor_5fshape_2eproto(); + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\022tensor_shape.proto\022\ntensorflow\"z\n\020Tens" + "orShapeProto\022-\n\003dim\030\002 \003(\0132 .tensorflow.T" + "ensorShapeProto.Dim\022\024\n\014unknown_rank\030\003 \001(" + "\010\032!\n\003Dim\022\014\n\004size\030\001 \001(\003\022\014\n\004name\030\002 \001(\tB2\n\030" + "org.tensorflow.frameworkB\021TensorShapePro" + "tosP\001\370\001\001b\006proto3", 216); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "tensor_shape.proto", &protobuf_RegisterTypes); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_tensor_5fshape_2eproto); +} + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_tensor_5fshape_2eproto_once_); +void protobuf_AddDesc_tensor_5fshape_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_tensor_5fshape_2eproto_once_, + &protobuf_AddDesc_tensor_5fshape_2eproto_impl); +} +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_tensor_5fshape_2eproto { + StaticDescriptorInitializer_tensor_5fshape_2eproto() { + protobuf_AddDesc_tensor_5fshape_2eproto(); + } +} static_descriptor_initializer_tensor_5fshape_2eproto_; + +namespace { + +static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD GOOGLE_ATTRIBUTE_NORETURN; +static void MergeFromFail(int line) { + ::google::protobuf::internal::MergeFromFail(__FILE__, line); +} + +} // namespace + + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TensorShapeProto_Dim::kSizeFieldNumber; +const int TensorShapeProto_Dim::kNameFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TensorShapeProto_Dim::TensorShapeProto_Dim() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_tensor_5fshape_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.TensorShapeProto.Dim) +} +TensorShapeProto_Dim::TensorShapeProto_Dim(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_tensor_5fshape_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.TensorShapeProto.Dim) +} + +void TensorShapeProto_Dim::InitAsDefaultInstance() { +} + +TensorShapeProto_Dim::TensorShapeProto_Dim(const TensorShapeProto_Dim& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.TensorShapeProto.Dim) +} + +void TensorShapeProto_Dim::SharedCtor() { + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + size_ = GOOGLE_LONGLONG(0); + _cached_size_ = 0; +} + +TensorShapeProto_Dim::~TensorShapeProto_Dim() { + // @@protoc_insertion_point(destructor:tensorflow.TensorShapeProto.Dim) + SharedDtor(); +} + +void TensorShapeProto_Dim::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + + name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); +} + +void TensorShapeProto_Dim::ArenaDtor(void* object) { + TensorShapeProto_Dim* _this = reinterpret_cast< TensorShapeProto_Dim* >(object); + (void)_this; +} +void TensorShapeProto_Dim::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void TensorShapeProto_Dim::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* TensorShapeProto_Dim::descriptor() { + protobuf_AssignDescriptorsOnce(); + return TensorShapeProto_Dim_descriptor_; +} + +const TensorShapeProto_Dim& TensorShapeProto_Dim::default_instance() { + protobuf_InitDefaults_tensor_5fshape_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed TensorShapeProto_Dim_default_instance_; + +TensorShapeProto_Dim* TensorShapeProto_Dim::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void TensorShapeProto_Dim::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.TensorShapeProto.Dim) + size_ = GOOGLE_LONGLONG(0); + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} + +bool TensorShapeProto_Dim::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.TensorShapeProto.Dim) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional int64 size = 1; + case 1: { + if (tag == 8) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &size_))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_name; + break; + } + + // optional string name = 2; + case 2: { + if (tag == 18) { + parse_name: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "tensorflow.TensorShapeProto.Dim.name")); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.TensorShapeProto.Dim) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.TensorShapeProto.Dim) + return false; +#undef DO_ +} + +void TensorShapeProto_Dim::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.TensorShapeProto.Dim) + // optional int64 size = 1; + if (this->size() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->size(), output); + } + + // optional string name = 2; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.TensorShapeProto.Dim.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->name(), output); + } + + // @@protoc_insertion_point(serialize_end:tensorflow.TensorShapeProto.Dim) +} + +::google::protobuf::uint8* TensorShapeProto_Dim::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TensorShapeProto.Dim) + // optional int64 size = 1; + if (this->size() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->size(), target); + } + + // optional string name = 2; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "tensorflow.TensorShapeProto.Dim.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->name(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TensorShapeProto.Dim) + return target; +} + +size_t TensorShapeProto_Dim::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.TensorShapeProto.Dim) + size_t total_size = 0; + + // optional int64 size = 1; + if (this->size() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->size()); + } + + // optional string name = 2; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void TensorShapeProto_Dim::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.TensorShapeProto.Dim) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const TensorShapeProto_Dim* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.TensorShapeProto.Dim) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.TensorShapeProto.Dim) + UnsafeMergeFrom(*source); + } +} + +void TensorShapeProto_Dim::MergeFrom(const TensorShapeProto_Dim& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TensorShapeProto.Dim) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void TensorShapeProto_Dim::UnsafeMergeFrom(const TensorShapeProto_Dim& from) { + GOOGLE_DCHECK(&from != this); + if (from.size() != 0) { + set_size(from.size()); + } + if (from.name().size() > 0) { + set_name(from.name()); + } +} + +void TensorShapeProto_Dim::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.TensorShapeProto.Dim) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TensorShapeProto_Dim::CopyFrom(const TensorShapeProto_Dim& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TensorShapeProto.Dim) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool TensorShapeProto_Dim::IsInitialized() const { + + return true; +} + +void TensorShapeProto_Dim::Swap(TensorShapeProto_Dim* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + TensorShapeProto_Dim temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void TensorShapeProto_Dim::UnsafeArenaSwap(TensorShapeProto_Dim* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void TensorShapeProto_Dim::InternalSwap(TensorShapeProto_Dim* other) { + std::swap(size_, other->size_); + name_.Swap(&other->name_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata TensorShapeProto_Dim::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = TensorShapeProto_Dim_descriptor_; + metadata.reflection = TensorShapeProto_Dim_reflection_; + return metadata; +} + + +// ------------------------------------------------------------------- + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TensorShapeProto::kDimFieldNumber; +const int TensorShapeProto::kUnknownRankFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TensorShapeProto::TensorShapeProto() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_tensor_5fshape_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.TensorShapeProto) +} +TensorShapeProto::TensorShapeProto(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena), + dim_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_tensor_5fshape_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.TensorShapeProto) +} + +void TensorShapeProto::InitAsDefaultInstance() { +} + +TensorShapeProto::TensorShapeProto(const TensorShapeProto& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.TensorShapeProto) +} + +void TensorShapeProto::SharedCtor() { + unknown_rank_ = false; + _cached_size_ = 0; +} + +TensorShapeProto::~TensorShapeProto() { + // @@protoc_insertion_point(destructor:tensorflow.TensorShapeProto) + SharedDtor(); +} + +void TensorShapeProto::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + +} + +void TensorShapeProto::ArenaDtor(void* object) { + TensorShapeProto* _this = reinterpret_cast< TensorShapeProto* >(object); + (void)_this; +} +void TensorShapeProto::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void TensorShapeProto::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* TensorShapeProto::descriptor() { + protobuf_AssignDescriptorsOnce(); + return TensorShapeProto_descriptor_; +} + +const TensorShapeProto& TensorShapeProto::default_instance() { + protobuf_InitDefaults_tensor_5fshape_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed TensorShapeProto_default_instance_; + +TensorShapeProto* TensorShapeProto::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void TensorShapeProto::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.TensorShapeProto) + unknown_rank_ = false; + dim_.Clear(); +} + +bool TensorShapeProto::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.TensorShapeProto) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated .tensorflow.TensorShapeProto.Dim dim = 2; + case 2: { + if (tag == 18) { + DO_(input->IncrementRecursionDepth()); + parse_loop_dim: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( + input, add_dim())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_loop_dim; + input->UnsafeDecrementRecursionDepth(); + if (input->ExpectTag(24)) goto parse_unknown_rank; + break; + } + + // optional bool unknown_rank = 3; + case 3: { + if (tag == 24) { + parse_unknown_rank: + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &unknown_rank_))); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.TensorShapeProto) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.TensorShapeProto) + return false; +#undef DO_ +} + +void TensorShapeProto::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.TensorShapeProto) + // repeated .tensorflow.TensorShapeProto.Dim dim = 2; + for (unsigned int i = 0, n = this->dim_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->dim(i), output); + } + + // optional bool unknown_rank = 3; + if (this->unknown_rank() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->unknown_rank(), output); + } + + // @@protoc_insertion_point(serialize_end:tensorflow.TensorShapeProto) +} + +::google::protobuf::uint8* TensorShapeProto::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TensorShapeProto) + // repeated .tensorflow.TensorShapeProto.Dim dim = 2; + for (unsigned int i = 0, n = this->dim_size(); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 2, this->dim(i), false, target); + } + + // optional bool unknown_rank = 3; + if (this->unknown_rank() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->unknown_rank(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TensorShapeProto) + return target; +} + +size_t TensorShapeProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.TensorShapeProto) + size_t total_size = 0; + + // optional bool unknown_rank = 3; + if (this->unknown_rank() != 0) { + total_size += 1 + 1; + } + + // repeated .tensorflow.TensorShapeProto.Dim dim = 2; + { + unsigned int count = this->dim_size(); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->dim(i)); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void TensorShapeProto::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.TensorShapeProto) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const TensorShapeProto* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.TensorShapeProto) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.TensorShapeProto) + UnsafeMergeFrom(*source); + } +} + +void TensorShapeProto::MergeFrom(const TensorShapeProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TensorShapeProto) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void TensorShapeProto::UnsafeMergeFrom(const TensorShapeProto& from) { + GOOGLE_DCHECK(&from != this); + dim_.MergeFrom(from.dim_); + if (from.unknown_rank() != 0) { + set_unknown_rank(from.unknown_rank()); + } +} + +void TensorShapeProto::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.TensorShapeProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TensorShapeProto::CopyFrom(const TensorShapeProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TensorShapeProto) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool TensorShapeProto::IsInitialized() const { + + return true; +} + +void TensorShapeProto::Swap(TensorShapeProto* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + TensorShapeProto temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void TensorShapeProto::UnsafeArenaSwap(TensorShapeProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void TensorShapeProto::InternalSwap(TensorShapeProto* other) { + dim_.UnsafeArenaSwap(&other->dim_); + std::swap(unknown_rank_, other->unknown_rank_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata TensorShapeProto::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = TensorShapeProto_descriptor_; + metadata.reflection = TensorShapeProto_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// TensorShapeProto_Dim + +// optional int64 size = 1; +void TensorShapeProto_Dim::clear_size() { + size_ = GOOGLE_LONGLONG(0); +} +::google::protobuf::int64 TensorShapeProto_Dim::size() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.Dim.size) + return size_; +} +void TensorShapeProto_Dim::set_size(::google::protobuf::int64 value) { + + size_ = value; + // @@protoc_insertion_point(field_set:tensorflow.TensorShapeProto.Dim.size) +} + +// optional string name = 2; +void TensorShapeProto_Dim::clear_name() { + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +const ::std::string& TensorShapeProto_Dim::name() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.Dim.name) + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void TensorShapeProto_Dim::set_name(const ::std::string& value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.TensorShapeProto.Dim.name) +} +void TensorShapeProto_Dim::set_name(const char* value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.TensorShapeProto.Dim.name) +} +void TensorShapeProto_Dim::set_name(const char* value, + size_t size) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.TensorShapeProto.Dim.name) +} +::std::string* TensorShapeProto_Dim::mutable_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.TensorShapeProto.Dim.name) + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* TensorShapeProto_Dim::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.TensorShapeProto.Dim.name) + + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +::std::string* TensorShapeProto_Dim::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.TensorShapeProto.Dim.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +void TensorShapeProto_Dim::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorShapeProto.Dim.name) +} +void TensorShapeProto_Dim::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TensorShapeProto.Dim.name) +} + +inline const TensorShapeProto_Dim* TensorShapeProto_Dim::internal_default_instance() { + return &TensorShapeProto_Dim_default_instance_.get(); +} +// ------------------------------------------------------------------- + +// TensorShapeProto + +// repeated .tensorflow.TensorShapeProto.Dim dim = 2; +int TensorShapeProto::dim_size() const { + return dim_.size(); +} +void TensorShapeProto::clear_dim() { + dim_.Clear(); +} +const ::tensorflow::TensorShapeProto_Dim& TensorShapeProto::dim(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.dim) + return dim_.Get(index); +} +::tensorflow::TensorShapeProto_Dim* TensorShapeProto::mutable_dim(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.TensorShapeProto.dim) + return dim_.Mutable(index); +} +::tensorflow::TensorShapeProto_Dim* TensorShapeProto::add_dim() { + // @@protoc_insertion_point(field_add:tensorflow.TensorShapeProto.dim) + return dim_.Add(); +} +::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >* +TensorShapeProto::mutable_dim() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorShapeProto.dim) + return &dim_; +} +const ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >& +TensorShapeProto::dim() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorShapeProto.dim) + return dim_; +} + +// optional bool unknown_rank = 3; +void TensorShapeProto::clear_unknown_rank() { + unknown_rank_ = false; +} +bool TensorShapeProto::unknown_rank() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.unknown_rank) + return unknown_rank_; +} +void TensorShapeProto::set_unknown_rank(bool value) { + + unknown_rank_ = value; + // @@protoc_insertion_point(field_set:tensorflow.TensorShapeProto.unknown_rank) +} + +inline const TensorShapeProto* TensorShapeProto::internal_default_instance() { + return &TensorShapeProto_default_instance_.get(); +} +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/tensor_shape.pb.h b/modules/dnn/misc/tensorflow/tensor_shape.pb.h new file mode 100644 index 000000000..df66bfcca --- /dev/null +++ b/modules/dnn/misc/tensorflow/tensor_shape.pb.h @@ -0,0 +1,423 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensor_shape.proto + +#ifndef PROTOBUF_tensor_5fshape_2eproto__INCLUDED +#define PROTOBUF_tensor_5fshape_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 3001000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace tensorflow { + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_tensor_5fshape_2eproto(); +void protobuf_InitDefaults_tensor_5fshape_2eproto(); +void protobuf_AssignDesc_tensor_5fshape_2eproto(); +void protobuf_ShutdownFile_tensor_5fshape_2eproto(); + +class TensorShapeProto; +class TensorShapeProto_Dim; + +// =================================================================== + +class TensorShapeProto_Dim : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.TensorShapeProto.Dim) */ { + public: + TensorShapeProto_Dim(); + virtual ~TensorShapeProto_Dim(); + + TensorShapeProto_Dim(const TensorShapeProto_Dim& from); + + inline TensorShapeProto_Dim& operator=(const TensorShapeProto_Dim& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const TensorShapeProto_Dim& default_instance(); + + static const TensorShapeProto_Dim* internal_default_instance(); + + void UnsafeArenaSwap(TensorShapeProto_Dim* other); + void Swap(TensorShapeProto_Dim* other); + + // implements Message ---------------------------------------------- + + inline TensorShapeProto_Dim* New() const { return New(NULL); } + + TensorShapeProto_Dim* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const TensorShapeProto_Dim& from); + void MergeFrom(const TensorShapeProto_Dim& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(TensorShapeProto_Dim* other); + void UnsafeMergeFrom(const TensorShapeProto_Dim& from); + protected: + explicit TensorShapeProto_Dim(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional int64 size = 1; + void clear_size(); + static const int kSizeFieldNumber = 1; + ::google::protobuf::int64 size() const; + void set_size(::google::protobuf::int64 value); + + // optional string name = 2; + void clear_name(); + static const int kNameFieldNumber = 2; + const ::std::string& name() const; + void set_name(const ::std::string& value); + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + ::std::string* unsafe_arena_release_name(); + void unsafe_arena_set_allocated_name( + ::std::string* name); + + // @@protoc_insertion_point(class_scope:tensorflow.TensorShapeProto.Dim) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::int64 size_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_tensor_5fshape_2eproto_impl(); + friend void protobuf_AddDesc_tensor_5fshape_2eproto_impl(); + friend void protobuf_AssignDesc_tensor_5fshape_2eproto(); + friend void protobuf_ShutdownFile_tensor_5fshape_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed TensorShapeProto_Dim_default_instance_; + +// ------------------------------------------------------------------- + +class TensorShapeProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.TensorShapeProto) */ { + public: + TensorShapeProto(); + virtual ~TensorShapeProto(); + + TensorShapeProto(const TensorShapeProto& from); + + inline TensorShapeProto& operator=(const TensorShapeProto& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const TensorShapeProto& default_instance(); + + static const TensorShapeProto* internal_default_instance(); + + void UnsafeArenaSwap(TensorShapeProto* other); + void Swap(TensorShapeProto* other); + + // implements Message ---------------------------------------------- + + inline TensorShapeProto* New() const { return New(NULL); } + + TensorShapeProto* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const TensorShapeProto& from); + void MergeFrom(const TensorShapeProto& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(TensorShapeProto* other); + void UnsafeMergeFrom(const TensorShapeProto& from); + protected: + explicit TensorShapeProto(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef TensorShapeProto_Dim Dim; + + // accessors ------------------------------------------------------- + + // repeated .tensorflow.TensorShapeProto.Dim dim = 2; + int dim_size() const; + void clear_dim(); + static const int kDimFieldNumber = 2; + const ::tensorflow::TensorShapeProto_Dim& dim(int index) const; + ::tensorflow::TensorShapeProto_Dim* mutable_dim(int index); + ::tensorflow::TensorShapeProto_Dim* add_dim(); + ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >* + mutable_dim(); + const ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >& + dim() const; + + // optional bool unknown_rank = 3; + void clear_unknown_rank(); + static const int kUnknownRankFieldNumber = 3; + bool unknown_rank() const; + void set_unknown_rank(bool value); + + // @@protoc_insertion_point(class_scope:tensorflow.TensorShapeProto) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim > dim_; + bool unknown_rank_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_tensor_5fshape_2eproto_impl(); + friend void protobuf_AddDesc_tensor_5fshape_2eproto_impl(); + friend void protobuf_AssignDesc_tensor_5fshape_2eproto(); + friend void protobuf_ShutdownFile_tensor_5fshape_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed TensorShapeProto_default_instance_; + +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +// TensorShapeProto_Dim + +// optional int64 size = 1; +inline void TensorShapeProto_Dim::clear_size() { + size_ = GOOGLE_LONGLONG(0); +} +inline ::google::protobuf::int64 TensorShapeProto_Dim::size() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.Dim.size) + return size_; +} +inline void TensorShapeProto_Dim::set_size(::google::protobuf::int64 value) { + + size_ = value; + // @@protoc_insertion_point(field_set:tensorflow.TensorShapeProto.Dim.size) +} + +// optional string name = 2; +inline void TensorShapeProto_Dim::clear_name() { + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const ::std::string& TensorShapeProto_Dim::name() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.Dim.name) + return name_.Get(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void TensorShapeProto_Dim::set_name(const ::std::string& value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.TensorShapeProto.Dim.name) +} +inline void TensorShapeProto_Dim::set_name(const char* value) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.TensorShapeProto.Dim.name) +} +inline void TensorShapeProto_Dim::set_name(const char* value, + size_t size) { + + name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.TensorShapeProto.Dim.name) +} +inline ::std::string* TensorShapeProto_Dim::mutable_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.TensorShapeProto.Dim.name) + return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* TensorShapeProto_Dim::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.TensorShapeProto.Dim.name) + + return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline ::std::string* TensorShapeProto_Dim::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.TensorShapeProto.Dim.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + + return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void TensorShapeProto_Dim::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorShapeProto.Dim.name) +} +inline void TensorShapeProto_Dim::unsafe_arena_set_allocated_name( + ::std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); + if (name != NULL) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TensorShapeProto.Dim.name) +} + +inline const TensorShapeProto_Dim* TensorShapeProto_Dim::internal_default_instance() { + return &TensorShapeProto_Dim_default_instance_.get(); +} +// ------------------------------------------------------------------- + +// TensorShapeProto + +// repeated .tensorflow.TensorShapeProto.Dim dim = 2; +inline int TensorShapeProto::dim_size() const { + return dim_.size(); +} +inline void TensorShapeProto::clear_dim() { + dim_.Clear(); +} +inline const ::tensorflow::TensorShapeProto_Dim& TensorShapeProto::dim(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.dim) + return dim_.Get(index); +} +inline ::tensorflow::TensorShapeProto_Dim* TensorShapeProto::mutable_dim(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.TensorShapeProto.dim) + return dim_.Mutable(index); +} +inline ::tensorflow::TensorShapeProto_Dim* TensorShapeProto::add_dim() { + // @@protoc_insertion_point(field_add:tensorflow.TensorShapeProto.dim) + return dim_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >* +TensorShapeProto::mutable_dim() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorShapeProto.dim) + return &dim_; +} +inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >& +TensorShapeProto::dim() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorShapeProto.dim) + return dim_; +} + +// optional bool unknown_rank = 3; +inline void TensorShapeProto::clear_unknown_rank() { + unknown_rank_ = false; +} +inline bool TensorShapeProto::unknown_rank() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.unknown_rank) + return unknown_rank_; +} +inline void TensorShapeProto::set_unknown_rank(bool value) { + + unknown_rank_ = value; + // @@protoc_insertion_point(field_set:tensorflow.TensorShapeProto.unknown_rank) +} + +inline const TensorShapeProto* TensorShapeProto::internal_default_instance() { + return &TensorShapeProto_default_instance_.get(); +} +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_tensor_5fshape_2eproto__INCLUDED diff --git a/modules/dnn/misc/tensorflow/types.pb.cc b/modules/dnn/misc/tensorflow/types.pb.cc new file mode 100644 index 000000000..0e509cc20 --- /dev/null +++ b/modules/dnn/misc/tensorflow/types.pb.cc @@ -0,0 +1,163 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: types.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "types.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace tensorflow { + +namespace { + +const ::google::protobuf::EnumDescriptor* DataType_descriptor_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_types_2eproto() GOOGLE_ATTRIBUTE_COLD; +void protobuf_AssignDesc_types_2eproto() { + protobuf_AddDesc_types_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "types.proto"); + GOOGLE_CHECK(file != NULL); + DataType_descriptor_ = file->enum_type(0); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_types_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); +} + +} // namespace + +void protobuf_ShutdownFile_types_2eproto() { +} + +void protobuf_InitDefaults_types_2eproto_impl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + +} + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_InitDefaults_types_2eproto_once_); +void protobuf_InitDefaults_types_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_InitDefaults_types_2eproto_once_, + &protobuf_InitDefaults_types_2eproto_impl); +} +void protobuf_AddDesc_types_2eproto_impl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + protobuf_InitDefaults_types_2eproto(); + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\013types.proto\022\ntensorflow*\234\005\n\010DataType\022\016" + "\n\nDT_INVALID\020\000\022\014\n\010DT_FLOAT\020\001\022\r\n\tDT_DOUBL" + "E\020\002\022\014\n\010DT_INT32\020\003\022\014\n\010DT_UINT8\020\004\022\014\n\010DT_IN" + "T16\020\005\022\013\n\007DT_INT8\020\006\022\r\n\tDT_STRING\020\007\022\020\n\014DT_" + "COMPLEX64\020\010\022\014\n\010DT_INT64\020\t\022\013\n\007DT_BOOL\020\n\022\014" + "\n\010DT_QINT8\020\013\022\r\n\tDT_QUINT8\020\014\022\r\n\tDT_QINT32" + "\020\r\022\017\n\013DT_BFLOAT16\020\016\022\r\n\tDT_QINT16\020\017\022\016\n\nDT" + "_QUINT16\020\020\022\r\n\tDT_UINT16\020\021\022\021\n\rDT_COMPLEX1" + "28\020\022\022\013\n\007DT_HALF\020\023\022\020\n\014DT_FLOAT_REF\020e\022\021\n\rD" + "T_DOUBLE_REF\020f\022\020\n\014DT_INT32_REF\020g\022\020\n\014DT_U" + "INT8_REF\020h\022\020\n\014DT_INT16_REF\020i\022\017\n\013DT_INT8_" + "REF\020j\022\021\n\rDT_STRING_REF\020k\022\024\n\020DT_COMPLEX64" + "_REF\020l\022\020\n\014DT_INT64_REF\020m\022\017\n\013DT_BOOL_REF\020" + "n\022\020\n\014DT_QINT8_REF\020o\022\021\n\rDT_QUINT8_REF\020p\022\021" + "\n\rDT_QINT32_REF\020q\022\023\n\017DT_BFLOAT16_REF\020r\022\021" + "\n\rDT_QINT16_REF\020s\022\022\n\016DT_QUINT16_REF\020t\022\021\n" + "\rDT_UINT16_REF\020u\022\025\n\021DT_COMPLEX128_REF\020v\022" + "\017\n\013DT_HALF_REF\020wB,\n\030org.tensorflow.frame" + "workB\013TypesProtosP\001\370\001\001b\006proto3", 750); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "types.proto", &protobuf_RegisterTypes); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_types_2eproto); +} + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_types_2eproto_once_); +void protobuf_AddDesc_types_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_types_2eproto_once_, + &protobuf_AddDesc_types_2eproto_impl); +} +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_types_2eproto { + StaticDescriptorInitializer_types_2eproto() { + protobuf_AddDesc_types_2eproto(); + } +} static_descriptor_initializer_types_2eproto_; +const ::google::protobuf::EnumDescriptor* DataType_descriptor() { + protobuf_AssignDescriptorsOnce(); + return DataType_descriptor_; +} +bool DataType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 108: + case 109: + case 110: + case 111: + case 112: + case 113: + case 114: + case 115: + case 116: + case 117: + case 118: + case 119: + return true; + default: + return false; + } +} + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/types.pb.h b/modules/dnn/misc/tensorflow/types.pb.h new file mode 100644 index 000000000..40ed7b856 --- /dev/null +++ b/modules/dnn/misc/tensorflow/types.pb.h @@ -0,0 +1,129 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: types.proto + +#ifndef PROTOBUF_types_2eproto__INCLUDED +#define PROTOBUF_types_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 3001000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace tensorflow { + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_types_2eproto(); +void protobuf_InitDefaults_types_2eproto(); +void protobuf_AssignDesc_types_2eproto(); +void protobuf_ShutdownFile_types_2eproto(); + + +enum DataType { + DT_INVALID = 0, + DT_FLOAT = 1, + DT_DOUBLE = 2, + DT_INT32 = 3, + DT_UINT8 = 4, + DT_INT16 = 5, + DT_INT8 = 6, + DT_STRING = 7, + DT_COMPLEX64 = 8, + DT_INT64 = 9, + DT_BOOL = 10, + DT_QINT8 = 11, + DT_QUINT8 = 12, + DT_QINT32 = 13, + DT_BFLOAT16 = 14, + DT_QINT16 = 15, + DT_QUINT16 = 16, + DT_UINT16 = 17, + DT_COMPLEX128 = 18, + DT_HALF = 19, + DT_FLOAT_REF = 101, + DT_DOUBLE_REF = 102, + DT_INT32_REF = 103, + DT_UINT8_REF = 104, + DT_INT16_REF = 105, + DT_INT8_REF = 106, + DT_STRING_REF = 107, + DT_COMPLEX64_REF = 108, + DT_INT64_REF = 109, + DT_BOOL_REF = 110, + DT_QINT8_REF = 111, + DT_QUINT8_REF = 112, + DT_QINT32_REF = 113, + DT_BFLOAT16_REF = 114, + DT_QINT16_REF = 115, + DT_QUINT16_REF = 116, + DT_UINT16_REF = 117, + DT_COMPLEX128_REF = 118, + DT_HALF_REF = 119, + DataType_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min, + DataType_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max +}; +bool DataType_IsValid(int value); +const DataType DataType_MIN = DT_INVALID; +const DataType DataType_MAX = DT_HALF_REF; +const int DataType_ARRAYSIZE = DataType_MAX + 1; + +const ::google::protobuf::EnumDescriptor* DataType_descriptor(); +inline const ::std::string& DataType_Name(DataType value) { + return ::google::protobuf::internal::NameOfEnum( + DataType_descriptor(), value); +} +inline bool DataType_Parse( + const ::std::string& name, DataType* value) { + return ::google::protobuf::internal::ParseNamedEnum( + DataType_descriptor(), name, value); +} +// =================================================================== + + +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +#ifndef SWIG +namespace google { +namespace protobuf { + +template <> struct is_proto_enum< ::tensorflow::DataType> : ::google::protobuf::internal::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::DataType>() { + return ::tensorflow::DataType_descriptor(); +} + +} // namespace protobuf +} // namespace google +#endif // SWIG + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_types_2eproto__INCLUDED diff --git a/modules/dnn/misc/tensorflow/versions.pb.cc b/modules/dnn/misc/tensorflow/versions.pb.cc new file mode 100644 index 000000000..a4556a0ff --- /dev/null +++ b/modules/dnn/misc/tensorflow/versions.pb.cc @@ -0,0 +1,572 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: versions.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "versions.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace tensorflow { + +namespace { + +const ::google::protobuf::Descriptor* VersionDef_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + VersionDef_reflection_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_versions_2eproto() GOOGLE_ATTRIBUTE_COLD; +void protobuf_AssignDesc_versions_2eproto() { + protobuf_AddDesc_versions_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "versions.proto"); + GOOGLE_CHECK(file != NULL); + VersionDef_descriptor_ = file->message_type(0); + static const int VersionDef_offsets_[3] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VersionDef, producer_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VersionDef, min_consumer_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VersionDef, bad_consumers_), + }; + VersionDef_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + VersionDef_descriptor_, + VersionDef::internal_default_instance(), + VersionDef_offsets_, + -1, + -1, + -1, + sizeof(VersionDef), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VersionDef, _internal_metadata_)); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_versions_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + VersionDef_descriptor_, VersionDef::internal_default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_versions_2eproto() { + VersionDef_default_instance_.Shutdown(); + delete VersionDef_reflection_; +} + +void protobuf_InitDefaults_versions_2eproto_impl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + VersionDef_default_instance_.DefaultConstruct(); + VersionDef_default_instance_.get_mutable()->InitAsDefaultInstance(); +} + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_InitDefaults_versions_2eproto_once_); +void protobuf_InitDefaults_versions_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_InitDefaults_versions_2eproto_once_, + &protobuf_InitDefaults_versions_2eproto_impl); +} +void protobuf_AddDesc_versions_2eproto_impl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + protobuf_InitDefaults_versions_2eproto(); + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\016versions.proto\022\ntensorflow\"K\n\nVersionD" + "ef\022\020\n\010producer\030\001 \001(\005\022\024\n\014min_consumer\030\002 \001" + "(\005\022\025\n\rbad_consumers\030\003 \003(\005B/\n\030org.tensorf" + "low.frameworkB\016VersionsProtosP\001\370\001\001b\006prot" + "o3", 162); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "versions.proto", &protobuf_RegisterTypes); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_versions_2eproto); +} + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_versions_2eproto_once_); +void protobuf_AddDesc_versions_2eproto() { + ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_versions_2eproto_once_, + &protobuf_AddDesc_versions_2eproto_impl); +} +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_versions_2eproto { + StaticDescriptorInitializer_versions_2eproto() { + protobuf_AddDesc_versions_2eproto(); + } +} static_descriptor_initializer_versions_2eproto_; + +namespace { + +static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD GOOGLE_ATTRIBUTE_NORETURN; +static void MergeFromFail(int line) { + ::google::protobuf::internal::MergeFromFail(__FILE__, line); +} + +} // namespace + + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int VersionDef::kProducerFieldNumber; +const int VersionDef::kMinConsumerFieldNumber; +const int VersionDef::kBadConsumersFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +VersionDef::VersionDef() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (this != internal_default_instance()) protobuf_InitDefaults_versions_2eproto(); + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.VersionDef) +} +VersionDef::VersionDef(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(), + _internal_metadata_(arena), + bad_consumers_(arena) { +#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + protobuf_InitDefaults_versions_2eproto(); +#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.VersionDef) +} + +void VersionDef::InitAsDefaultInstance() { +} + +VersionDef::VersionDef(const VersionDef& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + UnsafeMergeFrom(from); + // @@protoc_insertion_point(copy_constructor:tensorflow.VersionDef) +} + +void VersionDef::SharedCtor() { + ::memset(&producer_, 0, reinterpret_cast(&min_consumer_) - + reinterpret_cast(&producer_) + sizeof(min_consumer_)); + _cached_size_ = 0; +} + +VersionDef::~VersionDef() { + // @@protoc_insertion_point(destructor:tensorflow.VersionDef) + SharedDtor(); +} + +void VersionDef::SharedDtor() { + ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + if (arena != NULL) { + return; + } + +} + +void VersionDef::ArenaDtor(void* object) { + VersionDef* _this = reinterpret_cast< VersionDef* >(object); + (void)_this; +} +void VersionDef::RegisterArenaDtor(::google::protobuf::Arena* arena) { +} +void VersionDef::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* VersionDef::descriptor() { + protobuf_AssignDescriptorsOnce(); + return VersionDef_descriptor_; +} + +const VersionDef& VersionDef::default_instance() { + protobuf_InitDefaults_versions_2eproto(); + return *internal_default_instance(); +} + +::google::protobuf::internal::ExplicitlyConstructed VersionDef_default_instance_; + +VersionDef* VersionDef::New(::google::protobuf::Arena* arena) const { + return ::google::protobuf::Arena::CreateMessage(arena); +} + +void VersionDef::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.VersionDef) +#if defined(__clang__) +#define ZR_HELPER_(f) \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \ + __builtin_offsetof(VersionDef, f) \ + _Pragma("clang diagnostic pop") +#else +#define ZR_HELPER_(f) reinterpret_cast(\ + &reinterpret_cast(16)->f) +#endif + +#define ZR_(first, last) do {\ + ::memset(&(first), 0,\ + ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ +} while (0) + + ZR_(producer_, min_consumer_); + +#undef ZR_HELPER_ +#undef ZR_ + + bad_consumers_.Clear(); +} + +bool VersionDef::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.VersionDef) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional int32 producer = 1; + case 1: { + if (tag == 8) { + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &producer_))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_min_consumer; + break; + } + + // optional int32 min_consumer = 2; + case 2: { + if (tag == 16) { + parse_min_consumer: + + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &min_consumer_))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_bad_consumers; + break; + } + + // repeated int32 bad_consumers = 3; + case 3: { + if (tag == 26) { + parse_bad_consumers: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_bad_consumers()))); + } else if (tag == 24) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 26, input, this->mutable_bad_consumers()))); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.VersionDef) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.VersionDef) + return false; +#undef DO_ +} + +void VersionDef::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.VersionDef) + // optional int32 producer = 1; + if (this->producer() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->producer(), output); + } + + // optional int32 min_consumer = 2; + if (this->min_consumer() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->min_consumer(), output); + } + + // repeated int32 bad_consumers = 3; + if (this->bad_consumers_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(3, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_bad_consumers_cached_byte_size_); + } + for (int i = 0; i < this->bad_consumers_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + this->bad_consumers(i), output); + } + + // @@protoc_insertion_point(serialize_end:tensorflow.VersionDef) +} + +::google::protobuf::uint8* VersionDef::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.VersionDef) + // optional int32 producer = 1; + if (this->producer() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->producer(), target); + } + + // optional int32 min_consumer = 2; + if (this->min_consumer() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->min_consumer(), target); + } + + // repeated int32 bad_consumers = 3; + if (this->bad_consumers_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 3, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _bad_consumers_cached_byte_size_, target); + } + for (int i = 0; i < this->bad_consumers_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->bad_consumers(i), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.VersionDef) + return target; +} + +size_t VersionDef::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.VersionDef) + size_t total_size = 0; + + // optional int32 producer = 1; + if (this->producer() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->producer()); + } + + // optional int32 min_consumer = 2; + if (this->min_consumer() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->min_consumer()); + } + + // repeated int32 bad_consumers = 3; + { + size_t data_size = 0; + unsigned int count = this->bad_consumers_size(); + for (unsigned int i = 0; i < count; i++) { + data_size += ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->bad_consumers(i)); + } + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _bad_consumers_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void VersionDef::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.VersionDef) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const VersionDef* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.VersionDef) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.VersionDef) + UnsafeMergeFrom(*source); + } +} + +void VersionDef::MergeFrom(const VersionDef& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.VersionDef) + if (GOOGLE_PREDICT_TRUE(&from != this)) { + UnsafeMergeFrom(from); + } else { + MergeFromFail(__LINE__); + } +} + +void VersionDef::UnsafeMergeFrom(const VersionDef& from) { + GOOGLE_DCHECK(&from != this); + bad_consumers_.UnsafeMergeFrom(from.bad_consumers_); + if (from.producer() != 0) { + set_producer(from.producer()); + } + if (from.min_consumer() != 0) { + set_min_consumer(from.min_consumer()); + } +} + +void VersionDef::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.VersionDef) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void VersionDef::CopyFrom(const VersionDef& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.VersionDef) + if (&from == this) return; + Clear(); + UnsafeMergeFrom(from); +} + +bool VersionDef::IsInitialized() const { + + return true; +} + +void VersionDef::Swap(VersionDef* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + VersionDef temp; + temp.UnsafeMergeFrom(*this); + CopyFrom(*other); + other->CopyFrom(temp); + } +} +void VersionDef::UnsafeArenaSwap(VersionDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void VersionDef::InternalSwap(VersionDef* other) { + std::swap(producer_, other->producer_); + std::swap(min_consumer_, other->min_consumer_); + bad_consumers_.UnsafeArenaSwap(&other->bad_consumers_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata VersionDef::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = VersionDef_descriptor_; + metadata.reflection = VersionDef_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// VersionDef + +// optional int32 producer = 1; +void VersionDef::clear_producer() { + producer_ = 0; +} +::google::protobuf::int32 VersionDef::producer() const { + // @@protoc_insertion_point(field_get:tensorflow.VersionDef.producer) + return producer_; +} +void VersionDef::set_producer(::google::protobuf::int32 value) { + + producer_ = value; + // @@protoc_insertion_point(field_set:tensorflow.VersionDef.producer) +} + +// optional int32 min_consumer = 2; +void VersionDef::clear_min_consumer() { + min_consumer_ = 0; +} +::google::protobuf::int32 VersionDef::min_consumer() const { + // @@protoc_insertion_point(field_get:tensorflow.VersionDef.min_consumer) + return min_consumer_; +} +void VersionDef::set_min_consumer(::google::protobuf::int32 value) { + + min_consumer_ = value; + // @@protoc_insertion_point(field_set:tensorflow.VersionDef.min_consumer) +} + +// repeated int32 bad_consumers = 3; +int VersionDef::bad_consumers_size() const { + return bad_consumers_.size(); +} +void VersionDef::clear_bad_consumers() { + bad_consumers_.Clear(); +} +::google::protobuf::int32 VersionDef::bad_consumers(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.VersionDef.bad_consumers) + return bad_consumers_.Get(index); +} +void VersionDef::set_bad_consumers(int index, ::google::protobuf::int32 value) { + bad_consumers_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.VersionDef.bad_consumers) +} +void VersionDef::add_bad_consumers(::google::protobuf::int32 value) { + bad_consumers_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.VersionDef.bad_consumers) +} +const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +VersionDef::bad_consumers() const { + // @@protoc_insertion_point(field_list:tensorflow.VersionDef.bad_consumers) + return bad_consumers_; +} +::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +VersionDef::mutable_bad_consumers() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.VersionDef.bad_consumers) + return &bad_consumers_; +} + +inline const VersionDef* VersionDef::internal_default_instance() { + return &VersionDef_default_instance_.get(); +} +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/versions.pb.h b/modules/dnn/misc/tensorflow/versions.pb.h new file mode 100644 index 000000000..ce099cbf4 --- /dev/null +++ b/modules/dnn/misc/tensorflow/versions.pb.h @@ -0,0 +1,239 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: versions.proto + +#ifndef PROTOBUF_versions_2eproto__INCLUDED +#define PROTOBUF_versions_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 3001000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace tensorflow { + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_versions_2eproto(); +void protobuf_InitDefaults_versions_2eproto(); +void protobuf_AssignDesc_versions_2eproto(); +void protobuf_ShutdownFile_versions_2eproto(); + +class VersionDef; + +// =================================================================== + +class VersionDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.VersionDef) */ { + public: + VersionDef(); + virtual ~VersionDef(); + + VersionDef(const VersionDef& from); + + inline VersionDef& operator=(const VersionDef& from) { + CopyFrom(from); + return *this; + } + + inline ::google::protobuf::Arena* GetArena() const { return GetArenaNoVirtual(); } + inline void* GetMaybeArenaPointer() const { + return MaybeArenaPtr(); + } + static const ::google::protobuf::Descriptor* descriptor(); + static const VersionDef& default_instance(); + + static const VersionDef* internal_default_instance(); + + void UnsafeArenaSwap(VersionDef* other); + void Swap(VersionDef* other); + + // implements Message ---------------------------------------------- + + inline VersionDef* New() const { return New(NULL); } + + VersionDef* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const VersionDef& from); + void MergeFrom(const VersionDef& from); + void Clear(); + bool IsInitialized() const; + + size_t ByteSizeLong() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(VersionDef* other); + void UnsafeMergeFrom(const VersionDef& from); + protected: + explicit VersionDef(::google::protobuf::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional int32 producer = 1; + void clear_producer(); + static const int kProducerFieldNumber = 1; + ::google::protobuf::int32 producer() const; + void set_producer(::google::protobuf::int32 value); + + // optional int32 min_consumer = 2; + void clear_min_consumer(); + static const int kMinConsumerFieldNumber = 2; + ::google::protobuf::int32 min_consumer() const; + void set_min_consumer(::google::protobuf::int32 value); + + // repeated int32 bad_consumers = 3; + int bad_consumers_size() const; + void clear_bad_consumers(); + static const int kBadConsumersFieldNumber = 3; + ::google::protobuf::int32 bad_consumers(int index) const; + void set_bad_consumers(int index, ::google::protobuf::int32 value); + void add_bad_consumers(::google::protobuf::int32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + bad_consumers() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_bad_consumers(); + + // @@protoc_insertion_point(class_scope:tensorflow.VersionDef) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + friend class ::google::protobuf::Arena; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > bad_consumers_; + mutable int _bad_consumers_cached_byte_size_; + ::google::protobuf::int32 producer_; + ::google::protobuf::int32 min_consumer_; + mutable int _cached_size_; + friend void protobuf_InitDefaults_versions_2eproto_impl(); + friend void protobuf_AddDesc_versions_2eproto_impl(); + friend void protobuf_AssignDesc_versions_2eproto(); + friend void protobuf_ShutdownFile_versions_2eproto(); + + void InitAsDefaultInstance(); +}; +extern ::google::protobuf::internal::ExplicitlyConstructed VersionDef_default_instance_; + +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +// VersionDef + +// optional int32 producer = 1; +inline void VersionDef::clear_producer() { + producer_ = 0; +} +inline ::google::protobuf::int32 VersionDef::producer() const { + // @@protoc_insertion_point(field_get:tensorflow.VersionDef.producer) + return producer_; +} +inline void VersionDef::set_producer(::google::protobuf::int32 value) { + + producer_ = value; + // @@protoc_insertion_point(field_set:tensorflow.VersionDef.producer) +} + +// optional int32 min_consumer = 2; +inline void VersionDef::clear_min_consumer() { + min_consumer_ = 0; +} +inline ::google::protobuf::int32 VersionDef::min_consumer() const { + // @@protoc_insertion_point(field_get:tensorflow.VersionDef.min_consumer) + return min_consumer_; +} +inline void VersionDef::set_min_consumer(::google::protobuf::int32 value) { + + min_consumer_ = value; + // @@protoc_insertion_point(field_set:tensorflow.VersionDef.min_consumer) +} + +// repeated int32 bad_consumers = 3; +inline int VersionDef::bad_consumers_size() const { + return bad_consumers_.size(); +} +inline void VersionDef::clear_bad_consumers() { + bad_consumers_.Clear(); +} +inline ::google::protobuf::int32 VersionDef::bad_consumers(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.VersionDef.bad_consumers) + return bad_consumers_.Get(index); +} +inline void VersionDef::set_bad_consumers(int index, ::google::protobuf::int32 value) { + bad_consumers_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.VersionDef.bad_consumers) +} +inline void VersionDef::add_bad_consumers(::google::protobuf::int32 value) { + bad_consumers_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.VersionDef.bad_consumers) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +VersionDef::bad_consumers() const { + // @@protoc_insertion_point(field_list:tensorflow.VersionDef.bad_consumers) + return bad_consumers_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +VersionDef::mutable_bad_consumers() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.VersionDef.bad_consumers) + return &bad_consumers_; +} + +inline const VersionDef* VersionDef::internal_default_instance() { + return &VersionDef_default_instance_.get(); +} +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_versions_2eproto__INCLUDED diff --git a/modules/dnn/samples/tf_inception.cpp b/modules/dnn/samples/tf_inception.cpp new file mode 100644 index 000000000..e3b6e9cb3 --- /dev/null +++ b/modules/dnn/samples/tf_inception.cpp @@ -0,0 +1,182 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. + +// Copyright (C) 2016, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +/* +Sample of using OpenCV dnn module with Tensorflow Inception model. +*/ + +#include +#include +#include +using namespace cv; +using namespace cv::dnn; + +#include +#include +#include +using namespace std; + +const String keys = + "{help h || Sample app for loading Inception TensorFlow model. " + "The model and class names list can be downloaded here: " + "https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip }" + "{model m |tensorflow_inception_graph.pb| path to TensorFlow .pb model file }" + "{image i || path to image file }" + "{i_blob | .input | input blob name) }" + "{o_blob | softmax2 | output blob name) }" + "{c_names c | imagenet_comp_graph_label_strings.txt | path to file with classnames for class id }" + "{result r || path to save output blob (optional, binary format, NCHW order) }" + ; + +void getMaxClass(dnn::Blob &probBlob, int *classId, double *classProb); +std::vector readClassNames(const char *filename); + +int main(int argc, char **argv) +{ + cv::CommandLineParser parser(argc, argv, keys); + + if (parser.has("help")) + { + parser.printMessage(); + return 0; + } + + String modelFile = parser.get("model"); + String imageFile = parser.get("image"); + String inBlobName = parser.get("i_blob"); + String outBlobName = parser.get("o_blob"); + + if (!parser.check()) + { + parser.printErrors(); + return 0; + } + + String classNamesFile = parser.get("c_names"); + String resultFile = parser.get("result"); + + //! [Create the importer of TensorFlow model] + Ptr importer; + try //Try to import TensorFlow AlexNet model + { + importer = dnn::createTensorflowImporter(modelFile); + } + catch (const cv::Exception &err) //Importer can throw errors, we will catch them + { + std::cerr << err.msg << std::endl; + } + //! [Create the importer of Caffe model] + + if (!importer) + { + std::cerr << "Can't load network by using the mode file: " << std::endl; + std::cerr << modelFile << std::endl; + exit(-1); + } + + //! [Initialize network] + dnn::Net net; + importer->populateNet(net); + importer.release(); //We don't need importer anymore + //! [Initialize network] + + //! [Prepare blob] + Mat img = imread(imageFile); + if (img.empty()) + { + std::cerr << "Can't read image from the file: " << imageFile << std::endl; + exit(-1); + } + + cv::Size inputImgSize = cv::Size(224, 224); + + if (inputImgSize != img.size()) + resize(img, img, inputImgSize); //Resize image to input size + + cv::cvtColor(img, img, cv::COLOR_BGR2RGB); + + dnn::Blob inputBlob = dnn::Blob::fromImages(img); //Convert Mat to dnn::Blob image batch + //! [Prepare blob] + + //! [Set input blob] + net.setBlob(inBlobName, inputBlob); //set the network input + //! [Set input blob] + + cv::TickMeter tm; + tm.start(); + + //! [Make forward pass] + net.forward(); //compute output + //! [Make forward pass] + + tm.stop(); + + //! [Gather output] + dnn::Blob prob = net.getBlob(outBlobName); //gather output of "prob" layer + + Mat& result = prob.matRef(); + + BlobShape shape = prob.shape(); + + if (!resultFile.empty()) { + CV_Assert(result.isContinuous()); + + ofstream fout(resultFile.c_str(), ios::out | ios::binary); + fout.write((char*)result.data, result.total() * sizeof(float)); + fout.close(); + } + + std::cout << "Output blob shape " << shape << std::endl; + std::cout << "Inference time, ms: " << tm.getTimeMilli() << std::endl; + + if (!classNamesFile.empty()) { + std::vector classNames = readClassNames(classNamesFile.c_str()); + + int classId; + double classProb; + getMaxClass(prob, &classId, &classProb);//find the best class + + //! [Print results] + std::cout << "Best class: #" << classId << " '" << classNames.at(classId) << "'" << std::endl; + std::cout << "Probability: " << classProb * 100 << "%" << std::endl; + } + return 0; +} //main + + +/* Find best class for the blob (i. e. class with maximal probability) */ +void getMaxClass(dnn::Blob &probBlob, int *classId, double *classProb) +{ + Mat probMat = probBlob.matRefConst().reshape(1, 1); //reshape the blob to 1x1000 matrix + Point classNumber; + + minMaxLoc(probMat, NULL, classProb, NULL, &classNumber); + *classId = classNumber.x; +} + +std::vector readClassNames(const char *filename) +{ + std::vector classNames; + + std::ifstream fp(filename); + if (!fp.is_open()) + { + std::cerr << "File with classes labels not found: " << filename << std::endl; + exit(-1); + } + + std::string name; + while (!fp.eof()) + { + std::getline(fp, name); + if (name.length()) + classNames.push_back( name ); + } + + fp.close(); + return classNames; +} diff --git a/modules/dnn/src/caffe/layer_loaders.cpp b/modules/dnn/src/caffe/layer_loaders.cpp index 35ec9082c..40a7e567a 100644 --- a/modules/dnn/src/caffe/layer_loaders.cpp +++ b/modules/dnn/src/caffe/layer_loaders.cpp @@ -15,7 +15,9 @@ namespace dnn static void initConvDeconvLayerFromCaffe(Ptr l, LayerParams ¶ms) { l->setParamsFrom(params); - getConvolutionKernelParams(params, l->kernel.height, l->kernel.width, l->pad.height, l->pad.width, l->stride.height, l->stride.width, l->dilation.height, l->dilation.width); + getConvolutionKernelParams(params, l->kernel.height, l->kernel.width, l->pad.height, + l->pad.width, l->stride.height, l->stride.width, l->dilation.height, + l->dilation.width, l->padMode); bool bias = params.get("bias_term", true); int numOutput = params.get("num_output"); @@ -47,6 +49,7 @@ Ptr createLayerFromCaffe(LayerParams ¶ms) int type = PoolingLayer::MAX; Size kernel, stride, pad; bool globalPooling; + cv::String padMode; if (params.has("pool")) { @@ -61,11 +64,12 @@ Ptr createLayerFromCaffe(LayerParams ¶ms) CV_Error(Error::StsBadArg, "Unknown pooling type \"" + pool + "\""); } - getPoolingKernelParams(params, kernel.height, kernel.width, globalPooling, pad.height, pad.width, stride.height, stride.width); + getPoolingKernelParams(params, kernel.height, kernel.width, globalPooling, + pad.height, pad.width, stride.height, stride.width, padMode); //getCaffeConvParams(params, kernel, pad, stride); if (!globalPooling) - return Ptr(PoolingLayer::create(type, kernel, stride, pad)); + return Ptr(PoolingLayer::create(type, kernel, stride, pad, padMode)); else return Ptr(PoolingLayer::createGlobal(type)); } @@ -118,8 +122,10 @@ Ptr createLayerFromCaffe(LayerParams& params) double alpha = params.get("alpha", 1); double beta = params.get("beta", 0.75); + double bias = params.get("bias", 1); + bool normBySize = params.get("norm_by_size", true); - return Ptr(LRNLayer::create(type, size, alpha, beta)); + return Ptr(LRNLayer::create(type, size, alpha, beta, bias, normBySize)); } template<> @@ -139,6 +145,7 @@ Ptr createLayerFromCaffe(LayerParams ¶ms) { int axis = params.get("axis", 0); int numAxes = params.get("num_axes", -1); + bool enableReordering = params.get("reorder_dims", false); CV_Assert(numAxes >= -1); Range applyingRange = (numAxes == -1) ? Range(axis, INT_MAX) : Range(axis, axis + numAxes); @@ -153,7 +160,7 @@ Ptr createLayerFromCaffe(LayerParams ¶ms) else newShape = Shape::all(0); - return Ptr(ReshapeLayer::create(newShape, applyingRange)); + return Ptr(ReshapeLayer::create(newShape, applyingRange, enableReordering)); } template<> diff --git a/modules/dnn/src/dnn.cpp b/modules/dnn/src/dnn.cpp index dafc350aa..5c009272f 100644 --- a/modules/dnn/src/dnn.cpp +++ b/modules/dnn/src/dnn.cpp @@ -159,6 +159,7 @@ struct Net::Impl inpl.name = "_input"; inpl.type = "__NetInputLayer__"; inpl.layerInstance = netInputLayer; + layerNameToId.insert(std::make_pair(inpl.name, inpl.id)); lastLayerId = 1; netWasAllocated = false; diff --git a/modules/dnn/src/init.cpp b/modules/dnn/src/init.cpp index 1b7594726..5b675bdef 100644 --- a/modules/dnn/src/init.cpp +++ b/modules/dnn/src/init.cpp @@ -50,6 +50,7 @@ #include "layers/prior_box_layer.hpp" #include "layers/detection_output_layer.hpp" #include "layers/normalize_bbox_layer.hpp" +#include "layers/shift_layer.hpp" namespace cv { @@ -94,13 +95,15 @@ void initModule() REG_RUNTIME_LAYER_FUNC(AbsVal, createLayerFromCaffe); REG_RUNTIME_LAYER_FUNC(Power, createLayerFromCaffe); REG_RUNTIME_LAYER_CLASS(Dropout, BlankLayer); + REG_RUNTIME_LAYER_CLASS(Identity, BlankLayer); REG_RUNTIME_LAYER_FUNC(Crop, createLayerFromCaffe); REG_RUNTIME_LAYER_FUNC(Eltwise, createLayerFromCaffe); - REG_RUNTIME_LAYER_CLASS(Permute, PermuteLayer) - REG_RUNTIME_LAYER_CLASS(PriorBox, PriorBoxLayer) - REG_RUNTIME_LAYER_CLASS(DetectionOutput, DetectionOutputLayer) - REG_RUNTIME_LAYER_CLASS(NormalizeBBox, NormalizeBBoxLayer) + REG_RUNTIME_LAYER_CLASS(Permute, PermuteLayer); + REG_RUNTIME_LAYER_CLASS(PriorBox, PriorBoxLayer); + REG_RUNTIME_LAYER_CLASS(DetectionOutput, DetectionOutputLayer); + REG_RUNTIME_LAYER_CLASS(NormalizeBBox, NormalizeBBoxLayer); + REG_RUNTIME_LAYER_CLASS(Shift, ShiftLayer); init.status = true; } diff --git a/modules/dnn/src/layers/convolution_layer.cpp b/modules/dnn/src/layers/convolution_layer.cpp index 860c871c8..d10df0131 100644 --- a/modules/dnn/src/layers/convolution_layer.cpp +++ b/modules/dnn/src/layers/convolution_layer.cpp @@ -202,9 +202,13 @@ void ConvolutionLayerImpl::im2col(const Mat &srcImg, Mat &dstCol) Mat &colMat = colBlob.matRef(); if (srcImg.type() == CV_32F) - im2col_CpuPBody::run(srcImg.ptr(), inpGroupCn, inpH, inpW, kernel.height, kernel.width, pad.height, pad.width, stride.height, stride.width, dilation.height, dilation.width, colMat.ptr()); + im2col_CpuPBody::run(srcImg.ptr(), inpGroupCn, inpH, inpW, kernel.height, + kernel.width, pad.height, pad.width, stride.height, stride.width, + dilation.height, dilation.width, outH, outW, colMat.ptr()); if (srcImg.type() == CV_64F) - im2col_CpuPBody::run(srcImg.ptr(), inpGroupCn, inpH, inpW, kernel.height, kernel.width, pad.height, pad.width, stride.height, stride.width, dilation.height, dilation.width, colMat.ptr()); + im2col_CpuPBody::run(srcImg.ptr(), inpGroupCn, inpH, inpW, kernel.height, + kernel.width, pad.height, pad.width, stride.height, stride.width, + dilation.height, dilation.width, outH, outW, colMat.ptr()); dstCol = colMat; } @@ -214,11 +218,18 @@ void ConvolutionLayerImpl::computeInpOutShape(const Blob &input) inpH = input.rows(); inpW = input.cols(); inpCn = input.channels(); - - outH = (inpH + 2 * pad.height - (dilation.height * (kernel.height - 1) + 1)) / stride.height + 1; - outW = (inpW + 2 * pad.width - (dilation.width * (kernel.width - 1) + 1)) / stride.width + 1; outCn = numOutput; + if (padMode.empty()) + { + outH = (inpH + 2 * pad.height - (dilation.height * (kernel.height - 1) + 1)) / stride.height + 1; + outW = (inpW + 2 * pad.width - (dilation.width * (kernel.width - 1) + 1)) / stride.width + 1; + } + else + { + getConvPoolOutParams(inpH, inpW, kernel, stride, pad, padMode, outH, outW); + } + topH = outH; topW = outW; topCn = outCn; } diff --git a/modules/dnn/src/layers/convolution_layer.hpp b/modules/dnn/src/layers/convolution_layer.hpp index cd211cd2f..3b59bb638 100644 --- a/modules/dnn/src/layers/convolution_layer.hpp +++ b/modules/dnn/src/layers/convolution_layer.hpp @@ -103,4 +103,5 @@ Ptr createDeconvolutionLayerFromCaffe(LayerParams ¶ms); } } + #endif diff --git a/modules/dnn/src/layers/fully_connected_layer.cpp b/modules/dnn/src/layers/fully_connected_layer.cpp index f397606a8..bb5802743 100644 --- a/modules/dnn/src/layers/fully_connected_layer.cpp +++ b/modules/dnn/src/layers/fully_connected_layer.cpp @@ -82,7 +82,7 @@ void FullyConnectedLayerImpl::allocate(const std::vector &input, std::vec for (size_t i = 0; i < input.size(); i++) { CV_Assert(i == 0 || (input[i]->equalShape(*input[0]) && input[i]->type() == dtype)); - Shape outShape = input[i]->shape().slice(0, axis) + Shape(numOutput); + Shape outShape = Shape(outerSize, numOutput); output[i].create(outShape, dtype, allocFlags); } } diff --git a/modules/dnn/src/layers/layers_common.cpp b/modules/dnn/src/layers/layers_common.cpp index 8f04c8302..c1f586a26 100644 --- a/modules/dnn/src/layers/layers_common.cpp +++ b/modules/dnn/src/layers/layers_common.cpp @@ -102,19 +102,26 @@ void getKernelSize(LayerParams ¶ms, int &kernelH, int &kernelW) CV_Assert(kernelH > 0 && kernelW > 0); } -void getStrideAndPadding(LayerParams ¶ms, int &padH, int &padW, int &strideH, int &strideW) +void getStrideAndPadding(LayerParams ¶ms, int &padH, int &padW, int &strideH, int &strideW, cv::String& padMode) { util::getParameter(params, "pad", "pad", padH, padW, true, 0); util::getParameter(params, "stride", "stride", strideH, strideW, true, 1); + padMode = ""; + if (params.has("pad_mode")) + { + padMode = params.get("pad_mode"); + } + CV_Assert(padH >= 0 && padW >= 0 && strideH > 0 && strideW > 0); } } -void getPoolingKernelParams(LayerParams ¶ms, int &kernelH, int &kernelW, bool &globalPooling, int &padH, int &padW, int &strideH, int &strideW) +void getPoolingKernelParams(LayerParams ¶ms, int &kernelH, int &kernelW, bool &globalPooling, + int &padH, int &padW, int &strideH, int &strideW, cv::String &padMode) { - util::getStrideAndPadding(params, padH, padW, strideH, strideW); + util::getStrideAndPadding(params, padH, padW, strideH, strideW, padMode); globalPooling = params.has("global_pooling"); @@ -135,15 +142,51 @@ void getPoolingKernelParams(LayerParams ¶ms, int &kernelH, int &kernelW, boo } } -void getConvolutionKernelParams(LayerParams ¶ms, int &kernelH, int &kernelW, int &padH, int &padW, int &strideH, int &strideW, int &dilationH, int &dilationW) +void getConvolutionKernelParams(LayerParams ¶ms, int &kernelH, int &kernelW, int &padH, int &padW, + int &strideH, int &strideW, int &dilationH, int &dilationW, cv::String &padMode) { util::getKernelSize(params, kernelH, kernelW); - util::getStrideAndPadding(params, padH, padW, strideH, strideW); + util::getStrideAndPadding(params, padH, padW, strideH, strideW, padMode); util::getParameter(params, "dilation", "dilation", dilationH, dilationW, true, 1); CV_Assert(dilationH > 0 && dilationW > 0); } +// From TensorFlow code: +// Total padding on rows and cols is +// Pr = (R' - 1) * S + Kr - R +// Pc = (C' - 1) * S + Kc - C +// where (R', C') are output dimensions, (R, C) are input dimensions, S +// is stride, (Kr, Kc) are filter dimensions. +// We pad Pr/2 on the left and Pr - Pr/2 on the right, Pc/2 on the top +// and Pc - Pc/2 on the bottom. When Pr or Pc is odd, this means +// we pad more on the right and bottom than on the top and left. +void getConvPoolOutParams(const int inputH, const int inputW, const cv::Size &kernel, + const cv::Size &stride, cv::Size& pad, const cv::String &padMode, + int &outH, int &outW) +{ + if (padMode == "VALID") + { + outH = (inputH - kernel.height + stride.height) / stride.height; + outW = (inputW - kernel.width + stride.width) / stride.width; + pad = cv::Size(0,0); + } + else if (padMode == "SAME") + { + outH = (inputH - 1 + stride.height) / stride.height; + outW = (inputW - 1 + stride.width) / stride.width; + int Ph = std::max(0, (outH - 1) * stride.height + kernel.height - inputH); + int Pw = std::max(0, (outW - 1) * stride.width + kernel.width - inputW); + // For odd values of total padding, add more padding at the 'right' + // side of the given dimension. + pad = cv::Size(Pw / 2, Ph / 2); + } + else + { + CV_Error(Error::StsError, "Unsupported padding mode"); + } +} + } } diff --git a/modules/dnn/src/layers/layers_common.hpp b/modules/dnn/src/layers/layers_common.hpp index 8b4bf83a2..b27afafe7 100644 --- a/modules/dnn/src/layers/layers_common.hpp +++ b/modules/dnn/src/layers/layers_common.hpp @@ -50,10 +50,15 @@ namespace cv namespace dnn { -void getConvolutionKernelParams(LayerParams ¶ms, int &kernelH, int &kernelW, int &padH, int &padW, int &strideH, int &strideW, int &dilationH, int &dilationW); +void getConvolutionKernelParams(LayerParams ¶ms, int &kernelH, int &kernelW, int &padH, int &padW, + int &strideH, int &strideW, int &dilationH, int &dilationW, cv::String& padMode); -void getPoolingKernelParams(LayerParams ¶ms, int &kernelH, int &kernelW, bool &globalPooling, int &padH, int &padW, int &strideH, int &strideW); +void getPoolingKernelParams(LayerParams ¶ms, int &kernelH, int &kernelW, bool &globalPooling, + int &padH, int &padW, int &strideH, int &strideW, cv::String& padMode); +void getConvPoolOutParams(const int inputH, const int inputW, const cv::Size& kernel, + const cv::Size& stride, cv::Size &pad, const cv::String& padMode, + int &outH, int &outW); } } diff --git a/modules/dnn/src/layers/lrn_layer.cpp b/modules/dnn/src/layers/lrn_layer.cpp index 06b7d02c5..e2c0ec791 100644 --- a/modules/dnn/src/layers/lrn_layer.cpp +++ b/modules/dnn/src/layers/lrn_layer.cpp @@ -53,12 +53,14 @@ namespace cv namespace dnn { -LRNLayerImpl::LRNLayerImpl(int type_, int size_, double alpha_, double beta_) +LRNLayerImpl::LRNLayerImpl(int type_, int size_, double alpha_, double beta_, double bias_, bool normBySize_) { type = type_; size = size_; alpha = alpha_; beta = beta_; + bias = bias_; + normBySize = normBySize_; } void LRNLayerImpl::allocate(const std::vector &inputs, std::vector &outputs) @@ -118,6 +120,7 @@ void LRNLayerImpl::channelNoramlization_(Blob &srcBlob, Blob &dstBlob) int num = srcBlob.num(); int channels = srcBlob.channels(); int ksize = (size - 1) / 2; + int sizeNormFactor = normBySize ? size : 1; XMat srcMat = srcBlob.getRefConst(); XMat dstMat = dstBlob.getRef(); @@ -146,7 +149,7 @@ void LRNLayerImpl::channelNoramlization_(Blob &srcBlob, Blob &dstBlob) } XMat dst = getPlane(dstMat, n, cn); - accum.convertTo(dst, dst.type(), alpha/size, 1); + accum.convertTo(dst, dst.type(), alpha/sizeNormFactor, bias); cv::pow(dst, beta, dst); cv::divide(getPlane(srcMat, n, cn), dst, dst); } @@ -171,13 +174,15 @@ bool LRNLayerImpl::channelNoramlization_ocl(const UMat &src, UMat &dst) Shape shape = Shape::like(src); int ksize = (size - 1) / 2; + int sizeNormFactor = normBySize ? size : 1; + // TODO: add bias size_t wgSize = ocl::Device::getDefault().maxWorkGroupSize(); UMat &scaleBuf = buf.umatRef(); size_t nthreads = (size_t)(shape.total() / shape[1]); kerScale.args((int)nthreads, ocl::KernelArg::PtrReadOnly(src), shape[0], shape[1], shape[2], shape[3], - size, (float)(alpha/size), (float)ksize, ocl::KernelArg::PtrWriteOnly(scaleBuf)); + size, (float)(alpha/sizeNormFactor), (float)ksize, ocl::KernelArg::PtrWriteOnly(scaleBuf)); if (!kerScale.run(1, &nthreads, &wgSize, true)) return false; @@ -223,6 +228,7 @@ void LRNLayerImpl::spatialNormalization_(Blob &srcBlob, Blob &dstBlob) { int num = srcBlob.num(); int channels = srcBlob.channels(); + int sizeNormFactor = normBySize ? size*size : 1; XMat srcMat = srcBlob.getRefConst(); XMat dstMat = dstBlob.getRef(); @@ -236,7 +242,7 @@ void LRNLayerImpl::spatialNormalization_(Blob &srcBlob, Blob &dstBlob) sqrBoxFilter_(src, dst); - dst.convertTo(dst, dst.type(), alpha/(size*size), 1); + dst.convertTo(dst, dst.type(), alpha/sizeNormFactor, bias); cv::pow(dst, beta, dst); cv::divide(src, dst, dst); } @@ -244,9 +250,10 @@ void LRNLayerImpl::spatialNormalization_(Blob &srcBlob, Blob &dstBlob) } -Ptr LRNLayer::create(int type, int size, double alpha, double beta) +Ptr LRNLayer::create(int type, int size, double alpha, double beta, double bias, + bool normBySize) { - return Ptr(new LRNLayerImpl(type, size, alpha, beta)); + return Ptr(new LRNLayerImpl(type, size, alpha, beta, bias, normBySize)); } } diff --git a/modules/dnn/src/layers/lrn_layer.hpp b/modules/dnn/src/layers/lrn_layer.hpp index fe79bc18f..c9017b0bc 100644 --- a/modules/dnn/src/layers/lrn_layer.hpp +++ b/modules/dnn/src/layers/lrn_layer.hpp @@ -67,11 +67,13 @@ class LRNLayerImpl : public LRNLayer public: - LRNLayerImpl(int type = CHANNEL_NRM, int size = 5, double alpha = 1, double beta = 0.75); + LRNLayerImpl(int type = CHANNEL_NRM, int size = 5, double alpha = 1, double beta = 0.75, double bias = 1, + bool normBySize = true); void allocate(const std::vector &inputs, std::vector &outputs); void forward(std::vector &inputs, std::vector &outputs); }; } } + #endif diff --git a/modules/dnn/src/layers/op_im2col.cpp b/modules/dnn/src/layers/op_im2col.cpp index 3da3ad346..4adeec7b7 100644 --- a/modules/dnn/src/layers/op_im2col.cpp +++ b/modules/dnn/src/layers/op_im2col.cpp @@ -43,6 +43,7 @@ #include #include "opencl_kernels_dnn.hpp" #include "op_im2col.hpp" +#include "opencl_kernels_dnn.hpp" namespace cv { @@ -124,3 +125,44 @@ bool col2im_ocl(const UMat &col, #endif } } + +namespace cv +{ +namespace dnn +{ + +#ifdef HAVE_OPENCL +void im2col_ocl(UMat &img, + int channels, int height, int width, + int kernel_h, int kernel_w, + int pad_h, int pad_w, + int stride_h, int stride_w, + int height_out, int width_out, + UMat &col) +{ + int h_out = height_out; + int w_out = width_out; + + CV_Assert(img.isContinuous() && col.isContinuous()); + CV_Assert(img.total() == (size_t)channels * height * width); + CV_Assert(col.total() == (size_t)channels * kernel_h * kernel_w * h_out * w_out); + + ocl::Kernel im2col_ker("im2col", ocl::dnn::im2col_oclsrc); + CV_Assert(!im2col_ker.empty()); + + im2col_ker.args(ocl::KernelArg::PtrReadOnly(img), (int)img.offset, + channels, height, width, + kernel_h, kernel_w, pad_h, pad_w, stride_h, stride_w, + h_out, w_out, + ocl::KernelArg::PtrWriteOnly(col), (int)col.offset + ); + + size_t localSize = ocl::Device::getDefault().maxWorkGroupSize(); + size_t globalSize = (size_t)channels * h_out * w_out; + + CV_Assert(im2col_ker.run(1, &globalSize, &localSize, true)); +} +#endif // HAVE_OPENCL + +} +} diff --git a/modules/dnn/src/layers/op_im2col.hpp b/modules/dnn/src/layers/op_im2col.hpp index 3ddb42b1a..b41c68402 100644 --- a/modules/dnn/src/layers/op_im2col.hpp +++ b/modules/dnn/src/layers/op_im2col.hpp @@ -70,6 +70,7 @@ public: int pad_h, int pad_w, int stride_h, int stride_w, int dilation_h, int dilation_w, + int height_col, int width_col, Dtype* data_col) { im2col_CpuPBody t; @@ -82,8 +83,8 @@ public: t.stride_h = stride_h; t.stride_w = stride_w; t.dilation_h = dilation_h; t.dilation_w = dilation_w; - t.height_col = (height + 2 * pad_h - (dilation_h * (kernel_h - 1) + 1)) / stride_h + 1; - t.width_col = (width + 2 * pad_w - (dilation_w * (kernel_w - 1) + 1)) / stride_w + 1; + t.height_col = height_col; + t.width_col = width_col; t.channels_col = channels * kernel_h * kernel_w; cv::parallel_for_(Range(0, t.channels_col), t); diff --git a/modules/dnn/src/layers/pooling_layer.cpp b/modules/dnn/src/layers/pooling_layer.cpp index 9e5548104..2e184503b 100644 --- a/modules/dnn/src/layers/pooling_layer.cpp +++ b/modules/dnn/src/layers/pooling_layer.cpp @@ -60,13 +60,14 @@ PoolingLayerImpl::PoolingLayerImpl() globalPooling = false; } -PoolingLayerImpl::PoolingLayerImpl(int type_, Size kernel_, Size stride_, Size pad_) +PoolingLayerImpl::PoolingLayerImpl(int type_, Size kernel_, Size stride_, Size pad_, const String &padMode_) { globalPooling = false; type = type_; kernel = kernel_; pad = pad_; stride = stride_; + padMode = padMode_; } void PoolingLayerImpl::allocate(const std::vector &inputs, std::vector &outputs) @@ -251,26 +252,36 @@ void PoolingLayerImpl::avePooling_cpu(Blob &src, Blob &dst) void PoolingLayerImpl::computeOutputShape(Size inpSz) { - //Yeah, something strange Caffe scheme-) - out.height = static_cast(ceil(static_cast(inpSz.height + 2 * pad.height - kernel.height) / stride.height)) + 1; - out.width = static_cast(ceil(static_cast(inpSz.width + 2 * pad.width - kernel.width) / stride.width)) + 1; - - if (pad.height || pad.width) + if (padMode.empty()) { + //Yeah, something strange Caffe scheme-) + out.height = static_cast(ceil(static_cast(inpSz.height + 2 * pad.height - + kernel.height) / stride.height)) + 1; + out.width = static_cast(ceil(static_cast(inpSz.width + 2 * pad.width - + kernel.width) / stride.width)) + 1; + + if (pad.height || pad.width) + { + // If we have padding, ensure that the last pooling starts strictly + // inside the image (instead of at the padding); otherwise clip the last. + if ((out.height - 1) * stride.height >= inpSz.height + pad.height) + --out.height; + if ((out.width - 1) * stride.width >= inpSz.width + pad.width) + --out.width; + CV_Assert((out.height - 1) * stride.height < inpSz.height + pad.height); + CV_Assert((out.width - 1) * stride.width < inpSz.width + pad.width); + } + } + else { - // If we have padding, ensure that the last pooling starts strictly - // inside the image (instead of at the padding); otherwise clip the last. - if ((out.height - 1) * stride.height >= inpSz.height + pad.height) - --out.height; - if ((out.width - 1) * stride.width >= inpSz.width + pad.width) - --out.width; - CV_Assert((out.height - 1) * stride.height < inpSz.height + pad.height); - CV_Assert((out.width - 1) * stride.width < inpSz.width + pad.width); + getConvPoolOutParams(inpSz.height, inpSz.width, kernel, stride, pad, + padMode, out.height, out.width); } } -Ptr PoolingLayer::create(int type, Size kernel, Size stride, Size pad) +Ptr PoolingLayer::create(int type, Size kernel, Size stride, Size pad, + const String& padMode) { - return Ptr(new PoolingLayerImpl(type, kernel, stride, pad)); + return Ptr(new PoolingLayerImpl(type, kernel, stride, pad, padMode)); } Ptr PoolingLayer::createGlobal(int type) diff --git a/modules/dnn/src/layers/pooling_layer.hpp b/modules/dnn/src/layers/pooling_layer.hpp index 7d5ae67cf..c5723cd1f 100644 --- a/modules/dnn/src/layers/pooling_layer.hpp +++ b/modules/dnn/src/layers/pooling_layer.hpp @@ -1,4 +1,4 @@ -/*M/////////////////////////////////////////////////////////////////////////////////////// +/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // @@ -69,7 +69,7 @@ class PoolingLayerImpl : public PoolingLayer public: PoolingLayerImpl(); - PoolingLayerImpl(int type, Size kernel, Size stride, Size pad); + PoolingLayerImpl(int type, Size kernel, Size stride, Size pad, const String& padMode); void allocate(const std::vector &inputs, std::vector &outputs); void forward(std::vector &inputs, std::vector &outputs); @@ -77,4 +77,5 @@ public: } } + #endif diff --git a/modules/dnn/src/layers/reshape_layer.cpp b/modules/dnn/src/layers/reshape_layer.cpp index a39f1ee41..6bc9ebc95 100644 --- a/modules/dnn/src/layers/reshape_layer.cpp +++ b/modules/dnn/src/layers/reshape_layer.cpp @@ -49,7 +49,8 @@ namespace cv namespace dnn { -ReshapeLayerImpl::ReshapeLayerImpl(const BlobShape &newShape_, Range applyingRange_) +ReshapeLayerImpl::ReshapeLayerImpl(const BlobShape &newShape_, Range applyingRange_, bool enableReordering_) : + enableReordering(enableReordering_) { newShapeDesc = newShape_; newShapeRange = applyingRange_; @@ -72,14 +73,49 @@ void ReshapeLayerImpl::forward(std::vector &inputs, std::vector &ou { for (size_t i = 0; i < outputs.size(); i++) { - outputs[i].shareFrom(*inputs[i]); + Blob& srcBlob = *inputs[i]; + BlobShape inputShape = inputs[i]->shape(); + bool channelsReduced = inputShape.dims() > outShapes[i].dims() || + (inputShape.dims() == 4 && inputShape[1] > outShapes[i][1]); + bool performReordering = enableReordering && inputShape.dims() == 4 && channelsReduced; + + if (performReordering) + { + Blob reordered_blob(inputShape, inputs[i]->type()); + + float *dstData = reordered_blob.matRef().ptr(); + const float *srcData = srcBlob.matRefConst().ptr(); + + int num = inputShape[0], channels = inputShape[1], height = inputShape[2], width = inputShape[3]; + int total = num*channels*height*width; + for(int i_n = 0; i_n < num; i_n++) { + for(int i_c = 0; i_c < channels; i_c++) { + for(int i_h = 0; i_h < height; i_h++) { + for(int i_w = 0; i_w < width; i_w++) { + int src_i = channels*height*width*i_n + height*width*i_c + width*i_h + i_w; + int dst_i = channels*height*width*i_n + i_c + channels*width*i_h + channels*i_w; + + CV_Assert(dst_i < total); + CV_Assert(src_i < total); + + dstData[dst_i] = srcData[src_i]; + } + } + } + } + + srcBlob = reordered_blob; + } + + outputs[i].shareFrom(srcBlob); outputs[i].reshape(outShapes[i]); } } -Ptr ReshapeLayer::create(const BlobShape &newShape, Range applyingRange /*= Range::all()*/) +Ptr ReshapeLayer::create(const BlobShape &newShape, Range applyingRange /*= Range::all()*/, + bool enableReordering /*= false*/) { - return Ptr(new ReshapeLayerImpl(newShape, applyingRange)); + return Ptr(new ReshapeLayerImpl(newShape, applyingRange, enableReordering)); } diff --git a/modules/dnn/src/layers/reshape_layer.hpp b/modules/dnn/src/layers/reshape_layer.hpp index 439e8e1dd..10718b838 100644 --- a/modules/dnn/src/layers/reshape_layer.hpp +++ b/modules/dnn/src/layers/reshape_layer.hpp @@ -52,9 +52,10 @@ namespace dnn class ReshapeLayerImpl : public ReshapeLayer { std::vector outShapes; + bool enableReordering; public: - ReshapeLayerImpl(const BlobShape &newShape_, Range applyingRange_); + ReshapeLayerImpl(const BlobShape &newShape_, Range applyingRange_, bool enableReordering_); void allocate(const std::vector &inputs, std::vector &outputs); @@ -65,4 +66,5 @@ Ptr createFlattenLayer(LayerParams&); } } + #endif diff --git a/modules/dnn/src/layers/shift_layer.cpp b/modules/dnn/src/layers/shift_layer.cpp new file mode 100644 index 000000000..451b91900 --- /dev/null +++ b/modules/dnn/src/layers/shift_layer.cpp @@ -0,0 +1,157 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. + +// Copyright (C) 2016, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +/* +Implementation of shift layer, which adds up const values to blob. +*/ + +#include "../precomp.hpp" +#include "shift_layer.hpp" +#include "op_blas.hpp" + +namespace cv +{ +namespace dnn +{ + +class ShiftLayerImpl { +public: + static Ptr create(const std::vector &inputs, std::vector &outputs, + const std::vector& blobs); + + virtual ~ShiftLayerImpl() {} + + virtual void forward(std::vector &inputs, std::vector &outputs, const std::vector& blobs) = 0; + +protected: + ShiftLayerImpl() {} + virtual void allocate(const std::vector &inputs, std::vector &outputs, const std::vector& blobs) = 0; +}; + +namespace { + +class ShiftChannelsLayerImpl : public ShiftLayerImpl { +public: + virtual void forward(std::vector &inputs, std::vector &outputs, const std::vector& blobs) { + for (size_t ii = 0; ii < outputs.size(); ii++) + { + Blob &inpBlob = *inputs[ii]; + Blob &outBlob = outputs[ii]; + + inpBlob.matRef().copyTo(outBlob.matRef()); + + for (int n = 0; n < inpBlob.num(); n++) + { + Mat dstMat(inpBlob.channels(), inpBlob.rows() * inpBlob.cols(), + outBlob.type(), outBlob.ptr(n)); + dnn::gemm(blobs[0].matRefConst(), biasOnesMat, 1, dstMat, 1); //TODO: gemv + } + } + } + +protected: + virtual void allocate(const std::vector &inputs, std::vector &outputs, const std::vector& blobs) { + CV_Assert(inputs.size() > 0); + + const Blob &inpBlob = *inputs[0]; + CV_Assert(inpBlob.dims() == 4 && inpBlob.type() == CV_32F); + const Blob &biasBlob = blobs[0]; + CV_Assert(biasBlob.total() == (size_t)inpBlob.channels()); + + outputs.resize(inputs.size()); + for (size_t i = 0; i < inputs.size(); i++) + { + CV_Assert(inputs[i]->type() == inpBlob.type()); + CV_Assert(inputs[i]->dims() == 4 && inputs[i]->channels() == inpBlob.channels()); + + outputs[i].shareFrom(*inputs[i]); + } + + biasOnesMat = Mat::ones(1, inpBlob.rows() * inpBlob.cols(), inpBlob.type()); + } + +private: + Mat biasOnesMat; +}; + + +class ShiftElementsLayerImpl : public ShiftLayerImpl { +public: + virtual void forward(std::vector &inputs, std::vector &outputs, const std::vector& blobs) { + for (size_t ii = 0; ii < outputs.size(); ii++) + { + Blob &inpBlob = *inputs[ii]; + Blob &outBlob = outputs[ii]; + + outBlob.matRef() = inpBlob.matRef() + blobs[0].matRefConst(); + } + } + +protected: + virtual void allocate(const std::vector &inputs, std::vector &outputs, const std::vector& blobs) { + CV_Assert(inputs.size() > 0); + + const Blob &inpBlob = *inputs[0]; + CV_Assert(inpBlob.type() == CV_32F); + const Blob &biasBlob = blobs[0]; + CV_Assert(biasBlob.dims() == inpBlob.dims()); + + outputs.resize(inputs.size()); + for (size_t i = 0; i < inputs.size(); i++) + { + CV_Assert(inputs[i]->type() == inpBlob.type()); + CV_Assert(inputs[i]->dims() == inpBlob.dims()); + + outputs[i].shareFrom(*inputs[i]); + } + } +}; + +} + +Ptr ShiftLayerImpl::create(const std::vector &inputs, std::vector &outputs, + const std::vector& blobs) { + Ptr impl; + + CV_Assert(inputs.size() > 0); + CV_Assert(blobs.size() > 0); + + if(inputs[0]->dims() == blobs[0].dims()) + impl = Ptr(new ShiftElementsLayerImpl); + else + impl = Ptr(new ShiftChannelsLayerImpl); + + impl->allocate(inputs, outputs, blobs); + return impl; +} + +ShiftLayer::ShiftLayer(LayerParams ¶ms) : Layer(params) +{ + CV_Assert(blobs.size() == 1); + + #if HAVE_CBLAS + { + if (getBlasThreads() != cv::getThreadNum()) + { + setBlasThreads(cv::getThreadNum()); + } + } + #endif +} + +void ShiftLayer::allocate(const std::vector &inputs, std::vector &outputs) +{ + impl = ShiftLayerImpl::create(inputs, outputs, blobs); +} + +void ShiftLayer::forward(std::vector &inputs, std::vector &outputs) +{ + impl->forward(inputs, outputs, blobs); +} + +} +} diff --git a/modules/dnn/src/layers/shift_layer.hpp b/modules/dnn/src/layers/shift_layer.hpp new file mode 100644 index 000000000..1d1c70a85 --- /dev/null +++ b/modules/dnn/src/layers/shift_layer.hpp @@ -0,0 +1,36 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. + +// Copyright (C) 2016, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +/* +Declaration of shift layer, which adds up const values to blob. +*/ + +#ifndef __OPENCV_DNN_LAYERS_SHIFT_LAYER_HPP__ +#define __OPENCV_DNN_LAYERS_SHIFT_LAYER_HPP__ +#include "../precomp.hpp" + +namespace cv +{ +namespace dnn +{ + +class ShiftLayerImpl; + +class ShiftLayer : public Layer +{ + cv::Ptr impl; + +public: + ShiftLayer() {} + ShiftLayer(LayerParams ¶ms); + void allocate(const std::vector &inputs, std::vector &outputs); + void forward(std::vector &inputs, std::vector &outputs); +}; + +} +} +#endif diff --git a/modules/dnn/src/tensorflow/attr_value.proto b/modules/dnn/src/tensorflow/attr_value.proto new file mode 100644 index 000000000..26e42bc1a --- /dev/null +++ b/modules/dnn/src/tensorflow/attr_value.proto @@ -0,0 +1,60 @@ +syntax = "proto3"; + +package tensorflow; +option cc_enable_arenas = true; +option java_outer_classname = "AttrValueProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; + +import "tensor.proto"; +import "tensor_shape.proto"; +import "types.proto"; + +// 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. +message AttrValue { + message ListValue { + repeated bytes s = 2; // "list(string)" + repeated int64 i = 3 [packed = true]; // "list(int)" + repeated float f = 4 [packed = true]; // "list(float)" + repeated bool b = 5 [packed = true]; // "list(bool)" + repeated DataType type = 6 [packed = true]; // "list(type)" + repeated TensorShapeProto shape = 7; // "list(shape)" + repeated TensorProto tensor = 8; // "list(tensor)" + // TODO(zhifengc/josh11b): implements list(func) if needed. + } + + oneof value { + bytes s = 2; // "string" + int64 i = 3; // "int" + float f = 4; // "float" + bool b = 5; // "bool" + DataType type = 6; // "type" + TensorShapeProto shape = 7; // "shape" + TensorProto tensor = 8; // "tensor" + ListValue list = 1; // any "list(...)" + + // "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. + NameAttrList func = 10; + + // 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; + } +} + +// A list of attr names and their values. The whole list is attached +// with a string name. E.g., MatMul[T=float]. +message NameAttrList { + string name = 1; + map attr = 2; +} diff --git a/modules/dnn/src/tensorflow/function.proto b/modules/dnn/src/tensorflow/function.proto new file mode 100644 index 000000000..144c75bf3 --- /dev/null +++ b/modules/dnn/src/tensorflow/function.proto @@ -0,0 +1,95 @@ +syntax = "proto3"; + +package tensorflow; +option cc_enable_arenas = true; +option java_outer_classname = "FunctionProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; + +import "attr_value.proto"; +import "op_def.proto"; + +// A library is a set of named functions. +message FunctionDefLibrary { + repeated FunctionDef function = 1; + repeated GradientDef gradient = 2; +} + +// 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. +message FunctionDef { + // The definition of the function's name, arguments, return values, + // attrs etc. + OpDef signature = 1; + + // The body of the function. + repeated Node node = 2; // function.node.ret[*] are unique. + + // A node is a multi-value assignment: + // (ret[0], ret[1], ...) = func(arg[0], arg[1], ...) + // + // By convention, "func" is resolved by consulting with a user-defined + // library first. If not resolved, "func" is assumed to be a builtin op. + message Node { + // This node produces multiple outputs. They are named ret[0], + // ret[1], ..., etc. + // + // REQUIRES: function.node.ret[*] are unique across all nodes. + // REQUIRES: ret.size == func/op def's number of output args. + repeated string ret = 1; + + // The op/function name. + string op = 2; + + // Arguments passed to this func/op. + // + // arg[i] must be either one of + // function.signature.input_args[*].name or one of + // function.node[*].ret[*]. + // + // REQUIRES: arg.size == func/op def's number of input args. + repeated string arg = 3; + + // Control dependencies. + // + // dep[i] must be one of function.node[*].ret[*] or one of + // function.signature.input_args[*].name. + repeated string dep = 4; + + // Attrs. + // + // 'attr' maps names defined by 'func's attr defs to attr values. + // attr values may have placeholders which are substituted + // recursively by concrete values when this node is instantiated. + // These placeholders must name an attr listed in the FunctionDef's + // signature. + map attr = 5; + } +} + +// 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. +message GradientDef { + string function_name = 1; // The function name. + string gradient_func = 2; // The gradient function's name. +} diff --git a/modules/dnn/src/tensorflow/graph.proto b/modules/dnn/src/tensorflow/graph.proto new file mode 100644 index 000000000..f94520139 --- /dev/null +++ b/modules/dnn/src/tensorflow/graph.proto @@ -0,0 +1,112 @@ +syntax = "proto3"; + +package tensorflow; +option cc_enable_arenas = true; +option java_outer_classname = "GraphProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; + +import "attr_value.proto"; +import "function.proto"; +import "versions.proto"; + +// Represents the graph of operations +message GraphDef { + repeated NodeDef node = 1; + + // 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. + VersionDef versions = 4; + + // 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]; + + // 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 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. + FunctionDefLibrary library = 2; +}; + +message NodeDef { + // 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; + + // The operation name. There may be custom parameters in attrs. + // Op names starting with an underscore are reserved for internal use. + string op = 2; + + // 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; + + // A (possibly partial) specification for the device on which this + // node should be placed. + // The expected syntax for this string is as follows: + // + // DEVICE_SPEC ::= COLOCATED_NODE | PARTIAL_SPEC + // + // COLOCATED_NODE ::= "@" NODE_NAME // See NodeDef.name above. + // PARTIAL_SPEC ::= ("/" CONSTRAINT) * + // CONSTRAINT ::= ("job:" JOB_NAME) + // | ("replica:" [1-9][0-9]*) + // | ("task:" [1-9][0-9]*) + // | ( ("gpu" | "cpu") ":" ([1-9][0-9]* | "*") ) + // + // Valid values for this string include: + // * "@other/node" (colocate with "other/node") + // * "/job:worker/replica:0/task:1/gpu:3" (full specification) + // * "/job:worker/gpu:3" (partial specification) + // * "" (no specification) + // + // If the constraints do not resolve to a single device (or if this + // field is empty or not present), the runtime will attempt to + // choose a device automatically. + string device = 4; + + // 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 attr = 5; +}; diff --git a/modules/dnn/src/tensorflow/op_def.proto b/modules/dnn/src/tensorflow/op_def.proto new file mode 100644 index 000000000..baf68eaad --- /dev/null +++ b/modules/dnn/src/tensorflow/op_def.proto @@ -0,0 +1,157 @@ +syntax = "proto3"; + +package tensorflow; +option cc_enable_arenas = true; +option java_outer_classname = "OpDefProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; + +import "attr_value.proto"; +import "types.proto"; + +// Defines an operation. A NodeDef in a GraphDef specifies an Op by +// using the "op" field which should match the name of a OpDef. +message OpDef { + // 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; + + // For describing inputs and outputs. + message ArgDef { + // Name for the input/output. Should match the regexp "[a-z][a-z0-9_]*". + string name = 1; + + // Human readable description. + string description = 2; + + // 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)". + DataType type = 3; + string type_attr = 4; // if specified, attr must have type "type" + string number_attr = 5; // if specified, attr must have type "int" + // 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; + + // 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; + }; + + // Description of the input(s). + repeated ArgDef input_arg = 2; + + // Description of the output(s). + repeated ArgDef output_arg = 3; + + // 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. + message AttrDef { + // 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; + + // One of the type names from attr_value.proto ("string", "list(string)", + // "int", etc.). + string type = 2; + + // A reasonable default for this attribute if the user does not supply + // a value. If not specified, the user must supply a value. + AttrValue default_value = 3; + + // Human-readable description. + string description = 4; + + // TODO(josh11b): bool is_optional? + + // --- Constraints --- + // These constraints are only in effect if specified. Default is no + // constraints. + + // For type == "int", this is a minimum value. For "list(___)" + // types, this is the minimum length. + bool has_minimum = 5; + int64 minimum = 6; + + // 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. + AttrValue allowed_values = 7; + } + repeated AttrDef attr = 4; + + // Optional deprecation based on GraphDef versions. + OpDeprecation deprecation = 8; + + // One-line human-readable description of what the Op does. + string summary = 5; + + // Additional, longer human-readable description of what the Op does. + string description = 6; + + // ------------------------------------------------------------------------- + // Which optimizations this operation can participate in. + + // True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs) + bool is_commutative = 18; + + // 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; // for things like add + + // Other optimizations go here, like + // can_alias_input, rewrite_when_output_unused, partitioning_strategy, etc. + + // ------------------------------------------------------------------------- + // Optimization constraints. + + // 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; // for things like variables, queue + + // ------------------------------------------------------------------------- + // Non-standard options. + + // 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; // for Assign, etc. +}; + +// Information about version-dependent deprecation of an op +message OpDeprecation { + // First GraphDef version at which the op is disallowed. + int32 version = 1; + + // Explanation of why it was deprecated and what to use instead. + string explanation = 2; +}; + +// A collection of OpDefs +message OpList { + repeated OpDef op = 1; +}; diff --git a/modules/dnn/src/tensorflow/tensor.proto b/modules/dnn/src/tensorflow/tensor.proto new file mode 100644 index 000000000..080421809 --- /dev/null +++ b/modules/dnn/src/tensorflow/tensor.proto @@ -0,0 +1,68 @@ +syntax = "proto3"; + +package tensorflow; +option cc_enable_arenas = true; +option java_outer_classname = "TensorProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; + +import "tensor_shape.proto"; +import "types.proto"; + +// Protocol buffer representing a tensor. +message TensorProto { + DataType dtype = 1; + + // Shape of the tensor. TODO(touts): sort out the 0-rank issues. + TensorShapeProto tensor_shape = 2; + + // Only one of the representations below is set, one of "tensor_contents" and + // the "xxx_val" attributes. We are not using oneof because as oneofs cannot + // contain repeated fields it would require another extra set of messages. + + // Version number. + // + // In version 0, if the "repeated xxx" representations contain only one + // element, that element is repeated to fill the shape. This makes it easy + // to represent a constant Tensor with a single value. + int32 version_number = 3; + + // Serialized content from Tensor::AsProtoTensorContent(). This representation + // can be used for all tensor types. + bytes tensor_content = 4; + + // Type specific representations that make it easy to create tensor protos in + // all languages. Only the representation corresponding to "dtype" can + // be set. The values hold the flattened representation of the tensor in + // row major order. + + // DT_HALF. Note that since protobuf has no int16 type, we'll have some + // pointless zero padding for each value here. + repeated int32 half_val = 13 [packed = true]; + + // DT_FLOAT. + repeated float float_val = 5 [packed = true]; + + // DT_DOUBLE. + repeated double double_val = 6 [packed = true]; + + // DT_INT32, DT_INT16, DT_INT8, DT_UINT8. + repeated int32 int_val = 7 [packed = true]; + + // DT_STRING + repeated bytes string_val = 8; + + // DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real + // and imaginary parts of i-th single precision complex. + repeated float scomplex_val = 9 [packed = true]; + + // DT_INT64 + repeated int64 int64_val = 10 [packed = true]; + + // DT_BOOL + repeated bool bool_val = 11 [packed = true]; + + // DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real + // and imaginary parts of i-th double precision complex. + repeated double dcomplex_val = 12 [packed = true]; +}; diff --git a/modules/dnn/src/tensorflow/tensor_shape.proto b/modules/dnn/src/tensorflow/tensor_shape.proto new file mode 100644 index 000000000..1ec3c5323 --- /dev/null +++ b/modules/dnn/src/tensorflow/tensor_shape.proto @@ -0,0 +1,45 @@ +// Protocol buffer representing the shape of tensors. + +syntax = "proto3"; +option cc_enable_arenas = true; +option java_outer_classname = "TensorShapeProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; + +package tensorflow; + +// Dimensions of a tensor. +message TensorShapeProto { + // One dimension of the tensor. + message Dim { + // Size of the tensor in that dimension. + // This value must be >= -1, but values of -1 are reserved for "unknown" + // shapes (values of -1 mean "unknown" dimension). Certain wrappers + // that work with TensorShapeProto may fail at runtime when deserializing + // a TensorShapeProto containing a dim value of -1. + int64 size = 1; + + // Optional name of the tensor dimension. + string name = 2; + }; + + // Dimensions of the tensor, such as {"input", 30}, {"output", 40} + // for a 30 x 40 2D tensor. If an entry has size -1, this + // corresponds to a dimension of unknown size. The names are + // optional. + // + // The order of entries in "dim" matters: It indicates the layout of the + // values in the tensor in-memory representation. + // + // The first entry in "dim" is the outermost dimension used to layout the + // values, the last entry is the innermost dimension. This matches the + // in-memory layout of RowMajor Eigen tensors. + // + // If "dim.size()" > 0, "unknown_rank" must be false. + repeated Dim dim = 2; + + // If true, the number of dimensions in the shape is unknown. + // + // If true, "dim.size()" must be 0. + bool unknown_rank = 3; +}; diff --git a/modules/dnn/src/tensorflow/tf_importer.cpp b/modules/dnn/src/tensorflow/tf_importer.cpp new file mode 100644 index 000000000..6caccefad --- /dev/null +++ b/modules/dnn/src/tensorflow/tf_importer.cpp @@ -0,0 +1,749 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. + +// Copyright (C) 2016, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +/* +Implementation of Tensorflow models parser +*/ + +#include "precomp.hpp" +using namespace cv; +using namespace cv::dnn; + +#if HAVE_PROTOBUF +#include "graph.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include "tf_io.hpp" + +using ::google::protobuf::RepeatedField; +using ::google::protobuf::RepeatedPtrField; +using ::google::protobuf::Message; +using ::google::protobuf::Descriptor; +using ::google::protobuf::FieldDescriptor; +using ::google::protobuf::Reflection; + +namespace +{ + +static int toNCHW[] = {0, 2, 3, 1}; + +typedef std::vector > StrIntVector; + +struct Pin +{ + Pin(const std::string &_name, int _blobIndex = 0) : + name(_name), blobIndex(_blobIndex) {} + + Pin() : + name(""), blobIndex(-1) {} + + std::string name; + int blobIndex; +}; + +BlobShape blobShapeFromTensor(const tensorflow::TensorProto &tensor) +{ + if (tensor.has_tensor_shape()) + { + const tensorflow::TensorShapeProto &_shape = tensor.tensor_shape(); + BlobShape shape = BlobShape::all(_shape.dim_size()); + + for (int i = 0; i < _shape.dim_size(); i++) + shape[i] = (int)_shape.dim(i).size(); + + return shape; + } + else + { + CV_Error(Error::StsError, "Unknown shape of input tensor"); + return BlobShape(); + } +} + +template +void parseTensor(const tensorflow::TensorProto &tensor, Blob &dstBlob) +{ + BlobShape shape = blobShapeFromTensor(tensor); + + if (shape.dims() == 4) + { + // REORDER blob NHWC to NCHW + swap(shape[2], shape[3]); // NHCW + swap(shape[1], shape[2]); // NCHW + } + + dstBlob.create(shape, CV_32F); + + int size = tensor.tensor_content().size() / sizeof(T); + CV_Assert(size == (int)dstBlob.matRefConst().total()); + + float *dstData = dstBlob.matRef().ptr(); + const T *data = reinterpret_cast(tensor.tensor_content().c_str()); + + if (shape.dims() == 4) + { + int num = shape[0], channels = shape[1], height = shape[2], width = shape[3]; + int total = num*channels*height*width; + for(int i_n = 0; i_n < shape[0]; i_n++) { + for(int i_c = 0; i_c < shape[1]; i_c++) { + for(int i_h = 0; i_h < shape[2]; i_h++) { + for(int i_w = 0; i_w < shape[3]; i_w++) { + int dst_i = channels*height*width*i_n + height*width*i_c + width*i_h + i_w; + int src_i = channels*height*width*i_n + i_c + channels*width*i_h + channels*i_w; + + CV_Assert(dst_i < total); + CV_Assert(src_i < total); + + dstData[dst_i] = data[src_i]; + } + } + } + } + } else { + for (int i = 0; i < size; i++) + dstData[i] = data[i]; + } +} + +void blobFromTensor(const tensorflow::TensorProto &tensor, Blob &dstBlob) +{ + switch (tensor.dtype()) { + case tensorflow::DT_FLOAT: + parseTensor(tensor, dstBlob); + break; + case tensorflow::DT_DOUBLE: + parseTensor(tensor, dstBlob); + break; + default: + CV_Error(Error::StsError, "Tensor's data type is not supported"); + break; + } +} + +void printList(const tensorflow::AttrValue::ListValue &val) +{ + std::cout << "("; + for (int i = 0; i < val.i_size(); i++) + std::cout << " " << val.i(i); + std::cout << " )"; +} + +void printTensorShape(const tensorflow::TensorShapeProto &shape) +{ + std::cout << "[ "; + for (int d = 0; d < shape.dim_size(); d++) + std::cout << shape.dim(d).name() << + ":" << shape.dim(d).size() << " "; + std::cout << "]"; +} + +void printTensor(const tensorflow::TensorProto &tensor) +{ + printTensorShape(tensor.tensor_shape()); + + if (tensor.tensor_content().empty()) + return; + + switch (tensor.dtype()) + { + case 1: // float + { + const float *data = reinterpret_cast(tensor.tensor_content().c_str()); + int size = tensor.tensor_content().size() / sizeof(float); + for (int i = 0; i < std::min(10, size); i++) + std::cout << " " << data[i]; + if (size > 10) + std::cout << " ... " << size - 10 << " more"; + break; + } + case 3: // int32 + { + const int *data = reinterpret_cast(tensor.tensor_content().c_str()); + int size = tensor.tensor_content().size() / sizeof(int); + for (int i = 0; i < std::min(10, size); i++) + std::cout << " " << data[i]; + if (size > 10) + std::cout << " ... " << size - 10 << " more"; + break; + } + default: + CV_Error(Error::StsError, "Tensor type is not supported"); + break; + } +} + +void printLayerAttr(const tensorflow::NodeDef &layer) +{ + std::cout << std::endl << layer.name() << ":" << layer.op(); + for (int ii = 0; ii < layer.input_size(); ii++) + std::cout << "(" << layer.input(ii) << ")"; + std::cout << std::endl; + google::protobuf::Map attr + = layer.attr(); + for (google::protobuf::Map::const_iterator ai = attr.begin(); + ai != attr.end(); ++ai) + { + std::cout << ai->first << ":"; + if (ai->first == "dtype" || ai->first == "T") + std::cout << ai->second.i(); + else if (ai->first == "padding") + std::cout << ai->second.s(); + else if (ai->first == "transpose_a" || ai->first == "transpose_b") + std::cout << ai->second.b(); + // else if (ai->first == "shape") + // printTensorShape(ai->second.shape()); + else if (ai->first == "strides" || ai->first == "ksize") + printList(ai->second.list()); + else + printTensor(ai->second.tensor()); + std::cout << std::endl; + } +} + +bool hasLayerAttr(const tensorflow::NodeDef &layer, const std::string &name) +{ + google::protobuf::Map attr = layer.attr(); + return attr.find(name) != attr.end(); +} + +const tensorflow::AttrValue& getLayerAttr(const tensorflow::NodeDef &layer, const std::string &name) +{ + return layer.attr().at(name); +} + +void setStrides(LayerParams &layerParams, const tensorflow::NodeDef &layer) +{ + if (hasLayerAttr(layer, "strides")) + { + const tensorflow::AttrValue& val = getLayerAttr(layer, "strides"); + if (val.list().i_size() != 4 || + val.list().i(0) != 1 || val.list().i(3) != 1) + CV_Error(Error::StsError, "Unsupported strides"); + layerParams.set("stride_h", static_cast(val.list().i(1))); + layerParams.set("stride_w", static_cast(val.list().i(2))); + } +} + +DictValue parseDims(const tensorflow::TensorProto &tensor) { + BlobShape shape = blobShapeFromTensor(tensor); + + CV_Assert(tensor.dtype() == tensorflow::DT_INT32); + CV_Assert(shape.dims() == 1); + + int size = tensor.tensor_content().size() / sizeof(int); + const int *data = reinterpret_cast(tensor.tensor_content().c_str()); + // TODO: add reordering shape if dims == 4 + return DictValue::arrayInt(data, size); +} + +void setKSize(LayerParams &layerParams, const tensorflow::NodeDef &layer) +{ + if (hasLayerAttr(layer, "ksize")) + { + const tensorflow::AttrValue& val = getLayerAttr(layer, "ksize"); + if (val.list().i_size() != 4 || + val.list().i(0) != 1 || val.list().i(3) != 1) + CV_Error(Error::StsError, "Unsupported ksize"); + layerParams.set("kernel_h", static_cast(val.list().i(1))); + layerParams.set("kernel_w", static_cast(val.list().i(2))); + } + else + { + layerParams.set("kernel_h", 1); + layerParams.set("kernel_w", 1); + } +} + +void setPadding(LayerParams &layerParams, const tensorflow::NodeDef &layer) +{ + if (hasLayerAttr(layer, "padding")) + layerParams.set("pad_mode", getLayerAttr(layer, "padding").s()); +} + +void RemoveIdentityOps(tensorflow::GraphDef& net) { + typedef std::map IdentityOpsMap; + IdentityOpsMap identity_ops; + + std::vector identity_ops_idx; + + int layersCount = net.node_size(); + for (int li = 0; li < layersCount; li++) + { + const tensorflow::NodeDef &layer = net.node(li); + String type = layer.op(); + + if (type == "Identity") { + identity_ops_idx.push_back(li); + identity_ops[layer.name()] = layer.input(0); + } + } + + for (int li = 0; li < layersCount; li++) + { + tensorflow::NodeDef* layer = net.mutable_node(li); + for (int input_id = 0; input_id < layer->input_size(); input_id++) { + String input_op_name = layer->input(input_id); + IdentityOpsMap::iterator it = identity_ops.find(input_op_name); + + if (it != identity_ops.end()) { + layer->set_input(input_id, it->second); + } + } + } + + std::sort(identity_ops_idx.begin(), identity_ops_idx.end()); + + int removed_nodes = 0; + for(size_t i = 0; i < identity_ops_idx.size(); i++) { + int start_id = identity_ops_idx[i] - removed_nodes; + net.mutable_node()->DeleteSubrange(start_id, 1); + removed_nodes++; + } +} + +Pin parsePin(const std::string &name) +{ + Pin pin(name); + + size_t delimiter_pos = name.find_first_of(":"); + if (delimiter_pos != std::string::npos) + { + pin.name = name.substr(0, delimiter_pos); + std::istringstream(name.substr(delimiter_pos + 1)) >> pin.blobIndex; + } + + return pin; +} + +StrIntVector getNextLayers(const tensorflow::GraphDef& net, const String& layer_name, const String& type = "") +{ + StrIntVector layers; + + for (int li = 0; li < net.node_size(); li++) + { + const tensorflow::NodeDef& layer = net.node(li); + for (int input_id = 0; input_id < layer.input_size(); input_id++) { + String input_op_name = parsePin(layer.input(input_id)).name; + bool type_ok = type.empty() ? true : type == layer.op(); + if (input_op_name == layer_name && type_ok) + layers.push_back(std::make_pair(layer.name(), li)); + } + } + + return layers; +} + +void ExcludeLayer(tensorflow::GraphDef& net, const int layer_index, const int input_blob_index, bool remove_from_net = true) { + String layer_name = net.node(layer_index).name(); + StrIntVector layers = getNextLayers(net, layer_name); + + String removed_layer_input = net.node(layer_index).input(input_blob_index); + + for (size_t i = 0; i < layers.size(); i++) + { + tensorflow::NodeDef* layer = net.mutable_node(layers[i].second); + for (int input_id = 0; input_id < layer->input_size(); input_id++) { + String input_op_name = layer->input(input_id); + + if (input_op_name == layer_name) { + layer->set_input(input_id, removed_layer_input); + } + } + } + + if (remove_from_net) + net.mutable_node()->DeleteSubrange(layer_index, 1); +} + +class TFImporter : public Importer { +public: + TFImporter(const char *model); + void populateNet(Net dstNet); + ~TFImporter() {} + +private: + void kernelFromTensor(const tensorflow::TensorProto &tensor, Blob &dstBlob); + + void connect(const std::map& layers_name_id_map, Net& network, const Pin& outPin, + const int input_layer_id, const int input_blob_id); + void connectToAllBlobs(const std::map& layer_id, Net& network, const Pin& outPin, + const int input_layer_id, const int input_blobs_count); + const tensorflow::TensorProto& getConstBlob(const tensorflow::NodeDef &layer, std::map const_layers, + int input_blob_index = -1, int* actual_inp_blob_idx = 0); + + + tensorflow::GraphDef net; +}; + +TFImporter::TFImporter(const char *model) +{ + if (model && model[0]) + ReadTFNetParamsFromBinaryFileOrDie(model, &net); +} + +void TFImporter::kernelFromTensor(const tensorflow::TensorProto &tensor, Blob &dstBlob) +{ + BlobShape shape = blobShapeFromTensor(tensor); + + // TODO: other blob types + CV_Assert(tensor.dtype() == tensorflow::DT_FLOAT); + CV_Assert(shape.dims() == 4); + + // REORDER kernel HWIO to OIHW + swap(shape[0], shape[2]); // IWHO + swap(shape[1], shape[3]); // IOHW + swap(shape[0], shape[1]); // OIHW + + dstBlob.create(shape, CV_32F); + + int size = tensor.tensor_content().size() / sizeof(float); + CV_Assert(size == (int)dstBlob.matRefConst().total()); + + float *dstData = dstBlob.matRef().ptr(); + const float *data = reinterpret_cast(tensor.tensor_content().c_str()); + + int out_c = shape[0], input_c = shape[1], height = shape[2], width = shape[3]; + int total = out_c*input_c*height*width; + for(int i_oc = 0; i_oc < out_c; i_oc++) { + for(int i_ic = 0; i_ic < input_c; i_ic++) { + for(int i_h = 0; i_h < height; i_h++) { + for(int i_w = 0; i_w < width; i_w++) { + int dst_i = input_c*height*width*i_oc + height*width*i_ic + width*i_h + i_w; + int src_i = out_c*input_c*width*i_h + out_c*input_c*i_w + out_c*i_ic + i_oc; + CV_Assert(dst_i < total); + CV_Assert(src_i < total); + dstData[dst_i] = data[src_i]; + } + } + } + } +} + +void TFImporter::connect(const std::map& layers_name_id_map, Net& network, const Pin& outPin, + const int input_layer_id, const int input_blob_id) +{ + std::map::const_iterator it = layers_name_id_map.find(outPin.name); + if (it == layers_name_id_map.end()) + CV_Error(Error::StsError, "Input layer not found: " + outPin.name); + network.connect(it->second, outPin.blobIndex, input_layer_id, input_blob_id); +} + +void TFImporter::connectToAllBlobs(const std::map& layer_id, Net& network, const Pin& outPin, + const int input_layer_id, const int input_blobs_count) +{ + for (int input_blob_id = 0; input_blob_id < input_blobs_count; input_blob_id++) + connect(layer_id, network, outPin, input_layer_id, input_blob_id); +} + +const tensorflow::TensorProto& TFImporter::getConstBlob(const tensorflow::NodeDef &layer, std::map const_layers, + int input_blob_index, int* actual_inp_blob_idx) { + if (input_blob_index == -1) { + for(int i = 0; i < layer.input_size(); i++) { + Pin input = parsePin(layer.input(i)); + if (const_layers.find(input.name) != const_layers.end()) { + if (input_blob_index != -1) + CV_Error(Error::StsError, "More than one input is Const op"); + + input_blob_index = i; + } + } + } + + if (input_blob_index == -1) + CV_Error(Error::StsError, "Const input blob for weights not found"); + + Pin kernel_inp = parsePin(layer.input(input_blob_index)); + if (const_layers.find(kernel_inp.name) == const_layers.end()) + CV_Error(Error::StsError, "Const kernel input not found"); + if (kernel_inp.blobIndex != 0) + CV_Error(Error::StsError, "Unsupported kernel input"); + + if(actual_inp_blob_idx) { + *actual_inp_blob_idx = input_blob_index; + } + + return net.node(const_layers.at(kernel_inp.name)).attr().at("value").tensor(); +} + + +void TFImporter::populateNet(Net dstNet) +{ + RemoveIdentityOps(net); + + std::map layers_to_ignore; + + int layersSize = net.node_size(); + + // find all Const layers for params + std::map value_id; + for (int li = 0; li < layersSize; li++) + { + const tensorflow::NodeDef &layer = net.node(li); + String name = layer.name(); + String type = layer.op(); + + if (type != "Const") + continue; // only Const parameters are supported + + if (layer.attr().find("value") != layer.attr().end()) + { + value_id.insert(std::make_pair(name, li)); + } + + layers_to_ignore[li] = name; + } + + std::map layer_id; + + for (int li = 0; li < layersSize; li++) + { + const tensorflow::NodeDef &layer = net.node(li); + String name = layer.name(); + String type = layer.op(); + LayerParams layerParams; + + if(layers_to_ignore.find(li) != layers_to_ignore.end()) + continue; + + if (type == "Conv2D") + { + layerParams.set("bias_term", false); + layerParams.blobs.resize(1); + + StrIntVector next_layers = getNextLayers(net, name, "BiasAdd"); + if (next_layers.size() == 1) { + layerParams.set("bias_term", true); + layerParams.blobs.resize(2); + + int weights_layer_index = next_layers[0].second; + + blobFromTensor(getConstBlob(net.node(weights_layer_index), value_id), layerParams.blobs[1]); + ExcludeLayer(net, weights_layer_index, 0, false); + layers_to_ignore[weights_layer_index] = next_layers[0].first; + } + + kernelFromTensor(getConstBlob(layer, value_id), layerParams.blobs[0]); + BlobShape kshape = layerParams.blobs[0].shape(); + layerParams.set("kernel_h", kshape[2]); + layerParams.set("kernel_w", kshape[3]); + layerParams.set("num_output", kshape[0]); + + setStrides(layerParams, layer); + setPadding(layerParams, layer); + + int id = dstNet.addLayer(name, "Convolution", layerParams); + layer_id[name] = id; + + // one input only + connect(layer_id, dstNet, parsePin(layer.input(0)), id, 0); + } + else if (type == "BiasAdd" || type == "Add") + { + layerParams.blobs.resize(1); + blobFromTensor(getConstBlob(layer, value_id), layerParams.blobs[0]); + + int id = dstNet.addLayer(name, "Shift", layerParams); + layer_id[name] = id; + + // one input only + connect(layer_id, dstNet, parsePin(layer.input(0)), id, 0); + } + else if (type == "Identity") + { + int id = dstNet.addLayer(name, "Identity", layerParams); + layer_id[name] = id; + + connectToAllBlobs(layer_id, dstNet, parsePin(layer.input(0)), id, layer.input_size()); + } + else if (type == "MatMul") + { + CV_Assert(layer.input_size() == 2); + + layerParams.set("axis", 0); + layerParams.set("bias_term", false); + layerParams.blobs.resize(1); + + StrIntVector next_layers = getNextLayers(net, name, "BiasAdd"); + if (next_layers.size() == 1) { + layerParams.set("bias_term", true); + layerParams.blobs.resize(2); + + int weights_layer_index = next_layers[0].second; + blobFromTensor(getConstBlob(net.node(weights_layer_index), value_id), layerParams.blobs[1]); + ExcludeLayer(net, weights_layer_index, 0, false); + layers_to_ignore[weights_layer_index] = next_layers[0].first; + } + + int kernel_blob_index = -1; + blobFromTensor(getConstBlob(layer, value_id, -1, &kernel_blob_index), layerParams.blobs[0]); + + if (kernel_blob_index == 1) { // In this case output is computed by x*W formula - W should be transposed + Mat data = layerParams.blobs[0].matRef().t(); + BlobShape shape(data.rows, data.cols); + layerParams.blobs[0].fill(shape, layerParams.blobs[0].type(), data.data); + } + + BlobShape kshape = layerParams.blobs[0].shape(); + layerParams.set("num_output", kshape[0]); + + int id = dstNet.addLayer(name, "InnerProduct", layerParams); + layer_id[name] = id; + + // one input only + int input_blob_index = kernel_blob_index == 0 ? 1 : 0; + connect(layer_id, dstNet, parsePin(layer.input(input_blob_index)), id, 0); + } + else if (type == "Reshape") + { + layerParams.set("dim", parseDims(getConstBlob(layer, value_id, 1))); + layerParams.set("reorder_dims", true); + + int id = dstNet.addLayer(name, "Reshape", layerParams); + layer_id[name] = id; + + // one input only + connect(layer_id, dstNet, parsePin(layer.input(0)), id, 0); + } + else if (type == "Const") + { + } + else if (type == "Softmax") + { + layerParams.set("axis", -1); + int id = dstNet.addLayer(name, "Softmax", layerParams); + layer_id[name] = id; + + connectToAllBlobs(layer_id, dstNet, parsePin(layer.input(0)), id, layer.input_size()); + } + else if (type == "LRN") + { + if(hasLayerAttr(layer, "alpha")) { + layerParams.set("alpha", getLayerAttr(layer, "alpha").f()); + } + if(hasLayerAttr(layer, "beta")) { + layerParams.set("beta", getLayerAttr(layer, "beta").f()); + } + if(hasLayerAttr(layer, "depth_radius")) { + int radius = (int)getLayerAttr(layer, "depth_radius").i(); + layerParams.set("local_size", 2*radius + 1); + } + if(hasLayerAttr(layer, "bias")) { + layerParams.set("bias", getLayerAttr(layer, "bias").f()); + } + layerParams.set("norm_sz", false); + + int id = dstNet.addLayer(name, "LRN", layerParams); + layer_id[name] = id; + + connectToAllBlobs(layer_id, dstNet, parsePin(layer.input(0)), id, layer.input_size()); + } + else if (type == "Concat") + { + int axis = getConstBlob(layer, value_id, 0).int_val().Get(0); + layerParams.set("axis", toNCHW[axis]); + + int id = dstNet.addLayer(name, "Concat", layerParams); + layer_id[name] = id; + + // input(0) is concat_dim + for (int ii = 1; ii < layer.input_size(); ii++) + { + Pin inp = parsePin(layer.input(ii)); + if (layer_id.find(inp.name) == layer_id.end()) + CV_Error(Error::StsError, "Input layer not found: " + inp.name); + dstNet.connect(layer_id.at(inp.name), inp.blobIndex, id, ii - 1); + } + } + else if (type == "Relu") + { + int id = dstNet.addLayer(name, "ReLU", layerParams); + layer_id[name] = id; + + connectToAllBlobs(layer_id, dstNet, parsePin(layer.input(0)), id, layer.input_size()); + } + else if (type == "MaxPool") + { + layerParams.set("pool", "max"); + + setKSize(layerParams, layer); + setStrides(layerParams, layer); + setPadding(layerParams, layer); + + int id = dstNet.addLayer(name, "Pooling", layerParams); + layer_id[name] = id; + + connectToAllBlobs(layer_id, dstNet, parsePin(layer.input(0)), id, layer.input_size()); + } + else if (type == "AvgPool") + { + layerParams.set("pool", "ave"); + + setKSize(layerParams, layer); + setStrides(layerParams, layer); + setPadding(layerParams, layer); + + int id = dstNet.addLayer(name, "Pooling", layerParams); + layer_id[name] = id; + + connectToAllBlobs(layer_id, dstNet, parsePin(layer.input(0)), id, layer.input_size()); + } + else if (type == "Placeholder") + { + std::vector netInputs(1); + netInputs[0] = name; + layer_id[name] = 0; + dstNet.setNetInputs(netInputs); + } + else if (type == "Split") { + // TODO: determing axis index remapping by input dimensions order of input blob + // TODO: slicing input may be Const op + // TODO: slicing kernels for convolutions - in current implenmentation it is impossible + // TODO: add parsing num of slices parameter + CV_Assert(layer.input_size() == 2); + // num_split + // 1st blob is dims tensor + layerParams.set("slice_point", DictValue::arrayReal((double*)0, 0)); + + int axis = getConstBlob(layer, value_id, 0).int_val().Get(0); + layerParams.set("axis", toNCHW[axis]); + + int id = dstNet.addLayer(name, "Slice", layerParams); + layer_id[name] = id; + + // one input only + connect(layer_id, dstNet, parsePin(layer.input(1)), id, 0); + } + else + { + printLayerAttr(layer); + CV_Error_(Error::StsError, ("Unknown layer type %s in op %s", type.c_str(), name.c_str())); + } + } +} + +} // namespace + +Ptr cv::dnn::createTensorflowImporter(const String &model) +{ + return Ptr(new TFImporter(model.c_str())); +} + +#else //HAVE_PROTOBUF + +Ptr cv::dnn::createTensorflowImporter(const String&) +{ + CV_Error(cv::Error::StsNotImplemented, "libprotobuf required to import data from TensorFlow models"); + return Ptr(); +} + +#endif //HAVE_PROTOBUF diff --git a/modules/dnn/src/tensorflow/tf_io.cpp b/modules/dnn/src/tensorflow/tf_io.cpp new file mode 100644 index 000000000..fafe3cfa9 --- /dev/null +++ b/modules/dnn/src/tensorflow/tf_io.cpp @@ -0,0 +1,63 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. + +// Copyright (C) 2016, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +/* +Implementation of various functions which are related to Tensorflow models reading. +*/ + +#if HAVE_PROTOBUF +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include "graph.pb.h" +#include "tf_io.hpp" +#include "../caffe/glog_emulator.hpp" + +namespace cv { +namespace dnn { + +using std::string; +using std::map; +using namespace tensorflow; +using namespace ::google::protobuf; +using namespace ::google::protobuf::io; + +const int kProtoReadBytesLimit = INT_MAX; // Max size of 2 GB minus 1 byte. + +// TODO: remove Caffe duplicate +bool ReadProtoFromBinaryFileTF(const char* filename, Message* proto) { + std::ifstream fs(filename, std::ifstream::in | std::ifstream::binary); + CHECK(fs.is_open()) << "Can't open \"" << filename << "\""; + ZeroCopyInputStream* raw_input = new IstreamInputStream(&fs); + CodedInputStream* coded_input = new CodedInputStream(raw_input); + coded_input->SetTotalBytesLimit(kProtoReadBytesLimit, 536870912); + + bool success = proto->ParseFromCodedStream(coded_input); + + delete coded_input; + delete raw_input; + fs.close(); + return success; +} + +void ReadTFNetParamsFromBinaryFileOrDie(const char* param_file, + tensorflow::GraphDef* param) { + CHECK(ReadProtoFromBinaryFileTF(param_file, param)) + << "Failed to parse GraphDef file: " << param_file; +} + +} +} +#endif diff --git a/modules/dnn/src/tensorflow/tf_io.hpp b/modules/dnn/src/tensorflow/tf_io.hpp new file mode 100644 index 000000000..db9612fc3 --- /dev/null +++ b/modules/dnn/src/tensorflow/tf_io.hpp @@ -0,0 +1,29 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. + +// Copyright (C) 2016, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +/* +Declaration of various functions which are related to Tensorflow models reading. +*/ + +#ifndef __OPENCV_DNN_TF_IO_HPP__ +#define __OPENCV_DNN_TF_IO_HPP__ +#if HAVE_PROTOBUF + +#include "graph.pb.h" + +namespace cv { +namespace dnn { + +// Read parameters from a file into a GraphDef proto message. +void ReadTFNetParamsFromBinaryFileOrDie(const char* param_file, + tensorflow::GraphDef* param); + +} +} + +#endif +#endif diff --git a/modules/dnn/src/tensorflow/types.proto b/modules/dnn/src/tensorflow/types.proto new file mode 100644 index 000000000..051361bbe --- /dev/null +++ b/modules/dnn/src/tensorflow/types.proto @@ -0,0 +1,60 @@ +syntax = "proto3"; + +package tensorflow; +option cc_enable_arenas = true; +option java_outer_classname = "TypesProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; + +enum DataType { + // Not a legal value for DataType. Used to indicate a DataType field + // has not been set. + DT_INVALID = 0; + + // Data types that all computation devices are expected to be + // capable to support. + DT_FLOAT = 1; + DT_DOUBLE = 2; + DT_INT32 = 3; + DT_UINT8 = 4; + DT_INT16 = 5; + DT_INT8 = 6; + DT_STRING = 7; + DT_COMPLEX64 = 8; // Single-precision complex + DT_INT64 = 9; + DT_BOOL = 10; + DT_QINT8 = 11; // Quantized int8 + DT_QUINT8 = 12; // Quantized uint8 + DT_QINT32 = 13; // Quantized int32 + DT_BFLOAT16 = 14; // Float32 truncated to 16 bits. Only for cast ops. + DT_QINT16 = 15; // Quantized int16 + DT_QUINT16 = 16; // Quantized uint16 + DT_UINT16 = 17; + DT_COMPLEX128 = 18; // Double-precision complex + DT_HALF = 19; + + // TODO(josh11b): DT_GENERIC_PROTO = ??; + // TODO(jeff,josh11b): DT_UINT64? DT_UINT32? + + // 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_DOUBLE_REF = 102; + DT_INT32_REF = 103; + DT_UINT8_REF = 104; + DT_INT16_REF = 105; + DT_INT8_REF = 106; + DT_STRING_REF = 107; + DT_COMPLEX64_REF = 108; + DT_INT64_REF = 109; + DT_BOOL_REF = 110; + DT_QINT8_REF = 111; + DT_QUINT8_REF = 112; + DT_QINT32_REF = 113; + DT_BFLOAT16_REF = 114; + DT_QINT16_REF = 115; + DT_QUINT16_REF = 116; + DT_UINT16_REF = 117; + DT_COMPLEX128_REF = 118; + DT_HALF_REF = 119; +} diff --git a/modules/dnn/src/tensorflow/versions.proto b/modules/dnn/src/tensorflow/versions.proto new file mode 100644 index 000000000..7d5e58ae7 --- /dev/null +++ b/modules/dnn/src/tensorflow/versions.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +package tensorflow; +option cc_enable_arenas = true; +option java_outer_classname = "VersionsProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; + +// Version information for a piece of serialized data +// +// There are different types of versions for each type of data +// (GraphDef, etc.), but they all have the same common shape +// described here. +// +// Each consumer has "consumer" and "min_producer" versions (specified +// elsewhere). A consumer is allowed to consume this data if +// +// producer >= min_producer +// consumer >= min_consumer +// consumer not in bad_consumers +// +message VersionDef { + // The version of the code that produced this data. + int32 producer = 1; + + // Any consumer below this version is not allowed to consume this data. + int32 min_consumer = 2; + + // Specific consumer versions which are disallowed (e.g. due to bugs). + repeated int32 bad_consumers = 3; +}; diff --git a/modules/dnn/test/test_tf_importer.cpp b/modules/dnn/test/test_tf_importer.cpp new file mode 100644 index 000000000..9f5d08637 --- /dev/null +++ b/modules/dnn/test/test_tf_importer.cpp @@ -0,0 +1,51 @@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. + +// Copyright (C) 2016, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +/* +Test for Tensorflow models loading +*/ + +#include "test_precomp.hpp" + +namespace cvtest +{ + +using namespace cv; +using namespace cv::dnn; + +template +static std::string _tf(TString filename) +{ + return (getOpenCVExtraDir() + "/dnn/") + filename; +} + +TEST(Test_TensorFlow, read_inception) +{ + Net net; + { + Ptr importer = createTensorflowImporter(_tf("tensorflow_inception_graph.pb")); + ASSERT_TRUE(importer != NULL); + importer->populateNet(net); + } + + Mat sample = imread(_tf("grace_hopper.jpg")); + ASSERT_TRUE(!sample.empty()); + Mat input; + resize(sample, input, Size(224, 224)); + input -= 128; // mean sub + + std::vector inpMats; + inpMats.push_back(input); + + net.setBlob("_input.input", Blob(inpMats)); + net.forward(); + + Blob out = net.getBlob("output"); + std::cout << out.dims() << std::endl; +} + +}