Hello fellows,
I had a perfectly functioning model and then after an update in fastai and pytorch I can’t get it to work.
When i try to call predict(tensor) I got the following error:
IndexError: index 0 is out of bounds for axis 0 with size 0
I’ve already checked the tensor and the dimensions are correct. Is the same tensor that were working
The error is followed by a series of warnings:
SourceChangeWarning: source code of class ‘torchvision.models.densenet._DenseBlock’ has changed. you can retrieve the original source code by accessing the object’s source attribute or set
torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
source code of class ‘torchvision.models.densenet._DenseLayer’ has changed. you can retrieve the
SourceChangeWarning: original source code by accessing the object’s source attribute or set
torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
SourceChangeWarning: source code of class ‘fastai.layers.AdaptiveConcatPool2d’ has changed. you can retrieve the original source code by accessing the object’s source attribute or set
torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
SourceChangeWarning: source code of class ‘fastai.layers.Flatten’ has changed. you can retrieve the original source code by accessing the object’s source attribute or set
torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
Anyone knows how to solve this problem?