Can you print the inputs? Maybe they are still a dict or a tuple of key and value and you are trying to feed the key (which is a string) to the network?
In the last cell in that notebook, you have the following line:
inputs, labels = data
since data is a dictionary, that assignment will only assigns the keys. I made an example dictionary d with two elements:
>>> d = {'a':1, 'b':2}
>>> x, y = d
>>> x, y
('a', 'b')
Yet, another problem is in your dataset class, where in __getitem__ you defined sample as a dictionary, and then pass a dictionary to self.transform() function. The transformation functions only accept PIL Image as input not dictionary.
@vmirly1 what would be the proper way to set up the sample in __getitem__ for the example provided in this question? To me, it looks like @Jacob_K did the same thing as this example from pytorch. In the pytorch example, they use sample = {'image': image, 'landmarks': landmarks} in creating the dataset class, and Jacob used sample = {'image': image, 'label': label}.
Sorry if this is an obvious answer, but Iām new to pytorch and having a pretty hard time loading image files from a csv. @Jacob_K would it be possible to post the code that you eventually got to work for this problem.