tensorflow-serving-client 2.3.0

A prebuilt tensorflow serving client from the tensorflow serving proto files
Documentation
// This file is generated by rust-protobuf 2.14.0. Do not edit
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]

#![cfg_attr(rustfmt, rustfmt_skip)]

#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `tensorflow/core/framework/function.proto`

use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;

/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_14_0;

#[derive(PartialEq,Clone,Default)]
pub struct FunctionDefLibrary {
    // message fields
    pub function: ::protobuf::RepeatedField<FunctionDef>,
    pub gradient: ::protobuf::RepeatedField<GradientDef>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a FunctionDefLibrary {
    fn default() -> &'a FunctionDefLibrary {
        <FunctionDefLibrary as ::protobuf::Message>::default_instance()
    }
}

impl FunctionDefLibrary {
    pub fn new() -> FunctionDefLibrary {
        ::std::default::Default::default()
    }

    // repeated .tensorflow.FunctionDef function = 1;


    pub fn get_function(&self) -> &[FunctionDef] {
        &self.function
    }
    pub fn clear_function(&mut self) {
        self.function.clear();
    }

    // Param is passed by value, moved
    pub fn set_function(&mut self, v: ::protobuf::RepeatedField<FunctionDef>) {
        self.function = v;
    }

    // Mutable pointer to the field.
    pub fn mut_function(&mut self) -> &mut ::protobuf::RepeatedField<FunctionDef> {
        &mut self.function
    }

    // Take field
    pub fn take_function(&mut self) -> ::protobuf::RepeatedField<FunctionDef> {
        ::std::mem::replace(&mut self.function, ::protobuf::RepeatedField::new())
    }

    // repeated .tensorflow.GradientDef gradient = 2;


    pub fn get_gradient(&self) -> &[GradientDef] {
        &self.gradient
    }
    pub fn clear_gradient(&mut self) {
        self.gradient.clear();
    }

    // Param is passed by value, moved
    pub fn set_gradient(&mut self, v: ::protobuf::RepeatedField<GradientDef>) {
        self.gradient = v;
    }

    // Mutable pointer to the field.
    pub fn mut_gradient(&mut self) -> &mut ::protobuf::RepeatedField<GradientDef> {
        &mut self.gradient
    }

    // Take field
    pub fn take_gradient(&mut self) -> ::protobuf::RepeatedField<GradientDef> {
        ::std::mem::replace(&mut self.gradient, ::protobuf::RepeatedField::new())
    }
}

impl ::protobuf::Message for FunctionDefLibrary {
    fn is_initialized(&self) -> bool {
        for v in &self.function {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.gradient {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.function)?;
                },
                2 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.gradient)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        for value in &self.function {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        for value in &self.gradient {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        for v in &self.function {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        for v in &self.gradient {
            os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> FunctionDefLibrary {
        FunctionDefLibrary::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FunctionDef>>(
                    "function",
                    |m: &FunctionDefLibrary| { &m.function },
                    |m: &mut FunctionDefLibrary| { &mut m.function },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<GradientDef>>(
                    "gradient",
                    |m: &FunctionDefLibrary| { &m.gradient },
                    |m: &mut FunctionDefLibrary| { &mut m.gradient },
                ));
                ::protobuf::reflect::MessageDescriptor::new_pb_name::<FunctionDefLibrary>(
                    "FunctionDefLibrary",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static FunctionDefLibrary {
        static mut instance: ::protobuf::lazy::Lazy<FunctionDefLibrary> = ::protobuf::lazy::Lazy::INIT;
        unsafe {
            instance.get(FunctionDefLibrary::new)
        }
    }
}

impl ::protobuf::Clear for FunctionDefLibrary {
    fn clear(&mut self) {
        self.function.clear();
        self.gradient.clear();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for FunctionDefLibrary {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for FunctionDefLibrary {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct FunctionDef {
    // message fields
    pub signature: ::protobuf::SingularPtrField<super::op_def::OpDef>,
    pub attr: ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue>,
    pub arg_attr: ::std::collections::HashMap<u32, FunctionDef_ArgAttrs>,
    pub resource_arg_unique_id: ::std::collections::HashMap<u32, u32>,
    pub node_def: ::protobuf::RepeatedField<super::node_def::NodeDef>,
    pub ret: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
    pub control_ret: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a FunctionDef {
    fn default() -> &'a FunctionDef {
        <FunctionDef as ::protobuf::Message>::default_instance()
    }
}

impl FunctionDef {
    pub fn new() -> FunctionDef {
        ::std::default::Default::default()
    }

    // .tensorflow.OpDef signature = 1;


    pub fn get_signature(&self) -> &super::op_def::OpDef {
        self.signature.as_ref().unwrap_or_else(|| super::op_def::OpDef::default_instance())
    }
    pub fn clear_signature(&mut self) {
        self.signature.clear();
    }

    pub fn has_signature(&self) -> bool {
        self.signature.is_some()
    }

    // Param is passed by value, moved
    pub fn set_signature(&mut self, v: super::op_def::OpDef) {
        self.signature = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_signature(&mut self) -> &mut super::op_def::OpDef {
        if self.signature.is_none() {
            self.signature.set_default();
        }
        self.signature.as_mut().unwrap()
    }

    // Take field
    pub fn take_signature(&mut self) -> super::op_def::OpDef {
        self.signature.take().unwrap_or_else(|| super::op_def::OpDef::new())
    }

    // repeated .tensorflow.FunctionDef.AttrEntry attr = 5;


    pub fn get_attr(&self) -> &::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
        &self.attr
    }
    pub fn clear_attr(&mut self) {
        self.attr.clear();
    }

    // Param is passed by value, moved
    pub fn set_attr(&mut self, v: ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue>) {
        self.attr = v;
    }

    // Mutable pointer to the field.
    pub fn mut_attr(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
        &mut self.attr
    }

    // Take field
    pub fn take_attr(&mut self) -> ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
        ::std::mem::replace(&mut self.attr, ::std::collections::HashMap::new())
    }

    // repeated .tensorflow.FunctionDef.ArgAttrEntry arg_attr = 7;


    pub fn get_arg_attr(&self) -> &::std::collections::HashMap<u32, FunctionDef_ArgAttrs> {
        &self.arg_attr
    }
    pub fn clear_arg_attr(&mut self) {
        self.arg_attr.clear();
    }

    // Param is passed by value, moved
    pub fn set_arg_attr(&mut self, v: ::std::collections::HashMap<u32, FunctionDef_ArgAttrs>) {
        self.arg_attr = v;
    }

    // Mutable pointer to the field.
    pub fn mut_arg_attr(&mut self) -> &mut ::std::collections::HashMap<u32, FunctionDef_ArgAttrs> {
        &mut self.arg_attr
    }

    // Take field
    pub fn take_arg_attr(&mut self) -> ::std::collections::HashMap<u32, FunctionDef_ArgAttrs> {
        ::std::mem::replace(&mut self.arg_attr, ::std::collections::HashMap::new())
    }

    // repeated .tensorflow.FunctionDef.ResourceArgUniqueIdEntry resource_arg_unique_id = 8;


    pub fn get_resource_arg_unique_id(&self) -> &::std::collections::HashMap<u32, u32> {
        &self.resource_arg_unique_id
    }
    pub fn clear_resource_arg_unique_id(&mut self) {
        self.resource_arg_unique_id.clear();
    }

    // Param is passed by value, moved
    pub fn set_resource_arg_unique_id(&mut self, v: ::std::collections::HashMap<u32, u32>) {
        self.resource_arg_unique_id = v;
    }

    // Mutable pointer to the field.
    pub fn mut_resource_arg_unique_id(&mut self) -> &mut ::std::collections::HashMap<u32, u32> {
        &mut self.resource_arg_unique_id
    }

    // Take field
    pub fn take_resource_arg_unique_id(&mut self) -> ::std::collections::HashMap<u32, u32> {
        ::std::mem::replace(&mut self.resource_arg_unique_id, ::std::collections::HashMap::new())
    }

    // repeated .tensorflow.NodeDef node_def = 3;


    pub fn get_node_def(&self) -> &[super::node_def::NodeDef] {
        &self.node_def
    }
    pub fn clear_node_def(&mut self) {
        self.node_def.clear();
    }

    // Param is passed by value, moved
    pub fn set_node_def(&mut self, v: ::protobuf::RepeatedField<super::node_def::NodeDef>) {
        self.node_def = v;
    }

    // Mutable pointer to the field.
    pub fn mut_node_def(&mut self) -> &mut ::protobuf::RepeatedField<super::node_def::NodeDef> {
        &mut self.node_def
    }

    // Take field
    pub fn take_node_def(&mut self) -> ::protobuf::RepeatedField<super::node_def::NodeDef> {
        ::std::mem::replace(&mut self.node_def, ::protobuf::RepeatedField::new())
    }

    // repeated .tensorflow.FunctionDef.RetEntry ret = 4;


    pub fn get_ret(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
        &self.ret
    }
    pub fn clear_ret(&mut self) {
        self.ret.clear();
    }

    // Param is passed by value, moved
    pub fn set_ret(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) {
        self.ret = v;
    }

    // Mutable pointer to the field.
    pub fn mut_ret(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> {
        &mut self.ret
    }

    // Take field
    pub fn take_ret(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> {
        ::std::mem::replace(&mut self.ret, ::std::collections::HashMap::new())
    }

    // repeated .tensorflow.FunctionDef.ControlRetEntry control_ret = 6;


    pub fn get_control_ret(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
        &self.control_ret
    }
    pub fn clear_control_ret(&mut self) {
        self.control_ret.clear();
    }

    // Param is passed by value, moved
    pub fn set_control_ret(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) {
        self.control_ret = v;
    }

    // Mutable pointer to the field.
    pub fn mut_control_ret(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> {
        &mut self.control_ret
    }

    // Take field
    pub fn take_control_ret(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> {
        ::std::mem::replace(&mut self.control_ret, ::std::collections::HashMap::new())
    }
}

impl ::protobuf::Message for FunctionDef {
    fn is_initialized(&self) -> bool {
        for v in &self.signature {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.node_def {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.signature)?;
                },
                5 => {
                    ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(wire_type, is, &mut self.attr)?;
                },
                7 => {
                    ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeUint32, ::protobuf::types::ProtobufTypeMessage<FunctionDef_ArgAttrs>>(wire_type, is, &mut self.arg_attr)?;
                },
                8 => {
                    ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeUint32, ::protobuf::types::ProtobufTypeUint32>(wire_type, is, &mut self.resource_arg_unique_id)?;
                },
                3 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.node_def)?;
                },
                4 => {
                    ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.ret)?;
                },
                6 => {
                    ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.control_ret)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let Some(ref v) = self.signature.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(5, &self.attr);
        my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeUint32, ::protobuf::types::ProtobufTypeMessage<FunctionDef_ArgAttrs>>(7, &self.arg_attr);
        my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeUint32, ::protobuf::types::ProtobufTypeUint32>(8, &self.resource_arg_unique_id);
        for value in &self.node_def {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(4, &self.ret);
        my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(6, &self.control_ret);
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if let Some(ref v) = self.signature.as_ref() {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(5, &self.attr, os)?;
        ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeUint32, ::protobuf::types::ProtobufTypeMessage<FunctionDef_ArgAttrs>>(7, &self.arg_attr, os)?;
        ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeUint32, ::protobuf::types::ProtobufTypeUint32>(8, &self.resource_arg_unique_id, os)?;
        for v in &self.node_def {
            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(4, &self.ret, os)?;
        ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(6, &self.control_ret, os)?;
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> FunctionDef {
        FunctionDef::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::op_def::OpDef>>(
                    "signature",
                    |m: &FunctionDef| { &m.signature },
                    |m: &mut FunctionDef| { &mut m.signature },
                ));
                fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(
                    "attr",
                    |m: &FunctionDef| { &m.attr },
                    |m: &mut FunctionDef| { &mut m.attr },
                ));
                fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeUint32, ::protobuf::types::ProtobufTypeMessage<FunctionDef_ArgAttrs>>(
                    "arg_attr",
                    |m: &FunctionDef| { &m.arg_attr },
                    |m: &mut FunctionDef| { &mut m.arg_attr },
                ));
                fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeUint32, ::protobuf::types::ProtobufTypeUint32>(
                    "resource_arg_unique_id",
                    |m: &FunctionDef| { &m.resource_arg_unique_id },
                    |m: &mut FunctionDef| { &mut m.resource_arg_unique_id },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::node_def::NodeDef>>(
                    "node_def",
                    |m: &FunctionDef| { &m.node_def },
                    |m: &mut FunctionDef| { &mut m.node_def },
                ));
                fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(
                    "ret",
                    |m: &FunctionDef| { &m.ret },
                    |m: &mut FunctionDef| { &mut m.ret },
                ));
                fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(
                    "control_ret",
                    |m: &FunctionDef| { &m.control_ret },
                    |m: &mut FunctionDef| { &mut m.control_ret },
                ));
                ::protobuf::reflect::MessageDescriptor::new_pb_name::<FunctionDef>(
                    "FunctionDef",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static FunctionDef {
        static mut instance: ::protobuf::lazy::Lazy<FunctionDef> = ::protobuf::lazy::Lazy::INIT;
        unsafe {
            instance.get(FunctionDef::new)
        }
    }
}

impl ::protobuf::Clear for FunctionDef {
    fn clear(&mut self) {
        self.signature.clear();
        self.attr.clear();
        self.arg_attr.clear();
        self.resource_arg_unique_id.clear();
        self.node_def.clear();
        self.ret.clear();
        self.control_ret.clear();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for FunctionDef {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for FunctionDef {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct FunctionDef_ArgAttrs {
    // message fields
    pub attr: ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a FunctionDef_ArgAttrs {
    fn default() -> &'a FunctionDef_ArgAttrs {
        <FunctionDef_ArgAttrs as ::protobuf::Message>::default_instance()
    }
}

impl FunctionDef_ArgAttrs {
    pub fn new() -> FunctionDef_ArgAttrs {
        ::std::default::Default::default()
    }

    // repeated .tensorflow.FunctionDef.ArgAttrs.AttrEntry attr = 1;


    pub fn get_attr(&self) -> &::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
        &self.attr
    }
    pub fn clear_attr(&mut self) {
        self.attr.clear();
    }

    // Param is passed by value, moved
    pub fn set_attr(&mut self, v: ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue>) {
        self.attr = v;
    }

    // Mutable pointer to the field.
    pub fn mut_attr(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
        &mut self.attr
    }

    // Take field
    pub fn take_attr(&mut self) -> ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
        ::std::mem::replace(&mut self.attr, ::std::collections::HashMap::new())
    }
}

impl ::protobuf::Message for FunctionDef_ArgAttrs {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(wire_type, is, &mut self.attr)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(1, &self.attr);
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(1, &self.attr, os)?;
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> FunctionDef_ArgAttrs {
        FunctionDef_ArgAttrs::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(
                    "attr",
                    |m: &FunctionDef_ArgAttrs| { &m.attr },
                    |m: &mut FunctionDef_ArgAttrs| { &mut m.attr },
                ));
                ::protobuf::reflect::MessageDescriptor::new_pb_name::<FunctionDef_ArgAttrs>(
                    "FunctionDef.ArgAttrs",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static FunctionDef_ArgAttrs {
        static mut instance: ::protobuf::lazy::Lazy<FunctionDef_ArgAttrs> = ::protobuf::lazy::Lazy::INIT;
        unsafe {
            instance.get(FunctionDef_ArgAttrs::new)
        }
    }
}

impl ::protobuf::Clear for FunctionDef_ArgAttrs {
    fn clear(&mut self) {
        self.attr.clear();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for FunctionDef_ArgAttrs {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for FunctionDef_ArgAttrs {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct GradientDef {
    // message fields
    pub function_name: ::std::string::String,
    pub gradient_func: ::std::string::String,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

impl<'a> ::std::default::Default for &'a GradientDef {
    fn default() -> &'a GradientDef {
        <GradientDef as ::protobuf::Message>::default_instance()
    }
}

impl GradientDef {
    pub fn new() -> GradientDef {
        ::std::default::Default::default()
    }

    // string function_name = 1;


    pub fn get_function_name(&self) -> &str {
        &self.function_name
    }
    pub fn clear_function_name(&mut self) {
        self.function_name.clear();
    }

    // Param is passed by value, moved
    pub fn set_function_name(&mut self, v: ::std::string::String) {
        self.function_name = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_function_name(&mut self) -> &mut ::std::string::String {
        &mut self.function_name
    }

    // Take field
    pub fn take_function_name(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.function_name, ::std::string::String::new())
    }

    // string gradient_func = 2;


    pub fn get_gradient_func(&self) -> &str {
        &self.gradient_func
    }
    pub fn clear_gradient_func(&mut self) {
        self.gradient_func.clear();
    }

    // Param is passed by value, moved
    pub fn set_gradient_func(&mut self, v: ::std::string::String) {
        self.gradient_func = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_gradient_func(&mut self) -> &mut ::std::string::String {
        &mut self.gradient_func
    }

    // Take field
    pub fn take_gradient_func(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.gradient_func, ::std::string::String::new())
    }
}

impl ::protobuf::Message for GradientDef {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.function_name)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.gradient_func)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.function_name.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.function_name);
        }
        if !self.gradient_func.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.gradient_func);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if !self.function_name.is_empty() {
            os.write_string(1, &self.function_name)?;
        }
        if !self.gradient_func.is_empty() {
            os.write_string(2, &self.gradient_func)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> GradientDef {
        GradientDef::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "function_name",
                    |m: &GradientDef| { &m.function_name },
                    |m: &mut GradientDef| { &mut m.function_name },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "gradient_func",
                    |m: &GradientDef| { &m.gradient_func },
                    |m: &mut GradientDef| { &mut m.gradient_func },
                ));
                ::protobuf::reflect::MessageDescriptor::new_pb_name::<GradientDef>(
                    "GradientDef",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static GradientDef {
        static mut instance: ::protobuf::lazy::Lazy<GradientDef> = ::protobuf::lazy::Lazy::INIT;
        unsafe {
            instance.get(GradientDef::new)
        }
    }
}

impl ::protobuf::Clear for GradientDef {
    fn clear(&mut self) {
        self.function_name.clear();
        self.gradient_func.clear();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for GradientDef {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for GradientDef {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n(tensorflow/core/framework/function.proto\x12\ntensorflow\x1a*tensorfl\
    ow/core/framework/attr_value.proto\x1a(tensorflow/core/framework/node_de\
    f.proto\x1a&tensorflow/core/framework/op_def.proto\"~\n\x12FunctionDefLi\
    brary\x123\n\x08function\x18\x01\x20\x03(\x0b2\x17.tensorflow.FunctionDe\
    fR\x08function\x123\n\x08gradient\x18\x02\x20\x03(\x0b2\x17.tensorflow.G\
    radientDefR\x08gradient\"\xdb\x07\n\x0bFunctionDef\x12/\n\tsignature\x18\
    \x01\x20\x01(\x0b2\x11.tensorflow.OpDefR\tsignature\x125\n\x04attr\x18\
    \x05\x20\x03(\x0b2!.tensorflow.FunctionDef.AttrEntryR\x04attr\x12?\n\x08\
    arg_attr\x18\x07\x20\x03(\x0b2$.tensorflow.FunctionDef.ArgAttrEntryR\x07\
    argAttr\x12e\n\x16resource_arg_unique_id\x18\x08\x20\x03(\x0b20.tensorfl\
    ow.FunctionDef.ResourceArgUniqueIdEntryR\x13resourceArgUniqueId\x12.\n\
    \x08node_def\x18\x03\x20\x03(\x0b2\x13.tensorflow.NodeDefR\x07nodeDef\
    \x122\n\x03ret\x18\x04\x20\x03(\x0b2\x20.tensorflow.FunctionDef.RetEntry\
    R\x03ret\x12H\n\x0bcontrol_ret\x18\x06\x20\x03(\x0b2'.tensorflow.Functio\
    nDef.ControlRetEntryR\ncontrolRet\x1aN\n\tAttrEntry\x12\x10\n\x03key\x18\
    \x01\x20\x01(\tR\x03key\x12+\n\x05value\x18\x02\x20\x01(\x0b2\x15.tensor\
    flow.AttrValueR\x05value:\x028\x01\x1a\x9a\x01\n\x08ArgAttrs\x12>\n\x04a\
    ttr\x18\x01\x20\x03(\x0b2*.tensorflow.FunctionDef.ArgAttrs.AttrEntryR\
    \x04attr\x1aN\n\tAttrEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\
    \x12+\n\x05value\x18\x02\x20\x01(\x0b2\x15.tensorflow.AttrValueR\x05valu\
    e:\x028\x01\x1a\\\n\x0cArgAttrEntry\x12\x10\n\x03key\x18\x01\x20\x01(\rR\
    \x03key\x126\n\x05value\x18\x02\x20\x01(\x0b2\x20.tensorflow.FunctionDef\
    .ArgAttrsR\x05value:\x028\x01\x1aF\n\x18ResourceArgUniqueIdEntry\x12\x10\
    \n\x03key\x18\x01\x20\x01(\rR\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\
    \rR\x05value:\x028\x01\x1a6\n\x08RetEntry\x12\x10\n\x03key\x18\x01\x20\
    \x01(\tR\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x028\
    \x01\x1a=\n\x0fControlRetEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03k\
    ey\x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x028\x01J\x04\x08\
    \x02\x10\x03\"W\n\x0bGradientDef\x12#\n\rfunction_name\x18\x01\x20\x01(\
    \tR\x0cfunctionName\x12#\n\rgradient_func\x18\x02\x20\x01(\tR\x0cgradien\
    tFuncB\x80\x01\n\x18org.tensorflow.frameworkB\x0eFunctionProtosP\x01ZOgi\
    thub.com/tensorflow/tensorflow/tensorflow/go/core/framework/function_go_\
    proto\xf8\x01\x01J\xb0'\n\x06\x12\x04\0\0}\x01\n\x08\n\x01\x0c\x12\x03\0\
    \0\x12\n\x08\n\x01\x02\x12\x03\x02\0\x13\n\t\n\x02\x03\0\x12\x03\x04\04\
    \n\t\n\x02\x03\x01\x12\x03\x05\02\n\t\n\x02\x03\x02\x12\x03\x06\00\n\x08\
    \n\x01\x08\x12\x03\x08\0\x1f\n\t\n\x02\x08\x1f\x12\x03\x08\0\x1f\n\x08\n\
    \x01\x08\x12\x03\t\0/\n\t\n\x02\x08\x08\x12\x03\t\0/\n\x08\n\x01\x08\x12\
    \x03\n\0\"\n\t\n\x02\x08\n\x12\x03\n\0\"\n\x08\n\x01\x08\x12\x03\x0b\01\
    \n\t\n\x02\x08\x01\x12\x03\x0b\01\n\x08\n\x01\x08\x12\x03\x0c\0f\n\t\n\
    \x02\x08\x0b\x12\x03\x0c\0f\n4\n\x02\x04\0\x12\x04\x0f\0\x12\x01\x1a(\
    \x20A\x20library\x20is\x20a\x20set\x20of\x20named\x20functions.\n\n\n\n\
    \x03\x04\0\x01\x12\x03\x0f\x08\x1a\n\x0b\n\x04\x04\0\x02\0\x12\x03\x10\
    \x02$\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\x10\x02\n\n\x0c\n\x05\x04\0\
    \x02\0\x06\x12\x03\x10\x0b\x16\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x10\
    \x17\x1f\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x10\"#\n\x0b\n\x04\x04\0\
    \x02\x01\x12\x03\x11\x02$\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03\x11\x02\
    \n\n\x0c\n\x05\x04\0\x02\x01\x06\x12\x03\x11\x0b\x16\n\x0c\n\x05\x04\0\
    \x02\x01\x01\x12\x03\x11\x17\x1f\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\
    \x11\"#\n\xf3\x01\n\x02\x04\x01\x12\x04\x1a\0f\x01\x1a\xe6\x01\x20A\x20f\
    unction\x20can\x20be\x20instantiated\x20when\x20the\x20runtime\x20can\
    \x20bind\x20every\x20attr\n\x20with\x20a\x20value.\x20When\x20a\x20Graph\
    Def\x20has\x20a\x20call\x20to\x20a\x20function,\x20it\x20must\n\x20have\
    \x20binding\x20for\x20every\x20attr\x20defined\x20in\x20the\x20signature\
    .\n\n\x20TODO(zhifengc):\n\x20\x20\x20*\x20device\x20spec,\x20etc.\n\n\n\
    \n\x03\x04\x01\x01\x12\x03\x1a\x08\x13\n[\n\x04\x04\x01\x02\0\x12\x03\
    \x1d\x02\x16\x1aN\x20The\x20definition\x20of\x20the\x20function's\x20nam\
    e,\x20arguments,\x20return\x20values,\n\x20attrs\x20etc.\n\n\x0c\n\x05\
    \x04\x01\x02\0\x06\x12\x03\x1d\x02\x07\n\x0c\n\x05\x04\x01\x02\0\x01\x12\
    \x03\x1d\x08\x11\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x1d\x14\x15\n?\n\
    \x04\x04\x01\x02\x01\x12\x03\x20\x02\"\x1a2\x20Attributes\x20specific\
    \x20to\x20this\x20function\x20definition.\n\n\x0c\n\x05\x04\x01\x02\x01\
    \x06\x12\x03\x20\x02\x18\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x20\x19\
    \x1d\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x20\x20!\n{\n\x04\x04\x01\
    \x03\x01\x12\x04$\x02&\x03\x1am\x20Attributes\x20for\x20function\x20argu\
    ments.\x20These\x20attributes\x20are\x20the\x20same\x20set\x20of\n\x20va\
    lid\x20attributes\x20as\x20to\x20_Arg\x20nodes.\n\n\x0c\n\x05\x04\x01\
    \x03\x01\x01\x12\x03$\n\x12\n\r\n\x06\x04\x01\x03\x01\x02\0\x12\x03%\x04\
    $\n\x0e\n\x07\x04\x01\x03\x01\x02\0\x06\x12\x03%\x04\x1a\n\x0e\n\x07\x04\
    \x01\x03\x01\x02\0\x01\x12\x03%\x1b\x1f\n\x0e\n\x07\x04\x01\x03\x01\x02\
    \0\x03\x12\x03%\"#\n\x0b\n\x04\x04\x01\x02\x02\x12\x03'\x02%\n\x0c\n\x05\
    \x04\x01\x02\x02\x06\x12\x03'\x02\x17\n\x0c\n\x05\x04\x01\x02\x02\x01\
    \x12\x03'\x18\x20\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03'#$\n\xc7\x03\n\
    \x04\x04\x01\x02\x03\x12\x032\x021\x1a\xb9\x03\x20Unique\x20IDs\x20for\
    \x20each\x20resource\x20argument,\x20used\x20to\x20track\x20aliasing\x20\
    resources.\x20If\n\x20Argument\x20A\x20and\x20Argument\x20B\x20alias\x20\
    each\x20other,\x20then\n\x20resource_arg_unique_ids[A.index]\x20==\x20re\
    source_arg_unique_ids[B.index].\n\n\x20If\x20this\x20field\x20is\x20empt\
    y,\x20none\x20of\x20the\x20arguments\x20could\x20alias;\x20otherwise,\
    \x20every\n\x20resource\x20argument\x20should\x20have\x20an\x20entry\x20\
    in\x20this\x20field.\n\n\x20When\x20instantiated,\x20the\x20unique\x20ID\
    s\x20will\x20be\x20attached\x20to\x20the\x20_Arg\x20nodes'\n\x20\"_resou\
    rce_arg_unique_id\"\x20attribute.\n\n\x0c\n\x05\x04\x01\x02\x03\x06\x12\
    \x032\x02\x15\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x032\x16,\n\x0c\n\x05\
    \x04\x01\x02\x03\x03\x12\x032/0\nL\n\x03\x04\x01\t\x12\x035\x02\r\x1a@\
    \x20NOTE:\x20field\x20id\x202\x20deleted\x20on\x20Jan\x2011,\x202017,\
    \x20GraphDef\x20version\x2021.\n\n\x0b\n\x04\x04\x01\t\0\x12\x035\x0b\
    \x0c\n\x0c\n\x05\x04\x01\t\0\x01\x12\x035\x0b\x0c\n\x0c\n\x05\x04\x01\t\
    \0\x02\x12\x035\x0b\x0c\n\xfb\x0e\n\x04\x04\x01\x02\x04\x12\x03]\x02\x20\
    \x1a\x97\x01\x20By\x20convention,\x20\"op\"\x20in\x20node_def\x20is\x20r\
    esolved\x20by\x20consulting\x20with\x20a\n\x20user-defined\x20library\
    \x20first.\x20If\x20not\x20resolved,\x20\"func\"\x20is\x20assumed\x20to\
    \n\x20be\x20a\x20builtin\x20op.\n2\xad\x0c\x20In\x20both\x20of\x20the\
    \x20following\x20fields,\x20there\x20is\x20the\x20need\x20to\x20specify\
    \x20an\n\x20output\x20that\x20is\x20used\x20as\x20either\x20the\x20input\
    \x20to\x20another\x20node\x20(in\n\x20`node_def`)\x20or\x20as\x20a\x20re\
    turn\x20value\x20of\x20the\x20function\x20(in\x20`ret`).\n\x20Unlike\x20\
    the\x20NodeDefs\x20in\x20GraphDef,\x20we\x20need\x20to\x20be\x20able\x20\
    to\x20specify\x20a\n\x20list\x20in\x20some\x20cases\x20(instead\x20of\
    \x20just\x20single\x20outputs).\x20\x20Also,\x20we\n\x20need\x20to\x20be\
    \x20able\x20to\x20deal\x20with\x20lists\x20of\x20unknown\x20length\x20(s\
    o\x20the\n\x20output\x20index\x20may\x20not\x20be\x20known\x20at\x20func\
    tion\x20definition\x20time).\x20\x20So\n\x20we\x20use\x20the\x20followin\
    g\x20format\x20instead:\n\x20*\x20\"fun_in\"\x20where\x20\"fun_in\"\x20i\
    s\x20the\x20name\x20of\x20a\x20function\x20input\x20arg\x20in\n\x20\x20\
    \x20the\x20`signature`\x20field\x20above.\x20\x20This\x20represents\x20t\
    hat\x20input,\x20whether\n\x20\x20\x20it\x20is\x20a\x20single\x20tensor\
    \x20or\x20a\x20list.\n\x20*\x20\"fun_in:0\"\x20gives\x20the\x20first\x20\
    element\x20of\x20a\x20function\x20input\x20arg\x20(a\n\x20\x20\x20non-li\
    st\x20input\x20is\x20considered\x20a\x20list\x20of\x20length\x201\x20for\
    \x20these\n\x20\x20\x20purposes).\n\x20*\x20\"node:out\"\x20where\x20\"n\
    ode\"\x20is\x20the\x20name\x20of\x20a\x20node\x20in\x20`node_def`\x20and\
    \n\x20\x20\x20\"out\"\x20is\x20the\x20name\x20one\x20of\x20its\x20op's\
    \x20output\x20arguments\x20(the\x20name\n\x20\x20\x20comes\x20from\x20th\
    e\x20OpDef\x20of\x20the\x20node's\x20op).\x20This\x20represents\x20that\
    \n\x20\x20\x20node's\x20output,\x20whether\x20it\x20is\x20a\x20single\
    \x20tensor\x20or\x20a\x20list.\n\x20\x20\x20Note:\x20We\x20enforce\x20th\
    at\x20an\x20op's\x20output\x20arguments\x20are\x20never\n\x20\x20\x20ren\
    amed\x20in\x20the\x20backwards-compatibility\x20test.\n\x20*\x20\"node:o\
    ut:0\"\x20gives\x20the\x20first\x20element\x20of\x20a\x20node\x20output\
    \x20arg\x20(a\n\x20\x20\x20non-list\x20output\x20is\x20considered\x20a\
    \x20list\x20of\x20length\x201\x20for\x20these\n\x20\x20\x20purposes).\n\
    \n\x20NOT\x20CURRENTLY\x20SUPPORTED\x20(but\x20may\x20be\x20in\x20the\
    \x20future):\n\x20*\x20\"node:out:-1\"\x20gives\x20last\x20element\x20in\
    \x20a\x20node\x20output\x20list\n\x20*\x20\"node:out:1:\"\x20gives\x20a\
    \x20list\x20with\x20all\x20but\x20the\x20first\x20element\x20in\x20a\n\
    \x20\x20\x20node\x20output\x20list\n\x20*\x20\"node:out::-1\"\x20gives\
    \x20a\x20list\x20with\x20all\x20but\x20the\x20last\x20element\x20in\x20a\
    \n\x20\x20\x20node\x20output\x20list\n2\xa3\x01\x20The\x20body\x20of\x20\
    the\x20function.\x20\x20Unlike\x20the\x20NodeDefs\x20in\x20a\x20GraphDef\
    ,\x20attrs\n\x20may\x20have\x20values\x20of\x20type\x20`placeholder`\x20\
    and\x20the\x20`input`\x20field\x20uses\n\x20the\x20\"output\"\x20format\
    \x20above.\n\n\x0c\n\x05\x04\x01\x02\x04\x04\x12\x03]\x02\n\n\x0c\n\x05\
    \x04\x01\x02\x04\x06\x12\x03]\x0b\x12\n\x0c\n\x05\x04\x01\x02\x04\x01\
    \x12\x03]\x13\x1b\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\x03]\x1e\x1f\n\x8c\
    \x01\n\x04\x04\x01\x02\x05\x12\x03a\x02\x1e\x1a\x7f\x20A\x20mapping\x20f\
    rom\x20the\x20output\x20arg\x20names\x20from\x20`signature`\x20to\x20the\
    \n\x20outputs\x20from\x20`node_def`\x20that\x20should\x20be\x20returned\
    \x20by\x20the\x20function.\n\n\x0c\n\x05\x04\x01\x02\x05\x06\x12\x03a\
    \x02\x15\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x03a\x16\x19\n\x0c\n\x05\
    \x04\x01\x02\x05\x03\x12\x03a\x1c\x1d\n\x93\x01\n\x04\x04\x01\x02\x06\
    \x12\x03e\x02&\x1a\x85\x01\x20A\x20mapping\x20from\x20control\x20output\
    \x20names\x20from\x20`signature`\x20to\x20node\x20names\x20in\n\x20`node\
    _def`\x20which\x20should\x20be\x20control\x20outputs\x20of\x20this\x20fu\
    nction.\n\n\x0c\n\x05\x04\x01\x02\x06\x06\x12\x03e\x02\x15\n\x0c\n\x05\
    \x04\x01\x02\x06\x01\x12\x03e\x16!\n\x0c\n\x05\x04\x01\x02\x06\x03\x12\
    \x03e$%\n\xfb\x05\n\x02\x04\x02\x12\x04z\0}\x01\x1a\xee\x05\x20GradientD\
    ef\x20defines\x20the\x20gradient\x20function\x20of\x20a\x20function\x20d\
    efined\x20in\n\x20a\x20function\x20library.\n\n\x20A\x20gradient\x20func\
    tion\x20g\x20(specified\x20by\x20gradient_func)\x20for\x20a\x20function\
    \x20f\n\x20(specified\x20by\x20function_name)\x20must\x20follow\x20the\
    \x20following:\n\n\x20The\x20function\x20'f'\x20must\x20be\x20a\x20numer\
    ical\x20function\x20which\x20takes\x20N\x20inputs\n\x20and\x20produces\
    \x20M\x20outputs.\x20Its\x20gradient\x20function\x20'g',\x20which\x20is\
    \x20a\n\x20function\x20taking\x20N\x20+\x20M\x20inputs\x20and\x20produce\
    s\x20N\x20outputs.\n\n\x20I.e.\x20if\x20we\x20have\n\x20\x20\x20\x20(y1,\
    \x20y2,\x20...,\x20y_M)\x20=\x20f(x1,\x20x2,\x20...,\x20x_N),\n\x20then,\
    \x20g\x20is\n\x20\x20\x20\x20(dL/dx1,\x20dL/dx2,\x20...,\x20dL/dx_N)\x20\
    =\x20g(x1,\x20x2,\x20...,\x20x_N,\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\
    \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
    \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20dL/dy1,\x20dL/dy2,\x20...,\
    \x20dL/dy_M),\n\x20where\x20L\x20is\x20a\x20scalar-value\x20function\x20\
    of\x20(x1,\x20x2,\x20...,\x20xN)\x20(e.g.,\x20the\n\x20loss\x20function)\
    .\x20dL/dx_i\x20is\x20the\x20partial\x20derivative\x20of\x20L\x20with\
    \x20respect\n\x20to\x20x_i.\n\n\n\n\x03\x04\x02\x01\x12\x03z\x08\x13\n!\
    \n\x04\x04\x02\x02\0\x12\x03{\x02\x1b\"\x14\x20The\x20function\x20name.\
    \n\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03{\x02\x08\n\x0c\n\x05\x04\x02\
    \x02\0\x01\x12\x03{\t\x16\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03{\x19\x1a\
    \n,\n\x04\x04\x02\x02\x01\x12\x03|\x02\x1b\"\x1f\x20The\x20gradient\x20f\
    unction's\x20name.\n\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03|\x02\x08\n\
    \x0c\n\x05\x04\x02\x02\x01\x01\x12\x03|\t\x16\n\x0c\n\x05\x04\x02\x02\
    \x01\x03\x12\x03|\x19\x1ab\x06proto3\
";

static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT;

fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
    ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}

pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    unsafe {
        file_descriptor_proto_lazy.get(|| {
            parse_descriptor_proto()
        })
    }
}