Mmd1 And Mmd2

0 views
Skip to first unread message

Taj Barnett

unread,
Aug 4, 2024, 9:41:27 PM8/4/24
to tiarafdela
Iam trying to figure out why sometimes tf.GradientTape().gradient returns None, so I used the below three loss functions(mmd0(), mmd1(), mmd2()), although the formats are a bit different for mmd0 and mmd1, the gradients are still returned, but for mmd2, the gradients are None. I print out the loss from those three function, does anyone why why it behaves like this?

Have you seen this answer? I think I'm having a similar issue, and I believe that your might be related to mine. It has to do with the loss that is computed with a step somewhere in the process where the tensor of interest is "lost" from the start of the tape to the end. The referenced answer notes that the original poster had an area where a numpy array was returned instead of a tensorflow tensor, thus leading to the Gradient Tape failing to compute the gradient.

3a8082e126
Reply all
Reply to author
Forward
0 new messages