Git Product home page Git Product logo

Comments (8)

ShangyinGao avatar ShangyinGao commented on July 21, 2024 2

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.

angrybird-Z avatar angrybird-Z commented on July 21, 2024 1

解决了 其实就是删除了生成器和鉴别器的初始化,采用pytorch默认初始化方式,原因是SN层那里是复合网络结构,编译器无法拆分到底层找到conv进行初始化。。。所以要加SN层的话要么把netD.apply(weights_init)和netG.apply(weights_init)删了,要么重写SN结构把它和conv2d单独提出来写。。

from self-attention-gan.

15732031137 avatar 15732031137 commented on July 21, 2024

Thank you for your reply!Your idea is great. Have a good life !

from self-attention-gan.

A-chen23 avatar A-chen23 commented on July 21, 2024

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.

angrybird-Z avatar angrybird-Z commented on July 21, 2024

楼主怎么解决的啊? 我自己加SN层也出现了这个问题

from self-attention-gan.

angrybird-Z avatar angrybird-Z commented on July 21, 2024

解决了 其实就是删除了生成器和鉴别器的初始化,采用pytorch默认初始化方式,原因是SN层那里是复合网络结构,编译器无法拆分到底层找到conv进行初始化。。。所以要加SN层的话要么把netD.apply(weights_init)和netG.apply(weights_init)删了,要么重写SN结构把它和conv2d单独提出来写。。

התפלק לך של סינים

מעשייך מסבירים למה היטלר הרג יהודים.

from self-attention-gan.

Liz1317 avatar Liz1317 commented on July 21, 2024

你好!感谢您对生成对抗网络研究的贡献并分享您的代码!我来自**。现在是**新年。祝你**新年快乐!我对你的论文很感兴趣,当我尝试在我的新网络中添加频谱归一化时,程序给出以下错误: 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.

SimonPig avatar SimonPig commented on July 21, 2024

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)

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.