Comments (4)
I just committed the new code for doing that. When generating images, please use
--model=one_direction_test --max_dataset_size=20
This will load [...]_net_G.pth and generate 20 samples without loading the model of the other direction.
from pytorch-cyclegan-and-pix2pix.
hi, thank u for your reply and your new code,
i retrain with the your new code using the following cmd
training cmd:
python train.py --dataroot ./datasets/faceid/folderAB --name facaid_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction BtoA --lambda_A 100 --align_data --use_dropout --no_lsgan --niter 3000 --continue_train
and the test cmd I use is this:
python test.py --dataroot datasets/9 --name facaid_pix2pix --model one_direction_test --which_direction BtoA --align_data --use_dropout
is this cmd right?
And errors occured :
- model.test()
- File "/pytorch/GAN_NEW/pytorch-CycleGAN-and-pix2pix/models/one_direction_test_model.py", line 41, in test
- self.fake_B = self.netG_A.forward(self.real_A)
- File "/home//GAN_NEW/pytorch-CycleGAN-and-pix2pix/models/networks.py", line 225, in forward
- return nn.parallel.data_parallel(self.model, input, self.gpu_ids)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/parallel/data_parallel.py", line 100, in data_parallel
- return module(*inputs[0], **module_kwargs[0])
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call
- result = self.forward(*input, **kwargs)
- File "/home/public/pytorch/GAN_NEW/pytorch-CycleGAN-and-pix2pix/models/networks.py", line 276, in forward
- return self.model(x)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call
- result = self.forward(*input, **kwargs)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/container.py", line 64, in forward
- input = module(input)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call
- result = self.forward(*input, **kwargs)
- File "/home/public/itorch/zsl_exercise/pytorch/GAN_NEW/pytorch-CycleGAN-and-
- input = module(input)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call
- result = self.forward(*input, **kwargs)
- File "/home/public/itorch/zsl_exercise/pytorch/GAN_NEW/pytorch-CycleGAN-and-pix2pix/models/networks.py", line 278, in forward
- return torch.cat([self.model(x), x], 1)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call
- result = self.forward(*input, **kwargs)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/container.py", line 64, in forward
- input = module(input)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call
- result = self.forward(*input, **kwargs)
- File "/home/public/itorch/zsl_exercise/pytorch/GAN_NEW/pytorch-CycleGAN-and-pix2pix/models/networks.py", line 278, in forward
- return torch.cat([self.model(x), x], 1)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call
- result = self.forward(*input, **kwargs)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/container.py", line 64, in forward
- input = module(input)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call
- result = self.forward(*input, **kwargs)
- File "/home/public/itorch/zsl_exercise/pytorch/GAN_NEW/pytorch-CycleGAN-and-pix2pix/models/networks.py", line 278, in forward
- return torch.cat([self.model(x), x], 1)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call
- result = self.forward(*input, **kwargs)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/container.py", line 64, in forward
- input = module(input)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call
- result = self.forward(*input, **kwargs)
- File "/home/public/itorch/zsl_exercise/pytorch/GAN_NEW/pytorch-CycleGAN-and-pix2pix/models/networks.py", line 278, in forward
- return torch.cat([self.model(x), x], 1)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call
- result = self.forward(*input, **kwargs)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/container.py", line 64, in forward
- input = module(input)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call
- result = self.forward(*input, **kwargs)
- File "/home/public/itorch/zsl_exercise/pytorch/GAN_NEW/pytorch-CycleGAN-and-pix2pix/models/networks.py", line 278, in forward
- return torch.cat([self.model(x), x], 1)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call
- result = self.forward(*input, **kwargs)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/container.py", line 64, in forward
- input = module(input)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 206, in call
- result = self.forward(*input, **kwargs)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/conv.py", line 237, in forward
- self.padding, self.dilation, self.groups)
- File "/usr/local/lib/python2.7/dist-packages/torch/nn/functional.py", line 39, in conv2d
- return f(input, weight, bias)
- RuntimeError: CUDNN_STATUS_BAD_PARAM
the A and B image size is 128128
in AB folder images are 256128
training is ok。
but A Image in my testset is 128*128
my test folder is datasets/9 A image is dataset/9/test is this right?
thank u so much
from pytorch-cyclegan-and-pix2pix.
Will this commit be merged? e5b2fd6
from pytorch-cyclegan-and-pix2pix.
It has been added. You can use --model test
. See here for more details.
from pytorch-cyclegan-and-pix2pix.
Related Issues (20)
- pix2pix architecture differs from original paper
- Adding "Cite This Repository" Option
- losses not getting logged to wandb anymore? HOT 2
- How to generate an image and its corresponding mask at the same time?
- Exception in user code
- Not able to load a pre trained weight that I have used for training of custom data. HOT 4
- oserror: errno 24 too many open files HOT 1
- How to use test.py to test both directions for cyclegan? HOT 1
- CycleGAN model transferring the object rather than the style
- Loading issue in trained model
- SAR to Optical image generation
- 礼貌提问并虚心请教:线性衰减学习率政策
- 请问作者 HOT 1
- 生成图像的质量太低怎么办
- 请问对于输入图像大小不一样时,该代码中是否对图像进行预处理了呢?
- CPU
- It gets stuck when running for more than 20 rounds, but the graphics card is still running. What is the reason for this?
- Is the Model Capable of Processing and Maintaining Consistent Output Sizes Across Varied Image Dimensions? HOT 6
- 请问测试集应该下载保存到什么文件夹呢,每次都会报错'./checkpoints\\facades_label2photo_pretrained\\latest_net_G.pth'
- Hello, HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-cyclegan-and-pix2pix.