Git Product home page Git Product logo

Comments (4)

taesungp avatar taesungp commented on May 14, 2024

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.

andyhx avatar andyhx commented on May 14, 2024

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 256
128
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.

didirus avatar didirus commented on May 14, 2024

Will this commit be merged? e5b2fd6

from pytorch-cyclegan-and-pix2pix.

junyanz avatar junyanz commented on May 14, 2024

It has been added. You can use --model test. See here for more details.

from pytorch-cyclegan-and-pix2pix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.