tensor_stream 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,7 +9,7 @@ Project: https://github.com/aymericdamien/TensorFlow-Examples/
9
9
  require "bundler/setup"
10
10
  require 'tensor_stream'
11
11
  require 'mnist-learn'
12
- require 'tensor_stream/evaluator/opencl_evaluator'
12
+ require 'tensor_stream/evaluator/opencl/opencl_evaluator'
13
13
 
14
14
  tf = TensorStream
15
15
 
@@ -13,7 +13,7 @@ Project: https://github.com/aymericdamien/TensorFlow-Examples/
13
13
  require "bundler/setup"
14
14
  require 'tensor_stream'
15
15
  require 'mnist-learn'
16
- require 'tensor_stream/evaluator/opencl_evaluator'
16
+ require 'tensor_stream/evaluator/opencl/opencl_evaluator'
17
17
  require 'pry-byebug'
18
18
 
19
19
  tf = TensorStream
@@ -66,7 +66,7 @@ logits = neural_net(X, weights, biases)
66
66
  prediction = tf.nn.softmax(logits)
67
67
 
68
68
  # Define loss and optimizer
69
- loss_op = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(
69
+ loss_op = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits_v2(
70
70
  logits: logits, labels: Y))
71
71
 
72
72
  optimizer = TensorStream::Train::GradientDescentOptimizer.new(learning_rate)
@@ -90,15 +90,14 @@ tf.session do |sess|
90
90
 
91
91
  batch_x, batch_y = mnist.train.next_batch(batch_size)
92
92
  # Run optimization op (backprop)
93
- puts "...."
93
+ puts "."
94
94
  sess.run(train_op, feed_dict: { X => batch_x, Y => batch_y })
95
- puts "----"
96
95
  if step % display_step == 0 || step == 1
97
96
  # Calculate batch loss and accuracy
98
97
  loss, acc = sess.run([loss_op, accuracy], feed_dict: { X => batch_x, Y => batch_y})
99
- print("Step " + str(step) + ", Minibatch Loss= " + \
100
- "{:.4f}".format(loss) + ", Training Accuracy= " + \
101
- "{:.3f}".format(acc))
98
+ print("Step " + step.to_s + ", Minibatch Loss= " + \
99
+ loss.to_s + ", Training Accuracy= " + \
100
+ acc.to_s)
102
101
  end
103
102
  end
104
103
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tensor_stream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Emmanuel Dayo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-26 00:00:00.000000000 Z
11
+ date: 2018-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -232,12 +232,14 @@ files:
232
232
  - benchmark/benchmark.rb
233
233
  - benchmark_intel.txt
234
234
  - benchmark_nvidia.txt
235
+ - benchmark_ryzen_amd.txt
235
236
  - bin/console
236
237
  - bin/setup
237
238
  - lib/tensor_stream.rb
238
239
  - lib/tensor_stream/control_flow.rb
239
240
  - lib/tensor_stream/debugging/debugging.rb
240
241
  - lib/tensor_stream/device.rb
242
+ - lib/tensor_stream/dynamic_stitch.rb
241
243
  - lib/tensor_stream/evaluator/base_evaluator.rb
242
244
  - lib/tensor_stream/evaluator/buffer.rb
243
245
  - lib/tensor_stream/evaluator/evaluator.rb
@@ -254,10 +256,12 @@ files:
254
256
  - lib/tensor_stream/evaluator/opencl/kernels/div.cl.erb
255
257
  - lib/tensor_stream/evaluator/opencl/kernels/exp.cl
256
258
  - lib/tensor_stream/evaluator/opencl/kernels/floor.cl
259
+ - lib/tensor_stream/evaluator/opencl/kernels/floor_div.cl
257
260
  - lib/tensor_stream/evaluator/opencl/kernels/gemm.cl
258
261
  - lib/tensor_stream/evaluator/opencl/kernels/log.cl
259
262
  - lib/tensor_stream/evaluator/opencl/kernels/log1p.cl
260
263
  - lib/tensor_stream/evaluator/opencl/kernels/max.cl
264
+ - lib/tensor_stream/evaluator/opencl/kernels/mod.cl
261
265
  - lib/tensor_stream/evaluator/opencl/kernels/mul.cl
262
266
  - lib/tensor_stream/evaluator/opencl/kernels/negate.cl
263
267
  - lib/tensor_stream/evaluator/opencl/kernels/pow.cl
@@ -271,6 +275,7 @@ files:
271
275
  - lib/tensor_stream/evaluator/opencl/kernels/softmax_grad.cl
272
276
  - lib/tensor_stream/evaluator/opencl/kernels/sqrt.cl
273
277
  - lib/tensor_stream/evaluator/opencl/kernels/square.cl
278
+ - lib/tensor_stream/evaluator/opencl/kernels/squared_difference.cl
274
279
  - lib/tensor_stream/evaluator/opencl/kernels/sub.cl
275
280
  - lib/tensor_stream/evaluator/opencl/kernels/tan.cl
276
281
  - lib/tensor_stream/evaluator/opencl/kernels/tanh.cl
@@ -342,7 +347,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
342
347
  version: '0'
343
348
  requirements: []
344
349
  rubyforge_project:
345
- rubygems_version: 2.6.11
350
+ rubygems_version: 2.7.7
346
351
  signing_key:
347
352
  specification_version: 4
348
353
  summary: A Pure ruby tensorflow implementation