Closed Icxa closed 3 years ago
Hi @Icxa ! Looks like you're just forgetting a self
in the list of arguments to get_model, in the declaration:
def get_model(arch, pretrained):
should be
def get_model(self, arch, pretrained):
Hopefully this fixes it!
@andrewilyas Thank you very much. :)
I have a custom dataset. I have created a subclass of class DataSet as follows: ` class My_dataset(DataSet):
` Note: Somehow the first line of the code does not appear as a code here!
I create an object of class My_dataset. I obtain the train_loader, val_loader by running the method make_loaders() for the created object (ant_dataset).
But when I run the following code I encounter an error:
model, _ = model_utils.make_and_restore_model(arch='resnet18', dataset=ant_dataset)
Here is the error as an image.I have tried multiple ways to pass the input and implement get_mode() function. I am not able to understand what is going wrong. Can anyone please help?