Traceback (most recent call last):
File "cli.py", line 166, in <module>
main()
File "cli.py", line 163, in main
fire.Fire(train_from_folder)
File "/opt/conda/lib/python3.8/site-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/opt/conda/lib/python3.8/site-packages/fire/core.py", line 466, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "/opt/conda/lib/python3.8/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "cli.py", line 160, in train_from_folder
run_training(model_args, data, load_from, new, num_train_steps, name, seed)
File "cli.py", line 53, in run_training
model.train(G, D, D_aug)
File "/notebooks/community-events/huggan/pytorch/lightweight_gan/lightweight_gan.py", line 1074, in train
real_output, real_output_32x32, real_aux_loss = D_aug(image_batch, calc_aux_loss = True, **aug_kwargs)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/notebooks/community-events/huggan/pytorch/lightweight_gan/lightweight_gan.py", line 285, in forward
return self.D(images, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/notebooks/community-events/huggan/pytorch/lightweight_gan/lightweight_gan.py", line 648, in forward
x = net(x)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/notebooks/community-events/huggan/pytorch/lightweight_gan/lightweight_gan.py", line 171, in forward
return sum(map(lambda fn: fn(x), self.branches))
File "/notebooks/community-events/huggan/pytorch/lightweight_gan/lightweight_gan.py", line 171, in <lambda>
return sum(map(lambda fn: fn(x), self.branches))
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/container.py", line 141, in forward
input = module(input)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 447, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 443, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor
I tried with multiple datasets and even with the default one. I am looking at the code to find where is there a problem, it seems that data and models are not on the same device in Discriminator
forward method.