Closed IncubatorShokuhou closed 2 years ago
Hi there, I guess this is because ApplyToKeys
focuses on the nn. Module
class, and due to which error occurs (not sure though), but I found a solution for the same. I duplicated the error and inherited the nn.Module
class for ToTensor
and I think it worked.
Check it out here
Although, now there is another error as follows:
TypeError: __init__() got an unexpected keyword argument 'transform'
, so I think we have to look at that too, and I would keep you updated on the same
🐛 Bug
Met
TypeError: torchvision.transforms.transforms.ToTensor is not a Module subclass
in https://github.com/Lightning-AI/lightning-flash/blob/master/flash_examples/integrations/learn2learn/image_classification_imagenette_mini.pyTo Reproduce
Code sample
Expected behavior
Environment
Additional context