Tensorflow.LookupError : No gradient defined for operation 'Rsqrt' (op type: Rsqrt)
Hello,
I am trying to use batch_normalization.
I tried 2 way and got the same error.
First way:
nn_impl.batch_normalization(y, batchMean, batchVar, beta, gamma, epsilon);
Second way:
protected Tensor BatchNorm(Tensor x, Tensor gamma, Tensor beta, Tensor movingMean, Tensor movingVar, float eps)
{
var inv = tf.cast(math_ops.rsqrt(movingVar + eps), x.dtype);
inv *= gamma;
return x * inv + (beta - movingMean * inv);
}
THNX!!!
Hello, Another issue with gradient :( Tensorflow.LookupError : No gradient defined for operation 'Elu' (op type: Elu)
Sovled? batch_normalization trouble -----( version Tensorflow.NET 0.40.1 Tensorflow.Keras 0.5.1) I need your help. like some example code about using BN function in NeuralNetwork Code. Thanks.
same thing i used nn_impl.batch_normalization but :No gradient
Hello, I have used function where I manually register gradient.
ops.RegisterGradientFunction("Elu", (oper, out_grads) =>
{
var y = oper.outputs[0];
return new[] { gen_ops.elu_grad(out_grads[0], y) };
});
Hello, I have used function where I manually register gradient.
ops.RegisterGradientFunction("Elu", (oper, out_grads) => { var y = oper.outputs[0]; return new[] { gen_ops.elu_grad(out_grads[0], y) }; });
Thank you so much!
A custom gradient function? Cool But It doesn't sound easy for me. what a pity. I'm Freshmen, I don't even know where this code should be.
@UCtreespring Hi, just call it in constructor before creating/loading graph.