tensorflow-ruby 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +18 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +104 -0
  5. data/lib/datasets/download_manager.rb +49 -0
  6. data/lib/datasets/images/mnist.rb +54 -0
  7. data/lib/datasets/resource.rb +19 -0
  8. data/lib/tensorflow-ruby.rb +182 -0
  9. data/lib/tensorflow.rb +1 -0
  10. data/lib/tensorflow/batchable_type_spec.rb +4 -0
  11. data/lib/tensorflow/core/framework/allocation_description_pb.rb +21 -0
  12. data/lib/tensorflow/core/framework/api_def_pb.rb +59 -0
  13. data/lib/tensorflow/core/framework/attr_value_pb.rb +46 -0
  14. data/lib/tensorflow/core/framework/cost_graph_pb.rb +49 -0
  15. data/lib/tensorflow/core/framework/device_attributes_pb.rb +37 -0
  16. data/lib/tensorflow/core/framework/function_pb.rb +38 -0
  17. data/lib/tensorflow/core/framework/graph_pb.rb +22 -0
  18. data/lib/tensorflow/core/framework/graph_transfer_info_pb.rb +73 -0
  19. data/lib/tensorflow/core/framework/kernel_def_pb.rb +31 -0
  20. data/lib/tensorflow/core/framework/log_memory_pb.rb +53 -0
  21. data/lib/tensorflow/core/framework/node_def_pb.rb +27 -0
  22. data/lib/tensorflow/core/framework/op_def_pb.rb +58 -0
  23. data/lib/tensorflow/core/framework/reader_base_pb.rb +19 -0
  24. data/lib/tensorflow/core/framework/remote_fused_graph_execute_info_pb.rb +30 -0
  25. data/lib/tensorflow/core/framework/resource_handle_pb.rb +28 -0
  26. data/lib/tensorflow/core/framework/step_stats_pb.rb +72 -0
  27. data/lib/tensorflow/core/framework/summary_pb.rb +71 -0
  28. data/lib/tensorflow/core/framework/tensor_description_pb.rb +21 -0
  29. data/lib/tensorflow/core/framework/tensor_pb.rb +41 -0
  30. data/lib/tensorflow/core/framework/tensor_shape_pb.rb +22 -0
  31. data/lib/tensorflow/core/framework/tensor_slice_pb.rb +23 -0
  32. data/lib/tensorflow/core/framework/types_pb.rb +62 -0
  33. data/lib/tensorflow/core/framework/variable_pb.rb +45 -0
  34. data/lib/tensorflow/core/framework/versions_pb.rb +18 -0
  35. data/lib/tensorflow/core/lib/core/error_codes_pb.rb +35 -0
  36. data/lib/tensorflow/core/protobuf/cluster_pb.rb +21 -0
  37. data/lib/tensorflow/core/protobuf/config_pb.rb +180 -0
  38. data/lib/tensorflow/core/protobuf/control_flow_pb.rb +48 -0
  39. data/lib/tensorflow/core/protobuf/conv_autotuning_pb.rb +29 -0
  40. data/lib/tensorflow/core/protobuf/critical_section_pb.rb +21 -0
  41. data/lib/tensorflow/core/protobuf/debug_pb.rb +38 -0
  42. data/lib/tensorflow/core/protobuf/device_properties_pb.rb +33 -0
  43. data/lib/tensorflow/core/protobuf/eager_service_pb.rb +112 -0
  44. data/lib/tensorflow/core/protobuf/graph_debug_info_pb.rb +29 -0
  45. data/lib/tensorflow/core/protobuf/master_pb.rb +123 -0
  46. data/lib/tensorflow/core/protobuf/master_service_pb.rb +15 -0
  47. data/lib/tensorflow/core/protobuf/meta_graph_pb.rb +95 -0
  48. data/lib/tensorflow/core/protobuf/named_tensor_pb.rb +18 -0
  49. data/lib/tensorflow/core/protobuf/queue_runner_pb.rb +21 -0
  50. data/lib/tensorflow/core/protobuf/replay_log_pb.rb +48 -0
  51. data/lib/tensorflow/core/protobuf/rewriter_config_pb.rb +81 -0
  52. data/lib/tensorflow/core/protobuf/saved_model_pb.rb +18 -0
  53. data/lib/tensorflow/core/protobuf/saved_object_graph_pb.rb +87 -0
  54. data/lib/tensorflow/core/protobuf/saver_pb.rb +28 -0
  55. data/lib/tensorflow/core/protobuf/struct_pb.rb +81 -0
  56. data/lib/tensorflow/core/protobuf/tensor_bundle_pb.rb +37 -0
  57. data/lib/tensorflow/core/protobuf/tensorflow_server_pb.rb +22 -0
  58. data/lib/tensorflow/core/protobuf/trace_events_pb.rb +39 -0
  59. data/lib/tensorflow/core/protobuf/trackable_object_graph_pb.rb +40 -0
  60. data/lib/tensorflow/core/protobuf/transport_options_pb.rb +16 -0
  61. data/lib/tensorflow/core/protobuf/verifier_config_pb.rb +23 -0
  62. data/lib/tensorflow/core/protobuf/worker_pb.rb +246 -0
  63. data/lib/tensorflow/core/protobuf/worker_service_pb.rb +15 -0
  64. data/lib/tensorflow/core/util/event_pb.rb +93 -0
  65. data/lib/tensorflow/core/util/memmapped_file_system_pb.rb +22 -0
  66. data/lib/tensorflow/core/util/saved_tensor_slice_pb.rb +40 -0
  67. data/lib/tensorflow/data/batch_dataset.rb +18 -0
  68. data/lib/tensorflow/data/dataset.rb +106 -0
  69. data/lib/tensorflow/data/fixed_length_record_dataset.rb +27 -0
  70. data/lib/tensorflow/data/iterator.rb +76 -0
  71. data/lib/tensorflow/data/map_dataset.rb +17 -0
  72. data/lib/tensorflow/data/repeat_dataset.rb +16 -0
  73. data/lib/tensorflow/data/shuffle_dataset.rb +23 -0
  74. data/lib/tensorflow/data/tensor_dataset.rb +19 -0
  75. data/lib/tensorflow/data/tensor_slice_dataset.rb +15 -0
  76. data/lib/tensorflow/data/tf_record_dataset.rb +18 -0
  77. data/lib/tensorflow/data/zip_dataset.rb +24 -0
  78. data/lib/tensorflow/decorators.rb +53 -0
  79. data/lib/tensorflow/eager/context.rb +120 -0
  80. data/lib/tensorflow/eager/operation.rb +219 -0
  81. data/lib/tensorflow/eager/tensor_handle.rb +87 -0
  82. data/lib/tensorflow/error.rb +54 -0
  83. data/lib/tensorflow/execution_context.rb +62 -0
  84. data/lib/tensorflow/extensions/arg_def.rb +58 -0
  85. data/lib/tensorflow/extensions/array.rb +17 -0
  86. data/lib/tensorflow/extensions/boolean.rb +25 -0
  87. data/lib/tensorflow/extensions/narray.rb +7 -0
  88. data/lib/tensorflow/ffi.rb +291 -0
  89. data/lib/tensorflow/graph/function.rb +33 -0
  90. data/lib/tensorflow/graph/function_def.rb +62 -0
  91. data/lib/tensorflow/graph/gradients.rb +120 -0
  92. data/lib/tensorflow/graph/graph.rb +252 -0
  93. data/lib/tensorflow/graph/graph_def_options.rb +24 -0
  94. data/lib/tensorflow/graph/graph_keys.rb +50 -0
  95. data/lib/tensorflow/graph/operation.rb +176 -0
  96. data/lib/tensorflow/graph/operation_attr.rb +153 -0
  97. data/lib/tensorflow/graph/operation_description.rb +255 -0
  98. data/lib/tensorflow/graph/operation_output.rb +49 -0
  99. data/lib/tensorflow/graph/session.rb +156 -0
  100. data/lib/tensorflow/keras/datasets/boston_housing.rb +32 -0
  101. data/lib/tensorflow/keras/datasets/cifar10.rb +11 -0
  102. data/lib/tensorflow/keras/datasets/cifar100.rb +11 -0
  103. data/lib/tensorflow/keras/datasets/fashion_mnist.rb +44 -0
  104. data/lib/tensorflow/keras/datasets/imdb.rb +30 -0
  105. data/lib/tensorflow/keras/datasets/mnist.rb +18 -0
  106. data/lib/tensorflow/keras/datasets/reuters.rb +28 -0
  107. data/lib/tensorflow/keras/layers/conv.rb +14 -0
  108. data/lib/tensorflow/keras/layers/conv2d.rb +11 -0
  109. data/lib/tensorflow/keras/layers/dense.rb +68 -0
  110. data/lib/tensorflow/keras/layers/dropout.rb +27 -0
  111. data/lib/tensorflow/keras/layers/flatten.rb +25 -0
  112. data/lib/tensorflow/keras/losses/sparse_categorical_crossentropy.rb +14 -0
  113. data/lib/tensorflow/keras/metrics/mean.rb +30 -0
  114. data/lib/tensorflow/keras/metrics/sparse_categorical_accuracy.rb +17 -0
  115. data/lib/tensorflow/keras/model.rb +6 -0
  116. data/lib/tensorflow/keras/models/sequential.rb +56 -0
  117. data/lib/tensorflow/keras/optimizers/adam.rb +8 -0
  118. data/lib/tensorflow/keras/preprocessing/image.rb +22 -0
  119. data/lib/tensorflow/keras/utils.rb +83 -0
  120. data/lib/tensorflow/name_scope.rb +57 -0
  121. data/lib/tensorflow/op_def_builder.rb +49 -0
  122. data/lib/tensorflow/ops/audio.rb +13 -0
  123. data/lib/tensorflow/ops/bitwise.rb +29 -0
  124. data/lib/tensorflow/ops/control.rb +13 -0
  125. data/lib/tensorflow/ops/gradients.rb +21 -0
  126. data/lib/tensorflow/ops/image.rb +218 -0
  127. data/lib/tensorflow/ops/io.rb +123 -0
  128. data/lib/tensorflow/ops/linalg.rb +131 -0
  129. data/lib/tensorflow/ops/math.rb +493 -0
  130. data/lib/tensorflow/ops/nn.rb +286 -0
  131. data/lib/tensorflow/ops/operators.rb +31 -0
  132. data/lib/tensorflow/ops/ops.rb +102 -0
  133. data/lib/tensorflow/ops/random.rb +18 -0
  134. data/lib/tensorflow/ops/raw_ops.rb +5179 -0
  135. data/lib/tensorflow/ops/raw_ops.rb.erb +38 -0
  136. data/lib/tensorflow/printers/graph.erb +80 -0
  137. data/lib/tensorflow/printers/graph.rb +26 -0
  138. data/lib/tensorflow/printers/graph_def.erb +109 -0
  139. data/lib/tensorflow/printers/graph_def.rb +26 -0
  140. data/lib/tensorflow/python_compatiblity.rb +55 -0
  141. data/lib/tensorflow/resource_summary_writer.rb +78 -0
  142. data/lib/tensorflow/status.rb +49 -0
  143. data/lib/tensorflow/stream_executor/dnn_pb.rb +90 -0
  144. data/lib/tensorflow/strings.rb +100 -0
  145. data/lib/tensorflow/summary.rb +13 -0
  146. data/lib/tensorflow/tensor.rb +133 -0
  147. data/lib/tensorflow/tensor_data.rb +310 -0
  148. data/lib/tensorflow/tensor_mixin.rb +32 -0
  149. data/lib/tensorflow/tensor_spec.rb +10 -0
  150. data/lib/tensorflow/tensorflow/core/util/event_pb.rb +93 -0
  151. data/lib/tensorflow/train/gradient_descent_optimizer.rb +33 -0
  152. data/lib/tensorflow/train/optimizer.rb +158 -0
  153. data/lib/tensorflow/type_spec.rb +4 -0
  154. data/lib/tensorflow/variable.rb +127 -0
  155. data/lib/tensorflow/version.rb +3 -0
  156. metadata +308 -0
@@ -0,0 +1,27 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/framework/node_def.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/framework/attr_value_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("tensorflow/core/framework/node_def.proto", :syntax => :proto3) do
9
+ add_message "tensorflow.NodeDef" do
10
+ optional :name, :string, 1
11
+ optional :op, :string, 2
12
+ repeated :input, :string, 3
13
+ optional :device, :string, 4
14
+ map :attr, :string, :message, 5, "tensorflow.AttrValue"
15
+ optional :experimental_debug_info, :message, 6, "tensorflow.NodeDef.ExperimentalDebugInfo"
16
+ end
17
+ add_message "tensorflow.NodeDef.ExperimentalDebugInfo" do
18
+ repeated :original_node_names, :string, 1
19
+ repeated :original_func_names, :string, 2
20
+ end
21
+ end
22
+ end
23
+
24
+ module Tensorflow
25
+ NodeDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.NodeDef").msgclass
26
+ NodeDef::ExperimentalDebugInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.NodeDef.ExperimentalDebugInfo").msgclass
27
+ end
@@ -0,0 +1,58 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/framework/op_def.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/framework/attr_value_pb'
7
+ require 'tensorflow/core/framework/types_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("tensorflow/core/framework/op_def.proto", :syntax => :proto3) do
10
+ add_message "tensorflow.OpDef" do
11
+ optional :name, :string, 1
12
+ repeated :input_arg, :message, 2, "tensorflow.OpDef.ArgDef"
13
+ repeated :output_arg, :message, 3, "tensorflow.OpDef.ArgDef"
14
+ repeated :control_output, :string, 20
15
+ repeated :attr, :message, 4, "tensorflow.OpDef.AttrDef"
16
+ optional :deprecation, :message, 8, "tensorflow.OpDeprecation"
17
+ optional :summary, :string, 5
18
+ optional :description, :string, 6
19
+ optional :is_commutative, :bool, 18
20
+ optional :is_aggregate, :bool, 16
21
+ optional :is_stateful, :bool, 17
22
+ optional :allows_uninitialized_input, :bool, 19
23
+ end
24
+ add_message "tensorflow.OpDef.ArgDef" do
25
+ optional :name, :string, 1
26
+ optional :description, :string, 2
27
+ optional :type, :enum, 3, "tensorflow.DataType"
28
+ optional :type_attr, :string, 4
29
+ optional :number_attr, :string, 5
30
+ optional :type_list_attr, :string, 6
31
+ optional :is_ref, :bool, 16
32
+ end
33
+ add_message "tensorflow.OpDef.AttrDef" do
34
+ optional :name, :string, 1
35
+ optional :type, :string, 2
36
+ optional :default_value, :message, 3, "tensorflow.AttrValue"
37
+ optional :description, :string, 4
38
+ optional :has_minimum, :bool, 5
39
+ optional :minimum, :int64, 6
40
+ optional :allowed_values, :message, 7, "tensorflow.AttrValue"
41
+ end
42
+ add_message "tensorflow.OpDeprecation" do
43
+ optional :version, :int32, 1
44
+ optional :explanation, :string, 2
45
+ end
46
+ add_message "tensorflow.OpList" do
47
+ repeated :op, :message, 1, "tensorflow.OpDef"
48
+ end
49
+ end
50
+ end
51
+
52
+ module Tensorflow
53
+ OpDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.OpDef").msgclass
54
+ OpDef::ArgDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.OpDef.ArgDef").msgclass
55
+ OpDef::AttrDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.OpDef.AttrDef").msgclass
56
+ OpDeprecation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.OpDeprecation").msgclass
57
+ OpList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.OpList").msgclass
58
+ end
@@ -0,0 +1,19 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/framework/reader_base.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("tensorflow/core/framework/reader_base.proto", :syntax => :proto3) do
8
+ add_message "tensorflow.ReaderBaseState" do
9
+ optional :work_started, :int64, 1
10
+ optional :work_finished, :int64, 2
11
+ optional :num_records_produced, :int64, 3
12
+ optional :current_work, :bytes, 4
13
+ end
14
+ end
15
+ end
16
+
17
+ module Tensorflow
18
+ ReaderBaseState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ReaderBaseState").msgclass
19
+ end
@@ -0,0 +1,30 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/framework/remote_fused_graph_execute_info.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/framework/graph_pb'
7
+ require 'tensorflow/core/framework/tensor_shape_pb'
8
+ require 'tensorflow/core/framework/types_pb'
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_file("tensorflow/core/framework/remote_fused_graph_execute_info.proto", :syntax => :proto3) do
11
+ add_message "tensorflow.RemoteFusedGraphExecuteInfo" do
12
+ optional :remote_graph, :message, 1, "tensorflow.GraphDef"
13
+ repeated :graph_input_node_name, :string, 2
14
+ repeated :graph_output_node_name, :string, 3
15
+ optional :executor_name, :string, 4
16
+ optional :serialized_executor_parameters, :bytes, 5
17
+ repeated :default_graph_input_tensor_shape, :message, 6, "tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto"
18
+ repeated :default_graph_output_tensor_shape, :message, 7, "tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto"
19
+ end
20
+ add_message "tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto" do
21
+ optional :dtype, :enum, 1, "tensorflow.DataType"
22
+ optional :shape, :message, 2, "tensorflow.TensorShapeProto"
23
+ end
24
+ end
25
+ end
26
+
27
+ module Tensorflow
28
+ RemoteFusedGraphExecuteInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RemoteFusedGraphExecuteInfo").msgclass
29
+ RemoteFusedGraphExecuteInfo::TensorShapeTypeProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RemoteFusedGraphExecuteInfo.TensorShapeTypeProto").msgclass
30
+ end
@@ -0,0 +1,28 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/framework/resource_handle.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/framework/tensor_shape_pb'
7
+ require 'tensorflow/core/framework/types_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("tensorflow/core/framework/resource_handle.proto", :syntax => :proto3) do
10
+ add_message "tensorflow.ResourceHandleProto" do
11
+ optional :device, :string, 1
12
+ optional :container, :string, 2
13
+ optional :name, :string, 3
14
+ optional :hash_code, :uint64, 4
15
+ optional :maybe_type_name, :string, 5
16
+ repeated :dtypes_and_shapes, :message, 6, "tensorflow.ResourceHandleProto.DtypeAndShape"
17
+ end
18
+ add_message "tensorflow.ResourceHandleProto.DtypeAndShape" do
19
+ optional :dtype, :enum, 1, "tensorflow.DataType"
20
+ optional :shape, :message, 2, "tensorflow.TensorShapeProto"
21
+ end
22
+ end
23
+ end
24
+
25
+ module Tensorflow
26
+ ResourceHandleProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ResourceHandleProto").msgclass
27
+ ResourceHandleProto::DtypeAndShape = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ResourceHandleProto.DtypeAndShape").msgclass
28
+ end
@@ -0,0 +1,72 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/framework/step_stats.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/framework/allocation_description_pb'
7
+ require 'tensorflow/core/framework/tensor_description_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("tensorflow/core/framework/step_stats.proto", :syntax => :proto3) do
10
+ add_message "tensorflow.AllocationRecord" do
11
+ optional :alloc_micros, :int64, 1
12
+ optional :alloc_bytes, :int64, 2
13
+ end
14
+ add_message "tensorflow.AllocatorMemoryUsed" do
15
+ optional :allocator_name, :string, 1
16
+ optional :total_bytes, :int64, 2
17
+ optional :peak_bytes, :int64, 3
18
+ optional :live_bytes, :int64, 4
19
+ repeated :allocation_records, :message, 6, "tensorflow.AllocationRecord"
20
+ optional :allocator_bytes_in_use, :int64, 5
21
+ end
22
+ add_message "tensorflow.NodeOutput" do
23
+ optional :slot, :int32, 1
24
+ optional :tensor_description, :message, 3, "tensorflow.TensorDescription"
25
+ end
26
+ add_message "tensorflow.MemoryStats" do
27
+ optional :temp_memory_size, :int64, 1
28
+ optional :persistent_memory_size, :int64, 3
29
+ repeated :persistent_tensor_alloc_ids, :int64, 5
30
+ optional :device_temp_memory_size, :int64, 2
31
+ optional :device_persistent_memory_size, :int64, 4
32
+ repeated :device_persistent_tensor_alloc_ids, :int64, 6
33
+ end
34
+ add_message "tensorflow.NodeExecStats" do
35
+ optional :node_name, :string, 1
36
+ optional :all_start_micros, :int64, 2
37
+ optional :op_start_rel_micros, :int64, 3
38
+ optional :op_end_rel_micros, :int64, 4
39
+ optional :all_end_rel_micros, :int64, 5
40
+ repeated :memory, :message, 6, "tensorflow.AllocatorMemoryUsed"
41
+ repeated :output, :message, 7, "tensorflow.NodeOutput"
42
+ optional :timeline_label, :string, 8
43
+ optional :scheduled_micros, :int64, 9
44
+ optional :thread_id, :uint32, 10
45
+ repeated :referenced_tensor, :message, 11, "tensorflow.AllocationDescription"
46
+ optional :memory_stats, :message, 12, "tensorflow.MemoryStats"
47
+ optional :all_start_nanos, :int64, 13
48
+ optional :op_start_rel_nanos, :int64, 14
49
+ optional :op_end_rel_nanos, :int64, 15
50
+ optional :all_end_rel_nanos, :int64, 16
51
+ optional :scheduled_nanos, :int64, 17
52
+ end
53
+ add_message "tensorflow.DeviceStepStats" do
54
+ optional :device, :string, 1
55
+ repeated :node_stats, :message, 2, "tensorflow.NodeExecStats"
56
+ map :thread_names, :uint32, :string, 3
57
+ end
58
+ add_message "tensorflow.StepStats" do
59
+ repeated :dev_stats, :message, 1, "tensorflow.DeviceStepStats"
60
+ end
61
+ end
62
+ end
63
+
64
+ module Tensorflow
65
+ AllocationRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.AllocationRecord").msgclass
66
+ AllocatorMemoryUsed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.AllocatorMemoryUsed").msgclass
67
+ NodeOutput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.NodeOutput").msgclass
68
+ MemoryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.MemoryStats").msgclass
69
+ NodeExecStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.NodeExecStats").msgclass
70
+ DeviceStepStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.DeviceStepStats").msgclass
71
+ StepStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.StepStats").msgclass
72
+ end
@@ -0,0 +1,71 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/framework/summary.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/framework/tensor_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("tensorflow/core/framework/summary.proto", :syntax => :proto3) do
9
+ add_message "tensorflow.SummaryDescription" do
10
+ optional :type_hint, :string, 1
11
+ end
12
+ add_message "tensorflow.HistogramProto" do
13
+ optional :min, :double, 1
14
+ optional :max, :double, 2
15
+ optional :num, :double, 3
16
+ optional :sum, :double, 4
17
+ optional :sum_squares, :double, 5
18
+ repeated :bucket_limit, :double, 6
19
+ repeated :bucket, :double, 7
20
+ end
21
+ add_message "tensorflow.SummaryMetadata" do
22
+ optional :plugin_data, :message, 1, "tensorflow.SummaryMetadata.PluginData"
23
+ optional :display_name, :string, 2
24
+ optional :summary_description, :string, 3
25
+ end
26
+ add_message "tensorflow.SummaryMetadata.PluginData" do
27
+ optional :plugin_name, :string, 1
28
+ optional :content, :bytes, 2
29
+ end
30
+ add_message "tensorflow.Summary" do
31
+ repeated :value, :message, 1, "tensorflow.Summary.Value"
32
+ end
33
+ add_message "tensorflow.Summary.Image" do
34
+ optional :height, :int32, 1
35
+ optional :width, :int32, 2
36
+ optional :colorspace, :int32, 3
37
+ optional :encoded_image_string, :bytes, 4
38
+ end
39
+ add_message "tensorflow.Summary.Audio" do
40
+ optional :sample_rate, :float, 1
41
+ optional :num_channels, :int64, 2
42
+ optional :length_frames, :int64, 3
43
+ optional :encoded_audio_string, :bytes, 4
44
+ optional :content_type, :string, 5
45
+ end
46
+ add_message "tensorflow.Summary.Value" do
47
+ optional :node_name, :string, 7
48
+ optional :tag, :string, 1
49
+ optional :metadata, :message, 9, "tensorflow.SummaryMetadata"
50
+ oneof :value do
51
+ optional :simple_value, :float, 2
52
+ optional :obsolete_old_style_histogram, :bytes, 3
53
+ optional :image, :message, 4, "tensorflow.Summary.Image"
54
+ optional :histo, :message, 5, "tensorflow.HistogramProto"
55
+ optional :audio, :message, 6, "tensorflow.Summary.Audio"
56
+ optional :tensor, :message, 8, "tensorflow.TensorProto"
57
+ end
58
+ end
59
+ end
60
+ end
61
+
62
+ module Tensorflow
63
+ SummaryDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SummaryDescription").msgclass
64
+ HistogramProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.HistogramProto").msgclass
65
+ SummaryMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SummaryMetadata").msgclass
66
+ SummaryMetadata::PluginData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SummaryMetadata.PluginData").msgclass
67
+ Summary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.Summary").msgclass
68
+ Summary::Image = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.Summary.Image").msgclass
69
+ Summary::Audio = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.Summary.Audio").msgclass
70
+ Summary::Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.Summary.Value").msgclass
71
+ end
@@ -0,0 +1,21 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/framework/tensor_description.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/framework/types_pb'
7
+ require 'tensorflow/core/framework/tensor_shape_pb'
8
+ require 'tensorflow/core/framework/allocation_description_pb'
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_file("tensorflow/core/framework/tensor_description.proto", :syntax => :proto3) do
11
+ add_message "tensorflow.TensorDescription" do
12
+ optional :dtype, :enum, 1, "tensorflow.DataType"
13
+ optional :shape, :message, 2, "tensorflow.TensorShapeProto"
14
+ optional :allocation_description, :message, 4, "tensorflow.AllocationDescription"
15
+ end
16
+ end
17
+ end
18
+
19
+ module Tensorflow
20
+ TensorDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TensorDescription").msgclass
21
+ end
@@ -0,0 +1,41 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/framework/tensor.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/framework/resource_handle_pb'
7
+ require 'tensorflow/core/framework/tensor_shape_pb'
8
+ require 'tensorflow/core/framework/types_pb'
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_file("tensorflow/core/framework/tensor.proto", :syntax => :proto3) do
11
+ add_message "tensorflow.TensorProto" do
12
+ optional :dtype, :enum, 1, "tensorflow.DataType"
13
+ optional :tensor_shape, :message, 2, "tensorflow.TensorShapeProto"
14
+ optional :version_number, :int32, 3
15
+ optional :tensor_content, :bytes, 4
16
+ repeated :half_val, :int32, 13
17
+ repeated :float_val, :float, 5
18
+ repeated :double_val, :double, 6
19
+ repeated :int_val, :int32, 7
20
+ repeated :string_val, :bytes, 8
21
+ repeated :scomplex_val, :float, 9
22
+ repeated :int64_val, :int64, 10
23
+ repeated :bool_val, :bool, 11
24
+ repeated :dcomplex_val, :double, 12
25
+ repeated :resource_handle_val, :message, 14, "tensorflow.ResourceHandleProto"
26
+ repeated :variant_val, :message, 15, "tensorflow.VariantTensorDataProto"
27
+ repeated :uint32_val, :uint32, 16
28
+ repeated :uint64_val, :uint64, 17
29
+ end
30
+ add_message "tensorflow.VariantTensorDataProto" do
31
+ optional :type_name, :string, 1
32
+ optional :metadata, :bytes, 2
33
+ repeated :tensors, :message, 3, "tensorflow.TensorProto"
34
+ end
35
+ end
36
+ end
37
+
38
+ module Tensorflow
39
+ TensorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TensorProto").msgclass
40
+ VariantTensorDataProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.VariantTensorDataProto").msgclass
41
+ end
@@ -0,0 +1,22 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/framework/tensor_shape.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("tensorflow/core/framework/tensor_shape.proto", :syntax => :proto3) do
8
+ add_message "tensorflow.TensorShapeProto" do
9
+ repeated :dim, :message, 2, "tensorflow.TensorShapeProto.Dim"
10
+ optional :unknown_rank, :bool, 3
11
+ end
12
+ add_message "tensorflow.TensorShapeProto.Dim" do
13
+ optional :size, :int64, 1
14
+ optional :name, :string, 2
15
+ end
16
+ end
17
+ end
18
+
19
+ module Tensorflow
20
+ TensorShapeProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TensorShapeProto").msgclass
21
+ TensorShapeProto::Dim = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TensorShapeProto.Dim").msgclass
22
+ end
@@ -0,0 +1,23 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/framework/tensor_slice.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("tensorflow/core/framework/tensor_slice.proto", :syntax => :proto3) do
8
+ add_message "tensorflow.TensorSliceProto" do
9
+ repeated :extent, :message, 1, "tensorflow.TensorSliceProto.Extent"
10
+ end
11
+ add_message "tensorflow.TensorSliceProto.Extent" do
12
+ optional :start, :int64, 1
13
+ oneof :has_length do
14
+ optional :length, :int64, 2
15
+ end
16
+ end
17
+ end
18
+ end
19
+
20
+ module Tensorflow
21
+ TensorSliceProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TensorSliceProto").msgclass
22
+ TensorSliceProto::Extent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TensorSliceProto.Extent").msgclass
23
+ end
@@ -0,0 +1,62 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/framework/types.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("tensorflow/core/framework/types.proto", :syntax => :proto3) do
8
+ add_enum "tensorflow.DataType" do
9
+ value :DT_INVALID, 0
10
+ value :DT_FLOAT, 1
11
+ value :DT_DOUBLE, 2
12
+ value :DT_INT32, 3
13
+ value :DT_UINT8, 4
14
+ value :DT_INT16, 5
15
+ value :DT_INT8, 6
16
+ value :DT_STRING, 7
17
+ value :DT_COMPLEX64, 8
18
+ value :DT_INT64, 9
19
+ value :DT_BOOL, 10
20
+ value :DT_QINT8, 11
21
+ value :DT_QUINT8, 12
22
+ value :DT_QINT32, 13
23
+ value :DT_BFLOAT16, 14
24
+ value :DT_QINT16, 15
25
+ value :DT_QUINT16, 16
26
+ value :DT_UINT16, 17
27
+ value :DT_COMPLEX128, 18
28
+ value :DT_HALF, 19
29
+ value :DT_RESOURCE, 20
30
+ value :DT_VARIANT, 21
31
+ value :DT_UINT32, 22
32
+ value :DT_UINT64, 23
33
+ value :DT_FLOAT_REF, 101
34
+ value :DT_DOUBLE_REF, 102
35
+ value :DT_INT32_REF, 103
36
+ value :DT_UINT8_REF, 104
37
+ value :DT_INT16_REF, 105
38
+ value :DT_INT8_REF, 106
39
+ value :DT_STRING_REF, 107
40
+ value :DT_COMPLEX64_REF, 108
41
+ value :DT_INT64_REF, 109
42
+ value :DT_BOOL_REF, 110
43
+ value :DT_QINT8_REF, 111
44
+ value :DT_QUINT8_REF, 112
45
+ value :DT_QINT32_REF, 113
46
+ value :DT_BFLOAT16_REF, 114
47
+ value :DT_QINT16_REF, 115
48
+ value :DT_QUINT16_REF, 116
49
+ value :DT_UINT16_REF, 117
50
+ value :DT_COMPLEX128_REF, 118
51
+ value :DT_HALF_REF, 119
52
+ value :DT_RESOURCE_REF, 120
53
+ value :DT_VARIANT_REF, 121
54
+ value :DT_UINT32_REF, 122
55
+ value :DT_UINT64_REF, 123
56
+ end
57
+ end
58
+ end
59
+
60
+ module Tensorflow
61
+ DataType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.DataType").enummodule
62
+ end