Git Product home page Git Product logo

File "SRN_modules.py", line 65, in forward return x + self.pos_table[:, :x.size(1)].clone().detach() RuntimeError: The size of tensor a (320) must match the size of tensor b (256) at non-singleton dimension 1 about srn.pytorch HOT 4 OPEN

chenjun2hao avatar chenjun2hao commented on May 26, 2024
File "SRN_modules.py", line 65, in forward return x + self.pos_table[:, :x.size(1)].clone().detach() RuntimeError: The size of tensor a (320) must match the size of tensor b (256) at non-singleton dimension 1

from srn.pytorch.

Comments (4)

chenjun2hao avatar chenjun2hao commented on May 26, 2024

from srn.pytorch.

wuxiaolianggit avatar wuxiaolianggit commented on May 26, 2024

首先很感谢大神的回复,采用固定宽度这一点我可以理解,但是特征提取后w一般会减小到原来的1/4,我看您的代码里面默认是256和26,我的理解是:图片宽度是固定256的话,n_position的维度应该默认64,我这样理解对吗? @chenjun2hao

from srn.pytorch.

chenjun2hao avatar chenjun2hao commented on May 26, 2024

from srn.pytorch.

wuxiaolianggit avatar wuxiaolianggit commented on May 26, 2024

好的,非常感谢大神的回复,我也很想结合transform去做文本识别,很感谢大神的开源。

from srn.pytorch.

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.