I am trying to reproduce COSTA/VAE code to make it run on tf2.x and Keras 2.x rather than 1.x. however, I am facing problem in combining Keras loss (which are tensors) with some intermediate layer outputs (which are KerasTensors).
the error is occured in this line
gan.add_loss(gan_loss(y_true,y_pred,a,ap,b,bp)) <------ HERE IS THE PROBLEM
gan.compile(optimizer=opt, loss=None)
Note: the code works fine if i removed either y_true,y_pred or a,ap,b,bp from the calculation of loss function, but it throws an error if i used them together in the calculation of loss function
the Question: What shall i send for y_true and y_pred as they are implicitly send if we follow the standard form of loss calculation like gan.compile(optimizer=opt, loss=gan_loss)
please have a look at the question with full code posted in stack overflow on this link:
Thanks for bearing this with me
--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/3af1553f-8d34-451d-833a-88cf7d0f4ebdn%40googlegroups.com.