You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to understand the difference, but they are almost identical in term of behaviour.
In the documentation https://docs.fast.ai/losses.html#bcewithlogitslossflat, nn.BCEWithLogitsLoss suppose to fail but it doesn't.
tst = BCEWithLogitsLossFlat()
output = torch.randn(32, 5, 10)
target = torch.randn(32, 5, 10)
#nn.BCEWithLogitsLoss would fail with those two tensors, but not our flattened version.
_ = tst(output, target)
test_fail(lambda x: nn.BCEWithLogitsLoss()(output,target))
I tried to understand the difference, but they are almost identical in term of behaviour.
In the documentation https://docs.fast.ai/losses.html#bcewithlogitslossflat,
nn.BCEWithLogitsLoss
suppose to fail but it doesn't.The correct test should be:
instead of
In contrast to https://docs.fast.ai/losses.html#crossentropylossflat, the
nn.CrossEntropyLoss
fail but the test is misleading.The text was updated successfully, but these errors were encountered: