Giter Site home page Giter Site logo

pix2pix-pytorch's People

Contributors

atgambardella avatar huster-wgm avatar mrzhu-cool avatar sagarwaghmare69 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pix2pix-pytorch's Issues

mode.eval() when test

Hi, I notice that when testing the model, you don't set the model to eval mode. Is this a bug or some special reasons?

Models' forward are incorrect

Hey just realized that the model forward/sequence is wrong.
E.g
Current code:
input is (nc) x 256 x 256

e1 = self.conv1(input)
# input is (ngf) x 128 x 128
e2 = self.batch_norm2(self.conv2(self.leaky_relu(e1)))

This should be
input is (nc) x 256 x 256

e1 = self.conv1(input)
# input is (ngf) x 128 x 128
e2 = self.conv2(self.leaky_relu(self.batch_norm2(e1)))

Hence both the discriminator and generator models are incorrect.

代码结构问题

请问,你这个代码的结构和论文里边的结构完全一样么?
我看的不是很一样啊,论文里是编码器解码器的结构啊。
麻烦说下你这里的结构,如果方便的话,告诉我下我想改成论文里边那样子要改哪些~

should I add set_requires_grad(net_d, True/False) for discriminator during training?

Hello,
Thank you for your great work. However, I think you should add set_requires_grad(net_d, True/False) for discriminator during training. Is it true?

modified code:

    # (1) Update D network
    ######################
    set_requires_grad(net_d, True) # add it here
    optimizer_d.zero_grad()        
    # train with fake
    fake_ab = torch.cat((real_a, fake_b), 1)
    pdb.set_trace()
    pred_fake = net_d.forward(fake_ab.detach())
    loss_d_fake = criterionGAN(pred_fake, False)

    # train with real
    real_ab = torch.cat((reala, real_b), 1)
    pred_real = net_d.forward(real_ab)
    loss_d_real = criterionGAN(pred_real, True)
    
    # Combined D loss
    loss_d = (loss_d_fake + loss_d_real) * 0.5

    loss_d.backward()
   
    optimizer_d.step()

    set_requires_grad(net_d, False) # add it here

    ######################

I am looking forward to hearing from you. Thank you in advance!

PatchGAN part in the implementation

Hi,
I had hard time finding the PatchGAN part of code,Although you have commented before writing discriminator.Can you please point out where is it exactly there and how are you using it?
Thanks

Consider only L1 loss

I want to consider only L1 loss.Is it correct to comment out the generator loss as

#loss_g = loss_g_gan + loss_g_l1
and consider only,
loss_g = loss_g_l1

Do I need to change anything in discriminator part?

Thanks in advance

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.