Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'DiceCELoss' object is not callable #1526

Closed
PouriaRouzrokh opened this issue Jan 29, 2021 · 1 comment · Fixed by #1527
Closed

'DiceCELoss' object is not callable #1526

PouriaRouzrokh opened this issue Jan 29, 2021 · 1 comment · Fixed by #1527

Comments

@PouriaRouzrokh
Copy link

PouriaRouzrokh commented Jan 29, 2021

Hello.
It seems that there is a bug in calling a DiceCELoss object in the training loop.
The following code will fail with this error: "TypeError: 'DiceCELoss' object is not callable"

loss_function = monai.losses.DiceCELoss() # before the training
# ....
loss = loss_function(outputs, labels) # in the training loop

I have installed MONAI from git and the same code works if I simply call DiceLoss instead of DiceCELoss.

wyli added a commit to wyli/MONAI that referenced this issue Jan 29, 2021
Signed-off-by: Wenqi Li <[email protected]>
@wyli wyli mentioned this issue Jan 29, 2021
3 tasks
@wyli
Copy link
Contributor

wyli commented Jan 29, 2021

thanks for reporting this!

wyli added a commit that referenced this issue Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants