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,112 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/eager_service.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/framework/attr_value_pb'
7
+ require 'tensorflow/core/framework/device_attributes_pb'
8
+ require 'tensorflow/core/framework/function_pb'
9
+ require 'tensorflow/core/framework/tensor_pb'
10
+ require 'tensorflow/core/framework/tensor_shape_pb'
11
+ require 'tensorflow/core/framework/types_pb'
12
+ require 'tensorflow/core/framework/versions_pb'
13
+ require 'tensorflow/core/protobuf/tensorflow_server_pb'
14
+ Google::Protobuf::DescriptorPool.generated_pool.build do
15
+ add_file("tensorflow/core/protobuf/eager_service.proto", :syntax => :proto3) do
16
+ add_message "tensorflow.eager.RemoteTensorHandle" do
17
+ optional :op_id, :int64, 1
18
+ optional :output_num, :int32, 2
19
+ optional :device, :string, 3
20
+ optional :op_device, :string, 4
21
+ optional :dtype, :enum, 5, "tensorflow.DataType"
22
+ end
23
+ add_message "tensorflow.eager.Operation" do
24
+ optional :id, :int64, 1
25
+ optional :name, :string, 2
26
+ repeated :inputs, :message, 3, "tensorflow.eager.RemoteTensorHandle"
27
+ repeated :control_op_ids, :int64, 4
28
+ map :attrs, :string, :message, 5, "tensorflow.AttrValue"
29
+ optional :device, :string, 6
30
+ end
31
+ add_message "tensorflow.eager.QueueItem" do
32
+ oneof :item do
33
+ optional :handle_to_decref, :message, 1, "tensorflow.eager.RemoteTensorHandle"
34
+ optional :operation, :message, 2, "tensorflow.eager.Operation"
35
+ end
36
+ end
37
+ add_message "tensorflow.eager.QueueResponse" do
38
+ repeated :shape, :message, 1, "tensorflow.TensorShapeProto"
39
+ end
40
+ add_message "tensorflow.eager.CreateContextRequest" do
41
+ optional :server_def, :message, 1, "tensorflow.ServerDef"
42
+ optional :async, :bool, 2
43
+ optional :keep_alive_secs, :int64, 3
44
+ optional :version_def, :message, 4, "tensorflow.VersionDef"
45
+ repeated :cluster_device_attributes, :message, 6, "tensorflow.DeviceAttributes"
46
+ optional :context_id, :fixed64, 7
47
+ end
48
+ add_message "tensorflow.eager.CreateContextResponse" do
49
+ repeated :device_attributes, :message, 2, "tensorflow.DeviceAttributes"
50
+ end
51
+ add_message "tensorflow.eager.EnqueueRequest" do
52
+ optional :context_id, :fixed64, 1
53
+ repeated :queue, :message, 3, "tensorflow.eager.QueueItem"
54
+ end
55
+ add_message "tensorflow.eager.EnqueueResponse" do
56
+ repeated :queue_response, :message, 1, "tensorflow.eager.QueueResponse"
57
+ end
58
+ add_message "tensorflow.eager.WaitQueueDoneRequest" do
59
+ optional :context_id, :fixed64, 1
60
+ repeated :op_id, :int64, 2
61
+ end
62
+ add_message "tensorflow.eager.WaitQueueDoneResponse" do
63
+ end
64
+ add_message "tensorflow.eager.KeepAliveRequest" do
65
+ optional :context_id, :fixed64, 1
66
+ end
67
+ add_message "tensorflow.eager.KeepAliveResponse" do
68
+ end
69
+ add_message "tensorflow.eager.CloseContextRequest" do
70
+ optional :context_id, :fixed64, 1
71
+ end
72
+ add_message "tensorflow.eager.CloseContextResponse" do
73
+ end
74
+ add_message "tensorflow.eager.RegisterFunctionRequest" do
75
+ optional :context_id, :fixed64, 1
76
+ optional :function_def, :message, 2, "tensorflow.FunctionDef"
77
+ end
78
+ add_message "tensorflow.eager.RegisterFunctionResponse" do
79
+ end
80
+ add_message "tensorflow.eager.SendTensorRequest" do
81
+ optional :context_id, :fixed64, 1
82
+ optional :op_id, :int64, 2
83
+ repeated :tensors, :message, 3, "tensorflow.TensorProto"
84
+ optional :device_name, :string, 4
85
+ end
86
+ add_message "tensorflow.eager.SendTensorResponse" do
87
+ end
88
+ end
89
+ end
90
+
91
+ module Tensorflow
92
+ module Eager
93
+ RemoteTensorHandle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.RemoteTensorHandle").msgclass
94
+ Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.Operation").msgclass
95
+ QueueItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.QueueItem").msgclass
96
+ QueueResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.QueueResponse").msgclass
97
+ CreateContextRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.CreateContextRequest").msgclass
98
+ CreateContextResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.CreateContextResponse").msgclass
99
+ EnqueueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.EnqueueRequest").msgclass
100
+ EnqueueResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.EnqueueResponse").msgclass
101
+ WaitQueueDoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.WaitQueueDoneRequest").msgclass
102
+ WaitQueueDoneResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.WaitQueueDoneResponse").msgclass
103
+ KeepAliveRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.KeepAliveRequest").msgclass
104
+ KeepAliveResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.KeepAliveResponse").msgclass
105
+ CloseContextRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.CloseContextRequest").msgclass
106
+ CloseContextResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.CloseContextResponse").msgclass
107
+ RegisterFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.RegisterFunctionRequest").msgclass
108
+ RegisterFunctionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.RegisterFunctionResponse").msgclass
109
+ SendTensorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.SendTensorRequest").msgclass
110
+ SendTensorResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.eager.SendTensorResponse").msgclass
111
+ end
112
+ end
@@ -0,0 +1,29 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/graph_debug_info.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("tensorflow/core/protobuf/graph_debug_info.proto", :syntax => :proto3) do
8
+ add_message "tensorflow.GraphDebugInfo" do
9
+ repeated :files, :string, 1
10
+ map :traces, :string, :message, 2, "tensorflow.GraphDebugInfo.StackTrace"
11
+ end
12
+ add_message "tensorflow.GraphDebugInfo.FileLineCol" do
13
+ optional :file_index, :int32, 1
14
+ optional :line, :int32, 2
15
+ optional :col, :int32, 3
16
+ optional :func, :string, 4
17
+ optional :code, :string, 5
18
+ end
19
+ add_message "tensorflow.GraphDebugInfo.StackTrace" do
20
+ repeated :file_line_cols, :message, 1, "tensorflow.GraphDebugInfo.FileLineCol"
21
+ end
22
+ end
23
+ end
24
+
25
+ module Tensorflow
26
+ GraphDebugInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.GraphDebugInfo").msgclass
27
+ GraphDebugInfo::FileLineCol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.GraphDebugInfo.FileLineCol").msgclass
28
+ GraphDebugInfo::StackTrace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.GraphDebugInfo.StackTrace").msgclass
29
+ end
@@ -0,0 +1,123 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/master.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/framework/device_attributes_pb'
7
+ require 'tensorflow/core/framework/graph_pb'
8
+ require 'tensorflow/core/framework/tensor_pb'
9
+ require 'tensorflow/core/lib/core/error_codes_pb'
10
+ require 'tensorflow/core/protobuf/config_pb'
11
+ require 'tensorflow/core/protobuf/named_tensor_pb'
12
+ Google::Protobuf::DescriptorPool.generated_pool.build do
13
+ add_file("tensorflow/core/protobuf/master.proto", :syntax => :proto3) do
14
+ add_message "tensorflow.CreateSessionRequest" do
15
+ optional :graph_def, :message, 1, "tensorflow.GraphDef"
16
+ optional :config, :message, 2, "tensorflow.ConfigProto"
17
+ optional :target, :string, 3
18
+ end
19
+ add_message "tensorflow.CreateSessionResponse" do
20
+ optional :session_handle, :string, 1
21
+ optional :graph_version, :int64, 2
22
+ end
23
+ add_message "tensorflow.ExtendSessionRequest" do
24
+ optional :session_handle, :string, 1
25
+ optional :graph_def, :message, 2, "tensorflow.GraphDef"
26
+ optional :current_graph_version, :int64, 3
27
+ end
28
+ add_message "tensorflow.ExtendSessionResponse" do
29
+ optional :new_graph_version, :int64, 4
30
+ end
31
+ add_message "tensorflow.RunStepRequest" do
32
+ optional :session_handle, :string, 1
33
+ repeated :feed, :message, 2, "tensorflow.NamedTensorProto"
34
+ repeated :fetch, :string, 3
35
+ repeated :target, :string, 4
36
+ optional :options, :message, 5, "tensorflow.RunOptions"
37
+ optional :partial_run_handle, :string, 6
38
+ optional :store_errors_in_response_body, :bool, 7
39
+ optional :request_id, :int64, 8
40
+ end
41
+ add_message "tensorflow.RunStepResponse" do
42
+ repeated :tensor, :message, 1, "tensorflow.NamedTensorProto"
43
+ optional :metadata, :message, 2, "tensorflow.RunMetadata"
44
+ optional :status_code, :enum, 3, "tensorflow.error.Code"
45
+ optional :status_error_message, :string, 4
46
+ end
47
+ add_message "tensorflow.PartialRunSetupRequest" do
48
+ optional :session_handle, :string, 1
49
+ repeated :feed, :string, 2
50
+ repeated :fetch, :string, 3
51
+ repeated :target, :string, 4
52
+ optional :request_id, :int64, 5
53
+ end
54
+ add_message "tensorflow.PartialRunSetupResponse" do
55
+ optional :partial_run_handle, :string, 1
56
+ end
57
+ add_message "tensorflow.CloseSessionRequest" do
58
+ optional :session_handle, :string, 1
59
+ end
60
+ add_message "tensorflow.CloseSessionResponse" do
61
+ end
62
+ add_message "tensorflow.ResetRequest" do
63
+ repeated :container, :string, 1
64
+ repeated :device_filters, :string, 2
65
+ end
66
+ add_message "tensorflow.ResetResponse" do
67
+ end
68
+ add_message "tensorflow.ListDevicesRequest" do
69
+ optional :session_handle, :string, 1
70
+ end
71
+ add_message "tensorflow.ListDevicesResponse" do
72
+ repeated :local_device, :message, 1, "tensorflow.DeviceAttributes"
73
+ repeated :remote_device, :message, 2, "tensorflow.DeviceAttributes"
74
+ end
75
+ add_message "tensorflow.MakeCallableRequest" do
76
+ optional :session_handle, :string, 1
77
+ optional :options, :message, 2, "tensorflow.CallableOptions"
78
+ optional :request_id, :int64, 3
79
+ end
80
+ add_message "tensorflow.MakeCallableResponse" do
81
+ optional :handle, :int64, 1
82
+ end
83
+ add_message "tensorflow.RunCallableRequest" do
84
+ optional :session_handle, :string, 1
85
+ optional :handle, :int64, 2
86
+ repeated :feed, :message, 3, "tensorflow.TensorProto"
87
+ optional :request_id, :int64, 4
88
+ end
89
+ add_message "tensorflow.RunCallableResponse" do
90
+ repeated :fetch, :message, 1, "tensorflow.TensorProto"
91
+ optional :metadata, :message, 2, "tensorflow.RunMetadata"
92
+ end
93
+ add_message "tensorflow.ReleaseCallableRequest" do
94
+ optional :session_handle, :string, 1
95
+ optional :handle, :int64, 2
96
+ end
97
+ add_message "tensorflow.ReleaseCallableResponse" do
98
+ end
99
+ end
100
+ end
101
+
102
+ module Tensorflow
103
+ CreateSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.CreateSessionRequest").msgclass
104
+ CreateSessionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.CreateSessionResponse").msgclass
105
+ ExtendSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ExtendSessionRequest").msgclass
106
+ ExtendSessionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ExtendSessionResponse").msgclass
107
+ RunStepRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RunStepRequest").msgclass
108
+ RunStepResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RunStepResponse").msgclass
109
+ PartialRunSetupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.PartialRunSetupRequest").msgclass
110
+ PartialRunSetupResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.PartialRunSetupResponse").msgclass
111
+ CloseSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.CloseSessionRequest").msgclass
112
+ CloseSessionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.CloseSessionResponse").msgclass
113
+ ResetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ResetRequest").msgclass
114
+ ResetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ResetResponse").msgclass
115
+ ListDevicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ListDevicesRequest").msgclass
116
+ ListDevicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ListDevicesResponse").msgclass
117
+ MakeCallableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.MakeCallableRequest").msgclass
118
+ MakeCallableResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.MakeCallableResponse").msgclass
119
+ RunCallableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RunCallableRequest").msgclass
120
+ RunCallableResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RunCallableResponse").msgclass
121
+ ReleaseCallableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ReleaseCallableRequest").msgclass
122
+ ReleaseCallableResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ReleaseCallableResponse").msgclass
123
+ end
@@ -0,0 +1,15 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/master_service.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/protobuf/master_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("tensorflow/core/protobuf/master_service.proto", :syntax => :proto3) do
9
+ end
10
+ end
11
+
12
+ module Tensorflow
13
+ module Grpc
14
+ end
15
+ end
@@ -0,0 +1,95 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/meta_graph.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/protobuf/any_pb'
7
+ require 'tensorflow/core/framework/graph_pb'
8
+ require 'tensorflow/core/framework/op_def_pb'
9
+ require 'tensorflow/core/framework/tensor_shape_pb'
10
+ require 'tensorflow/core/framework/types_pb'
11
+ require 'tensorflow/core/protobuf/saved_object_graph_pb'
12
+ require 'tensorflow/core/protobuf/saver_pb'
13
+ Google::Protobuf::DescriptorPool.generated_pool.build do
14
+ add_file("tensorflow/core/protobuf/meta_graph.proto", :syntax => :proto3) do
15
+ add_message "tensorflow.MetaGraphDef" do
16
+ optional :meta_info_def, :message, 1, "tensorflow.MetaGraphDef.MetaInfoDef"
17
+ optional :graph_def, :message, 2, "tensorflow.GraphDef"
18
+ optional :saver_def, :message, 3, "tensorflow.SaverDef"
19
+ map :collection_def, :string, :message, 4, "tensorflow.CollectionDef"
20
+ map :signature_def, :string, :message, 5, "tensorflow.SignatureDef"
21
+ repeated :asset_file_def, :message, 6, "tensorflow.AssetFileDef"
22
+ optional :object_graph_def, :message, 7, "tensorflow.SavedObjectGraph"
23
+ end
24
+ add_message "tensorflow.MetaGraphDef.MetaInfoDef" do
25
+ optional :meta_graph_version, :string, 1
26
+ optional :stripped_op_list, :message, 2, "tensorflow.OpList"
27
+ optional :any_info, :message, 3, "google.protobuf.Any"
28
+ repeated :tags, :string, 4
29
+ optional :tensorflow_version, :string, 5
30
+ optional :tensorflow_git_version, :string, 6
31
+ optional :stripped_default_attrs, :bool, 7
32
+ end
33
+ add_message "tensorflow.CollectionDef" do
34
+ oneof :kind do
35
+ optional :node_list, :message, 1, "tensorflow.CollectionDef.NodeList"
36
+ optional :bytes_list, :message, 2, "tensorflow.CollectionDef.BytesList"
37
+ optional :int64_list, :message, 3, "tensorflow.CollectionDef.Int64List"
38
+ optional :float_list, :message, 4, "tensorflow.CollectionDef.FloatList"
39
+ optional :any_list, :message, 5, "tensorflow.CollectionDef.AnyList"
40
+ end
41
+ end
42
+ add_message "tensorflow.CollectionDef.NodeList" do
43
+ repeated :value, :string, 1
44
+ end
45
+ add_message "tensorflow.CollectionDef.BytesList" do
46
+ repeated :value, :bytes, 1
47
+ end
48
+ add_message "tensorflow.CollectionDef.Int64List" do
49
+ repeated :value, :int64, 1
50
+ end
51
+ add_message "tensorflow.CollectionDef.FloatList" do
52
+ repeated :value, :float, 1
53
+ end
54
+ add_message "tensorflow.CollectionDef.AnyList" do
55
+ repeated :value, :message, 1, "google.protobuf.Any"
56
+ end
57
+ add_message "tensorflow.TensorInfo" do
58
+ optional :dtype, :enum, 2, "tensorflow.DataType"
59
+ optional :tensor_shape, :message, 3, "tensorflow.TensorShapeProto"
60
+ oneof :encoding do
61
+ optional :name, :string, 1
62
+ optional :coo_sparse, :message, 4, "tensorflow.TensorInfo.CooSparse"
63
+ end
64
+ end
65
+ add_message "tensorflow.TensorInfo.CooSparse" do
66
+ optional :values_tensor_name, :string, 1
67
+ optional :indices_tensor_name, :string, 2
68
+ optional :dense_shape_tensor_name, :string, 3
69
+ end
70
+ add_message "tensorflow.SignatureDef" do
71
+ map :inputs, :string, :message, 1, "tensorflow.TensorInfo"
72
+ map :outputs, :string, :message, 2, "tensorflow.TensorInfo"
73
+ optional :method_name, :string, 3
74
+ end
75
+ add_message "tensorflow.AssetFileDef" do
76
+ optional :tensor_info, :message, 1, "tensorflow.TensorInfo"
77
+ optional :filename, :string, 2
78
+ end
79
+ end
80
+ end
81
+
82
+ module Tensorflow
83
+ MetaGraphDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.MetaGraphDef").msgclass
84
+ MetaGraphDef::MetaInfoDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.MetaGraphDef.MetaInfoDef").msgclass
85
+ CollectionDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.CollectionDef").msgclass
86
+ CollectionDef::NodeList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.CollectionDef.NodeList").msgclass
87
+ CollectionDef::BytesList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.CollectionDef.BytesList").msgclass
88
+ CollectionDef::Int64List = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.CollectionDef.Int64List").msgclass
89
+ CollectionDef::FloatList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.CollectionDef.FloatList").msgclass
90
+ CollectionDef::AnyList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.CollectionDef.AnyList").msgclass
91
+ TensorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TensorInfo").msgclass
92
+ TensorInfo::CooSparse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TensorInfo.CooSparse").msgclass
93
+ SignatureDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SignatureDef").msgclass
94
+ AssetFileDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.AssetFileDef").msgclass
95
+ end
@@ -0,0 +1,18 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/named_tensor.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/protobuf/named_tensor.proto", :syntax => :proto3) do
9
+ add_message "tensorflow.NamedTensorProto" do
10
+ optional :name, :string, 1
11
+ optional :tensor, :message, 2, "tensorflow.TensorProto"
12
+ end
13
+ end
14
+ end
15
+
16
+ module Tensorflow
17
+ NamedTensorProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.NamedTensorProto").msgclass
18
+ end
@@ -0,0 +1,21 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/queue_runner.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/lib/core/error_codes_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("tensorflow/core/protobuf/queue_runner.proto", :syntax => :proto3) do
9
+ add_message "tensorflow.QueueRunnerDef" do
10
+ optional :queue_name, :string, 1
11
+ repeated :enqueue_op_name, :string, 2
12
+ optional :close_op_name, :string, 3
13
+ optional :cancel_op_name, :string, 4
14
+ repeated :queue_closed_exception_types, :enum, 5, "tensorflow.error.Code"
15
+ end
16
+ end
17
+ end
18
+
19
+ module Tensorflow
20
+ QueueRunnerDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.QueueRunnerDef").msgclass
21
+ end
@@ -0,0 +1,48 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/replay_log.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/protobuf/master_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("tensorflow/core/protobuf/replay_log.proto", :syntax => :proto3) do
9
+ add_message "tensorflow.NewReplaySession" do
10
+ optional :devices, :message, 1, "tensorflow.ListDevicesResponse"
11
+ optional :session_handle, :string, 2
12
+ end
13
+ add_message "tensorflow.ReplayOp" do
14
+ optional :start_time_us, :double, 31
15
+ optional :end_time_us, :double, 32
16
+ oneof :op do
17
+ optional :create_session, :message, 1, "tensorflow.CreateSessionRequest"
18
+ optional :extend_session, :message, 2, "tensorflow.ExtendSessionRequest"
19
+ optional :partial_run_setup, :message, 3, "tensorflow.PartialRunSetupRequest"
20
+ optional :run_step, :message, 4, "tensorflow.RunStepRequest"
21
+ optional :close_session, :message, 5, "tensorflow.CloseSessionRequest"
22
+ optional :list_devices, :message, 6, "tensorflow.ListDevicesRequest"
23
+ optional :reset_request, :message, 7, "tensorflow.ResetRequest"
24
+ optional :make_callable, :message, 8, "tensorflow.MakeCallableRequest"
25
+ optional :run_callable, :message, 9, "tensorflow.RunCallableRequest"
26
+ optional :release_callable, :message, 10, "tensorflow.ReleaseCallableRequest"
27
+ optional :new_replay_session, :message, 11, "tensorflow.NewReplaySession"
28
+ end
29
+ oneof :response do
30
+ optional :create_session_response, :message, 21, "tensorflow.CreateSessionResponse"
31
+ optional :extend_session_response, :message, 22, "tensorflow.ExtendSessionResponse"
32
+ optional :partial_run_setup_response, :message, 23, "tensorflow.PartialRunSetupResponse"
33
+ optional :run_step_response, :message, 24, "tensorflow.RunStepResponse"
34
+ optional :close_session_response, :message, 25, "tensorflow.CloseSessionResponse"
35
+ optional :list_devices_response, :message, 26, "tensorflow.ListDevicesResponse"
36
+ optional :reset_request_response, :message, 27, "tensorflow.ResetResponse"
37
+ optional :make_callable_response, :message, 28, "tensorflow.MakeCallableResponse"
38
+ optional :run_callable_response, :message, 29, "tensorflow.RunCallableResponse"
39
+ optional :release_callable_response, :message, 30, "tensorflow.ReleaseCallableResponse"
40
+ end
41
+ end
42
+ end
43
+ end
44
+
45
+ module Tensorflow
46
+ NewReplaySession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.NewReplaySession").msgclass
47
+ ReplayOp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ReplayOp").msgclass
48
+ end