We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am using:
When setting alpha > 0 in DiceLoss it results in following error:
alpha > 0
DiceLoss
RuntimeError: "bitwise_and_cpu" not implemented for 'Float' in DiceLoss
at line:
https://github.com/ShannonAI/dice_loss_for_NLP/blob/master/loss/dice_loss.py#L120
This is due to wrong operator evaluation order. First & is evaluated, which is wrong. You can avoid it by adding brackets around boolean operations:
cond = ((torch.argmax(flat_input, dim=1) == label_idx) & (flat_input[:, label_idx] >= threshold)) | pos_example.view(-1)
The text was updated successfully, but these errors were encountered:
I also meet this problem!, it is so hard to slove!
Sorry, something went wrong.
No branches or pull requests
I am using:
When setting
alpha > 0
inDiceLoss
it results in following error:RuntimeError: "bitwise_and_cpu" not implemented for 'Float' in DiceLoss
at line:
https://github.com/ShannonAI/dice_loss_for_NLP/blob/master/loss/dice_loss.py#L120
This is due to wrong operator evaluation order. First & is evaluated, which is wrong. You can avoid it by adding brackets around boolean operations:
cond = ((torch.argmax(flat_input, dim=1) == label_idx) & (flat_input[:, label_idx] >= threshold)) | pos_example.view(-1)
The text was updated successfully, but these errors were encountered: