Hello.

I'm trying to build a model with a custom loss function in tensorflow.

The Loss function has two parts. One is a regular distance function and the other one a function which will map model predictions to something new(in this case will generate an image based on them).

the problem is i can't Eval the model output tensor to have access to the model predictions in number and use them parameters for generating an image inside my loss function!

Model Diagram is attached.

Also, model diagram and some of my code can be seen here:

https://stackoverflow.com/questions/50084051/use-returned-values-of-a-custom-function-in-loss-based-on-model-predictions

How should i do such a thing?

ps: yes this might be a better way for updating a CNN! ;)

More Babak Soltani's questions See All
Similar questions and discussions