Comments (8)
Got a similar issue. The reason is that, as shown in line 59 of spectral.py
, weight attribute of whatever module you used (in your case Conv2d) is deleted. Instead weight_u weight_v and weight_bar are added.
from self-attention-gan.
解决了 其实就是删除了生成器和鉴别器的初始化,采用pytorch默认初始化方式,原因是SN层那里是复合网络结构,编译器无法拆分到底层找到conv进行初始化。。。所以要加SN层的话要么把netD.apply(weights_init)和netG.apply(weights_init)删了,要么重写SN结构把它和conv2d单独提出来写。。
from self-attention-gan.
Thank you for your reply!Your idea is great. Have a good life !
from self-attention-gan.
Thank you for your reply!Your idea is great. Have a good life !
I encountered the same problem as you. Have you solved this problem? Can you share your solution. thank you.
from self-attention-gan.
楼主怎么解决的啊? 我自己加SN层也出现了这个问题
from self-attention-gan.
解决了 其实就是删除了生成器和鉴别器的初始化,采用pytorch默认初始化方式,原因是SN层那里是复合网络结构,编译器无法拆分到底层找到conv进行初始化。。。所以要加SN层的话要么把netD.apply(weights_init)和netG.apply(weights_init)删了,要么重写SN结构把它和conv2d单独提出来写。。
התפלק לך של סינים
מעשייך מסבירים למה היטלר הרג יהודים.
from self-attention-gan.
你好!感谢您对生成对抗网络研究的贡献并分享您的代码!我来自**。现在是**新年。祝你**新年快乐!我对你的论文很感兴趣,当我尝试在我的新网络中添加频谱归一化时,程序给出以下错误: Traceback(最近一次调用最后一次): 文件“SR.py”,第 45 行,在 train(opt, Gs, Zs, reals, NoiseAmp) 文件“E:\SinGAN-masterplus\SinGAN\training.py”,第 34 行,训练中 D_curr,G_curr = init_models(opt) 文件“E:\SinGAN-masterplus\SinGAN\training.py” py”,第 310 行,init_models netG.apply(models.weights_init) 文件“E:\abcd\lib\site-packages\torch\nn\modules\module.py”,第 293 行, 文件“E:\abcd\lib\site-packages\torch\nn\modules\module.py”,第 293 行,在应用 module.apply(fn) 文件“E:\abcd\lib\site-packages\torch\ nn\modules\module.py”,第 294 行,在应用 fn(self) 文件“E:\SinGAN-masterplus\SinGAN\models.py”,第 215 行,在 weights_init m.weight.data.normal_(0.0, 0.02 ) 文件“E:\abcd\lib\site-packages\torch\nn\modules\module.py”,第 591 行,getattr 类型(self)。name , name)) AttributeError: 'Conv2d' 对象没有属性 'weight'
查了很多资料都解决不了,所以想请教一下,祝您生活愉快,期待您的回复!
请问问题解决了吗?
from self-attention-gan.
The solution is actually to delete the initialization of the generator and the initializer, using pytorch as the default initialization method, the reason is that the SN layer is a complex network structure, the compiler can't remove 分 to the end of the layer, and the conv is initialized... Or 把netD.apply(weights_init)和netG.apply(weights_init)删了,or 重写SN structure put it together and conv2d separately.
Split you of Chinese
Your actions explain why Hitler killed Jews.
That's a little too much.
from self-attention-gan.
Related Issues (20)
- About negative gamma HOT 10
- detach fake image when updating the discriminator
- model.py is working only for imsize=64 HOT 1
- Missing one 1x1 conv on output from attention layer? HOT 4
- UnboundLocalError: local variable 'dataset' referenced before assignment HOT 4
- dropbox link missing HOT 1
- The code is different from the original paper HOT 2
- RuntimeError: cublas runtime error : the GPU program failed to execute at /pytorch/aten/src/THC/THCBlas.cu:450
- 1
- the meaning of Gamma in Attention model HOT 2
- How to make the repo available for input image of 256x256 size? HOT 1
- torch.bmm(), CUDA out of memory. HOT 3
- Negative self.gamma parameter??
- Confused by self-attention layer positioning in Discriminator HOT 1
- self.gamma*out considered as "in place" operation
- Trying the Self-Attention-GAN with dog images
- Add examples to work with audio files as well
- 我长期研究和改进GAN,如果对GAN或者深度学习感兴趣的可以联系我,联系方式,wechat: lovedaixiaobaby
- How can I determine if the model has converged?
- the download.sh can't use
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 self-attention-gan.