README.md in tensor_stream-0.1.3 vs README.md in tensor_stream-0.1.4

- old
+ new

@@ -1,5 +1,7 @@ +[![Gem Version](https://badge.fury.io/rb/tensor_stream.svg)](https://badge.fury.io/rb/tensor_stream) + # TensorStream A reimplementation of TensorFlow for ruby. This is a ground up implementation with no dependency on TensorFlow. Effort has been made to make the programming style as near to TensorFlow as possible, comes with a pure ruby evaluator by default as well with support for an opencl evaluator. The goal of this gem is to have a high performance machine learning and compute solution for ruby with support for a wide range of hardware and software configuration. @@ -92,12 +94,16 @@ puts("Training cost=", training_cost, "W=", sess.run(W), "b=", sess.run(b), '\n') puts("time elapsed ", Time.now.to_i - start_time.to_i) end ``` -## python to ruby guide +You can take a look at spec/tensor_stream/operation_spec.rb for a list of supported ops and various examples and test cases used. Of course these contain only a +sliver of what TensorFlow can do, so feel free to file a PR to add requested +ops and test cases. +## Python to Ruby guide + Not all ops are available. Available ops are defined in lib/tensor_stream/ops.rb, corresponding gradients are found at lib/tensor_stream/math_gradients. There are also certain differences with regards to naming conventions, and named parameters: # Variables @@ -120,11 +126,11 @@ ``` Ruby ```ruby -w =tf.variable(0, name: 'weights') +w = tf.variable(0, name: 'weights') ``` # Shapes Python @@ -148,10 +154,10 @@ Y = tf.placeholder("float") W = tf.variable(rand, name: "weight") b = tf.variable(rand, name: "bias") pred = X * W + b cost = tf.reduce_sum(tf.pow(pred - Y, 2)) / ( 2 * 10) -cost.to_math # "(reduce_sum(|((((Placeholder: * weight) + bias) - Placeholder_2:)^2)|) / 10.0)" +cost.to_math # "(reduce_sum(|((((Placeholder: * weight) + bias) - Placeholder_2:)^2)|) / 20.0)" ``` breakpoints can also be set, block will be evaluated during computation ```ruby