tensorflow_serving_client/
function.rs

1// This file is generated by rust-protobuf 2.14.0. Do not edit
2// @generated
3
4// https://github.com/rust-lang/rust-clippy/issues/702
5#![allow(unknown_lints)]
6#![allow(clippy::all)]
7
8#![cfg_attr(rustfmt, rustfmt_skip)]
9
10#![allow(box_pointers)]
11#![allow(dead_code)]
12#![allow(missing_docs)]
13#![allow(non_camel_case_types)]
14#![allow(non_snake_case)]
15#![allow(non_upper_case_globals)]
16#![allow(trivial_casts)]
17#![allow(unsafe_code)]
18#![allow(unused_imports)]
19#![allow(unused_results)]
20//! Generated file from `tensorflow/core/framework/function.proto`
21
22use protobuf::Message as Message_imported_for_functions;
23use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
24
25/// Generated files are compatible only with the same version
26/// of protobuf runtime.
27// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_14_0;
28
29#[derive(PartialEq,Clone,Default)]
30pub struct FunctionDefLibrary {
31    // message fields
32    pub function: ::protobuf::RepeatedField<FunctionDef>,
33    pub gradient: ::protobuf::RepeatedField<GradientDef>,
34    // special fields
35    pub unknown_fields: ::protobuf::UnknownFields,
36    pub cached_size: ::protobuf::CachedSize,
37}
38
39impl<'a> ::std::default::Default for &'a FunctionDefLibrary {
40    fn default() -> &'a FunctionDefLibrary {
41        <FunctionDefLibrary as ::protobuf::Message>::default_instance()
42    }
43}
44
45impl FunctionDefLibrary {
46    pub fn new() -> FunctionDefLibrary {
47        ::std::default::Default::default()
48    }
49
50    // repeated .tensorflow.FunctionDef function = 1;
51
52
53    pub fn get_function(&self) -> &[FunctionDef] {
54        &self.function
55    }
56    pub fn clear_function(&mut self) {
57        self.function.clear();
58    }
59
60    // Param is passed by value, moved
61    pub fn set_function(&mut self, v: ::protobuf::RepeatedField<FunctionDef>) {
62        self.function = v;
63    }
64
65    // Mutable pointer to the field.
66    pub fn mut_function(&mut self) -> &mut ::protobuf::RepeatedField<FunctionDef> {
67        &mut self.function
68    }
69
70    // Take field
71    pub fn take_function(&mut self) -> ::protobuf::RepeatedField<FunctionDef> {
72        ::std::mem::replace(&mut self.function, ::protobuf::RepeatedField::new())
73    }
74
75    // repeated .tensorflow.GradientDef gradient = 2;
76
77
78    pub fn get_gradient(&self) -> &[GradientDef] {
79        &self.gradient
80    }
81    pub fn clear_gradient(&mut self) {
82        self.gradient.clear();
83    }
84
85    // Param is passed by value, moved
86    pub fn set_gradient(&mut self, v: ::protobuf::RepeatedField<GradientDef>) {
87        self.gradient = v;
88    }
89
90    // Mutable pointer to the field.
91    pub fn mut_gradient(&mut self) -> &mut ::protobuf::RepeatedField<GradientDef> {
92        &mut self.gradient
93    }
94
95    // Take field
96    pub fn take_gradient(&mut self) -> ::protobuf::RepeatedField<GradientDef> {
97        ::std::mem::replace(&mut self.gradient, ::protobuf::RepeatedField::new())
98    }
99}
100
101impl ::protobuf::Message for FunctionDefLibrary {
102    fn is_initialized(&self) -> bool {
103        for v in &self.function {
104            if !v.is_initialized() {
105                return false;
106            }
107        };
108        for v in &self.gradient {
109            if !v.is_initialized() {
110                return false;
111            }
112        };
113        true
114    }
115
116    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
117        while !is.eof()? {
118            let (field_number, wire_type) = is.read_tag_unpack()?;
119            match field_number {
120                1 => {
121                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.function)?;
122                },
123                2 => {
124                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.gradient)?;
125                },
126                _ => {
127                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
128                },
129            };
130        }
131        ::std::result::Result::Ok(())
132    }
133
134    // Compute sizes of nested messages
135    #[allow(unused_variables)]
136    fn compute_size(&self) -> u32 {
137        let mut my_size = 0;
138        for value in &self.function {
139            let len = value.compute_size();
140            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
141        };
142        for value in &self.gradient {
143            let len = value.compute_size();
144            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
145        };
146        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
147        self.cached_size.set(my_size);
148        my_size
149    }
150
151    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
152        for v in &self.function {
153            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
154            os.write_raw_varint32(v.get_cached_size())?;
155            v.write_to_with_cached_sizes(os)?;
156        };
157        for v in &self.gradient {
158            os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
159            os.write_raw_varint32(v.get_cached_size())?;
160            v.write_to_with_cached_sizes(os)?;
161        };
162        os.write_unknown_fields(self.get_unknown_fields())?;
163        ::std::result::Result::Ok(())
164    }
165
166    fn get_cached_size(&self) -> u32 {
167        self.cached_size.get()
168    }
169
170    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
171        &self.unknown_fields
172    }
173
174    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
175        &mut self.unknown_fields
176    }
177
178    fn as_any(&self) -> &dyn (::std::any::Any) {
179        self as &dyn (::std::any::Any)
180    }
181    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
182        self as &mut dyn (::std::any::Any)
183    }
184    fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
185        self
186    }
187
188    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
189        Self::descriptor_static()
190    }
191
192    fn new() -> FunctionDefLibrary {
193        FunctionDefLibrary::new()
194    }
195
196    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
197        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
198        unsafe {
199            descriptor.get(|| {
200                let mut fields = ::std::vec::Vec::new();
201                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FunctionDef>>(
202                    "function",
203                    |m: &FunctionDefLibrary| { &m.function },
204                    |m: &mut FunctionDefLibrary| { &mut m.function },
205                ));
206                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<GradientDef>>(
207                    "gradient",
208                    |m: &FunctionDefLibrary| { &m.gradient },
209                    |m: &mut FunctionDefLibrary| { &mut m.gradient },
210                ));
211                ::protobuf::reflect::MessageDescriptor::new_pb_name::<FunctionDefLibrary>(
212                    "FunctionDefLibrary",
213                    fields,
214                    file_descriptor_proto()
215                )
216            })
217        }
218    }
219
220    fn default_instance() -> &'static FunctionDefLibrary {
221        static mut instance: ::protobuf::lazy::Lazy<FunctionDefLibrary> = ::protobuf::lazy::Lazy::INIT;
222        unsafe {
223            instance.get(FunctionDefLibrary::new)
224        }
225    }
226}
227
228impl ::protobuf::Clear for FunctionDefLibrary {
229    fn clear(&mut self) {
230        self.function.clear();
231        self.gradient.clear();
232        self.unknown_fields.clear();
233    }
234}
235
236impl ::std::fmt::Debug for FunctionDefLibrary {
237    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
238        ::protobuf::text_format::fmt(self, f)
239    }
240}
241
242impl ::protobuf::reflect::ProtobufValue for FunctionDefLibrary {
243    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
244        ::protobuf::reflect::ReflectValueRef::Message(self)
245    }
246}
247
248#[derive(PartialEq,Clone,Default)]
249pub struct FunctionDef {
250    // message fields
251    pub signature: ::protobuf::SingularPtrField<super::op_def::OpDef>,
252    pub attr: ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue>,
253    pub arg_attr: ::std::collections::HashMap<u32, FunctionDef_ArgAttrs>,
254    pub resource_arg_unique_id: ::std::collections::HashMap<u32, u32>,
255    pub node_def: ::protobuf::RepeatedField<super::node_def::NodeDef>,
256    pub ret: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
257    pub control_ret: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
258    // special fields
259    pub unknown_fields: ::protobuf::UnknownFields,
260    pub cached_size: ::protobuf::CachedSize,
261}
262
263impl<'a> ::std::default::Default for &'a FunctionDef {
264    fn default() -> &'a FunctionDef {
265        <FunctionDef as ::protobuf::Message>::default_instance()
266    }
267}
268
269impl FunctionDef {
270    pub fn new() -> FunctionDef {
271        ::std::default::Default::default()
272    }
273
274    // .tensorflow.OpDef signature = 1;
275
276
277    pub fn get_signature(&self) -> &super::op_def::OpDef {
278        self.signature.as_ref().unwrap_or_else(|| super::op_def::OpDef::default_instance())
279    }
280    pub fn clear_signature(&mut self) {
281        self.signature.clear();
282    }
283
284    pub fn has_signature(&self) -> bool {
285        self.signature.is_some()
286    }
287
288    // Param is passed by value, moved
289    pub fn set_signature(&mut self, v: super::op_def::OpDef) {
290        self.signature = ::protobuf::SingularPtrField::some(v);
291    }
292
293    // Mutable pointer to the field.
294    // If field is not initialized, it is initialized with default value first.
295    pub fn mut_signature(&mut self) -> &mut super::op_def::OpDef {
296        if self.signature.is_none() {
297            self.signature.set_default();
298        }
299        self.signature.as_mut().unwrap()
300    }
301
302    // Take field
303    pub fn take_signature(&mut self) -> super::op_def::OpDef {
304        self.signature.take().unwrap_or_else(|| super::op_def::OpDef::new())
305    }
306
307    // repeated .tensorflow.FunctionDef.AttrEntry attr = 5;
308
309
310    pub fn get_attr(&self) -> &::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
311        &self.attr
312    }
313    pub fn clear_attr(&mut self) {
314        self.attr.clear();
315    }
316
317    // Param is passed by value, moved
318    pub fn set_attr(&mut self, v: ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue>) {
319        self.attr = v;
320    }
321
322    // Mutable pointer to the field.
323    pub fn mut_attr(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
324        &mut self.attr
325    }
326
327    // Take field
328    pub fn take_attr(&mut self) -> ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
329        ::std::mem::replace(&mut self.attr, ::std::collections::HashMap::new())
330    }
331
332    // repeated .tensorflow.FunctionDef.ArgAttrEntry arg_attr = 7;
333
334
335    pub fn get_arg_attr(&self) -> &::std::collections::HashMap<u32, FunctionDef_ArgAttrs> {
336        &self.arg_attr
337    }
338    pub fn clear_arg_attr(&mut self) {
339        self.arg_attr.clear();
340    }
341
342    // Param is passed by value, moved
343    pub fn set_arg_attr(&mut self, v: ::std::collections::HashMap<u32, FunctionDef_ArgAttrs>) {
344        self.arg_attr = v;
345    }
346
347    // Mutable pointer to the field.
348    pub fn mut_arg_attr(&mut self) -> &mut ::std::collections::HashMap<u32, FunctionDef_ArgAttrs> {
349        &mut self.arg_attr
350    }
351
352    // Take field
353    pub fn take_arg_attr(&mut self) -> ::std::collections::HashMap<u32, FunctionDef_ArgAttrs> {
354        ::std::mem::replace(&mut self.arg_attr, ::std::collections::HashMap::new())
355    }
356
357    // repeated .tensorflow.FunctionDef.ResourceArgUniqueIdEntry resource_arg_unique_id = 8;
358
359
360    pub fn get_resource_arg_unique_id(&self) -> &::std::collections::HashMap<u32, u32> {
361        &self.resource_arg_unique_id
362    }
363    pub fn clear_resource_arg_unique_id(&mut self) {
364        self.resource_arg_unique_id.clear();
365    }
366
367    // Param is passed by value, moved
368    pub fn set_resource_arg_unique_id(&mut self, v: ::std::collections::HashMap<u32, u32>) {
369        self.resource_arg_unique_id = v;
370    }
371
372    // Mutable pointer to the field.
373    pub fn mut_resource_arg_unique_id(&mut self) -> &mut ::std::collections::HashMap<u32, u32> {
374        &mut self.resource_arg_unique_id
375    }
376
377    // Take field
378    pub fn take_resource_arg_unique_id(&mut self) -> ::std::collections::HashMap<u32, u32> {
379        ::std::mem::replace(&mut self.resource_arg_unique_id, ::std::collections::HashMap::new())
380    }
381
382    // repeated .tensorflow.NodeDef node_def = 3;
383
384
385    pub fn get_node_def(&self) -> &[super::node_def::NodeDef] {
386        &self.node_def
387    }
388    pub fn clear_node_def(&mut self) {
389        self.node_def.clear();
390    }
391
392    // Param is passed by value, moved
393    pub fn set_node_def(&mut self, v: ::protobuf::RepeatedField<super::node_def::NodeDef>) {
394        self.node_def = v;
395    }
396
397    // Mutable pointer to the field.
398    pub fn mut_node_def(&mut self) -> &mut ::protobuf::RepeatedField<super::node_def::NodeDef> {
399        &mut self.node_def
400    }
401
402    // Take field
403    pub fn take_node_def(&mut self) -> ::protobuf::RepeatedField<super::node_def::NodeDef> {
404        ::std::mem::replace(&mut self.node_def, ::protobuf::RepeatedField::new())
405    }
406
407    // repeated .tensorflow.FunctionDef.RetEntry ret = 4;
408
409
410    pub fn get_ret(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
411        &self.ret
412    }
413    pub fn clear_ret(&mut self) {
414        self.ret.clear();
415    }
416
417    // Param is passed by value, moved
418    pub fn set_ret(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) {
419        self.ret = v;
420    }
421
422    // Mutable pointer to the field.
423    pub fn mut_ret(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> {
424        &mut self.ret
425    }
426
427    // Take field
428    pub fn take_ret(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> {
429        ::std::mem::replace(&mut self.ret, ::std::collections::HashMap::new())
430    }
431
432    // repeated .tensorflow.FunctionDef.ControlRetEntry control_ret = 6;
433
434
435    pub fn get_control_ret(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
436        &self.control_ret
437    }
438    pub fn clear_control_ret(&mut self) {
439        self.control_ret.clear();
440    }
441
442    // Param is passed by value, moved
443    pub fn set_control_ret(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) {
444        self.control_ret = v;
445    }
446
447    // Mutable pointer to the field.
448    pub fn mut_control_ret(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> {
449        &mut self.control_ret
450    }
451
452    // Take field
453    pub fn take_control_ret(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> {
454        ::std::mem::replace(&mut self.control_ret, ::std::collections::HashMap::new())
455    }
456}
457
458impl ::protobuf::Message for FunctionDef {
459    fn is_initialized(&self) -> bool {
460        for v in &self.signature {
461            if !v.is_initialized() {
462                return false;
463            }
464        };
465        for v in &self.node_def {
466            if !v.is_initialized() {
467                return false;
468            }
469        };
470        true
471    }
472
473    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
474        while !is.eof()? {
475            let (field_number, wire_type) = is.read_tag_unpack()?;
476            match field_number {
477                1 => {
478                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.signature)?;
479                },
480                5 => {
481                    ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(wire_type, is, &mut self.attr)?;
482                },
483                7 => {
484                    ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeUint32, ::protobuf::types::ProtobufTypeMessage<FunctionDef_ArgAttrs>>(wire_type, is, &mut self.arg_attr)?;
485                },
486                8 => {
487                    ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeUint32, ::protobuf::types::ProtobufTypeUint32>(wire_type, is, &mut self.resource_arg_unique_id)?;
488                },
489                3 => {
490                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.node_def)?;
491                },
492                4 => {
493                    ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.ret)?;
494                },
495                6 => {
496                    ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.control_ret)?;
497                },
498                _ => {
499                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
500                },
501            };
502        }
503        ::std::result::Result::Ok(())
504    }
505
506    // Compute sizes of nested messages
507    #[allow(unused_variables)]
508    fn compute_size(&self) -> u32 {
509        let mut my_size = 0;
510        if let Some(ref v) = self.signature.as_ref() {
511            let len = v.compute_size();
512            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
513        }
514        my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(5, &self.attr);
515        my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeUint32, ::protobuf::types::ProtobufTypeMessage<FunctionDef_ArgAttrs>>(7, &self.arg_attr);
516        my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeUint32, ::protobuf::types::ProtobufTypeUint32>(8, &self.resource_arg_unique_id);
517        for value in &self.node_def {
518            let len = value.compute_size();
519            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
520        };
521        my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(4, &self.ret);
522        my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(6, &self.control_ret);
523        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
524        self.cached_size.set(my_size);
525        my_size
526    }
527
528    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
529        if let Some(ref v) = self.signature.as_ref() {
530            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
531            os.write_raw_varint32(v.get_cached_size())?;
532            v.write_to_with_cached_sizes(os)?;
533        }
534        ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(5, &self.attr, os)?;
535        ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeUint32, ::protobuf::types::ProtobufTypeMessage<FunctionDef_ArgAttrs>>(7, &self.arg_attr, os)?;
536        ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeUint32, ::protobuf::types::ProtobufTypeUint32>(8, &self.resource_arg_unique_id, os)?;
537        for v in &self.node_def {
538            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
539            os.write_raw_varint32(v.get_cached_size())?;
540            v.write_to_with_cached_sizes(os)?;
541        };
542        ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(4, &self.ret, os)?;
543        ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(6, &self.control_ret, os)?;
544        os.write_unknown_fields(self.get_unknown_fields())?;
545        ::std::result::Result::Ok(())
546    }
547
548    fn get_cached_size(&self) -> u32 {
549        self.cached_size.get()
550    }
551
552    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
553        &self.unknown_fields
554    }
555
556    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
557        &mut self.unknown_fields
558    }
559
560    fn as_any(&self) -> &dyn (::std::any::Any) {
561        self as &dyn (::std::any::Any)
562    }
563    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
564        self as &mut dyn (::std::any::Any)
565    }
566    fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
567        self
568    }
569
570    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
571        Self::descriptor_static()
572    }
573
574    fn new() -> FunctionDef {
575        FunctionDef::new()
576    }
577
578    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
579        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
580        unsafe {
581            descriptor.get(|| {
582                let mut fields = ::std::vec::Vec::new();
583                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::op_def::OpDef>>(
584                    "signature",
585                    |m: &FunctionDef| { &m.signature },
586                    |m: &mut FunctionDef| { &mut m.signature },
587                ));
588                fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(
589                    "attr",
590                    |m: &FunctionDef| { &m.attr },
591                    |m: &mut FunctionDef| { &mut m.attr },
592                ));
593                fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeUint32, ::protobuf::types::ProtobufTypeMessage<FunctionDef_ArgAttrs>>(
594                    "arg_attr",
595                    |m: &FunctionDef| { &m.arg_attr },
596                    |m: &mut FunctionDef| { &mut m.arg_attr },
597                ));
598                fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeUint32, ::protobuf::types::ProtobufTypeUint32>(
599                    "resource_arg_unique_id",
600                    |m: &FunctionDef| { &m.resource_arg_unique_id },
601                    |m: &mut FunctionDef| { &mut m.resource_arg_unique_id },
602                ));
603                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::node_def::NodeDef>>(
604                    "node_def",
605                    |m: &FunctionDef| { &m.node_def },
606                    |m: &mut FunctionDef| { &mut m.node_def },
607                ));
608                fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(
609                    "ret",
610                    |m: &FunctionDef| { &m.ret },
611                    |m: &mut FunctionDef| { &mut m.ret },
612                ));
613                fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(
614                    "control_ret",
615                    |m: &FunctionDef| { &m.control_ret },
616                    |m: &mut FunctionDef| { &mut m.control_ret },
617                ));
618                ::protobuf::reflect::MessageDescriptor::new_pb_name::<FunctionDef>(
619                    "FunctionDef",
620                    fields,
621                    file_descriptor_proto()
622                )
623            })
624        }
625    }
626
627    fn default_instance() -> &'static FunctionDef {
628        static mut instance: ::protobuf::lazy::Lazy<FunctionDef> = ::protobuf::lazy::Lazy::INIT;
629        unsafe {
630            instance.get(FunctionDef::new)
631        }
632    }
633}
634
635impl ::protobuf::Clear for FunctionDef {
636    fn clear(&mut self) {
637        self.signature.clear();
638        self.attr.clear();
639        self.arg_attr.clear();
640        self.resource_arg_unique_id.clear();
641        self.node_def.clear();
642        self.ret.clear();
643        self.control_ret.clear();
644        self.unknown_fields.clear();
645    }
646}
647
648impl ::std::fmt::Debug for FunctionDef {
649    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
650        ::protobuf::text_format::fmt(self, f)
651    }
652}
653
654impl ::protobuf::reflect::ProtobufValue for FunctionDef {
655    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
656        ::protobuf::reflect::ReflectValueRef::Message(self)
657    }
658}
659
660#[derive(PartialEq,Clone,Default)]
661pub struct FunctionDef_ArgAttrs {
662    // message fields
663    pub attr: ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue>,
664    // special fields
665    pub unknown_fields: ::protobuf::UnknownFields,
666    pub cached_size: ::protobuf::CachedSize,
667}
668
669impl<'a> ::std::default::Default for &'a FunctionDef_ArgAttrs {
670    fn default() -> &'a FunctionDef_ArgAttrs {
671        <FunctionDef_ArgAttrs as ::protobuf::Message>::default_instance()
672    }
673}
674
675impl FunctionDef_ArgAttrs {
676    pub fn new() -> FunctionDef_ArgAttrs {
677        ::std::default::Default::default()
678    }
679
680    // repeated .tensorflow.FunctionDef.ArgAttrs.AttrEntry attr = 1;
681
682
683    pub fn get_attr(&self) -> &::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
684        &self.attr
685    }
686    pub fn clear_attr(&mut self) {
687        self.attr.clear();
688    }
689
690    // Param is passed by value, moved
691    pub fn set_attr(&mut self, v: ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue>) {
692        self.attr = v;
693    }
694
695    // Mutable pointer to the field.
696    pub fn mut_attr(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
697        &mut self.attr
698    }
699
700    // Take field
701    pub fn take_attr(&mut self) -> ::std::collections::HashMap<::std::string::String, super::attr_value::AttrValue> {
702        ::std::mem::replace(&mut self.attr, ::std::collections::HashMap::new())
703    }
704}
705
706impl ::protobuf::Message for FunctionDef_ArgAttrs {
707    fn is_initialized(&self) -> bool {
708        true
709    }
710
711    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
712        while !is.eof()? {
713            let (field_number, wire_type) = is.read_tag_unpack()?;
714            match field_number {
715                1 => {
716                    ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(wire_type, is, &mut self.attr)?;
717                },
718                _ => {
719                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
720                },
721            };
722        }
723        ::std::result::Result::Ok(())
724    }
725
726    // Compute sizes of nested messages
727    #[allow(unused_variables)]
728    fn compute_size(&self) -> u32 {
729        let mut my_size = 0;
730        my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(1, &self.attr);
731        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
732        self.cached_size.set(my_size);
733        my_size
734    }
735
736    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
737        ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(1, &self.attr, os)?;
738        os.write_unknown_fields(self.get_unknown_fields())?;
739        ::std::result::Result::Ok(())
740    }
741
742    fn get_cached_size(&self) -> u32 {
743        self.cached_size.get()
744    }
745
746    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
747        &self.unknown_fields
748    }
749
750    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
751        &mut self.unknown_fields
752    }
753
754    fn as_any(&self) -> &dyn (::std::any::Any) {
755        self as &dyn (::std::any::Any)
756    }
757    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
758        self as &mut dyn (::std::any::Any)
759    }
760    fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
761        self
762    }
763
764    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
765        Self::descriptor_static()
766    }
767
768    fn new() -> FunctionDef_ArgAttrs {
769        FunctionDef_ArgAttrs::new()
770    }
771
772    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
773        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
774        unsafe {
775            descriptor.get(|| {
776                let mut fields = ::std::vec::Vec::new();
777                fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::attr_value::AttrValue>>(
778                    "attr",
779                    |m: &FunctionDef_ArgAttrs| { &m.attr },
780                    |m: &mut FunctionDef_ArgAttrs| { &mut m.attr },
781                ));
782                ::protobuf::reflect::MessageDescriptor::new_pb_name::<FunctionDef_ArgAttrs>(
783                    "FunctionDef.ArgAttrs",
784                    fields,
785                    file_descriptor_proto()
786                )
787            })
788        }
789    }
790
791    fn default_instance() -> &'static FunctionDef_ArgAttrs {
792        static mut instance: ::protobuf::lazy::Lazy<FunctionDef_ArgAttrs> = ::protobuf::lazy::Lazy::INIT;
793        unsafe {
794            instance.get(FunctionDef_ArgAttrs::new)
795        }
796    }
797}
798
799impl ::protobuf::Clear for FunctionDef_ArgAttrs {
800    fn clear(&mut self) {
801        self.attr.clear();
802        self.unknown_fields.clear();
803    }
804}
805
806impl ::std::fmt::Debug for FunctionDef_ArgAttrs {
807    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
808        ::protobuf::text_format::fmt(self, f)
809    }
810}
811
812impl ::protobuf::reflect::ProtobufValue for FunctionDef_ArgAttrs {
813    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
814        ::protobuf::reflect::ReflectValueRef::Message(self)
815    }
816}
817
818#[derive(PartialEq,Clone,Default)]
819pub struct GradientDef {
820    // message fields
821    pub function_name: ::std::string::String,
822    pub gradient_func: ::std::string::String,
823    // special fields
824    pub unknown_fields: ::protobuf::UnknownFields,
825    pub cached_size: ::protobuf::CachedSize,
826}
827
828impl<'a> ::std::default::Default for &'a GradientDef {
829    fn default() -> &'a GradientDef {
830        <GradientDef as ::protobuf::Message>::default_instance()
831    }
832}
833
834impl GradientDef {
835    pub fn new() -> GradientDef {
836        ::std::default::Default::default()
837    }
838
839    // string function_name = 1;
840
841
842    pub fn get_function_name(&self) -> &str {
843        &self.function_name
844    }
845    pub fn clear_function_name(&mut self) {
846        self.function_name.clear();
847    }
848
849    // Param is passed by value, moved
850    pub fn set_function_name(&mut self, v: ::std::string::String) {
851        self.function_name = v;
852    }
853
854    // Mutable pointer to the field.
855    // If field is not initialized, it is initialized with default value first.
856    pub fn mut_function_name(&mut self) -> &mut ::std::string::String {
857        &mut self.function_name
858    }
859
860    // Take field
861    pub fn take_function_name(&mut self) -> ::std::string::String {
862        ::std::mem::replace(&mut self.function_name, ::std::string::String::new())
863    }
864
865    // string gradient_func = 2;
866
867
868    pub fn get_gradient_func(&self) -> &str {
869        &self.gradient_func
870    }
871    pub fn clear_gradient_func(&mut self) {
872        self.gradient_func.clear();
873    }
874
875    // Param is passed by value, moved
876    pub fn set_gradient_func(&mut self, v: ::std::string::String) {
877        self.gradient_func = v;
878    }
879
880    // Mutable pointer to the field.
881    // If field is not initialized, it is initialized with default value first.
882    pub fn mut_gradient_func(&mut self) -> &mut ::std::string::String {
883        &mut self.gradient_func
884    }
885
886    // Take field
887    pub fn take_gradient_func(&mut self) -> ::std::string::String {
888        ::std::mem::replace(&mut self.gradient_func, ::std::string::String::new())
889    }
890}
891
892impl ::protobuf::Message for GradientDef {
893    fn is_initialized(&self) -> bool {
894        true
895    }
896
897    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
898        while !is.eof()? {
899            let (field_number, wire_type) = is.read_tag_unpack()?;
900            match field_number {
901                1 => {
902                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.function_name)?;
903                },
904                2 => {
905                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.gradient_func)?;
906                },
907                _ => {
908                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
909                },
910            };
911        }
912        ::std::result::Result::Ok(())
913    }
914
915    // Compute sizes of nested messages
916    #[allow(unused_variables)]
917    fn compute_size(&self) -> u32 {
918        let mut my_size = 0;
919        if !self.function_name.is_empty() {
920            my_size += ::protobuf::rt::string_size(1, &self.function_name);
921        }
922        if !self.gradient_func.is_empty() {
923            my_size += ::protobuf::rt::string_size(2, &self.gradient_func);
924        }
925        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
926        self.cached_size.set(my_size);
927        my_size
928    }
929
930    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
931        if !self.function_name.is_empty() {
932            os.write_string(1, &self.function_name)?;
933        }
934        if !self.gradient_func.is_empty() {
935            os.write_string(2, &self.gradient_func)?;
936        }
937        os.write_unknown_fields(self.get_unknown_fields())?;
938        ::std::result::Result::Ok(())
939    }
940
941    fn get_cached_size(&self) -> u32 {
942        self.cached_size.get()
943    }
944
945    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
946        &self.unknown_fields
947    }
948
949    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
950        &mut self.unknown_fields
951    }
952
953    fn as_any(&self) -> &dyn (::std::any::Any) {
954        self as &dyn (::std::any::Any)
955    }
956    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
957        self as &mut dyn (::std::any::Any)
958    }
959    fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
960        self
961    }
962
963    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
964        Self::descriptor_static()
965    }
966
967    fn new() -> GradientDef {
968        GradientDef::new()
969    }
970
971    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
972        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
973        unsafe {
974            descriptor.get(|| {
975                let mut fields = ::std::vec::Vec::new();
976                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
977                    "function_name",
978                    |m: &GradientDef| { &m.function_name },
979                    |m: &mut GradientDef| { &mut m.function_name },
980                ));
981                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
982                    "gradient_func",
983                    |m: &GradientDef| { &m.gradient_func },
984                    |m: &mut GradientDef| { &mut m.gradient_func },
985                ));
986                ::protobuf::reflect::MessageDescriptor::new_pb_name::<GradientDef>(
987                    "GradientDef",
988                    fields,
989                    file_descriptor_proto()
990                )
991            })
992        }
993    }
994
995    fn default_instance() -> &'static GradientDef {
996        static mut instance: ::protobuf::lazy::Lazy<GradientDef> = ::protobuf::lazy::Lazy::INIT;
997        unsafe {
998            instance.get(GradientDef::new)
999        }
1000    }
1001}
1002
1003impl ::protobuf::Clear for GradientDef {
1004    fn clear(&mut self) {
1005        self.function_name.clear();
1006        self.gradient_func.clear();
1007        self.unknown_fields.clear();
1008    }
1009}
1010
1011impl ::std::fmt::Debug for GradientDef {
1012    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1013        ::protobuf::text_format::fmt(self, f)
1014    }
1015}
1016
1017impl ::protobuf::reflect::ProtobufValue for GradientDef {
1018    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
1019        ::protobuf::reflect::ReflectValueRef::Message(self)
1020    }
1021}
1022
1023static file_descriptor_proto_data: &'static [u8] = b"\
1024    \n(tensorflow/core/framework/function.proto\x12\ntensorflow\x1a*tensorfl\
1025    ow/core/framework/attr_value.proto\x1a(tensorflow/core/framework/node_de\
1026    f.proto\x1a&tensorflow/core/framework/op_def.proto\"~\n\x12FunctionDefLi\
1027    brary\x123\n\x08function\x18\x01\x20\x03(\x0b2\x17.tensorflow.FunctionDe\
1028    fR\x08function\x123\n\x08gradient\x18\x02\x20\x03(\x0b2\x17.tensorflow.G\
1029    radientDefR\x08gradient\"\xdb\x07\n\x0bFunctionDef\x12/\n\tsignature\x18\
1030    \x01\x20\x01(\x0b2\x11.tensorflow.OpDefR\tsignature\x125\n\x04attr\x18\
1031    \x05\x20\x03(\x0b2!.tensorflow.FunctionDef.AttrEntryR\x04attr\x12?\n\x08\
1032    arg_attr\x18\x07\x20\x03(\x0b2$.tensorflow.FunctionDef.ArgAttrEntryR\x07\
1033    argAttr\x12e\n\x16resource_arg_unique_id\x18\x08\x20\x03(\x0b20.tensorfl\
1034    ow.FunctionDef.ResourceArgUniqueIdEntryR\x13resourceArgUniqueId\x12.\n\
1035    \x08node_def\x18\x03\x20\x03(\x0b2\x13.tensorflow.NodeDefR\x07nodeDef\
1036    \x122\n\x03ret\x18\x04\x20\x03(\x0b2\x20.tensorflow.FunctionDef.RetEntry\
1037    R\x03ret\x12H\n\x0bcontrol_ret\x18\x06\x20\x03(\x0b2'.tensorflow.Functio\
1038    nDef.ControlRetEntryR\ncontrolRet\x1aN\n\tAttrEntry\x12\x10\n\x03key\x18\
1039    \x01\x20\x01(\tR\x03key\x12+\n\x05value\x18\x02\x20\x01(\x0b2\x15.tensor\
1040    flow.AttrValueR\x05value:\x028\x01\x1a\x9a\x01\n\x08ArgAttrs\x12>\n\x04a\
1041    ttr\x18\x01\x20\x03(\x0b2*.tensorflow.FunctionDef.ArgAttrs.AttrEntryR\
1042    \x04attr\x1aN\n\tAttrEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\
1043    \x12+\n\x05value\x18\x02\x20\x01(\x0b2\x15.tensorflow.AttrValueR\x05valu\
1044    e:\x028\x01\x1a\\\n\x0cArgAttrEntry\x12\x10\n\x03key\x18\x01\x20\x01(\rR\
1045    \x03key\x126\n\x05value\x18\x02\x20\x01(\x0b2\x20.tensorflow.FunctionDef\
1046    .ArgAttrsR\x05value:\x028\x01\x1aF\n\x18ResourceArgUniqueIdEntry\x12\x10\
1047    \n\x03key\x18\x01\x20\x01(\rR\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\
1048    \rR\x05value:\x028\x01\x1a6\n\x08RetEntry\x12\x10\n\x03key\x18\x01\x20\
1049    \x01(\tR\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x028\
1050    \x01\x1a=\n\x0fControlRetEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03k\
1051    ey\x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x028\x01J\x04\x08\
1052    \x02\x10\x03\"W\n\x0bGradientDef\x12#\n\rfunction_name\x18\x01\x20\x01(\
1053    \tR\x0cfunctionName\x12#\n\rgradient_func\x18\x02\x20\x01(\tR\x0cgradien\
1054    tFuncB\x80\x01\n\x18org.tensorflow.frameworkB\x0eFunctionProtosP\x01ZOgi\
1055    thub.com/tensorflow/tensorflow/tensorflow/go/core/framework/function_go_\
1056    proto\xf8\x01\x01J\xb0'\n\x06\x12\x04\0\0}\x01\n\x08\n\x01\x0c\x12\x03\0\
1057    \0\x12\n\x08\n\x01\x02\x12\x03\x02\0\x13\n\t\n\x02\x03\0\x12\x03\x04\04\
1058    \n\t\n\x02\x03\x01\x12\x03\x05\02\n\t\n\x02\x03\x02\x12\x03\x06\00\n\x08\
1059    \n\x01\x08\x12\x03\x08\0\x1f\n\t\n\x02\x08\x1f\x12\x03\x08\0\x1f\n\x08\n\
1060    \x01\x08\x12\x03\t\0/\n\t\n\x02\x08\x08\x12\x03\t\0/\n\x08\n\x01\x08\x12\
1061    \x03\n\0\"\n\t\n\x02\x08\n\x12\x03\n\0\"\n\x08\n\x01\x08\x12\x03\x0b\01\
1062    \n\t\n\x02\x08\x01\x12\x03\x0b\01\n\x08\n\x01\x08\x12\x03\x0c\0f\n\t\n\
1063    \x02\x08\x0b\x12\x03\x0c\0f\n4\n\x02\x04\0\x12\x04\x0f\0\x12\x01\x1a(\
1064    \x20A\x20library\x20is\x20a\x20set\x20of\x20named\x20functions.\n\n\n\n\
1065    \x03\x04\0\x01\x12\x03\x0f\x08\x1a\n\x0b\n\x04\x04\0\x02\0\x12\x03\x10\
1066    \x02$\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\x10\x02\n\n\x0c\n\x05\x04\0\
1067    \x02\0\x06\x12\x03\x10\x0b\x16\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x10\
1068    \x17\x1f\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x10\"#\n\x0b\n\x04\x04\0\
1069    \x02\x01\x12\x03\x11\x02$\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03\x11\x02\
1070    \n\n\x0c\n\x05\x04\0\x02\x01\x06\x12\x03\x11\x0b\x16\n\x0c\n\x05\x04\0\
1071    \x02\x01\x01\x12\x03\x11\x17\x1f\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\
1072    \x11\"#\n\xf3\x01\n\x02\x04\x01\x12\x04\x1a\0f\x01\x1a\xe6\x01\x20A\x20f\
1073    unction\x20can\x20be\x20instantiated\x20when\x20the\x20runtime\x20can\
1074    \x20bind\x20every\x20attr\n\x20with\x20a\x20value.\x20When\x20a\x20Graph\
1075    Def\x20has\x20a\x20call\x20to\x20a\x20function,\x20it\x20must\n\x20have\
1076    \x20binding\x20for\x20every\x20attr\x20defined\x20in\x20the\x20signature\
1077    .\n\n\x20TODO(zhifengc):\n\x20\x20\x20*\x20device\x20spec,\x20etc.\n\n\n\
1078    \n\x03\x04\x01\x01\x12\x03\x1a\x08\x13\n[\n\x04\x04\x01\x02\0\x12\x03\
1079    \x1d\x02\x16\x1aN\x20The\x20definition\x20of\x20the\x20function's\x20nam\
1080    e,\x20arguments,\x20return\x20values,\n\x20attrs\x20etc.\n\n\x0c\n\x05\
1081    \x04\x01\x02\0\x06\x12\x03\x1d\x02\x07\n\x0c\n\x05\x04\x01\x02\0\x01\x12\
1082    \x03\x1d\x08\x11\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x1d\x14\x15\n?\n\
1083    \x04\x04\x01\x02\x01\x12\x03\x20\x02\"\x1a2\x20Attributes\x20specific\
1084    \x20to\x20this\x20function\x20definition.\n\n\x0c\n\x05\x04\x01\x02\x01\
1085    \x06\x12\x03\x20\x02\x18\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x20\x19\
1086    \x1d\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x20\x20!\n{\n\x04\x04\x01\
1087    \x03\x01\x12\x04$\x02&\x03\x1am\x20Attributes\x20for\x20function\x20argu\
1088    ments.\x20These\x20attributes\x20are\x20the\x20same\x20set\x20of\n\x20va\
1089    lid\x20attributes\x20as\x20to\x20_Arg\x20nodes.\n\n\x0c\n\x05\x04\x01\
1090    \x03\x01\x01\x12\x03$\n\x12\n\r\n\x06\x04\x01\x03\x01\x02\0\x12\x03%\x04\
1091    $\n\x0e\n\x07\x04\x01\x03\x01\x02\0\x06\x12\x03%\x04\x1a\n\x0e\n\x07\x04\
1092    \x01\x03\x01\x02\0\x01\x12\x03%\x1b\x1f\n\x0e\n\x07\x04\x01\x03\x01\x02\
1093    \0\x03\x12\x03%\"#\n\x0b\n\x04\x04\x01\x02\x02\x12\x03'\x02%\n\x0c\n\x05\
1094    \x04\x01\x02\x02\x06\x12\x03'\x02\x17\n\x0c\n\x05\x04\x01\x02\x02\x01\
1095    \x12\x03'\x18\x20\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03'#$\n\xc7\x03\n\
1096    \x04\x04\x01\x02\x03\x12\x032\x021\x1a\xb9\x03\x20Unique\x20IDs\x20for\
1097    \x20each\x20resource\x20argument,\x20used\x20to\x20track\x20aliasing\x20\
1098    resources.\x20If\n\x20Argument\x20A\x20and\x20Argument\x20B\x20alias\x20\
1099    each\x20other,\x20then\n\x20resource_arg_unique_ids[A.index]\x20==\x20re\
1100    source_arg_unique_ids[B.index].\n\n\x20If\x20this\x20field\x20is\x20empt\
1101    y,\x20none\x20of\x20the\x20arguments\x20could\x20alias;\x20otherwise,\
1102    \x20every\n\x20resource\x20argument\x20should\x20have\x20an\x20entry\x20\
1103    in\x20this\x20field.\n\n\x20When\x20instantiated,\x20the\x20unique\x20ID\
1104    s\x20will\x20be\x20attached\x20to\x20the\x20_Arg\x20nodes'\n\x20\"_resou\
1105    rce_arg_unique_id\"\x20attribute.\n\n\x0c\n\x05\x04\x01\x02\x03\x06\x12\
1106    \x032\x02\x15\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x032\x16,\n\x0c\n\x05\
1107    \x04\x01\x02\x03\x03\x12\x032/0\nL\n\x03\x04\x01\t\x12\x035\x02\r\x1a@\
1108    \x20NOTE:\x20field\x20id\x202\x20deleted\x20on\x20Jan\x2011,\x202017,\
1109    \x20GraphDef\x20version\x2021.\n\n\x0b\n\x04\x04\x01\t\0\x12\x035\x0b\
1110    \x0c\n\x0c\n\x05\x04\x01\t\0\x01\x12\x035\x0b\x0c\n\x0c\n\x05\x04\x01\t\
1111    \0\x02\x12\x035\x0b\x0c\n\xfb\x0e\n\x04\x04\x01\x02\x04\x12\x03]\x02\x20\
1112    \x1a\x97\x01\x20By\x20convention,\x20\"op\"\x20in\x20node_def\x20is\x20r\
1113    esolved\x20by\x20consulting\x20with\x20a\n\x20user-defined\x20library\
1114    \x20first.\x20If\x20not\x20resolved,\x20\"func\"\x20is\x20assumed\x20to\
1115    \n\x20be\x20a\x20builtin\x20op.\n2\xad\x0c\x20In\x20both\x20of\x20the\
1116    \x20following\x20fields,\x20there\x20is\x20the\x20need\x20to\x20specify\
1117    \x20an\n\x20output\x20that\x20is\x20used\x20as\x20either\x20the\x20input\
1118    \x20to\x20another\x20node\x20(in\n\x20`node_def`)\x20or\x20as\x20a\x20re\
1119    turn\x20value\x20of\x20the\x20function\x20(in\x20`ret`).\n\x20Unlike\x20\
1120    the\x20NodeDefs\x20in\x20GraphDef,\x20we\x20need\x20to\x20be\x20able\x20\
1121    to\x20specify\x20a\n\x20list\x20in\x20some\x20cases\x20(instead\x20of\
1122    \x20just\x20single\x20outputs).\x20\x20Also,\x20we\n\x20need\x20to\x20be\
1123    \x20able\x20to\x20deal\x20with\x20lists\x20of\x20unknown\x20length\x20(s\
1124    o\x20the\n\x20output\x20index\x20may\x20not\x20be\x20known\x20at\x20func\
1125    tion\x20definition\x20time).\x20\x20So\n\x20we\x20use\x20the\x20followin\
1126    g\x20format\x20instead:\n\x20*\x20\"fun_in\"\x20where\x20\"fun_in\"\x20i\
1127    s\x20the\x20name\x20of\x20a\x20function\x20input\x20arg\x20in\n\x20\x20\
1128    \x20the\x20`signature`\x20field\x20above.\x20\x20This\x20represents\x20t\
1129    hat\x20input,\x20whether\n\x20\x20\x20it\x20is\x20a\x20single\x20tensor\
1130    \x20or\x20a\x20list.\n\x20*\x20\"fun_in:0\"\x20gives\x20the\x20first\x20\
1131    element\x20of\x20a\x20function\x20input\x20arg\x20(a\n\x20\x20\x20non-li\
1132    st\x20input\x20is\x20considered\x20a\x20list\x20of\x20length\x201\x20for\
1133    \x20these\n\x20\x20\x20purposes).\n\x20*\x20\"node:out\"\x20where\x20\"n\
1134    ode\"\x20is\x20the\x20name\x20of\x20a\x20node\x20in\x20`node_def`\x20and\
1135    \n\x20\x20\x20\"out\"\x20is\x20the\x20name\x20one\x20of\x20its\x20op's\
1136    \x20output\x20arguments\x20(the\x20name\n\x20\x20\x20comes\x20from\x20th\
1137    e\x20OpDef\x20of\x20the\x20node's\x20op).\x20This\x20represents\x20that\
1138    \n\x20\x20\x20node's\x20output,\x20whether\x20it\x20is\x20a\x20single\
1139    \x20tensor\x20or\x20a\x20list.\n\x20\x20\x20Note:\x20We\x20enforce\x20th\
1140    at\x20an\x20op's\x20output\x20arguments\x20are\x20never\n\x20\x20\x20ren\
1141    amed\x20in\x20the\x20backwards-compatibility\x20test.\n\x20*\x20\"node:o\
1142    ut:0\"\x20gives\x20the\x20first\x20element\x20of\x20a\x20node\x20output\
1143    \x20arg\x20(a\n\x20\x20\x20non-list\x20output\x20is\x20considered\x20a\
1144    \x20list\x20of\x20length\x201\x20for\x20these\n\x20\x20\x20purposes).\n\
1145    \n\x20NOT\x20CURRENTLY\x20SUPPORTED\x20(but\x20may\x20be\x20in\x20the\
1146    \x20future):\n\x20*\x20\"node:out:-1\"\x20gives\x20last\x20element\x20in\
1147    \x20a\x20node\x20output\x20list\n\x20*\x20\"node:out:1:\"\x20gives\x20a\
1148    \x20list\x20with\x20all\x20but\x20the\x20first\x20element\x20in\x20a\n\
1149    \x20\x20\x20node\x20output\x20list\n\x20*\x20\"node:out::-1\"\x20gives\
1150    \x20a\x20list\x20with\x20all\x20but\x20the\x20last\x20element\x20in\x20a\
1151    \n\x20\x20\x20node\x20output\x20list\n2\xa3\x01\x20The\x20body\x20of\x20\
1152    the\x20function.\x20\x20Unlike\x20the\x20NodeDefs\x20in\x20a\x20GraphDef\
1153    ,\x20attrs\n\x20may\x20have\x20values\x20of\x20type\x20`placeholder`\x20\
1154    and\x20the\x20`input`\x20field\x20uses\n\x20the\x20\"output\"\x20format\
1155    \x20above.\n\n\x0c\n\x05\x04\x01\x02\x04\x04\x12\x03]\x02\n\n\x0c\n\x05\
1156    \x04\x01\x02\x04\x06\x12\x03]\x0b\x12\n\x0c\n\x05\x04\x01\x02\x04\x01\
1157    \x12\x03]\x13\x1b\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\x03]\x1e\x1f\n\x8c\
1158    \x01\n\x04\x04\x01\x02\x05\x12\x03a\x02\x1e\x1a\x7f\x20A\x20mapping\x20f\
1159    rom\x20the\x20output\x20arg\x20names\x20from\x20`signature`\x20to\x20the\
1160    \n\x20outputs\x20from\x20`node_def`\x20that\x20should\x20be\x20returned\
1161    \x20by\x20the\x20function.\n\n\x0c\n\x05\x04\x01\x02\x05\x06\x12\x03a\
1162    \x02\x15\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x03a\x16\x19\n\x0c\n\x05\
1163    \x04\x01\x02\x05\x03\x12\x03a\x1c\x1d\n\x93\x01\n\x04\x04\x01\x02\x06\
1164    \x12\x03e\x02&\x1a\x85\x01\x20A\x20mapping\x20from\x20control\x20output\
1165    \x20names\x20from\x20`signature`\x20to\x20node\x20names\x20in\n\x20`node\
1166    _def`\x20which\x20should\x20be\x20control\x20outputs\x20of\x20this\x20fu\
1167    nction.\n\n\x0c\n\x05\x04\x01\x02\x06\x06\x12\x03e\x02\x15\n\x0c\n\x05\
1168    \x04\x01\x02\x06\x01\x12\x03e\x16!\n\x0c\n\x05\x04\x01\x02\x06\x03\x12\
1169    \x03e$%\n\xfb\x05\n\x02\x04\x02\x12\x04z\0}\x01\x1a\xee\x05\x20GradientD\
1170    ef\x20defines\x20the\x20gradient\x20function\x20of\x20a\x20function\x20d\
1171    efined\x20in\n\x20a\x20function\x20library.\n\n\x20A\x20gradient\x20func\
1172    tion\x20g\x20(specified\x20by\x20gradient_func)\x20for\x20a\x20function\
1173    \x20f\n\x20(specified\x20by\x20function_name)\x20must\x20follow\x20the\
1174    \x20following:\n\n\x20The\x20function\x20'f'\x20must\x20be\x20a\x20numer\
1175    ical\x20function\x20which\x20takes\x20N\x20inputs\n\x20and\x20produces\
1176    \x20M\x20outputs.\x20Its\x20gradient\x20function\x20'g',\x20which\x20is\
1177    \x20a\n\x20function\x20taking\x20N\x20+\x20M\x20inputs\x20and\x20produce\
1178    s\x20N\x20outputs.\n\n\x20I.e.\x20if\x20we\x20have\n\x20\x20\x20\x20(y1,\
1179    \x20y2,\x20...,\x20y_M)\x20=\x20f(x1,\x20x2,\x20...,\x20x_N),\n\x20then,\
1180    \x20g\x20is\n\x20\x20\x20\x20(dL/dx1,\x20dL/dx2,\x20...,\x20dL/dx_N)\x20\
1181    =\x20g(x1,\x20x2,\x20...,\x20x_N,\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\
1182    \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
1183    \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20dL/dy1,\x20dL/dy2,\x20...,\
1184    \x20dL/dy_M),\n\x20where\x20L\x20is\x20a\x20scalar-value\x20function\x20\
1185    of\x20(x1,\x20x2,\x20...,\x20xN)\x20(e.g.,\x20the\n\x20loss\x20function)\
1186    .\x20dL/dx_i\x20is\x20the\x20partial\x20derivative\x20of\x20L\x20with\
1187    \x20respect\n\x20to\x20x_i.\n\n\n\n\x03\x04\x02\x01\x12\x03z\x08\x13\n!\
1188    \n\x04\x04\x02\x02\0\x12\x03{\x02\x1b\"\x14\x20The\x20function\x20name.\
1189    \n\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03{\x02\x08\n\x0c\n\x05\x04\x02\
1190    \x02\0\x01\x12\x03{\t\x16\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03{\x19\x1a\
1191    \n,\n\x04\x04\x02\x02\x01\x12\x03|\x02\x1b\"\x1f\x20The\x20gradient\x20f\
1192    unction's\x20name.\n\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03|\x02\x08\n\
1193    \x0c\n\x05\x04\x02\x02\x01\x01\x12\x03|\t\x16\n\x0c\n\x05\x04\x02\x02\
1194    \x01\x03\x12\x03|\x19\x1ab\x06proto3\
1195";
1196
1197static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT;
1198
1199fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
1200    ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
1201}
1202
1203pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
1204    unsafe {
1205        file_descriptor_proto_lazy.get(|| {
1206            parse_descriptor_proto()
1207        })
1208    }
1209}