andreped / t-loss-tf

Robust T-Loss for Medical Image Segmentation with TensorFlow backend
MIT License
3 stars 0 forks source link

`nu` parameter should be trainable? #1

Closed andreped closed 1 year ago

andreped commented 1 year ago

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?

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 the add_loss() method.

andreped commented 1 year ago

Yes, it should be, as stated by the creator of T-loss: https://github.com/Digital-Dermatology/t-loss/issues/1#issuecomment-1694476847

andreped commented 1 year ago

Fixed in 7806558608109d791aa658c8630d6f877aafbe39.