NVlabs / FUNIT

Translate images to unseen domains in the test time with few example images.

Home Page:https://nvlabs.github.io/FUNIT/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuntimeError: CUDA error: device-side assert triggered

MarStarck opened this issue · comments

Traceback (most recent call last):
  File "train.py", line 83, in <module>
    d_acc = trainer.dis_update(co_data, cl_data, config)
  File "/home/xxx/FUNIT-master/trainer.py", line 62, in dis_update
    al, lfa, lre, reg, acc = self.model(co_data, cl_data, hp, 'dis_update')
  File "/root/anaconda3/envs/funit/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/xxx/FUNIT-master/funit_model.py", line 53, in forward
    l_real_pre, acc_r, resp_r = self.dis.calc_dis_real_loss(xb, lb)
  File "/home/xxx/FUNIT-master/networks.py", line 83, in calc_dis_real_loss
    total_count = torch.tensor(np.prod(resp_real.size()), dtype=torch.float).cuda()
RuntimeError: CUDA error: device-side assert triggered

I've found out the num_classes in yaml is set not equal to real data. The pytorch trace is really confusing.