Coder Social home page Coder Social logo

Comments (1)

taishan1994 avatar taishan1994 commented on June 11, 2024

本人程序能力尚处在学习阶段,又有一些问题想请问。 1.我将Raw_data 下的数据进行了替换,并使用preprocess进行了处理,生成了json文件后运行main出现了错误 ##RuntimeError: Error(s) in loading state_dict for BertNerModel:size mismatch for linear.weight: copying a param with shape##根据我网上调研,对这个错误理解是和模型的参数不匹配所导致,所以我在想我输入的自己的数据是否存在问题,请问我在标注的时候有什么需要注意的要把所有的实体都标注出来吗?(为了测试我只标注了两种实体,我在观察生成的json文件时发现格式与之前的很有出入) 2.checkpoints下的模型,是可以用本程序自己训练的吗,没有model.pt文件运行程序是会报错的。我对程序的的理解是【输入数据-训练模型-用训练的模型对文本进行识别】这样的步骤,所以我在想是否本程序训练时生成了对应的pt文件,可以使用。 本人程序能力方面十分欠缺,还在努力学习中,如果楼主能抽宝贵的时间解答我的一些疑惑和问题,我表示十分的感谢。

1、使用自己的数据要修改的地方:(1)mid_data里面的json;(2)标签需要改变;(3)配置文件中的标签数目;
2、使用自己数据要先训练生成model.pt,不然会报错,具体是xxx.train()那一行代码是训练。

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.