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,81 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/rewriter_config.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/framework/attr_value_pb'
7
+ require 'tensorflow/core/protobuf/verifier_config_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("tensorflow/core/protobuf/rewriter_config.proto", :syntax => :proto3) do
10
+ add_message "tensorflow.AutoParallelOptions" do
11
+ optional :enable, :bool, 1
12
+ optional :num_replicas, :int32, 2
13
+ end
14
+ add_message "tensorflow.ScopedAllocatorOptions" do
15
+ repeated :enable_op, :string, 1
16
+ end
17
+ add_message "tensorflow.RewriterConfig" do
18
+ optional :layout_optimizer, :enum, 1, "tensorflow.RewriterConfig.Toggle"
19
+ optional :constant_folding, :enum, 3, "tensorflow.RewriterConfig.Toggle"
20
+ optional :shape_optimization, :enum, 13, "tensorflow.RewriterConfig.Toggle"
21
+ optional :remapping, :enum, 14, "tensorflow.RewriterConfig.Toggle"
22
+ optional :arithmetic_optimization, :enum, 7, "tensorflow.RewriterConfig.Toggle"
23
+ optional :dependency_optimization, :enum, 8, "tensorflow.RewriterConfig.Toggle"
24
+ optional :loop_optimization, :enum, 9, "tensorflow.RewriterConfig.Toggle"
25
+ optional :function_optimization, :enum, 10, "tensorflow.RewriterConfig.Toggle"
26
+ optional :debug_stripper, :enum, 11, "tensorflow.RewriterConfig.Toggle"
27
+ optional :disable_model_pruning, :bool, 2
28
+ optional :scoped_allocator_optimization, :enum, 15, "tensorflow.RewriterConfig.Toggle"
29
+ optional :pin_to_host_optimization, :enum, 18, "tensorflow.RewriterConfig.Toggle"
30
+ optional :implementation_selector, :enum, 22, "tensorflow.RewriterConfig.Toggle"
31
+ optional :auto_mixed_precision, :enum, 23, "tensorflow.RewriterConfig.Toggle"
32
+ optional :disable_meta_optimizer, :bool, 19
33
+ optional :meta_optimizer_iterations, :enum, 12, "tensorflow.RewriterConfig.NumIterationsType"
34
+ optional :min_graph_nodes, :int32, 17
35
+ optional :memory_optimization, :enum, 4, "tensorflow.RewriterConfig.MemOptType"
36
+ optional :memory_optimizer_target_node_name_scope, :string, 6
37
+ optional :meta_optimizer_timeout_ms, :int64, 20
38
+ optional :auto_parallel, :message, 5, "tensorflow.AutoParallelOptions"
39
+ optional :fail_on_optimizer_errors, :bool, 21
40
+ optional :scoped_allocator_opts, :message, 16, "tensorflow.ScopedAllocatorOptions"
41
+ repeated :optimizers, :string, 100
42
+ repeated :custom_optimizers, :message, 200, "tensorflow.RewriterConfig.CustomGraphOptimizer"
43
+ optional :inter_optimizer_verifier_config, :message, 300, "tensorflow.VerifierConfig"
44
+ optional :post_optimization_verifier_config, :message, 301, "tensorflow.VerifierConfig"
45
+ end
46
+ add_message "tensorflow.RewriterConfig.CustomGraphOptimizer" do
47
+ optional :name, :string, 1
48
+ map :parameter_map, :string, :message, 2, "tensorflow.AttrValue"
49
+ end
50
+ add_enum "tensorflow.RewriterConfig.Toggle" do
51
+ value :DEFAULT, 0
52
+ value :ON, 1
53
+ value :OFF, 2
54
+ value :AGGRESSIVE, 3
55
+ end
56
+ add_enum "tensorflow.RewriterConfig.NumIterationsType" do
57
+ value :DEFAULT_NUM_ITERS, 0
58
+ value :ONE, 1
59
+ value :TWO, 2
60
+ end
61
+ add_enum "tensorflow.RewriterConfig.MemOptType" do
62
+ value :DEFAULT_MEM_OPT, 0
63
+ value :NO_MEM_OPT, 1
64
+ value :MANUAL, 2
65
+ value :SWAPPING_HEURISTICS, 4
66
+ value :RECOMPUTATION_HEURISTICS, 5
67
+ value :SCHEDULING_HEURISTICS, 6
68
+ value :HEURISTICS, 3
69
+ end
70
+ end
71
+ end
72
+
73
+ module Tensorflow
74
+ AutoParallelOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.AutoParallelOptions").msgclass
75
+ ScopedAllocatorOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ScopedAllocatorOptions").msgclass
76
+ RewriterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RewriterConfig").msgclass
77
+ RewriterConfig::CustomGraphOptimizer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RewriterConfig.CustomGraphOptimizer").msgclass
78
+ RewriterConfig::Toggle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RewriterConfig.Toggle").enummodule
79
+ RewriterConfig::NumIterationsType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RewriterConfig.NumIterationsType").enummodule
80
+ RewriterConfig::MemOptType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RewriterConfig.MemOptType").enummodule
81
+ end
@@ -0,0 +1,18 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/saved_model.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/protobuf/meta_graph_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("tensorflow/core/protobuf/saved_model.proto", :syntax => :proto3) do
9
+ add_message "tensorflow.SavedModel" do
10
+ optional :saved_model_schema_version, :int64, 1
11
+ repeated :meta_graphs, :message, 2, "tensorflow.MetaGraphDef"
12
+ end
13
+ end
14
+ end
15
+
16
+ module Tensorflow
17
+ SavedModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SavedModel").msgclass
18
+ end
@@ -0,0 +1,87 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/saved_object_graph.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/protobuf/trackable_object_graph_pb'
7
+ require 'tensorflow/core/protobuf/struct_pb'
8
+ require 'tensorflow/core/framework/tensor_shape_pb'
9
+ require 'tensorflow/core/framework/types_pb'
10
+ require 'tensorflow/core/framework/versions_pb'
11
+ require 'tensorflow/core/framework/variable_pb'
12
+ Google::Protobuf::DescriptorPool.generated_pool.build do
13
+ add_file("tensorflow/core/protobuf/saved_object_graph.proto", :syntax => :proto3) do
14
+ add_message "tensorflow.SavedObjectGraph" do
15
+ repeated :nodes, :message, 1, "tensorflow.SavedObject"
16
+ map :concrete_functions, :string, :message, 2, "tensorflow.SavedConcreteFunction"
17
+ end
18
+ add_message "tensorflow.SavedObject" do
19
+ repeated :children, :message, 1, "tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference"
20
+ repeated :slot_variables, :message, 3, "tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference"
21
+ oneof :kind do
22
+ optional :user_object, :message, 4, "tensorflow.SavedUserObject"
23
+ optional :asset, :message, 5, "tensorflow.SavedAsset"
24
+ optional :function, :message, 6, "tensorflow.SavedFunction"
25
+ optional :variable, :message, 7, "tensorflow.SavedVariable"
26
+ optional :bare_concrete_function, :message, 8, "tensorflow.SavedBareConcreteFunction"
27
+ optional :constant, :message, 9, "tensorflow.SavedConstant"
28
+ optional :resource, :message, 10, "tensorflow.SavedResource"
29
+ end
30
+ end
31
+ add_message "tensorflow.SavedUserObject" do
32
+ optional :identifier, :string, 1
33
+ optional :version, :message, 2, "tensorflow.VersionDef"
34
+ optional :metadata, :string, 3
35
+ end
36
+ add_message "tensorflow.SavedAsset" do
37
+ optional :asset_file_def_index, :int32, 1
38
+ end
39
+ add_message "tensorflow.SavedFunction" do
40
+ repeated :concrete_functions, :string, 1
41
+ optional :function_spec, :message, 2, "tensorflow.FunctionSpec"
42
+ end
43
+ add_message "tensorflow.SavedConcreteFunction" do
44
+ repeated :bound_inputs, :int32, 2
45
+ optional :canonicalized_input_signature, :message, 3, "tensorflow.StructuredValue"
46
+ optional :output_signature, :message, 4, "tensorflow.StructuredValue"
47
+ end
48
+ add_message "tensorflow.SavedBareConcreteFunction" do
49
+ optional :concrete_function_name, :string, 1
50
+ repeated :argument_keywords, :string, 2
51
+ optional :allowed_positional_arguments, :int64, 3
52
+ end
53
+ add_message "tensorflow.SavedConstant" do
54
+ optional :operation, :string, 1
55
+ end
56
+ add_message "tensorflow.SavedVariable" do
57
+ optional :dtype, :enum, 1, "tensorflow.DataType"
58
+ optional :shape, :message, 2, "tensorflow.TensorShapeProto"
59
+ optional :trainable, :bool, 3
60
+ optional :synchronization, :enum, 4, "tensorflow.VariableSynchronization"
61
+ optional :aggregation, :enum, 5, "tensorflow.VariableAggregation"
62
+ optional :name, :string, 6
63
+ end
64
+ add_message "tensorflow.FunctionSpec" do
65
+ optional :fullargspec, :message, 1, "tensorflow.StructuredValue"
66
+ optional :is_method, :bool, 2
67
+ optional :input_signature, :message, 5, "tensorflow.StructuredValue"
68
+ end
69
+ add_message "tensorflow.SavedResource" do
70
+ optional :device, :string, 1
71
+ end
72
+ end
73
+ end
74
+
75
+ module Tensorflow
76
+ SavedObjectGraph = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SavedObjectGraph").msgclass
77
+ SavedObject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SavedObject").msgclass
78
+ SavedUserObject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SavedUserObject").msgclass
79
+ SavedAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SavedAsset").msgclass
80
+ SavedFunction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SavedFunction").msgclass
81
+ SavedConcreteFunction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SavedConcreteFunction").msgclass
82
+ SavedBareConcreteFunction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SavedBareConcreteFunction").msgclass
83
+ SavedConstant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SavedConstant").msgclass
84
+ SavedVariable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SavedVariable").msgclass
85
+ FunctionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.FunctionSpec").msgclass
86
+ SavedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SavedResource").msgclass
87
+ end
@@ -0,0 +1,28 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/saver.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("tensorflow/core/protobuf/saver.proto", :syntax => :proto3) do
8
+ add_message "tensorflow.SaverDef" do
9
+ optional :filename_tensor_name, :string, 1
10
+ optional :save_tensor_name, :string, 2
11
+ optional :restore_op_name, :string, 3
12
+ optional :max_to_keep, :int32, 4
13
+ optional :sharded, :bool, 5
14
+ optional :keep_checkpoint_every_n_hours, :float, 6
15
+ optional :version, :enum, 7, "tensorflow.SaverDef.CheckpointFormatVersion"
16
+ end
17
+ add_enum "tensorflow.SaverDef.CheckpointFormatVersion" do
18
+ value :LEGACY, 0
19
+ value :V1, 1
20
+ value :V2, 2
21
+ end
22
+ end
23
+ end
24
+
25
+ module Tensorflow
26
+ SaverDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SaverDef").msgclass
27
+ SaverDef::CheckpointFormatVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.SaverDef.CheckpointFormatVersion").enummodule
28
+ end
@@ -0,0 +1,81 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/struct.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/protobuf/struct.proto", :syntax => :proto3) do
10
+ add_message "tensorflow.StructuredValue" do
11
+ oneof :kind do
12
+ optional :none_value, :message, 1, "tensorflow.NoneValue"
13
+ optional :float64_value, :double, 11
14
+ optional :int64_value, :sint64, 12
15
+ optional :string_value, :string, 13
16
+ optional :bool_value, :bool, 14
17
+ optional :tensor_shape_value, :message, 31, "tensorflow.TensorShapeProto"
18
+ optional :tensor_dtype_value, :enum, 32, "tensorflow.DataType"
19
+ optional :tensor_spec_value, :message, 33, "tensorflow.TensorSpecProto"
20
+ optional :type_spec_value, :message, 34, "tensorflow.TypeSpecProto"
21
+ optional :list_value, :message, 51, "tensorflow.ListValue"
22
+ optional :tuple_value, :message, 52, "tensorflow.TupleValue"
23
+ optional :dict_value, :message, 53, "tensorflow.DictValue"
24
+ optional :named_tuple_value, :message, 54, "tensorflow.NamedTupleValue"
25
+ end
26
+ end
27
+ add_message "tensorflow.NoneValue" do
28
+ end
29
+ add_message "tensorflow.ListValue" do
30
+ repeated :values, :message, 1, "tensorflow.StructuredValue"
31
+ end
32
+ add_message "tensorflow.TupleValue" do
33
+ repeated :values, :message, 1, "tensorflow.StructuredValue"
34
+ end
35
+ add_message "tensorflow.DictValue" do
36
+ map :fields, :string, :message, 1, "tensorflow.StructuredValue"
37
+ end
38
+ add_message "tensorflow.PairValue" do
39
+ optional :key, :string, 1
40
+ optional :value, :message, 2, "tensorflow.StructuredValue"
41
+ end
42
+ add_message "tensorflow.NamedTupleValue" do
43
+ optional :name, :string, 1
44
+ repeated :values, :message, 2, "tensorflow.PairValue"
45
+ end
46
+ add_message "tensorflow.TensorSpecProto" do
47
+ optional :name, :string, 1
48
+ optional :shape, :message, 2, "tensorflow.TensorShapeProto"
49
+ optional :dtype, :enum, 3, "tensorflow.DataType"
50
+ end
51
+ add_message "tensorflow.TypeSpecProto" do
52
+ optional :type_spec_class, :enum, 1, "tensorflow.TypeSpecProto.TypeSpecClass"
53
+ optional :type_state, :message, 2, "tensorflow.StructuredValue"
54
+ optional :type_spec_class_name, :string, 3
55
+ end
56
+ add_enum "tensorflow.TypeSpecProto.TypeSpecClass" do
57
+ value :UNKNOWN, 0
58
+ value :SPARSE_TENSOR_SPEC, 1
59
+ value :INDEXED_SLICES_SPEC, 2
60
+ value :RAGGED_TENSOR_SPEC, 3
61
+ value :TENSOR_ARRAY_SPEC, 4
62
+ value :DATA_DATASET_SPEC, 5
63
+ value :DATA_ITERATOR_SPEC, 6
64
+ value :OPTIONAL_SPEC, 7
65
+ value :PER_REPLICA_SPEC, 8
66
+ end
67
+ end
68
+ end
69
+
70
+ module Tensorflow
71
+ StructuredValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.StructuredValue").msgclass
72
+ NoneValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.NoneValue").msgclass
73
+ ListValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ListValue").msgclass
74
+ TupleValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TupleValue").msgclass
75
+ DictValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.DictValue").msgclass
76
+ PairValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.PairValue").msgclass
77
+ NamedTupleValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.NamedTupleValue").msgclass
78
+ TensorSpecProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TensorSpecProto").msgclass
79
+ TypeSpecProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TypeSpecProto").msgclass
80
+ TypeSpecProto::TypeSpecClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TypeSpecProto.TypeSpecClass").enummodule
81
+ end
@@ -0,0 +1,37 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/tensor_bundle.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/framework/tensor_shape_pb'
7
+ require 'tensorflow/core/framework/tensor_slice_pb'
8
+ require 'tensorflow/core/framework/types_pb'
9
+ require 'tensorflow/core/framework/versions_pb'
10
+ Google::Protobuf::DescriptorPool.generated_pool.build do
11
+ add_file("tensorflow/core/protobuf/tensor_bundle.proto", :syntax => :proto3) do
12
+ add_message "tensorflow.BundleHeaderProto" do
13
+ optional :num_shards, :int32, 1
14
+ optional :endianness, :enum, 2, "tensorflow.BundleHeaderProto.Endianness"
15
+ optional :version, :message, 3, "tensorflow.VersionDef"
16
+ end
17
+ add_enum "tensorflow.BundleHeaderProto.Endianness" do
18
+ value :LITTLE, 0
19
+ value :BIG, 1
20
+ end
21
+ add_message "tensorflow.BundleEntryProto" do
22
+ optional :dtype, :enum, 1, "tensorflow.DataType"
23
+ optional :shape, :message, 2, "tensorflow.TensorShapeProto"
24
+ optional :shard_id, :int32, 3
25
+ optional :offset, :int64, 4
26
+ optional :size, :int64, 5
27
+ optional :crc32c, :fixed32, 6
28
+ repeated :slices, :message, 7, "tensorflow.TensorSliceProto"
29
+ end
30
+ end
31
+ end
32
+
33
+ module Tensorflow
34
+ BundleHeaderProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.BundleHeaderProto").msgclass
35
+ BundleHeaderProto::Endianness = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.BundleHeaderProto.Endianness").enummodule
36
+ BundleEntryProto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.BundleEntryProto").msgclass
37
+ end
@@ -0,0 +1,22 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/tensorflow_server.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'tensorflow/core/protobuf/config_pb'
7
+ require 'tensorflow/core/protobuf/cluster_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("tensorflow/core/protobuf/tensorflow_server.proto", :syntax => :proto3) do
10
+ add_message "tensorflow.ServerDef" do
11
+ optional :cluster, :message, 1, "tensorflow.ClusterDef"
12
+ optional :job_name, :string, 2
13
+ optional :task_index, :int32, 3
14
+ optional :default_session_config, :message, 4, "tensorflow.ConfigProto"
15
+ optional :protocol, :string, 5
16
+ end
17
+ end
18
+ end
19
+
20
+ module Tensorflow
21
+ ServerDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.ServerDef").msgclass
22
+ end
@@ -0,0 +1,39 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/trace_events.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("tensorflow/core/protobuf/trace_events.proto", :syntax => :proto3) do
8
+ add_message "tensorflow.profiler.Trace" do
9
+ map :devices, :uint32, :message, 1, "tensorflow.profiler.Device"
10
+ repeated :trace_events, :message, 4, "tensorflow.profiler.TraceEvent"
11
+ end
12
+ add_message "tensorflow.profiler.Device" do
13
+ optional :name, :string, 1
14
+ optional :device_id, :uint32, 2
15
+ map :resources, :uint32, :message, 3, "tensorflow.profiler.Resource"
16
+ end
17
+ add_message "tensorflow.profiler.Resource" do
18
+ optional :name, :string, 1
19
+ optional :resource_id, :uint32, 2
20
+ end
21
+ add_message "tensorflow.profiler.TraceEvent" do
22
+ optional :device_id, :uint32, 1
23
+ optional :resource_id, :uint32, 2
24
+ optional :name, :string, 3
25
+ optional :timestamp_ps, :uint64, 9
26
+ optional :duration_ps, :uint64, 10
27
+ map :args, :string, :string, 11
28
+ end
29
+ end
30
+ end
31
+
32
+ module Tensorflow
33
+ module Profiler
34
+ Trace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.profiler.Trace").msgclass
35
+ Device = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.profiler.Device").msgclass
36
+ Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.profiler.Resource").msgclass
37
+ TraceEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.profiler.TraceEvent").msgclass
38
+ end
39
+ end
@@ -0,0 +1,40 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/trackable_object_graph.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("tensorflow/core/protobuf/trackable_object_graph.proto", :syntax => :proto3) do
8
+ add_message "tensorflow.TrackableObjectGraph" do
9
+ repeated :nodes, :message, 1, "tensorflow.TrackableObjectGraph.TrackableObject"
10
+ end
11
+ add_message "tensorflow.TrackableObjectGraph.TrackableObject" do
12
+ repeated :children, :message, 1, "tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference"
13
+ repeated :attributes, :message, 2, "tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor"
14
+ repeated :slot_variables, :message, 3, "tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference"
15
+ end
16
+ add_message "tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference" do
17
+ optional :node_id, :int32, 1
18
+ optional :local_name, :string, 2
19
+ end
20
+ add_message "tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor" do
21
+ optional :name, :string, 1
22
+ optional :full_name, :string, 2
23
+ optional :checkpoint_key, :string, 3
24
+ optional :optional_restore, :bool, 4
25
+ end
26
+ add_message "tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference" do
27
+ optional :original_variable_node_id, :int32, 1
28
+ optional :slot_name, :string, 2
29
+ optional :slot_variable_node_id, :int32, 3
30
+ end
31
+ end
32
+ end
33
+
34
+ module Tensorflow
35
+ TrackableObjectGraph = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TrackableObjectGraph").msgclass
36
+ TrackableObjectGraph::TrackableObject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TrackableObjectGraph.TrackableObject").msgclass
37
+ TrackableObjectGraph::TrackableObject::ObjectReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference").msgclass
38
+ TrackableObjectGraph::TrackableObject::SerializedTensor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor").msgclass
39
+ TrackableObjectGraph::TrackableObject::SlotVariableReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference").msgclass
40
+ end
@@ -0,0 +1,16 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: tensorflow/core/protobuf/transport_options.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("tensorflow/core/protobuf/transport_options.proto", :syntax => :proto3) do
8
+ add_message "tensorflow.RecvBufRespExtra" do
9
+ repeated :tensor_content, :bytes, 1
10
+ end
11
+ end
12
+ end
13
+
14
+ module Tensorflow
15
+ RecvBufRespExtra = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensorflow.RecvBufRespExtra").msgclass
16
+ end