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,45 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/framework/variable.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("tensorflow/core/framework/variable.proto", :syntax => :proto3) do
8
+ add_message "tensorflow.VariableDef" do
9
+ optional :variable_name, :string, 1
10
+ optional :initial_value_name, :string, 6
11
+ optional :initializer_name, :string, 2
12
+ optional :snapshot_name, :string, 3
13
+ optional :save_slice_info_def, :message, 4, "tensorflow.SaveSliceInfoDef"
14
+ optional :is_resource, :bool, 5
15
+ optional :trainable, :bool, 7
16
+ optional :synchronization, :enum, 8, "tensorflow.VariableSynchronization"
17
+ optional :aggregation, :enum, 9, "tensorflow.VariableAggregation"
18
+ end
19
+ add_message "tensorflow.SaveSliceInfoDef" do
20
+ optional :full_name, :string, 1
21
+ repeated :full_shape, :int64, 2
22
+ repeated :var_offset, :int64, 3
23
+ repeated :var_shape, :int64, 4
24
+ end
25
+ add_enum "tensorflow.VariableSynchronization" do
26
+ value :VARIABLE_SYNCHRONIZATION_AUTO, 0
27
+ value :VARIABLE_SYNCHRONIZATION_NONE, 1
28
+ value :VARIABLE_SYNCHRONIZATION_ON_WRITE, 2
29
+ value :VARIABLE_SYNCHRONIZATION_ON_READ, 3
30
+ end
31
+ add_enum "tensorflow.VariableAggregation" do
32
+ value :VARIABLE_AGGREGATION_NONE, 0
33
+ value :VARIABLE_AGGREGATION_SUM, 1
34
+ value :VARIABLE_AGGREGATION_MEAN, 2
35
+ value :VARIABLE_AGGREGATION_ONLY_FIRST_REPLICA, 3
36
+ end
37
+ end
38
+ end
39
+
40
+ module Tensorflow
41
+ VariableDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.VariableDef").msgclass
42
+ SaveSliceInfoDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SaveSliceInfoDef").msgclass
43
+ VariableSynchronization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.VariableSynchronization").enummodule
44
+ VariableAggregation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.VariableAggregation").enummodule
45
+ end
@@ -0,0 +1,18 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/framework/versions.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("tensorflow/core/framework/versions.proto", :syntax => :proto3) do
8
+ add_message "tensorflow.VersionDef" do
9
+ optional :producer, :int32, 1
10
+ optional :min_consumer, :int32, 2
11
+ repeated :bad_consumers, :int32, 3
12
+ end
13
+ end
14
+ end
15
+
16
+ module Tensorflow
17
+ VersionDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.VersionDef").msgclass
18
+ end
@@ -0,0 +1,35 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: core/lib/core/error_codes.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("core/lib/core/error_codes.proto", :syntax => :proto3) do
8
+ add_enum "tensorflow.error.Code" do
9
+ value :OK, 0
10
+ value :CANCELLED, 1
11
+ value :UNKNOWN, 2
12
+ value :INVALID_ARGUMENT, 3
13
+ value :DEADLINE_EXCEEDED, 4
14
+ value :NOT_FOUND, 5
15
+ value :ALREADY_EXISTS, 6
16
+ value :PERMISSION_DENIED, 7
17
+ value :UNAUTHENTICATED, 16
18
+ value :RESOURCE_EXHAUSTED, 8
19
+ value :FAILED_PRECONDITION, 9
20
+ value :ABORTED, 10
21
+ value :OUT_OF_RANGE, 11
22
+ value :UNIMPLEMENTED, 12
23
+ value :INTERNAL, 13
24
+ value :UNAVAILABLE, 14
25
+ value :DATA_LOSS, 15
26
+ value :DO_NOT_USE_RESERVED_FOR_FUTURE_EXPANSION_USE_DEFAULT_IN_SWITCH_INSTEAD_, 20
27
+ end
28
+ end
29
+ end
30
+
31
+ module Tensorflow
32
+ module Error
33
+ Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.error.Code").enummodule
34
+ end
35
+ end
@@ -0,0 +1,21 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/cluster.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("tensorflow/core/protobuf/cluster.proto", :syntax => :proto3) do
8
+ add_message "tensorflow.JobDef" do
9
+ optional :name, :string, 1
10
+ map :tasks, :int32, :string, 2
11
+ end
12
+ add_message "tensorflow.ClusterDef" do
13
+ repeated :job, :message, 1, "tensorflow.JobDef"
14
+ end
15
+ end
16
+ end
17
+
18
+ module Tensorflow
19
+ JobDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.JobDef").msgclass
20
+ ClusterDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ClusterDef").msgclass
21
+ end
@@ -0,0 +1,180 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/config.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/framework/cost_graph_pb'
7
+ require 'tensorflow/core/framework/graph_pb'
8
+ require 'tensorflow/core/framework/step_stats_pb'
9
+ require 'tensorflow/core/protobuf/cluster_pb'
10
+ require 'tensorflow/core/protobuf/debug_pb'
11
+ require 'tensorflow/core/protobuf/rewriter_config_pb'
12
+ Google::Protobuf::DescriptorPool.generated_pool.build do
13
+ add_file("tensorflow/core/protobuf/config.proto", :syntax => :proto3) do
14
+ add_message "tensorflow.GPUOptions" do
15
+ optional :per_process_gpu_memory_fraction, :double, 1
16
+ optional :allow_growth, :bool, 4
17
+ optional :allocator_type, :string, 2
18
+ optional :deferred_deletion_bytes, :int64, 3
19
+ optional :visible_device_list, :string, 5
20
+ optional :polling_active_delay_usecs, :int32, 6
21
+ optional :polling_inactive_delay_msecs, :int32, 7
22
+ optional :force_gpu_compatible, :bool, 8
23
+ optional :experimental, :message, 9, "tensorflow.GPUOptions.Experimental"
24
+ end
25
+ add_message "tensorflow.GPUOptions.Experimental" do
26
+ repeated :virtual_devices, :message, 1, "tensorflow.GPUOptions.Experimental.VirtualDevices"
27
+ optional :use_unified_memory, :bool, 2
28
+ optional :num_dev_to_dev_copy_streams, :int32, 3
29
+ optional :collective_ring_order, :string, 4
30
+ optional :timestamped_allocator, :bool, 5
31
+ optional :kernel_tracker_max_interval, :int32, 7
32
+ optional :kernel_tracker_max_bytes, :int32, 8
33
+ optional :kernel_tracker_max_pending, :int32, 9
34
+ end
35
+ add_message "tensorflow.GPUOptions.Experimental.VirtualDevices" do
36
+ repeated :memory_limit_mb, :float, 1
37
+ end
38
+ add_message "tensorflow.OptimizerOptions" do
39
+ optional :do_common_subexpression_elimination, :bool, 1
40
+ optional :do_constant_folding, :bool, 2
41
+ optional :max_folded_constant_in_bytes, :int64, 6
42
+ optional :do_function_inlining, :bool, 4
43
+ optional :opt_level, :enum, 3, "tensorflow.OptimizerOptions.Level"
44
+ optional :global_jit_level, :enum, 5, "tensorflow.OptimizerOptions.GlobalJitLevel"
45
+ end
46
+ add_enum "tensorflow.OptimizerOptions.Level" do
47
+ value :L1, 0
48
+ value :L0, -1
49
+ end
50
+ add_enum "tensorflow.OptimizerOptions.GlobalJitLevel" do
51
+ value :DEFAULT, 0
52
+ value :OFF, -1
53
+ value :ON_1, 1
54
+ value :ON_2, 2
55
+ end
56
+ add_message "tensorflow.GraphOptions" do
57
+ optional :enable_recv_scheduling, :bool, 2
58
+ optional :optimizer_options, :message, 3, "tensorflow.OptimizerOptions"
59
+ optional :build_cost_model, :int64, 4
60
+ optional :build_cost_model_after, :int64, 9
61
+ optional :infer_shapes, :bool, 5
62
+ optional :place_pruned_graph, :bool, 6
63
+ optional :enable_bfloat16_sendrecv, :bool, 7
64
+ optional :timeline_step, :int32, 8
65
+ optional :rewrite_options, :message, 10, "tensorflow.RewriterConfig"
66
+ end
67
+ add_message "tensorflow.ThreadPoolOptionProto" do
68
+ optional :num_threads, :int32, 1
69
+ optional :global_name, :string, 2
70
+ end
71
+ add_message "tensorflow.RPCOptions" do
72
+ optional :use_rpc_for_inprocess_master, :bool, 1
73
+ optional :compression_algorithm, :string, 2
74
+ optional :compression_level, :int32, 3
75
+ optional :cache_rpc_response, :bool, 4
76
+ optional :disable_session_connection_sharing, :bool, 5
77
+ end
78
+ add_message "tensorflow.SessionMetadata" do
79
+ optional :name, :string, 1
80
+ optional :version, :int64, 2
81
+ end
82
+ add_message "tensorflow.ConfigProto" do
83
+ map :device_count, :string, :int32, 1
84
+ optional :intra_op_parallelism_threads, :int32, 2
85
+ optional :inter_op_parallelism_threads, :int32, 5
86
+ optional :use_per_session_threads, :bool, 9
87
+ repeated :session_inter_op_thread_pool, :message, 12, "tensorflow.ThreadPoolOptionProto"
88
+ optional :placement_period, :int32, 3
89
+ repeated :device_filters, :string, 4
90
+ optional :gpu_options, :message, 6, "tensorflow.GPUOptions"
91
+ optional :allow_soft_placement, :bool, 7
92
+ optional :log_device_placement, :bool, 8
93
+ optional :graph_options, :message, 10, "tensorflow.GraphOptions"
94
+ optional :operation_timeout_in_ms, :int64, 11
95
+ optional :rpc_options, :message, 13, "tensorflow.RPCOptions"
96
+ optional :cluster_def, :message, 14, "tensorflow.ClusterDef"
97
+ optional :isolate_session_state, :bool, 15
98
+ optional :experimental, :message, 16, "tensorflow.ConfigProto.Experimental"
99
+ end
100
+ add_message "tensorflow.ConfigProto.Experimental" do
101
+ optional :collective_group_leader, :string, 1
102
+ optional :executor_type, :string, 3
103
+ optional :recv_buf_max_chunk, :int32, 4
104
+ optional :use_numa_affinity, :bool, 5
105
+ optional :collective_deterministic_sequential_execution, :bool, 6
106
+ optional :collective_nccl, :bool, 7
107
+ optional :share_session_state_in_clusterspec_propagation, :bool, 8
108
+ optional :disable_thread_spinning, :bool, 9
109
+ optional :share_cluster_devices_in_session, :bool, 10
110
+ optional :session_metadata, :message, 11, "tensorflow.SessionMetadata"
111
+ optional :optimize_for_static_graph, :bool, 12
112
+ end
113
+ add_message "tensorflow.RunOptions" do
114
+ optional :trace_level, :enum, 1, "tensorflow.RunOptions.TraceLevel"
115
+ optional :timeout_in_ms, :int64, 2
116
+ optional :inter_op_thread_pool, :int32, 3
117
+ optional :output_partition_graphs, :bool, 5
118
+ optional :debug_options, :message, 6, "tensorflow.DebugOptions"
119
+ optional :report_tensor_allocations_upon_oom, :bool, 7
120
+ optional :experimental, :message, 8, "tensorflow.RunOptions.Experimental"
121
+ end
122
+ add_message "tensorflow.RunOptions.Experimental" do
123
+ optional :collective_graph_key, :int64, 1
124
+ optional :use_run_handler_pool, :bool, 2
125
+ end
126
+ add_enum "tensorflow.RunOptions.TraceLevel" do
127
+ value :NO_TRACE, 0
128
+ value :SOFTWARE_TRACE, 1
129
+ value :HARDWARE_TRACE, 2
130
+ value :FULL_TRACE, 3
131
+ end
132
+ add_message "tensorflow.RunMetadata" do
133
+ optional :step_stats, :message, 1, "tensorflow.StepStats"
134
+ optional :cost_graph, :message, 2, "tensorflow.CostGraphDef"
135
+ repeated :partition_graphs, :message, 3, "tensorflow.GraphDef"
136
+ repeated :function_graphs, :message, 4, "tensorflow.RunMetadata.FunctionGraphs"
137
+ end
138
+ add_message "tensorflow.RunMetadata.FunctionGraphs" do
139
+ repeated :partition_graphs, :message, 1, "tensorflow.GraphDef"
140
+ optional :pre_optimization_graph, :message, 2, "tensorflow.GraphDef"
141
+ optional :post_optimization_graph, :message, 3, "tensorflow.GraphDef"
142
+ end
143
+ add_message "tensorflow.TensorConnection" do
144
+ optional :from_tensor, :string, 1
145
+ optional :to_tensor, :string, 2
146
+ end
147
+ add_message "tensorflow.CallableOptions" do
148
+ repeated :feed, :string, 1
149
+ repeated :fetch, :string, 2
150
+ repeated :target, :string, 3
151
+ optional :run_options, :message, 4, "tensorflow.RunOptions"
152
+ repeated :tensor_connection, :message, 5, "tensorflow.TensorConnection"
153
+ map :feed_devices, :string, :string, 6
154
+ map :fetch_devices, :string, :string, 7
155
+ optional :fetch_skip_sync, :bool, 8
156
+ end
157
+ end
158
+ end
159
+
160
+ module Tensorflow
161
+ GPUOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.GPUOptions").msgclass
162
+ GPUOptions::Experimental = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.GPUOptions.Experimental").msgclass
163
+ GPUOptions::Experimental::VirtualDevices = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.GPUOptions.Experimental.VirtualDevices").msgclass
164
+ OptimizerOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.OptimizerOptions").msgclass
165
+ OptimizerOptions::Level = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.OptimizerOptions.Level").enummodule
166
+ OptimizerOptions::GlobalJitLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.OptimizerOptions.GlobalJitLevel").enummodule
167
+ GraphOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.GraphOptions").msgclass
168
+ ThreadPoolOptionProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ThreadPoolOptionProto").msgclass
169
+ RPCOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RPCOptions").msgclass
170
+ SessionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SessionMetadata").msgclass
171
+ ConfigProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ConfigProto").msgclass
172
+ ConfigProto::Experimental = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ConfigProto.Experimental").msgclass
173
+ RunOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RunOptions").msgclass
174
+ RunOptions::Experimental = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RunOptions.Experimental").msgclass
175
+ RunOptions::TraceLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RunOptions.TraceLevel").enummodule
176
+ RunMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RunMetadata").msgclass
177
+ RunMetadata::FunctionGraphs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RunMetadata.FunctionGraphs").msgclass
178
+ TensorConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TensorConnection").msgclass
179
+ CallableOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.CallableOptions").msgclass
180
+ end
@@ -0,0 +1,48 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/control_flow.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("tensorflow/core/protobuf/control_flow.proto", :syntax => :proto3) do
8
+ add_message "tensorflow.ValuesDef" do
9
+ repeated :values, :string, 1
10
+ map :external_values, :string, :string, 2
11
+ end
12
+ add_message "tensorflow.ControlFlowContextDef" do
13
+ oneof :ctxt do
14
+ optional :cond_ctxt, :message, 1, "tensorflow.CondContextDef"
15
+ optional :while_ctxt, :message, 2, "tensorflow.WhileContextDef"
16
+ end
17
+ end
18
+ add_message "tensorflow.CondContextDef" do
19
+ optional :context_name, :string, 1
20
+ optional :pred_name, :string, 2
21
+ optional :pivot_name, :string, 3
22
+ optional :branch, :int32, 4
23
+ optional :values_def, :message, 5, "tensorflow.ValuesDef"
24
+ repeated :nested_contexts, :message, 6, "tensorflow.ControlFlowContextDef"
25
+ end
26
+ add_message "tensorflow.WhileContextDef" do
27
+ optional :context_name, :string, 1
28
+ optional :parallel_iterations, :int32, 2
29
+ optional :back_prop, :bool, 3
30
+ optional :swap_memory, :bool, 4
31
+ optional :pivot_name, :string, 5
32
+ optional :pivot_for_pred_name, :string, 6
33
+ optional :pivot_for_body_name, :string, 7
34
+ repeated :loop_exit_names, :string, 8
35
+ repeated :loop_enter_names, :string, 10
36
+ optional :values_def, :message, 9, "tensorflow.ValuesDef"
37
+ optional :maximum_iterations_name, :string, 11
38
+ repeated :nested_contexts, :message, 12, "tensorflow.ControlFlowContextDef"
39
+ end
40
+ end
41
+ end
42
+
43
+ module Tensorflow
44
+ ValuesDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ValuesDef").msgclass
45
+ ControlFlowContextDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ControlFlowContextDef").msgclass
46
+ CondContextDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.CondContextDef").msgclass
47
+ WhileContextDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.WhileContextDef").msgclass
48
+ end
@@ -0,0 +1,29 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/conv_autotuning.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/stream_executor/dnn_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("tensorflow/core/protobuf/conv_autotuning.proto", :syntax => :proto3) do
9
+ add_message "tensorflow.ConvolutionProto" do
10
+ optional :kind, :enum, 1, "stream_executor.dnn.ConvolutionKind"
11
+ optional :input, :message, 2, "stream_executor.dnn.TensorDescriptorProto"
12
+ optional :filter, :message, 3, "stream_executor.dnn.TensorDescriptorProto"
13
+ optional :output, :message, 4, "stream_executor.dnn.TensorDescriptorProto"
14
+ optional :conv_desc, :message, 5, "stream_executor.dnn.ConvolutionDescriptorProto"
15
+ optional :conv_scale, :double, 6
16
+ optional :side_value_scale, :double, 7
17
+ optional :activation, :enum, 8, "stream_executor.dnn.ActivationMode"
18
+ optional :input_address, :int64, 9
19
+ optional :filter_address, :int64, 10
20
+ optional :output_address, :int64, 11
21
+ optional :bias_address, :int64, 12
22
+ optional :side_input_address, :int64, 13
23
+ end
24
+ end
25
+ end
26
+
27
+ module Tensorflow
28
+ ConvolutionProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ConvolutionProto").msgclass
29
+ end
@@ -0,0 +1,21 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/critical_section.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("tensorflow/core/protobuf/critical_section.proto", :syntax => :proto3) do
8
+ add_message "tensorflow.CriticalSectionDef" do
9
+ optional :critical_section_name, :string, 1
10
+ end
11
+ add_message "tensorflow.CriticalSectionExecutionDef" do
12
+ optional :execute_in_critical_section_name, :string, 1
13
+ optional :exclusive_resource_access, :bool, 2
14
+ end
15
+ end
16
+ end
17
+
18
+ module Tensorflow
19
+ CriticalSectionDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.CriticalSectionDef").msgclass
20
+ CriticalSectionExecutionDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.CriticalSectionExecutionDef").msgclass
21
+ end
@@ -0,0 +1,38 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/debug.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("tensorflow/core/protobuf/debug.proto", :syntax => :proto3) do
8
+ add_message "tensorflow.DebugTensorWatch" do
9
+ optional :node_name, :string, 1
10
+ optional :output_slot, :int32, 2
11
+ repeated :debug_ops, :string, 3
12
+ repeated :debug_urls, :string, 4
13
+ optional :tolerate_debug_op_creation_failures, :bool, 5
14
+ end
15
+ add_message "tensorflow.DebugOptions" do
16
+ repeated :debug_tensor_watch_opts, :message, 4, "tensorflow.DebugTensorWatch"
17
+ optional :global_step, :int64, 10
18
+ optional :reset_disk_byte_usage, :bool, 11
19
+ end
20
+ add_message "tensorflow.DebuggedSourceFile" do
21
+ optional :host, :string, 1
22
+ optional :file_path, :string, 2
23
+ optional :last_modified, :int64, 3
24
+ optional :bytes, :int64, 4
25
+ repeated :lines, :string, 5
26
+ end
27
+ add_message "tensorflow.DebuggedSourceFiles" do
28
+ repeated :source_files, :message, 1, "tensorflow.DebuggedSourceFile"
29
+ end
30
+ end
31
+ end
32
+
33
+ module Tensorflow
34
+ DebugTensorWatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.DebugTensorWatch").msgclass
35
+ DebugOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.DebugOptions").msgclass
36
+ DebuggedSourceFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.DebuggedSourceFile").msgclass
37
+ DebuggedSourceFiles = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.DebuggedSourceFiles").msgclass
38
+ end
@@ -0,0 +1,33 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/device_properties.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("tensorflow/core/protobuf/device_properties.proto", :syntax => :proto3) do
8
+ add_message "tensorflow.DeviceProperties" do
9
+ optional :type, :string, 1
10
+ optional :vendor, :string, 2
11
+ optional :model, :string, 3
12
+ optional :frequency, :int64, 4
13
+ optional :num_cores, :int64, 5
14
+ map :environment, :string, :string, 6
15
+ optional :num_registers, :int64, 7
16
+ optional :l1_cache_size, :int64, 8
17
+ optional :l2_cache_size, :int64, 9
18
+ optional :l3_cache_size, :int64, 10
19
+ optional :shared_memory_size_per_multiprocessor, :int64, 11
20
+ optional :memory_size, :int64, 12
21
+ optional :bandwidth, :int64, 13
22
+ end
23
+ add_message "tensorflow.NamedDevice" do
24
+ optional :name, :string, 1
25
+ optional :properties, :message, 2, "tensorflow.DeviceProperties"
26
+ end
27
+ end
28
+ end
29
+
30
+ module Tensorflow
31
+ DeviceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.DeviceProperties").msgclass
32
+ NamedDevice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.NamedDevice").msgclass
33
+ end