I’m doing the gradient tape exercise and found that x = tf.constant(3.0) doesn’t work for the nested gradient tape. The error code is as follows:
Target should be a list or nested structure of Tensors or Variables to be differentiated, but recieved None
However, when I changed to tf.Variable(3.0), it worked just fine!
Does anyone know the reason? Thanks!