Home > Net >  Tensorflow: Data dependent loss function
Tensorflow: Data dependent loss function

Time:12-10

I am trying to implement a loss function that computes a loss depending on the (unaugmented) data. So far I found an example detailing the process using the model.add_loss() method of a tf.keras.models.Model() enter image description here


Note

It is important to examine the code as well as the model architecture carefully to ensure the desired functionality is implemented correctly. One of the helpful tools is the plot_model function from tf.keras.utils:

tf.keras.utils.plot_model(
    m,
    to_file='model.png',
    show_shapes=True,
    show_layer_names=True,
)

Output: enter image description here

  • Related