Lab 3, missing dataloader declaration


If anyone has a fix for Lab 3, missing dataloader declaration

Hi @porton

Welcome to the community.

What module are you referring to?

Module how difussion models work.

Thank you. But, what lesson/module?

Hi, it is this one,

(the one at the bottom, after converting to Code (from NBRawContent)

Thank you!

One question: Are you trying to running locally? If so, don’t forget that you have to install/download all the packages related first.

I try troughs run direct from the course platform and everything works just fine

To download the course files follow:

  1. Click on the jupyter logo at the top-left:

  2. Click on the file that you want to download

  3. Click on file and download

Don’t forget to keep the files on the root path of your project. This is the easy way to import the packages/lib without erros.

Best regards

Yes I tried running locally and on the cloud. Lab 1 and Lab 2 run great locally.
It looks like a defect for Lab 3?

The error on the lab 3

The error suggests that the dataloader package wasn’t installed or that something went wrong with its installation. It could be a typo when try to import as well.

Did you tried to change the dataloader to a Capital “D” like": pbar = tqdm(Dataloader, mininterval=2 )

I asks because the relative import is like from import DataLoader

Not sure if it is your case.

Give it a try. I will do some troubleshooting too.

Ow! I got it.

The cell that has this line codes works just as a reference to learners prototyping or train your own models.

If you want to train your model using this cell you have to instantiate the DataLoader in order to use it.

You have to provide a dataset and the DataLoader params as well.

For example:

from import DataLoader

train_dataloader = DataLoader(training_data, batch_size=64, shuffle=True)
test_dataloader = DataLoader(test_data, batch_size=64, shuffle=True)

after that you can run the line 11 like:

pbar = tqdm(train_dataloader, mininterval=2 )

Just to compare with the the cell code discribed in the course platform it should be some like that:

from import DataLoader

dataloader = DataLoader(some_dataset, batch_size=64, shuffle=True)

And that

pbar = tqdm(dataloader, mininterval=2 )

1 Like

Clearly to generate and train the model, they must have implemented the Dataloader to load in both the images and contexts. If someone has been able to get or write the code to do that, I would appreciate a copy.