Currently, the nu variable of the loss function is kept fixed, but if I understand the original torch implementation correctly, it was initialized with torch.nn.Parameter which maybe makes it trainable?
If it is trainable, we likely need to implement the loss as a custom tf.keras.layers.Layer to enable trainable weights in the loss function, and use the add_loss() method.
Currently, the
nu
variable of the loss function is kept fixed, but if I understand the original torch implementation correctly, it was initialized withtorch.nn.Parameter
which maybe makes it trainable?As I was not sure, I have made an issue in the original repo regarding this issue: https://github.com/Digital-Dermatology/t-loss/issues/1
If it is trainable, we likely need to implement the loss as a custom
tf.keras.layers.Layer
to enable trainable weights in the loss function, and use theadd_loss()
method.