GithubHelp home page GithubHelp logo

stylegans-pytorch's People

Contributors

yuuho 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

Watchers

 avatar  avatar  avatar

stylegans-pytorch's Issues

only have bias but miss "act"

class AddChannelwiseBias(nn.Module):
def __init__(self, out_channels, lr):
super().__init__()
# lr = 1.0 (conv,mod,AdaIN), 0.01 (mapping)
self.bias = nn.Parameter(torch.zeros(out_channels))
torch.nn.init.zeros_(self.bias.data)
self.bias_scaler = lr
def forward(self, x):
oC,*_ = self.bias.shape
shape = (1,oC) if x.ndim==2 else (1,oC,1,1)
y = x + self.bias.view(*shape)*self.bias_scaler
return y

as paper said

The activation funtion(Lrelu) is always applied right after adding the bias

you only have bias but not act

reference original repo:
https://github.com/NVlabs/stylegan2/blob/cec605e0834de5404d5c7e5cead7053bdd0e4dde/dnnlib/tflib/ops/fused_bias_act.py#L72-L96

why does compute method is different [EqualizedModulatedConv2d] from [EqualizedModulatedConvTranspose2d]

the size of modulated_weight is [N, iC, oC, kH, kW]
the size of demod_norm is [N, oC]

weight = modulated_weight * demod_norm.view(N, 1, oC, 1, 1) # (N,oC,iC,kH,kW)

This line is view demod_norm to [N, 1, oC, 1, 1]

but

weight = modulated_weight * demod_norm.view(N, oC, 1, 1, 1) # (N,oC,iC,kH,kW)

this line is view demod_norm to [N, oC, 1, 1, 1]

this two function has a difficult result I guess

使用するGPUメモリを少なくする

GTX1080ti (11GB) 以上の環境で動かすことしか想定していなかったため
バッチサイズ16固定としていた

  • 基本的にはバッチサイズ 1
  • 選択して16とか選べるようにする

FusedBlur3x3 is different from NVlabs

the NVlabs:
https://github.com/NVlabs/stylegan2/blob/cec605e0834de5404d5c7e5cead7053bdd0e4dde/dnnlib/tflib/ops/upfirdn_2d.py#L234-L292

This part code make a filter_kernel:k
parameter of input k is [1, 3, 3, 1]
and after this line the k is:
[4/64, 12/64, 12/64, 4/64]
[12/64, 36/64, 36/64, 12/64]
[12/64, 36/64, 36/64, 12/64]
[4/64, 12/64, 12/64, 4/64]

but your code the FusedBlur3x3
it use filter kernel is :
[1/16, 2/16, 1/16]
[2/16, 4/16, 2/16]
[1/16, 2/16, 1/16]
why?

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.