Open hankhaohao opened 4 years ago
Do you have the correct pytorch version, i.e., 1.0.0, since it says ``[torch.cuda.FloatTensor [3, 32, 3, 3]] is at version 2; expected version 1 instead''?
Thank you! When I use the version of pytorch is 1.0.0, I can run the train.py successfully.
But, I also want to know. When I get the trained model by train.py , how do I test the test set.Thanks.
The trained models are saved at fold "/Checkpoints/current_I2I/". Since we tackle I2I with two unpaired images, we do not provide the testing code.
So,when I want to use the trained model by train.py to test the test set, I need to write the test code myself, right?
@linjx-ustc1106 Hi,Is the meaning of the sentence that I say above correct? please
@linjx-ustc1106 hi?
@linjx-ustc1106 @erjanmx Please teach me, thanks
It's a one-to-one mapping, for new image, you need to retrain the model. There is no sense to have test set.
oh,If this is the case, I feel that the applicability of this model is not great
@xuhaohao86 Now you konw how to test it on your dataset?
@stillstream No,It's a one-to-one mapping, for new image, you need to retrain the model.
Traceback (most recent call last): File "train.py", line 30, in
train(opt, Gs, Zs, reals, NoiseAmp, Gs2, Zs2, reals2, NoiseAmp2)
File "/export2/home/xavier.xu/project/TuiGAN-PyTorch/models/TuiGAN.py", line 72, in train
z_curr,in_s,G_curr, z_curr2,in_s2,G_curr2 = train_single_scale(D_curr,G_curr, reals,Gs,Zs,in_s,NoiseAmp, D_curr2,G_curr2, reals2,Gs2,Zs2,in_s2,NoiseAmp2, opt,scale_num)
File "/export2/home/xavier.xu/project/TuiGAN-PyTorch/models/TuiGAN.py", line 225, in train_single_scale
errG.backward(retain_graph=True)
File "/export2/home/xavier.xu/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/tensor.py", line 198, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/export2/home/xavier.xu/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/autograd/init.py", line 100, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [3, 32, 3, 3]] is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).