NVlabs/stylegan2-ada-pytorch

TypeError: run_G() missing 1 required positional argument: 'c'`

jcrbsa opened this issue · 0 comments

After run the following command:

python3 train.py \
    --outdir=$OUTPUT_PATH \
    --img_data=$TRAIN_PATH \
    --gpus 1 \
    --gamma 10 \
    --aug 'noaug' \
    --metrics True \
    --eval_img_data $VAL_PATH \
    --batch 32 

Show the following error:

Traceback (most recent call last):
  File "train.py", line 523, in <module>
    main() # pylint: disable=no-value-for-parameter
  File "/content/drive/MyDrive/env/FcF-Inpainting/virtualenv/lib/python3.7/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/content/drive/MyDrive/env/FcF-Inpainting/virtualenv/lib/python3.7/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/content/drive/MyDrive/env/FcF-Inpainting/virtualenv/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/content/drive/MyDrive/env/FcF-Inpainting/virtualenv/lib/python3.7/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/content/drive/MyDrive/env/FcF-Inpainting/virtualenv/lib/python3.7/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "train.py", line 516, in main
    subprocess_fn(rank=0, args=args, temp_dir=temp_dir)
  File "train.py", line 391, in subprocess_fn
    training_loop.training_loop(rank=rank, **args)
  File "/content/drive/MyDrive/env/FcF-Inpainting/training/training_loop.py", line 327, in training_loop
    loss.accumulate_gradients(phase=phase.name, erased_img=erased_img, real_img=real_img, mask=mask, real_c=real_c, gen_c=gen_c, sync=sync, gain=gain)
  File "/content/drive/MyDrive/env/FcF-Inpainting/training/losses/loss.py", line 65, in accumulate_gradients
    gen_img, _ = self.run_G(g_inputs, gen_c, sync=sync) # May get synced by Gpl.
TypeError: run_G() missing 1 required positional argument: 'c'`