Giter VIP home page Giter VIP logo

match-lstm's People

Contributors

laddie132 avatar

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  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

match-lstm's Issues

BoundaryPointer类的bidirectional模式疑问

在下面这段代码里,为了用Pointer网络计算从右至左的开始和结束概率,直接把Hr输入到另一个UniBoundaryPointer,并把输出的“开始概率"和”结束概率“对调,这段我不太理解,能否解释一下?

Match-LSTM/models/layers.py

Lines 583 to 587 in 793f0ec

if self.bidirectional:
right_beta_inv, _ = self.right_ptr_rnn.forward(Hr, Hr_mask, h_0)
right_beta = right_beta_inv[[1, 0], :]
rtn_beta = (left_beta + right_beta) / 2

在我的理解里,584行的Hr似乎应该使用masked_flip翻转后再输入吧?

是不是应该效仿MatchRNN的处理方式,用masked_flip处理Hr后输入,得到beta后再用masked_flip翻回来?

Run time Error regarding input size while training

I am trying to train the model (after pre-processing was done successfully) using
python run.py train.
I am using running Windows 10, Python 3.6.5, spaCy 2.0.0, pytorch 0.4.0
Unfortunately, I am receiving a run time error .

2019-05-02 18:47:45,082 - [train.py:22-train()] - INFO - ------------MODEL TRAIN--------------
2019-05-02 18:47:45,082 - [train.py:23-train()] - INFO - loading config file...
2019-05-02 18:47:45,082 - [train.py:37-train()] - INFO - reading squad dataset...
2019-05-02 18:47:49,647 - [train.py:40-train()] - INFO - constructing model...
2019-05-02 18:47:50,334 - [train.py:89-train()] - INFO - start training...
Traceback (most recent call last):
File "C:/Users/Administrator/PycharmProjects/Match-LSTM/run.py", line 38, in
train(args.config_path)
File "C:\Users\Administrator\PycharmProjects\Match-LSTM\train.py", line 110, in train
device=device)
File "C:\Users\Administrator\PycharmProjects\Match-LSTM\train.py", line 162, in train_on_model
ans_range_prop, _, _ = model.forward(*batch_input)
File "C:\Users\Administrator\PycharmProjects\Match-LSTM\models\match_lstm_plus.py", line 119, in forward
context_encode, _ = self.encoder.forward(context_vec, context_mask)
File "C:\Users\Administrator\PycharmProjects\Match-LSTM\models\layers.py", line 716, in forward
o_pack_dropout, _ = self.hidden.forward(v_pack_dropout)
File "C:\Users\Administrator\Anaconda3\lib\site-packages\torch\nn\modules\rnn.py", line 178, in forward
self.check_forward_args(input, hx, batch_sizes)
File "C:\Users\Administrator\Anaconda3\lib\site-packages\torch\nn\modules\rnn.py", line 130, in check_forward_args
self.input_size, input.size(-1)))
RuntimeError: input.size(-1) must be equal to input_size. Expected 373, got 372

Process finished with exit code 1

Would appreciate any help regarding this.
Thanks!

not able to save hdf5

I am getting this error while running pre-process, can you please check?

2018-08-02 18:50:57,367 - [preprocess_data.py:375-run()] - INFO - padding id vectors...
2018-08-02 18:51:21,268 - [preprocess_data.py:392-run()] - INFO - export to hdf5 file...
Traceback (most recent call last):
File "./run.py", line 35, in
preprocess(args.config_path)
File "./run.py", line 24, in preprocess
pdata.run()
File "/data/dchaudhu/Match-LSTM/dataset/preprocess_data.py", line 393, in run
self._export_squad_hdf5()
File "/data/dchaudhu/Match-LSTM/dataset/preprocess_data.py", line 344, in _export_squad_hdf5
**self._compress_option)
File "/data/dchaudhu/anaconda3/envs/py36/lib/python3.6/site-packages/h5py/_hl/group.py", line 116, in create_dataset
dsid = dataset.make_new_dset(self, shape, dtype, data, **kwds)
File "/data/dchaudhu/anaconda3/envs/py36/lib/python3.6/site-packages/h5py/_hl/dataset.py", line 100, in make_new_dset
tid = h5t.py_create(dtype, logical=1)
File "h5py/h5t.pyx", line 1611, in h5py.h5t.py_create
File "h5py/h5t.pyx", line 1633, in h5py.h5t.py_create
File "h5py/h5t.pyx", line 1688, in h5py.h5t.py_create
TypeError: Object dtype dtype('O') has no native HDF5 equivalent

Regards,
Debanjan

prepocess_data.py 343行报错<data = data_grp.create_dataset>,哪里问题呢

`Traceback (most recent call last):
File "run.py", line 35, in
preprocess(args.config_path)
File "run.py", line 24, in preprocess
pdata.run()
File "E:\coms\challenger\资料\codes\Match-LSTM-master\Match-LSTM-master\dataset\preprocess_data.py", line 392, in run
self._export_squad_hdf5()
File "E:\coms\challenger\资料\codes\Match-LSTM-master\Match-LSTM-master\dataset\preprocess_data.py", line 343, in _export_squad_hdf5
**self._compress_option)
File "C:\Users\l\Anaconda3\lib\site-packages\h5py_hl\group.py", line 106, in create_dataset
dsid = dataset.make_new_dset(self, shape, dtype, data, **kwds)
File "C:\Users\l\Anaconda3\lib\site-packages\h5py_hl\dataset.py", line 100, in make_new_dset
tid = h5t.py_create(dtype, logical=1)
File "h5py\h5t.pyx", line 1519, in h5py.h5t.py_create
File "h5py\h5t.pyx", line 1541, in h5py.h5t.py_create
File "h5py\h5t.pyx", line 1596, in h5py.h5t.py_create
TypeError: Object dtype dtype('O') has no native HDF5 equivalent'

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.