TypeError: __init__() got an unexpected keyword argument 'weight' #7503
Replies: 1 comment 1 reply
-
Hi @NastaranVB, it's a new argument introduced after 1.3. Hope it helps, thanks. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to apply weight to the voxels of each class in DiceLoss, but I get the error " TypeError: init() got an unexpected keyword argument 'weight'" while using
loss_function=DiceLoss(include_background=False, to_onehot_y=2, softmax=True, smooth_nr=0, smooth_dr=1e-5, weight = [1, 10]).
Beta Was this translation helpful? Give feedback.
All reactions