tensorflow_serving_client/
example.rs1#![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)]
20use protobuf::Message as Message_imported_for_functions;
23use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
24
25#[derive(PartialEq,Clone,Default)]
30pub struct Example {
31 pub features: ::protobuf::SingularPtrField<super::feature::Features>,
33 pub unknown_fields: ::protobuf::UnknownFields,
35 pub cached_size: ::protobuf::CachedSize,
36}
37
38impl<'a> ::std::default::Default for &'a Example {
39 fn default() -> &'a Example {
40 <Example as ::protobuf::Message>::default_instance()
41 }
42}
43
44impl Example {
45 pub fn new() -> Example {
46 ::std::default::Default::default()
47 }
48
49 pub fn get_features(&self) -> &super::feature::Features {
53 self.features.as_ref().unwrap_or_else(|| super::feature::Features::default_instance())
54 }
55 pub fn clear_features(&mut self) {
56 self.features.clear();
57 }
58
59 pub fn has_features(&self) -> bool {
60 self.features.is_some()
61 }
62
63 pub fn set_features(&mut self, v: super::feature::Features) {
65 self.features = ::protobuf::SingularPtrField::some(v);
66 }
67
68 pub fn mut_features(&mut self) -> &mut super::feature::Features {
71 if self.features.is_none() {
72 self.features.set_default();
73 }
74 self.features.as_mut().unwrap()
75 }
76
77 pub fn take_features(&mut self) -> super::feature::Features {
79 self.features.take().unwrap_or_else(|| super::feature::Features::new())
80 }
81}
82
83impl ::protobuf::Message for Example {
84 fn is_initialized(&self) -> bool {
85 for v in &self.features {
86 if !v.is_initialized() {
87 return false;
88 }
89 };
90 true
91 }
92
93 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
94 while !is.eof()? {
95 let (field_number, wire_type) = is.read_tag_unpack()?;
96 match field_number {
97 1 => {
98 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.features)?;
99 },
100 _ => {
101 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
102 },
103 };
104 }
105 ::std::result::Result::Ok(())
106 }
107
108 #[allow(unused_variables)]
110 fn compute_size(&self) -> u32 {
111 let mut my_size = 0;
112 if let Some(ref v) = self.features.as_ref() {
113 let len = v.compute_size();
114 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
115 }
116 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
117 self.cached_size.set(my_size);
118 my_size
119 }
120
121 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
122 if let Some(ref v) = self.features.as_ref() {
123 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
124 os.write_raw_varint32(v.get_cached_size())?;
125 v.write_to_with_cached_sizes(os)?;
126 }
127 os.write_unknown_fields(self.get_unknown_fields())?;
128 ::std::result::Result::Ok(())
129 }
130
131 fn get_cached_size(&self) -> u32 {
132 self.cached_size.get()
133 }
134
135 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
136 &self.unknown_fields
137 }
138
139 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
140 &mut self.unknown_fields
141 }
142
143 fn as_any(&self) -> &dyn (::std::any::Any) {
144 self as &dyn (::std::any::Any)
145 }
146 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
147 self as &mut dyn (::std::any::Any)
148 }
149 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
150 self
151 }
152
153 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
154 Self::descriptor_static()
155 }
156
157 fn new() -> Example {
158 Example::new()
159 }
160
161 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
162 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
163 unsafe {
164 descriptor.get(|| {
165 let mut fields = ::std::vec::Vec::new();
166 fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::feature::Features>>(
167 "features",
168 |m: &Example| { &m.features },
169 |m: &mut Example| { &mut m.features },
170 ));
171 ::protobuf::reflect::MessageDescriptor::new_pb_name::<Example>(
172 "Example",
173 fields,
174 file_descriptor_proto()
175 )
176 })
177 }
178 }
179
180 fn default_instance() -> &'static Example {
181 static mut instance: ::protobuf::lazy::Lazy<Example> = ::protobuf::lazy::Lazy::INIT;
182 unsafe {
183 instance.get(Example::new)
184 }
185 }
186}
187
188impl ::protobuf::Clear for Example {
189 fn clear(&mut self) {
190 self.features.clear();
191 self.unknown_fields.clear();
192 }
193}
194
195impl ::std::fmt::Debug for Example {
196 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
197 ::protobuf::text_format::fmt(self, f)
198 }
199}
200
201impl ::protobuf::reflect::ProtobufValue for Example {
202 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
203 ::protobuf::reflect::ReflectValueRef::Message(self)
204 }
205}
206
207#[derive(PartialEq,Clone,Default)]
208pub struct SequenceExample {
209 pub context: ::protobuf::SingularPtrField<super::feature::Features>,
211 pub feature_lists: ::protobuf::SingularPtrField<super::feature::FeatureLists>,
212 pub unknown_fields: ::protobuf::UnknownFields,
214 pub cached_size: ::protobuf::CachedSize,
215}
216
217impl<'a> ::std::default::Default for &'a SequenceExample {
218 fn default() -> &'a SequenceExample {
219 <SequenceExample as ::protobuf::Message>::default_instance()
220 }
221}
222
223impl SequenceExample {
224 pub fn new() -> SequenceExample {
225 ::std::default::Default::default()
226 }
227
228 pub fn get_context(&self) -> &super::feature::Features {
232 self.context.as_ref().unwrap_or_else(|| super::feature::Features::default_instance())
233 }
234 pub fn clear_context(&mut self) {
235 self.context.clear();
236 }
237
238 pub fn has_context(&self) -> bool {
239 self.context.is_some()
240 }
241
242 pub fn set_context(&mut self, v: super::feature::Features) {
244 self.context = ::protobuf::SingularPtrField::some(v);
245 }
246
247 pub fn mut_context(&mut self) -> &mut super::feature::Features {
250 if self.context.is_none() {
251 self.context.set_default();
252 }
253 self.context.as_mut().unwrap()
254 }
255
256 pub fn take_context(&mut self) -> super::feature::Features {
258 self.context.take().unwrap_or_else(|| super::feature::Features::new())
259 }
260
261 pub fn get_feature_lists(&self) -> &super::feature::FeatureLists {
265 self.feature_lists.as_ref().unwrap_or_else(|| super::feature::FeatureLists::default_instance())
266 }
267 pub fn clear_feature_lists(&mut self) {
268 self.feature_lists.clear();
269 }
270
271 pub fn has_feature_lists(&self) -> bool {
272 self.feature_lists.is_some()
273 }
274
275 pub fn set_feature_lists(&mut self, v: super::feature::FeatureLists) {
277 self.feature_lists = ::protobuf::SingularPtrField::some(v);
278 }
279
280 pub fn mut_feature_lists(&mut self) -> &mut super::feature::FeatureLists {
283 if self.feature_lists.is_none() {
284 self.feature_lists.set_default();
285 }
286 self.feature_lists.as_mut().unwrap()
287 }
288
289 pub fn take_feature_lists(&mut self) -> super::feature::FeatureLists {
291 self.feature_lists.take().unwrap_or_else(|| super::feature::FeatureLists::new())
292 }
293}
294
295impl ::protobuf::Message for SequenceExample {
296 fn is_initialized(&self) -> bool {
297 for v in &self.context {
298 if !v.is_initialized() {
299 return false;
300 }
301 };
302 for v in &self.feature_lists {
303 if !v.is_initialized() {
304 return false;
305 }
306 };
307 true
308 }
309
310 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
311 while !is.eof()? {
312 let (field_number, wire_type) = is.read_tag_unpack()?;
313 match field_number {
314 1 => {
315 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.context)?;
316 },
317 2 => {
318 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.feature_lists)?;
319 },
320 _ => {
321 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
322 },
323 };
324 }
325 ::std::result::Result::Ok(())
326 }
327
328 #[allow(unused_variables)]
330 fn compute_size(&self) -> u32 {
331 let mut my_size = 0;
332 if let Some(ref v) = self.context.as_ref() {
333 let len = v.compute_size();
334 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
335 }
336 if let Some(ref v) = self.feature_lists.as_ref() {
337 let len = v.compute_size();
338 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
339 }
340 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
341 self.cached_size.set(my_size);
342 my_size
343 }
344
345 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
346 if let Some(ref v) = self.context.as_ref() {
347 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
348 os.write_raw_varint32(v.get_cached_size())?;
349 v.write_to_with_cached_sizes(os)?;
350 }
351 if let Some(ref v) = self.feature_lists.as_ref() {
352 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
353 os.write_raw_varint32(v.get_cached_size())?;
354 v.write_to_with_cached_sizes(os)?;
355 }
356 os.write_unknown_fields(self.get_unknown_fields())?;
357 ::std::result::Result::Ok(())
358 }
359
360 fn get_cached_size(&self) -> u32 {
361 self.cached_size.get()
362 }
363
364 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
365 &self.unknown_fields
366 }
367
368 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
369 &mut self.unknown_fields
370 }
371
372 fn as_any(&self) -> &dyn (::std::any::Any) {
373 self as &dyn (::std::any::Any)
374 }
375 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
376 self as &mut dyn (::std::any::Any)
377 }
378 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
379 self
380 }
381
382 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
383 Self::descriptor_static()
384 }
385
386 fn new() -> SequenceExample {
387 SequenceExample::new()
388 }
389
390 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
391 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
392 unsafe {
393 descriptor.get(|| {
394 let mut fields = ::std::vec::Vec::new();
395 fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::feature::Features>>(
396 "context",
397 |m: &SequenceExample| { &m.context },
398 |m: &mut SequenceExample| { &mut m.context },
399 ));
400 fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::feature::FeatureLists>>(
401 "feature_lists",
402 |m: &SequenceExample| { &m.feature_lists },
403 |m: &mut SequenceExample| { &mut m.feature_lists },
404 ));
405 ::protobuf::reflect::MessageDescriptor::new_pb_name::<SequenceExample>(
406 "SequenceExample",
407 fields,
408 file_descriptor_proto()
409 )
410 })
411 }
412 }
413
414 fn default_instance() -> &'static SequenceExample {
415 static mut instance: ::protobuf::lazy::Lazy<SequenceExample> = ::protobuf::lazy::Lazy::INIT;
416 unsafe {
417 instance.get(SequenceExample::new)
418 }
419 }
420}
421
422impl ::protobuf::Clear for SequenceExample {
423 fn clear(&mut self) {
424 self.context.clear();
425 self.feature_lists.clear();
426 self.unknown_fields.clear();
427 }
428}
429
430impl ::std::fmt::Debug for SequenceExample {
431 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
432 ::protobuf::text_format::fmt(self, f)
433 }
434}
435
436impl ::protobuf::reflect::ProtobufValue for SequenceExample {
437 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
438 ::protobuf::reflect::ReflectValueRef::Message(self)
439 }
440}
441
442static file_descriptor_proto_data: &'static [u8] = b"\
443 \n%tensorflow/core/example/example.proto\x12\ntensorflow\x1a%tensorflow/\
444 core/example/feature.proto\";\n\x07Example\x120\n\x08features\x18\x01\
445 \x20\x01(\x0b2\x14.tensorflow.FeaturesR\x08features\"\x80\x01\n\x0fSeque\
446 nceExample\x12.\n\x07context\x18\x01\x20\x01(\x0b2\x14.tensorflow.Featur\
447 esR\x07context\x12=\n\rfeature_lists\x18\x02\x20\x01(\x0b2\x18.tensorflo\
448 w.FeatureListsR\x0cfeatureListsB\x81\x01\n\x16org.tensorflow.exampleB\rE\
449 xampleProtosP\x01ZSgithub.com/tensorflow/tensorflow/tensorflow/go/core/e\
450 xample/example_protos_go_proto\xf8\x01\x01J\xffN\n\x07\x12\x05\x02\0\xae\
451 \x02\x01\ns\n\x01\x0c\x12\x03\x02\0\x12\x1ai\x20Protocol\x20messages\x20\
452 for\x20describing\x20input\x20data\x20Examples\x20for\x20machine\x20lear\
453 ning\n\x20model\x20training\x20or\x20inference.\n\n\x08\n\x01\x02\x12\
454 \x03\x04\0\x13\n\t\n\x02\x03\0\x12\x03\x06\0/\n\x08\n\x01\x08\x12\x03\
455 \x08\0\x1f\n\t\n\x02\x08\x1f\x12\x03\x08\0\x1f\n\x08\n\x01\x08\x12\x03\t\
456 \0.\n\t\n\x02\x08\x08\x12\x03\t\0.\n\x08\n\x01\x08\x12\x03\n\0\"\n\t\n\
457 \x02\x08\n\x12\x03\n\0\"\n\x08\n\x01\x08\x12\x03\x0b\0/\n\t\n\x02\x08\
458 \x01\x12\x03\x0b\0/\n\x08\n\x01\x08\x12\x03\x0c\0j\n\t\n\x02\x08\x0b\x12\
459 \x03\x0c\0j\n\xaa\x16\n\x02\x04\0\x12\x04Y\0[\x012\x9d\x16\x20An\x20Exam\
460 ple\x20is\x20a\x20mostly-normalized\x20data\x20format\x20for\x20storing\
461 \x20data\x20for\n\x20training\x20and\x20inference.\x20\x20It\x20contains\
462 \x20a\x20key-value\x20store\x20(features);\x20where\n\x20each\x20key\x20\
463 (string)\x20maps\x20to\x20a\x20Feature\x20message\x20(which\x20is\x20one\
464 of\x20packed\x20BytesList,\n\x20FloatList,\x20or\x20Int64List).\x20\x20T\
465 his\x20flexible\x20and\x20compact\x20format\x20allows\x20the\n\x20storag\
466 e\x20of\x20large\x20amounts\x20of\x20typed\x20data,\x20but\x20requires\
467 \x20that\x20the\x20data\x20shape\n\x20and\x20use\x20be\x20determined\x20\
468 by\x20the\x20configuration\x20files\x20and\x20parsers\x20that\x20are\x20\
469 used\x20to\n\x20read\x20and\x20write\x20this\x20format.\x20\x20That\x20i\
470 s,\x20the\x20Example\x20is\x20mostly\x20*not*\x20a\n\x20self-describing\
471 \x20format.\x20\x20In\x20TensorFlow,\x20Examples\x20are\x20read\x20in\
472 \x20row-major\n\x20format,\x20so\x20any\x20configuration\x20that\x20desc\
473 ribes\x20data\x20with\x20rank-2\x20or\x20above\n\x20should\x20keep\x20th\
474 is\x20in\x20mind.\x20\x20For\x20example,\x20to\x20store\x20an\x20M\x20x\
475 \x20N\x20matrix\x20of\x20Bytes,\n\x20the\x20BytesList\x20must\x20contain\
476 \x20M*N\x20bytes,\x20with\x20M\x20rows\x20of\x20N\x20contiguous\x20value\
477 s\n\x20each.\x20\x20That\x20is,\x20the\x20BytesList\x20value\x20must\x20\
478 store\x20the\x20matrix\x20as:\n\x20\x20\x20\x20\x20....\x20row\x200\x20.\
479 ...\x20....\x20row\x201\x20....\x20//\x20...........\x20\x20//\x20...\
480 \x20row\x20M-1\x20....\n\n\x20An\x20Example\x20for\x20a\x20movie\x20reco\
481 mmendation\x20application:\n\x20\x20\x20features\x20{\n\x20\x20\x20\x20\
482 \x20feature\x20{\n\x20\x20\x20\x20\x20\x20\x20key:\x20\"age\"\n\x20\x20\
483 \x20\x20\x20\x20\x20value\x20{\x20float_list\x20{\n\x20\x20\x20\x20\x20\
484 \x20\x20\x20\x20value:\x2029.0\n\x20\x20\x20\x20\x20\x20\x20}}\n\x20\x20\
485 \x20\x20\x20}\n\x20\x20\x20\x20\x20feature\x20{\n\x20\x20\x20\x20\x20\
486 \x20\x20key:\x20\"movie\"\n\x20\x20\x20\x20\x20\x20\x20value\x20{\x20byt\
487 es_list\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20value:\x20\"The\x20Sha\
488 wshank\x20Redemption\"\n\x20\x20\x20\x20\x20\x20\x20\x20\x20value:\x20\"\
489 Fight\x20Club\"\n\x20\x20\x20\x20\x20\x20\x20}}\n\x20\x20\x20\x20\x20}\n\
490 \x20\x20\x20\x20\x20feature\x20{\n\x20\x20\x20\x20\x20\x20\x20key:\x20\"\
491 movie_ratings\"\n\x20\x20\x20\x20\x20\x20\x20value\x20{\x20float_list\
492 \x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20value:\x209.0\n\x20\x20\x20\
493 \x20\x20\x20\x20\x20\x20value:\x209.7\n\x20\x20\x20\x20\x20\x20\x20}}\n\
494 \x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20feature\x20{\n\x20\x20\x20\
495 \x20\x20\x20\x20key:\x20\"suggestion\"\n\x20\x20\x20\x20\x20\x20\x20valu\
496 e\x20{\x20bytes_list\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20value:\
497 \x20\"Inception\"\n\x20\x20\x20\x20\x20\x20\x20}}\n\x20\x20\x20\x20\x20}\
498 \n\x20\x20\x20\x20\x20#\x20Note\x20that\x20this\x20feature\x20exists\x20\
499 to\x20be\x20used\x20as\x20a\x20label\x20in\x20training.\n\x20\x20\x20\
500 \x20\x20#\x20E.g.,\x20if\x20training\x20a\x20logistic\x20regression\x20m\
501 odel\x20to\x20predict\x20purchase\n\x20\x20\x20\x20\x20#\x20probability\
502 \x20in\x20our\x20learning\x20tool\x20we\x20would\x20set\x20the\x20label\
503 \x20feature\x20to\n\x20\x20\x20\x20\x20#\x20\"suggestion_purchased\".\n\
504 \x20\x20\x20\x20\x20feature\x20{\n\x20\x20\x20\x20\x20\x20\x20key:\x20\"\
505 suggestion_purchased\"\n\x20\x20\x20\x20\x20\x20\x20value\x20{\x20float_\
506 list\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20value:\x201.0\n\x20\x20\
507 \x20\x20\x20\x20\x20}}\n\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20#\x20\
508 Similar\x20to\x20\"suggestion_purchased\"\x20above\x20this\x20feature\
509 \x20exists\x20to\x20be\x20used\n\x20\x20\x20\x20\x20#\x20as\x20a\x20labe\
510 l\x20in\x20training.\n\x20\x20\x20\x20\x20#\x20E.g.,\x20if\x20training\
511 \x20a\x20linear\x20regression\x20model\x20to\x20predict\x20purchase\n\
512 \x20\x20\x20\x20\x20#\x20price\x20in\x20our\x20learning\x20tool\x20we\
513 \x20would\x20set\x20the\x20label\x20feature\x20to\n\x20\x20\x20\x20\x20#\
514 \x20\"purchase_price\".\n\x20\x20\x20\x20\x20feature\x20{\n\x20\x20\x20\
515 \x20\x20\x20\x20key:\x20\"purchase_price\"\n\x20\x20\x20\x20\x20\x20\x20\
516 value\x20{\x20float_list\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20value\
517 :\x209.99\n\x20\x20\x20\x20\x20\x20\x20}}\n\x20\x20\x20\x20\x20}\n\x20\
518 \x20}\n\n\x20A\x20conformant\x20Example\x20data\x20set\x20obeys\x20the\
519 \x20following\x20conventions:\n\x20\x20\x20-\x20If\x20a\x20Feature\x20K\
520 \x20exists\x20in\x20one\x20example\x20with\x20data\x20type\x20T,\x20it\
521 \x20must\x20be\x20of\n\x20\x20\x20\x20\x20\x20\x20type\x20T\x20in\x20all\
522 \x20other\x20examples\x20when\x20present.\x20It\x20may\x20be\x20omitted.\
523 \n\x20\x20\x20-\x20The\x20number\x20of\x20instances\x20of\x20Feature\x20\
524 K\x20list\x20data\x20may\x20vary\x20across\x20examples,\n\x20\x20\x20\
525 \x20\x20\x20\x20depending\x20on\x20the\x20requirements\x20of\x20the\x20m\
526 odel.\n\x20\x20\x20-\x20If\x20a\x20Feature\x20K\x20doesn't\x20exist\x20i\
527 n\x20an\x20example,\x20a\x20K-specific\x20default\x20will\x20be\n\x20\
528 \x20\x20\x20\x20\x20\x20used,\x20if\x20configured.\n\x20\x20\x20-\x20If\
529 \x20a\x20Feature\x20K\x20exists\x20in\x20an\x20example\x20but\x20contain\
530 s\x20no\x20items,\x20the\x20intent\n\x20\x20\x20\x20\x20\x20\x20is\x20co\
531 nsidered\x20to\x20be\x20an\x20empty\x20tensor\x20and\x20no\x20default\
532 \x20will\x20be\x20used.\n\n\n\n\x03\x04\0\x01\x12\x03Y\x08\x0f\n\x0b\n\
533 \x04\x04\0\x02\0\x12\x03Z\x02\x18\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03Z\
534 \x02\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03Z\x0b\x13\n\x0c\n\x05\x04\0\
535 \x02\0\x03\x12\x03Z\x16\x17\n\x8d5\n\x02\x04\x01\x12\x06\xab\x02\0\xae\
536 \x02\x012\xfe4\x20A\x20SequenceExample\x20is\x20an\x20Example\x20represe\
537 nting\x20one\x20or\x20more\x20sequences,\x20and\n\x20some\x20context.\
538 \x20\x20The\x20context\x20contains\x20features\x20which\x20apply\x20to\
539 \x20the\x20entire\n\x20example.\x20The\x20feature_lists\x20contain\x20a\
540 \x20key,\x20value\x20map\x20where\x20each\x20key\x20is\n\x20associated\
541 \x20with\x20a\x20repeated\x20set\x20of\x20Features\x20(a\x20FeatureList)\
542 .\n\x20A\x20FeatureList\x20thus\x20represents\x20the\x20values\x20of\x20\
543 a\x20feature\x20identified\x20by\x20its\x20key\n\x20over\x20time\x20/\
544 \x20frames.\n\n\x20Below\x20is\x20a\x20SequenceExample\x20for\x20a\x20mo\
545 vie\x20recommendation\x20application\x20recording\x20a\n\x20sequence\x20\
546 of\x20ratings\x20by\x20a\x20user.\x20The\x20time-independent\x20features\
547 \x20(\"locale\",\n\x20\"age\",\x20\"favorites\")\x20describing\x20the\
548 \x20user\x20are\x20part\x20of\x20the\x20context.\x20The\x20sequence\n\
549 \x20of\x20movies\x20the\x20user\x20rated\x20are\x20part\x20of\x20the\x20\
550 feature_lists.\x20For\x20each\x20movie\x20in\x20the\n\x20sequence\x20we\
551 \x20have\x20information\x20on\x20its\x20name\x20and\x20actors\x20and\x20\
552 the\x20user's\x20rating.\n\x20This\x20information\x20is\x20recorded\x20i\
553 n\x20three\x20separate\x20feature_list(s).\n\x20In\x20the\x20example\x20\
554 below\x20there\x20are\x20only\x20two\x20movies.\x20All\x20three\x20featu\
555 re_list(s),\n\x20namely\x20\"movie_ratings\",\x20\"movie_names\",\x20and\
556 \x20\"actors\"\x20have\x20a\x20feature\x20value\x20for\n\x20both\x20movi\
557 es.\x20Note,\x20that\x20\"actors\"\x20is\x20itself\x20a\x20bytes_list\
558 \x20with\x20multiple\n\x20strings\x20per\x20movie.\n\n\x20context:\x20{\
559 \n\x20\x20\x20feature:\x20{\n\x20\x20\x20\x20\x20key\x20\x20:\x20\"local\
560 e\"\n\x20\x20\x20\x20\x20value:\x20{\n\x20\x20\x20\x20\x20\x20\x20bytes_\
561 list:\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20value:\x20[\x20\"pt_BR\"\
562 \x20]\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20}\n\x20\x20\
563 \x20}\n\x20\x20\x20feature:\x20{\n\x20\x20\x20\x20\x20key\x20\x20:\x20\"\
564 age\"\n\x20\x20\x20\x20\x20value:\x20{\n\x20\x20\x20\x20\x20\x20\x20floa\
565 t_list:\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20value:\x20[\x2019.0\
566 \x20]\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20}\n\x20\x20\
567 \x20}\n\x20\x20\x20feature:\x20{\n\x20\x20\x20\x20\x20key\x20\x20:\x20\"\
568 favorites\"\n\x20\x20\x20\x20\x20value:\x20{\n\x20\x20\x20\x20\x20\x20\
569 \x20bytes_list:\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20value:\x20[\
570 \x20\"Majesty\x20Rose\",\x20\"Savannah\x20Outen\",\x20\"One\x20Direction\
571 \"\x20]\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20}\n\x20\x20\
572 \x20}\n\x20}\n\x20feature_lists:\x20{\n\x20\x20\x20feature_list:\x20{\n\
573 \x20\x20\x20\x20\x20key\x20\x20:\x20\"movie_ratings\"\n\x20\x20\x20\x20\
574 \x20value:\x20{\n\x20\x20\x20\x20\x20\x20\x20feature:\x20{\n\x20\x20\x20\
575 \x20\x20\x20\x20\x20\x20float_list:\x20{\n\x20\x20\x20\x20\x20\x20\x20\
576 \x20\x20\x20\x20value:\x20[\x204.5\x20]\n\x20\x20\x20\x20\x20\x20\x20\
577 \x20\x20}\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20\x20\x20fe\
578 ature:\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20float_list:\x20{\n\x20\
579 \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20value:\x20[\x205.0\x20]\n\x20\
580 \x20\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\
581 \x20\x20\x20\x20}\n\x20\x20\x20}\n\x20\x20\x20feature_list:\x20{\n\x20\
582 \x20\x20\x20\x20key\x20\x20:\x20\"movie_names\"\n\x20\x20\x20\x20\x20val\
583 ue:\x20{\n\x20\x20\x20\x20\x20\x20\x20feature:\x20{\n\x20\x20\x20\x20\
584 \x20\x20\x20\x20\x20bytes_list:\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\
585 \x20\x20\x20value:\x20[\x20\"The\x20Shawshank\x20Redemption\"\x20]\n\x20\
586 \x20\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\
587 \x20\x20\x20\x20\x20\x20feature:\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\
588 \x20bytes_list:\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20value:\
589 \x20[\x20\"Fight\x20Club\"\x20]\n\x20\x20\x20\x20\x20\x20\x20\x20\x20}\n\
590 \x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20}\n\x20\x20\x20}\n\
591 \x20\x20\x20feature_list:\x20{\n\x20\x20\x20\x20\x20key\x20\x20:\x20\"ac\
592 tors\"\n\x20\x20\x20\x20\x20value:\x20{\n\x20\x20\x20\x20\x20\x20\x20fea\
593 ture:\x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20bytes_list:\x20{\n\x20\
594 \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20value:\x20[\x20\"Tim\x20Robbins\
595 \",\x20\"Morgan\x20Freeman\"\x20]\n\x20\x20\x20\x20\x20\x20\x20\x20\x20}\
596 \n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20\x20\x20feature:\
597 \x20{\n\x20\x20\x20\x20\x20\x20\x20\x20\x20bytes_list:\x20{\n\x20\x20\
598 \x20\x20\x20\x20\x20\x20\x20\x20\x20value:\x20[\x20\"Brad\x20Pitt\",\x20\
599 \"Edward\x20Norton\",\x20\"Helena\x20Bonham\x20Carter\"\x20]\n\x20\x20\
600 \x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\x20\x20\x20\x20\x20}\n\x20\x20\
601 \x20\x20\x20}\n\x20\x20\x20}\n\x20}\n\n\x20A\x20conformant\x20SequenceEx\
602 ample\x20data\x20set\x20obeys\x20the\x20following\x20conventions:\n\n\
603 \x20Context:\n\x20\x20\x20-\x20All\x20conformant\x20context\x20features\
604 \x20K\x20must\x20obey\x20the\x20same\x20conventions\x20as\n\x20\x20\x20\
605 \x20\x20a\x20conformant\x20Example's\x20features\x20(see\x20above).\n\
606 \x20Feature\x20lists:\n\x20\x20\x20-\x20A\x20FeatureList\x20L\x20may\x20\
607 be\x20missing\x20in\x20an\x20example;\x20it\x20is\x20up\x20to\x20the\n\
608 \x20\x20\x20\x20\x20parser\x20configuration\x20to\x20determine\x20if\x20\
609 this\x20is\x20allowed\x20or\x20considered\n\x20\x20\x20\x20\x20an\x20emp\
610 ty\x20list\x20(zero\x20length).\n\x20\x20\x20-\x20If\x20a\x20FeatureList\
611 \x20L\x20exists,\x20it\x20may\x20be\x20empty\x20(zero\x20length).\n\x20\
612 \x20\x20-\x20If\x20a\x20FeatureList\x20L\x20is\x20non-empty,\x20all\x20f\
613 eatures\x20within\x20the\x20FeatureList\n\x20\x20\x20\x20\x20must\x20hav\
614 e\x20the\x20same\x20data\x20type\x20T.\x20Even\x20across\x20SequenceExam\
615 ples,\x20the\x20type\x20T\n\x20\x20\x20\x20\x20of\x20the\x20FeatureList\
616 \x20identified\x20by\x20the\x20same\x20key\x20must\x20be\x20the\x20same.\
617 \x20An\x20entry\n\x20\x20\x20\x20\x20without\x20any\x20values\x20may\x20\
618 serve\x20as\x20an\x20empty\x20feature.\n\x20\x20\x20-\x20If\x20a\x20Feat\
619 ureList\x20L\x20is\x20non-empty,\x20it\x20is\x20up\x20to\x20the\x20parse\
620 r\x20configuration\n\x20\x20\x20\x20\x20to\x20determine\x20if\x20all\x20\
621 features\x20within\x20the\x20FeatureList\x20must\n\x20\x20\x20\x20\x20ha\
622 ve\x20the\x20same\x20size.\x20\x20The\x20same\x20holds\x20for\x20this\
623 \x20FeatureList\x20across\x20multiple\n\x20\x20\x20\x20\x20examples.\n\
624 \x20\x20\x20-\x20For\x20sequence\x20modeling,\x20e.g.:\n\x20\x20\x20\x20\
625 \x20\x20\x20\x20http://colah.github.io/posts/2015-08-Understanding-LSTMs\
626 /\n\x20\x20\x20\x20\x20\x20\x20\x20https://github.com/tensorflow/nmt\n\
627 \x20\x20\x20\x20\x20the\x20feature\x20lists\x20represent\x20a\x20sequenc\
628 e\x20of\x20frames.\n\x20\x20\x20\x20\x20In\x20this\x20scenario,\x20all\
629 \x20FeatureLists\x20in\x20a\x20SequenceExample\x20have\x20the\x20same\n\
630 \x20\x20\x20\x20\x20number\x20of\x20Feature\x20messages,\x20so\x20that\
631 \x20the\x20ith\x20element\x20in\x20each\x20FeatureList\n\x20\x20\x20\x20\
632 \x20is\x20part\x20of\x20the\x20ith\x20frame\x20(or\x20time\x20step).\n\
633 \x20Examples\x20of\x20conformant\x20and\x20non-conformant\x20examples'\
634 \x20FeatureLists:\n\n\x20Conformant\x20FeatureLists:\n\x20\x20\x20\x20fe\
635 ature_lists:\x20{\x20feature_list:\x20{\n\x20\x20\x20\x20\x20\x20key:\
636 \x20\"movie_ratings\"\n\x20\x20\x20\x20\x20\x20value:\x20{\x20feature:\
637 \x20{\x20float_list:\x20{\x20value:\x20[\x204.5\x20]\x20}\x20}\n\x20\x20\
638 \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20feature:\x20{\x20flo\
639 at_list:\x20{\x20value:\x20[\x205.0\x20]\x20}\x20}\x20}\n\x20\x20\x20\
640 \x20}\x20}\n\n\x20Non-conformant\x20FeatureLists\x20(mismatched\x20types\
641 ):\n\x20\x20\x20\x20feature_lists:\x20{\x20feature_list:\x20{\n\x20\x20\
642 \x20\x20\x20\x20key:\x20\"movie_ratings\"\n\x20\x20\x20\x20\x20\x20value\
643 :\x20{\x20feature:\x20{\x20float_list:\x20{\x20value:\x20[\x204.5\x20]\
644 \x20}\x20}\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
645 feature:\x20{\x20int64_list:\x20{\x20value:\x20[\x205\x20]\x20}\x20}\x20\
646 }\n\x20\x20\x20\x20}\x20}\n\n\x20Conditionally\x20conformant\x20FeatureL\
647 ists,\x20the\x20parser\x20configuration\x20determines\n\x20if\x20the\x20\
648 feature\x20sizes\x20must\x20match:\n\x20\x20\x20\x20feature_lists:\x20{\
649 \x20feature_list:\x20{\n\x20\x20\x20\x20\x20\x20key:\x20\"movie_ratings\
650 \"\n\x20\x20\x20\x20\x20\x20value:\x20{\x20feature:\x20{\x20float_list:\
651 \x20{\x20value:\x20[\x204.5\x20]\x20}\x20}\n\x20\x20\x20\x20\x20\x20\x20\
652 \x20\x20\x20\x20\x20\x20\x20\x20feature:\x20{\x20float_list:\x20{\x20val\
653 ue:\x20[\x205.0,\x206.0\x20]\x20}\x20}\x20}\n\x20\x20\x20\x20}\x20}\n\n\
654 \x20Conformant\x20pair\x20of\x20SequenceExample\n\x20\x20\x20\x20feature\
655 _lists:\x20{\x20feature_list:\x20{\n\x20\x20\x20\x20\x20\x20key:\x20\"mo\
656 vie_ratings\"\n\x20\x20\x20\x20\x20\x20value:\x20{\x20feature:\x20{\x20f\
657 loat_list:\x20{\x20value:\x20[\x204.5\x20]\x20}\x20}\n\x20\x20\x20\x20\
658 \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20feature:\x20{\x20float_list:\
659 \x20{\x20value:\x20[\x205.0\x20]\x20}\x20}\x20}\n\x20\x20\x20\x20}\x20}\
660 \n\x20and:\n\x20\x20\x20\x20feature_lists:\x20{\x20feature_list:\x20{\n\
661 \x20\x20\x20\x20\x20\x20key:\x20\"movie_ratings\"\n\x20\x20\x20\x20\x20\
662 \x20value:\x20{\x20feature:\x20{\x20float_list:\x20{\x20value:\x20[\x204\
663 .5\x20]\x20}\x20}\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
664 \x20\x20feature:\x20{\x20float_list:\x20{\x20value:\x20[\x205.0\x20]\x20\
665 }\x20}\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20feat\
666 ure:\x20{\x20float_list:\x20{\x20value:\x20[\x202.0\x20]\x20}\x20}\x20}\
667 \n\x20\x20\x20\x20}\x20}\n\n\x20Conformant\x20pair\x20of\x20SequenceExam\
668 ple\n\x20\x20\x20\x20feature_lists:\x20{\x20feature_list:\x20{\n\x20\x20\
669 \x20\x20\x20\x20key:\x20\"movie_ratings\"\n\x20\x20\x20\x20\x20\x20value\
670 :\x20{\x20feature:\x20{\x20float_list:\x20{\x20value:\x20[\x204.5\x20]\
671 \x20}\x20}\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
672 feature:\x20{\x20float_list:\x20{\x20value:\x20[\x205.0\x20]\x20}\x20}\
673 \x20}\n\x20\x20\x20\x20}\x20}\n\x20and:\n\x20\x20\x20\x20feature_lists:\
674 \x20{\x20feature_list:\x20{\n\x20\x20\x20\x20\x20\x20key:\x20\"movie_rat\
675 ings\"\n\x20\x20\x20\x20\x20\x20value:\x20{\x20}\n\x20\x20\x20\x20}\x20}\
676 \n\n\x20Conditionally\x20conformant\x20pair\x20of\x20SequenceExample,\
677 \x20the\x20parser\x20configuration\n\x20determines\x20if\x20the\x20secon\
678 d\x20feature_lists\x20is\x20consistent\x20(zero-length)\x20or\n\x20inval\
679 id\x20(missing\x20\"movie_ratings\"):\n\x20\x20\x20\x20feature_lists:\
680 \x20{\x20feature_list:\x20{\n\x20\x20\x20\x20\x20\x20key:\x20\"movie_rat\
681 ings\"\n\x20\x20\x20\x20\x20\x20value:\x20{\x20feature:\x20{\x20float_li\
682 st:\x20{\x20value:\x20[\x204.5\x20]\x20}\x20}\n\x20\x20\x20\x20\x20\x20\
683 \x20\x20\x20\x20\x20\x20\x20\x20\x20feature:\x20{\x20float_list:\x20{\
684 \x20value:\x20[\x205.0\x20]\x20}\x20}\x20}\n\x20\x20\x20\x20}\x20}\n\x20\
685 and:\n\x20\x20\x20\x20feature_lists:\x20{\x20}\n\n\x20Non-conformant\x20\
686 pair\x20of\x20SequenceExample\x20(mismatched\x20types)\n\x20\x20\x20\x20\
687 feature_lists:\x20{\x20feature_list:\x20{\n\x20\x20\x20\x20\x20\x20key:\
688 \x20\"movie_ratings\"\n\x20\x20\x20\x20\x20\x20value:\x20{\x20feature:\
689 \x20{\x20float_list:\x20{\x20value:\x20[\x204.5\x20]\x20}\x20}\n\x20\x20\
690 \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20feature:\x20{\x20flo\
691 at_list:\x20{\x20value:\x20[\x205.0\x20]\x20}\x20}\x20}\n\x20\x20\x20\
692 \x20}\x20}\n\x20and:\n\x20\x20\x20\x20feature_lists:\x20{\x20feature_lis\
693 t:\x20{\n\x20\x20\x20\x20\x20\x20key:\x20\"movie_ratings\"\n\x20\x20\x20\
694 \x20\x20\x20value:\x20{\x20feature:\x20{\x20int64_list:\x20{\x20value:\
695 \x20[\x204\x20]\x20}\x20}\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
696 \x20\x20\x20\x20feature:\x20{\x20int64_list:\x20{\x20value:\x20[\x205\
697 \x20]\x20}\x20}\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
698 \x20\x20feature:\x20{\x20int64_list:\x20{\x20value:\x20[\x202\x20]\x20}\
699 \x20}\x20}\n\x20\x20\x20\x20}\x20}\n\n\x20Conditionally\x20conformant\
700 \x20pair\x20of\x20SequenceExample;\x20the\x20parser\x20configuration\n\
701 \x20determines\x20if\x20the\x20feature\x20sizes\x20must\x20match:\n\x20\
702 \x20\x20\x20feature_lists:\x20{\x20feature_list:\x20{\n\x20\x20\x20\x20\
703 \x20\x20key:\x20\"movie_ratings\"\n\x20\x20\x20\x20\x20\x20value:\x20{\
704 \x20feature:\x20{\x20float_list:\x20{\x20value:\x20[\x204.5\x20]\x20}\
705 \x20}\n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20featu\
706 re:\x20{\x20float_list:\x20{\x20value:\x20[\x205.0\x20]\x20}\x20}\x20}\n\
707 \x20\x20\x20\x20}\x20}\n\x20and:\n\x20\x20\x20\x20feature_lists:\x20{\
708 \x20feature_list:\x20{\n\x20\x20\x20\x20\x20\x20key:\x20\"movie_ratings\
709 \"\n\x20\x20\x20\x20\x20\x20value:\x20{\x20feature:\x20{\x20float_list:\
710 \x20{\x20value:\x20[\x204.0\x20]\x20}\x20}\n\x20\x20\x20\x20\x20\x20\x20\
711 \x20\x20\x20\x20\x20\x20\x20\x20feature:\x20{\x20float_list:\x20{\x20val\
712 ue:\x20[\x205.0,\x203.0\x20]\x20}\x20}\n\x20\x20\x20\x20}\x20}\n\n\x0b\n\
713 \x03\x04\x01\x01\x12\x04\xab\x02\x08\x17\n\x0c\n\x04\x04\x01\x02\0\x12\
714 \x04\xac\x02\x02\x17\n\r\n\x05\x04\x01\x02\0\x06\x12\x04\xac\x02\x02\n\n\
715 \r\n\x05\x04\x01\x02\0\x01\x12\x04\xac\x02\x0b\x12\n\r\n\x05\x04\x01\x02\
716 \0\x03\x12\x04\xac\x02\x15\x16\n\x0c\n\x04\x04\x01\x02\x01\x12\x04\xad\
717 \x02\x02!\n\r\n\x05\x04\x01\x02\x01\x06\x12\x04\xad\x02\x02\x0e\n\r\n\
718 \x05\x04\x01\x02\x01\x01\x12\x04\xad\x02\x0f\x1c\n\r\n\x05\x04\x01\x02\
719 \x01\x03\x12\x04\xad\x02\x1f\x20b\x06proto3\
720";
721
722static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT;
723
724fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
725 ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
726}
727
728pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
729 unsafe {
730 file_descriptor_proto_lazy.get(|| {
731 parse_descriptor_proto()
732 })
733 }
734}