Problems with the dataset in C1W1 assignment Cell #12

Hi, I need some help with C1W1 assignment at Cell #12.

# Set your parameters
criterion = nn.BCEWithLogitsLoss()
n_epochs = 200
z_dim = 64
display_step = 1000
batch_size = 128
lr = 0.00001

dataloader = DataLoader(
    MNIST('.', download = False, transform = transforms.ToTensor()),
    batch_size = batch_size, 
    shuffle = True

### DO NOT EDIT ###
device = 'cuda'

When I set “download = True”
it shows “Cell #12. Can’t compile the student’s code. Error: <HTTPError 403: ‘Forbidden’>”

and when I set “download = False”
it shows “Cell #12. Can’t compile the student’s code. Error: RuntimeError(‘Dataset not found. You can use download=True to download it’,)”

Does anyone know what’s happening?

It worked for me to set it to False (as it was in the original notebook as given to us). The point is that MNIST is a local directory in the file tree for this assignment. Perhaps that directory is not present in your assignment for some reason. It might be worth trying the “Help → Lab Help → Get Latest Version” method and see if that brings it back. Note that procedure will only replace missing files, so it should not replace any completed work you have done in your notebook, unless you first move the notebook out of the way.

Or click “File → Open” and see if the MNIST directory is there. Note that it is referenced in the “import” cell at the beginning of the notebook. Did running that throw any errors? Here’s what I see when I do “File → Open” and then click into the MNIST directory:

Thank you for your kind reply.
The MNIST dataset was there in the lab files, but I guess there was something wrong.

Eventually, I set the notebook to initial state and started over. There were no errors and I passed the assignment.

It’s great to hear you found a solution! Thanks for confirming.

1 Like