Changing Batch Size Causes Runtime Error #8376
Unanswered
ik362
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 0 comments
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.
-
Hi there,
I am trying to train a CNN on some medical images. When I set batch_size = 1, everything works fine. However, when set batch_size > 1, the validation sanity check runs, and then on the second epoch I get the following error:
I really cannot work out this error as even when I explicitly change data type (e.g.
y = y.type(torch.int)
similar to https://discuss.pytorch.org/t/nn-bcewithlogitsloss-cant-accept-one-hot-target/59980 ) the error still remains.Any help would be greatly appreciated!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions