This operators aren’t compatible with  GradientTape in which needs a context as input. Check example below.
Tape tape(/persistent=/false);
tape.Watch(inputs[0]);
AbstractTensorHandle* neg_output;
TF_RETURN_IF_ERROR(ops::Neg(ctx, inputs[0], &neg_output, “Neg”));
tape.RecordOperation(inputs, {neg_output}, nullptr, “Neg”);