This is most likely a typo. This should call Resize yet you are trying to call a function or reference a tensor called t which does not exist in your code.
These classes should not inherit from torch.nn.functional. They should inherit from object. Your notebook has it correct but moving over to a closed file you didn't do this properly.
https://github.com/MitraDP/Surface_Defect_Detection/blob/c5fdca2d10494b538194c4ab0682b4cd48fcddfc/my_classes/dataset.py#L17
This is most likely a typo. This should call
Resize
yet you are trying to call a function or reference a tensor calledt
which does not exist in your code.https://github.com/MitraDP/Surface_Defect_Detection/blob/c5fdca2d10494b538194c4ab0682b4cd48fcddfc/my_classes/transforms.py#L7
These classes should not inherit from
torch.nn.functional
. They should inherit fromobject
. Your notebook has it correct but moving over to a closed file you didn't do this properly.