In R, I have been trying to use Tensorflow math functions. My issue is I can't figure out how to enter arguments into the tensorflow functions like you can with Python.
For example, how can I do the tensorflowdot
function?
x = tf$constant(c(1, 2, 3))
y = tf$constant(c(9, 8, 7))
tf$tensordot(x, y, axes = 1)
Error in py_call_impl(callable, dots$args, dots$keywords) :
TypeError: Cannot convert 1.0 to EagerTensor of dtype int32
I can reproduce the output of tensordot
manually, but I want to use the built in
tf$reduce_sum(x * y)