Git Product home page Git Product logo

Comments (13)

yjj-ui avatar yjj-ui commented on June 12, 2024

应该是batch_output这行出的错,有翻到之前有人问过您类似的问题,但是按照您更新后的代码,仍然会出现这个问题
bug

from pytorch_bert_bilstm_crf_ner.

taishan1994 avatar taishan1994 commented on June 12, 2024

网上搜了很多教程,都没有改成功,新手小白真的很崩溃,谢谢大佬了 bug

改了下代码,你再试试。

from pytorch_bert_bilstm_crf_ner.

yjj-ui avatar yjj-ui commented on June 12, 2024

又出现了这个问题
bug

from pytorch_bert_bilstm_crf_ner.

taishan1994 avatar taishan1994 commented on June 12, 2024

又出现了这个问题 bug

打印一下batch_output是什么

from pytorch_bert_bilstm_crf_ner.

yjj-ui avatar yjj-ui commented on June 12, 2024

刚刚打印了一下,每条数据长度都是一样的
bug

from pytorch_bert_bilstm_crf_ner.

taishan1994 avatar taishan1994 commented on June 12, 2024

刚刚打印了一下,每条数据长度都是一样的 bug

batch_output = np.array(batch_output)注释掉。然后最主要是看看最后一个batch_output是什么样的。

from pytorch_bert_bilstm_crf_ner.

yjj-ui avatar yjj-ui commented on June 12, 2024

大佬我打印看了一下,发现最后一个batch_out里有一条长度不是128,为什么会出现这种情况呢,需要怎么处理数据呢
bug

from pytorch_bert_bilstm_crf_ner.

taishan1994 avatar taishan1994 commented on June 12, 2024

大佬我打印看了一下,发现最后一个batch_out里有一条长度不是128,为什么会出现这种情况呢,需要怎么处理数据呢 bug

transformers是4.5.0版本的么。

from pytorch_bert_bilstm_crf_ner.

yjj-ui avatar yjj-ui commented on June 12, 2024

大佬我打印看了一下,发现最后一个batch_out里有一条长度不是128,为什么会出现这种情况呢,需要怎么处理数据呢 bug

transformers是4.5.0版本的么。

一开始用的4.22.0,后来改成4.5.0还是这个问题,另外pytorch-crf也是0.7.2

from pytorch_bert_bilstm_crf_ner.

taishan1994 avatar taishan1994 commented on June 12, 2024

transformers是4.5.0版本的么。

一开始用的4.22.0,后来改成4.5.0还是这个问题,另外pytorch-crf也是0.7.2

把那条数据删了吧。

from pytorch_bert_bilstm_crf_ner.

yjj-ui avatar yjj-ui commented on June 12, 2024

嗯嗯数据处理掉能跑了,谢谢大佬太感谢了,另外刚刚调了一些其他各种版本,发现如果不处理数据的话,注释掉batch_output = np.array(batch_output)也可以跑了,这句在运行代码的时候,可以注释掉吗,是非必要的吗

from pytorch_bert_bilstm_crf_ner.

taishan1994 avatar taishan1994 commented on June 12, 2024

嗯嗯数据处理掉能跑了,谢谢大佬太感谢了,另外刚刚调了一些其他各种版本,发现如果不处理数据的话,注释掉batch_output = np.array(batch_output)也可以跑了,这句在运行代码的时候,可以注释掉吗,是非必要的吗

这个必须注释掉了,删掉也行。

from pytorch_bert_bilstm_crf_ner.

yjj-ui avatar yjj-ui commented on June 12, 2024

谢谢大佬耐心解答!太感谢啦!

from pytorch_bert_bilstm_crf_ner.

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.