Giter Site home page Giter Site logo

onehaitao / att-blstm-relation-extraction Goto Github PK

View Code? Open in Web Editor NEW
73.0 4.0 18.0 753 KB

Implementation of Attention-Based Bidirectional Long Short-Term Memory Networks for Relation Classification.

License: MIT License

Python 58.30% Perl 41.70%
relation-extraction semeval-2010

att-blstm-relation-extraction's Introduction

Hi there 👋

My name is Haitao Wang.

  • 👻 An ordinary coder, enjoy life and love technology.
  • ⚽ Interested in information extraction and natural language understanding.
  • ✉️ How to reach me: Issue or Mail.

Anurag's github stats

att-blstm-relation-extraction's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

att-blstm-relation-extraction's Issues

I run the code and get the F1 score 82.73

Hi, thanks for your code!I have a question,can you give me some advice? I run your code,but only get F1 score 82.73,never get 83.13 in your log file.If you have time, thanks for your advice.

Position Indicator

Hello,
I wonder if the position indicator has the corresponding embedding or just UNK?

Thanks

当选择BiLSTtt进行训练时,报错

往上翻发现提示
File "D:\Program Files\miniconda3\envs\pyt\lib\site-packages\torch\nn\modules\module.py", line 1072, in train
module.train(mode)
[Previous line repeated 990 more times]
File "D:\Program Files\miniconda3\envs\pyt\lib\site-packages\torch\nn\modules\module.py", line 1070, in train
self.training = mode
File "D:\Program Files\miniconda3\envs\pyt\lib\site-packages\torch\nn\modules\rnn.py", line 97, in setattr
super(RNNBase, self).setattr(attr, value)
File "D:\Program Files\miniconda3\envs\pyt\lib\site-packages\torch\nn\modules\module.py", line 602, in setattr
params = self.dict.get('_parameters')
RecursionError: maximum recursion depth exceeded while calling a Python object

运行发现错误


start to train the model ...
Traceback (most recent call last):
File "", line 1, in
File "C:\Program Files\Python36\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "C:\Program Files\Python36\lib\multiprocessing\spawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
AttributeError: 'SemEvalDataLoader' object has no attribute '__collate_fn'
Traceback (most recent call last):
File "", line 1, in
File "C:\Program Files\Python36\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "C:\Program Files\Python36\lib\multiprocessing\spawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
AttributeError: 'SemEvalDataLoader' object has no attribute '__collate_fn'
Traceback (most recent call last):
File "run.py", line 100, in
train(model, criterion, loader, config)
File "run.py", line 37, in train
for step, (data, label) in enumerate(train_loader):
File "C:\Program Files\Python36\lib\site-packages\torch\utils\data\dataloader.py", line 804, in next
idx, data = self._get_data()
File "C:\Program Files\Python36\l

TypeError: __collate_fn()

python = 3.6
pytorch = 1.3.0
After python run.py, show this error massage

Traceback (most recent call last):
File ".\run.py", line 105, in
train(model, criterion, loader, config)
File ".\run.py", line 39, in train
for step, (data, label) in enumerate(train_loader):
File "C:\Users\90607.conda\envs\Att-BLSTM-relation-extraction-master\lib\site-packages\torch\utils\data\dataloader.py", line 346, in next
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\Users\90607.conda\envs\Att-BLSTM-relation-extraction-master\lib\site-packages\torch\utils\data_utils\fetch.py", line 47, in fetch
return self.collate_fn(data)
TypeError: __collate_fn() takes 1 positional argument but 2 were given

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.