Code Monkey home page Code Monkey logo

Comments (5)

yueliu1999 avatar yueliu1999 commented on June 18, 2024

您好,感谢关注。请问是哪一个数据集呢?这个错误看起来是有个参数b可能模型里面写的是一个vector(Size([1])),而checkpoints里面是一个matrix(Size([10000, 20]))。

from dcrn.

Lorraine-Kwok avatar Lorraine-Kwok commented on June 18, 2024

前輩,我剛剛又試著運行了dblp,報錯如下:
size mismatch for b: copying a param with shape torch.Size([4057, 20]) from checkpoint, the shape in current model is torch.Size([1]).

from dcrn.

yueliu1999 avatar yueliu1999 commented on June 18, 2024

dblp这个数据集我没有使用batch training,一般的gpu都可以使用整张图来训练,我建议可以直接使用非batch版本的代码。如果你需要在dblp上batch training的话可能需要修改一下b这个参数的shape。

from dcrn.

Lorraine-Kwok avatar Lorraine-Kwok commented on June 18, 2024

我有一個其他數據集10000*256,在非batch版本會溢出,生成了預訓練模型加載到batch版本會報此錯,應該如何修改b呢?
直接改動這一行嗎?self.b = Parameter(nn.init.constant_(torch.zeros(1), 0.5), requires_grad=True)
新手還不太會改,麻煩前輩了

from dcrn.

yueliu1999 avatar yueliu1999 commented on June 18, 2024

self.b = Parameter(nn.init.constant_(torch.zeros(n_node, opt.args.n_z), 0.5), requires_grad=True),试试这个看看行不行

from dcrn.

Related Issues (13)

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.