ModuleAttributeError: 'Sequential' object has no attribute 'smooth_loss'

I’m going through the course, and cobbling things together along the way. I don’t understand this error.
Input/output/error here: https://github.com/nilamo/scratch/blob/main/pytorch_test.ipynb

Any help would be appreciated.

Could this be because you haven’t defined your targets?

Can you please tell us about the problem you are working on?

Thanks for the reply :slight_smile:

My goal is to take a curated selection of images, and generate new images based off the training set. So I’m not sure what the targets would be, as there’s no classification involved.

Currently, I’m using about 12 images (from the Smithsonian open access: https://www.si.edu/openaccess) scaled down and converted to png (the raw images they provide are massive). I thought maybe the issue could be due to a small sample size, but I was hoping to at least get some sort of result, and tweak it/add sample images until the generated images start becoming interesting.

As you are trying to generate new images the approach you are trying isn’t quite right.

You may follow this nice introduction to generative models.

fastai supports training of basic GAN(Generative Adversarial Networks), but I haven’t tried it. Here is the documentation.

I looked at those docs, and came up with this: https://github.com/nilamo/scratch/blob/main/pytorch_test.ipynb

It’s almost completely copy/pasted from there, with the only major change that it’s using a local path for the dataloaders instead of URLs.LSUN_BEDROOMS. The output is just a green square. That’s a step up, at least there’s output this time.

Is the issue that I’m doing something wrong still? Is the sample size just too small?