pytorch-CycleGAN-and-pix2pix icon indicating copy to clipboard operation
pytorch-CycleGAN-and-pix2pix copied to clipboard

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

Open PlantPotatoOnMoon opened this issue 1 year ago • 3 comments

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

PlantPotatoOnMoon avatar May 16 '23 05:05 PlantPotatoOnMoon

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

junyanz avatar May 16 '23 20:05 junyanz

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.

PlantPotatoOnMoon avatar May 17 '23 05:05 PlantPotatoOnMoon

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.

Djoels avatar Jun 13 '23 16:06 Djoels