Giter Site home page Giter Site logo

wangpeiyi9979 / informationextractiondemo Goto Github PK

View Code? Open in Web Editor NEW
126.0 2.0 30.0 132 KB

一个关于百度2019语言与智能技术竞赛信息抽取 (http://lic2019.ccf.org.cn/kg) 的简单Demo, 模型采用BERT+CNN ( https://github.com/Wangpeiyi9979/IE-Bert-CNN )。 Demo使用Flask搭建

Python 78.82% JavaScript 6.18% HTML 5.90% Jupyter Notebook 9.11%

informationextractiondemo's Issues

RuntimeError: expected a non-empty list of Tensors

Traceback (most recent call last):
File "/home/clife/anaconda2/envs/py36/lib/python3.6/site-packages/flask/app.py", line 2328, in call
return self.wsgi_app(environ, start_response)
File "/home/clife/anaconda2/envs/py36/lib/python3.6/site-packages/flask/app.py", line 2314, in wsgi_app
response = self.handle_exception(e)
File "/home/clife/anaconda2/envs/py36/lib/python3.6/site-packages/flask/app.py", line 1760, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/clife/anaconda2/envs/py36/lib/python3.6/site-packages/flask/_compat.py", line 36, in reraise
raise value
File "/home/clife/anaconda2/envs/py36/lib/python3.6/site-packages/flask/app.py", line 2311, in wsgi_app
response = self.full_dispatch_request()
File "/home/clife/anaconda2/envs/py36/lib/python3.6/site-packages/flask/app.py", line 1834, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/clife/anaconda2/envs/py36/lib/python3.6/site-packages/flask/app.py", line 1737, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/clife/anaconda2/envs/py36/lib/python3.6/site-packages/flask/_compat.py", line 36, in reraise
raise value
File "/home/clife/anaconda2/envs/py36/lib/python3.6/site-packages/flask/app.py", line 1832, in full_dispatch_request
rv = self.dispatch_request()
File "/home/clife/anaconda2/envs/py36/lib/python3.6/site-packages/flask/app.py", line 1818, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/clife/Leo/InformationExtractionDemo/app.py", line 14, in IEDemo
ieData = getTriple(text)
File "/home/clife/Leo/InformationExtractionDemo/utils/findTriple.py", line 29, in getTriple
_, triples = model(sen, None, None)
File "/home/clife/anaconda2/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/clife/Leo/InformationExtractionDemo/utils/BERT_MUL_CNN.py", line 146, in forward
all_tuples = torch.cat(all_tuples, 0) # (B * tule_num, 1, tuple_max_len, bert_hidden_size)
RuntimeError: expected a non-empty list of Tensors
在预测的时候有时会报这个错误,请问下是什么原因引起的?这个地方是不是应该加个异常处理?

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.