Giter VIP home page Giter VIP logo

Comments (3)

bluestyle97 avatar bluestyle97 commented on July 18, 2024 2

Hi, thanks for your comment!
For the first question, 'bias' will only influence the mean value of the convolutional layer's output. So 'bias' can be ignored when the convolutional layer (nn.Conv2d) is followed by a batch-normalization layer, since the mean shift will be removed in the batchnorm layer. You can refer to the following links for more explanation:
https://discuss.pytorch.org/t/any-purpose-to-set-bias-false-in-densenet-torchvision/22067
kuangliu/pytorch-cifar#52

For the second question, STGAN is exactly based on the work of AttGAN, and in AttGAN they use a mechanism to control the attribute manipulation intensity by make the target vector uniformly lie on [-1, 1] while training. You can read the AttGAN paper and its implementation for more details:
https://arxiv.org/abs/1711.10678
https://github.com/elvisyjlin/AttGAN-PyTorch

from stgan-pytorch.

dypromise avatar dypromise commented on July 18, 2024

Wow!! Thank you very much, it helps me A LOT!!!

Hi, thanks for your comment!
For the first question, 'bias' will only influence the mean value of the convolutional layer's output. So 'bias' can be ignored when the convolutional layer (nn.Conv2d) is followed by a batch-normalization layer, since the mean shift will be removed in the batchnorm layer. You can refer to the following links for more explanation:
https://discuss.pytorch.org/t/any-purpose-to-set-bias-false-in-densenet-torchvision/22067
kuangliu/pytorch-cifar#52

For the second question, STGAN is exactly based on the work of AttGAN, and in AttGAN they use a mechanism to control the attribute manipulation intensity by make the target vector uniformly lie on [-1, 1] while training. You can read the AttGAN paper and its implementation for more details:
https://arxiv.org/abs/1711.10678
https://github.com/elvisyjlin/AttGAN-PyTorch

from stgan-pytorch.

dypromise avatar dypromise commented on July 18, 2024

Hi, I noticed that another differences: your version don't use inject layers and just use 3 stu layers. I modify it to use inject layers in decoder and use 4 shortcut layers and found that it is difficult to converge. Did you try this ? If so, could you give me some suggestions on training? following is my parameters:
exp_name: stgan
model_name: stgan
mode: train
cuda: true
ngpu: 4

data

dataset: celeba
data_root: /dockerdata/home/rpf/rpf/xmmtyding/celeba_data/crop384/img_crop_celeba_png/
att_list_file: /dockerdata/home/rpf/rpf/xmmtyding/celeba_data/crop384/new_list_attr_celeba_addhair.txt
crop_size: 384
image_size: 384

model

g_conv_dim: 48
d_conv_dim: 48
d_fc_dim: 512
g_layers: 5
d_layers: 5
shortcut_layers: 4
stu_kernel_size: 3
use_stu: true
one_more_conv: true
attrs: [Bangs, Black_Hair, Blond_Hair, Brown_Hair, Bushy_Eyebrows, Eyeglasses, Male, Mouth_Slightly_Open, Mustache, No_Beard, Pale_Skin, Young, HairLength]
checkpoint: ~

training

batch_size: 64
beta1: 0.5
beta2: 0.5
g_lr: 0.0008
d_lr: 0.0008
n_critic: 5
thres_int: 0.5
lambda_gp: 10
lambda1: 1
lambda2: 10
lambda3: 100
max_iters: 1000000
lr_decay_iters: 800000

steps:

summary_step: 10
sample_step: 2500
checkpoint_step: 2500

from stgan-pytorch.

Related Issues (12)

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.