Closed samgooi4189 closed 5 years ago
matmul requires at least rank(2) tensors (2 dimensional) and as this is matrix multiplication the shapes must be compatible.
For your example to work, it should be:
require 'tensor_stream'
ts = TensorStream
a = ts.constant([[2,2]])
b = ts.constant([[3],[3]])
f = ts.matmul(a,b, name: 'abc')
ts.session.run(f)
I am currently following the steps in the README, and having issue with matmul
My code is
From the gem code (/lib/tensor_stream/evaluator/ruby/math_ops.rb),
Maybe get_rank(matrix_a, 1) ?