junyanz / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch
Other
23.09k stars 6.32k forks source link

TypeError: data_dependent_initialize() takes 1 positional argument but 2 were given #1574

Open PlantPotatoOnMoon opened 1 year ago

PlantPotatoOnMoon commented 1 year ago

Traceback (most recent call last): File "train.py", line 43, in model.data_dependent_initialize(data) TypeError: data_dependent_initialize() takes 1 positional argument but 2 were given

I'm running with the latest version. CPU only. I only changed gpu_ids=-1and num_threads=0 and nothing else. What' wrong? QAQ

junyanz commented 1 year ago

I am not sure if we have this function data_dependent_initialize in our repo. Did you post it in the wrong repo?

PlantPotatoOnMoon commented 1 year ago

I am not sure if we have this function data_dependent_initialize in our repo. Did you post it in the wrong repo?

Line 109 in base_model.py. I've fixed this problem by chaging the data_dependet_initialize function in cycle_gan_model.py. But there seems to have another problem that I can't get the training result in checkpoints. Sad.

Djoels commented 1 year ago

You probably meant to post this in the contrastive unpaired translation repo, which originated from this one it seems. The cyclegan / pix2pix repo doesn't have this function in the code.