ptrblck:

print(dataset.class_to_idx)


It’s running !!
The folder list was below:

[’.ipynb_checkpoints’, ‘Black-grass’, ‘Charlock’, ‘Cleavers’, ‘Common Chickweed’, ‘Common wheat’, ‘Fat Hen’, ‘Loose Silky-bent’, ‘Maize’, ‘Scentless Mayweed’, ‘Shepherds Purse’, ‘Small-flowered Cranesbill’, ‘Sugar beet’]
{’.ipynb_checkpoints’: 0, ‘Black-grass’: 1, ‘Charlock’: 2, ‘Cleavers’: 3, ‘Common Chickweed’: 4, ‘Common wheat’: 5, ‘Fat Hen’: 6, ‘Loose Silky-bent’: 7, ‘Maize’: 8, ‘Scentless Mayweed’: 9, ‘Shepherds Purse’: 10, ‘Small-flowered Cranesbill’: 11, ‘Sugar beet’: 12}

This is on Google cloud and there seems to be a folder called ’.ipynb_checkpoints’ which is 0. I did it by changing the number of outputs in the final layer to 13:
resnet34.fc = nn.Linear(num_ftrs, 13)
I’m not sure what to do with the invisible folder besides changing the number of outputs in the final layer, is there any other way I can deal with that? Will this create problems by having an unnecessary layer?
Thanks so much.