Description
Hi, I am sorry that I am so confused. I gather that most high level tensor operations have to be done using the single function einsum, I'm OK with that, for instance the square of a matrix x is einsum("ij,jk->ik",x,x). Also that grad() is a function that takes as input a function from tensors to tensors and outputs another one. So my "Hello World" for tensorflow.js would be
f=function(x){return tf.einsum("ij,jk->ik",x,x)};tf.grad(f)(tf.tensor([[1,2],[3,4]]))
which defines f to be the function on tensors of type (2,2) otherwise known as squaring the matrix, and it does not give any problem evaluating grad(f) on tf.tensor([[1,2],[3,4]]) but it says "gradient function not found for Einsum"
How can this be, that essentially the ONLY function operating on tensors which is provided is einsum, and grad ONLY operates on such functions, but it cannot "FIND" the gradient function for einsum????
I see this was asked earlier in 2019 with no answer except that someone checked einsum exists, come on, I am so frustrated. HOW CAN IT BE POSSIBLE THAT THE ONLY TENSOR OPERATION ALLOWED IS EINSUM, AND grad() CAN ONLY ACT ON TENSOR OPERATIONS, WHILE grad of einsum CANNOT BE FOUND!
I am so frustrated by this. It is like trying to do a 'hello world' and being told you must use the command print() but print() is not yet implemented for strings, while it is only implemented for strings.
Sorry bo be so dumb but did you guys really make an implementation of tensorflow with no other tensor operator but einsum, and grad only acting on tensor operators, but not yet defined for einsum?
I won't attach a file, but the error is caused by a script with just this line
f=function(x){return tf.einsum("ij,jk->ik",x,x)};tf.grad(f)(tf.tensor([[1,2],[3,4]]))