Git Product home page Git Product logo

overlapping-ner-em18's Issues

Run train.py with errors

I tried to run train.py following you setup instruction

Setup

  1. Put the embedding file glove.6B.100d.txt into the > folder of embeddings (or directly downlaod from here)
  2. run the gen_data.py to generate the processed data for training, they will be defaultly placed at the ./data folder
  3. run train.py to start training

but get following errors

D:\opt\anaconda3\python.exe D:\src\em18\train.py
{'root_path': '.', 'if_margin': True, 'beta': 3, 'data_set': 'sample', 'lowercase': True, 'batch_size': 32, 'if_shuffle': True, 'if_backward': False, 'if_interactions': True, 'voc_size': 1347, 'pos_size': 34, 'label_size': 5, 'token_feat_size': None, 'span_feat_size': None, 't_null_id': None, 's_null_id': None, 'h_hidden_size': 128, 'token_embed': 100, 'if_pos': True, 'pos_embed': 32, 'input_dropout': 0.5, 'f_hidden_size': 128, 'f_layers': 1, 'f_lstm_dropout': 0.1, 'semi_hidden_size': 128, 'embed_path': './data/word_vec_sample_100.pkl', 'epoch': 500, 'if_gpu': True, 'opt': 'Adam', 'lr': 0.005, 'l2': 0.0001, 'check_every': 1, 'clip_norm': 3, 'lr_patience': 3, 'decay_patience': 2, 'pre_trained': True, 'data_path': './data/sample', 'model_path': './dumps/sample_model.pt', 'if_C': True, 'C': 6, 'char_size': 73}
D:\opt\anaconda3\lib\site-packages\torch\nn\modules\rnn.py:38: UserWarning: dropout option adds dropout after all but last recurrent layer, so non-zero dropout expects num_layers greater than 1, but got dropout=0.1 and num_layers=1
  "num_layers={}".format(dropout, num_layers))
Loading from ./data/word_vec_sample_100.pkl with size torch.Size([1347, 100])
27 batches expected for training
Epoch:  1
D:\src\em18\module\Hypergraph.py:254: UserWarning: invalid index of a 0-dim tensor. This will be an error in PyTorch 0.5. Use tensor.item() to convert a 0-dim tensor to a Python number
  diff = (loss_vec_relu - loss_vec).max().cpu().data[0]
D:\src\em18\module\Hypergraph.py:256: UserWarning: invalid index of a 0-dim tensor. This will be an error in PyTorch 0.5. Use tensor.item() to convert a 0-dim tensor to a Python number
  if output["loss"].cpu().data[0] < 0:
D:\src\em18\training\util.py:25: UserWarning: torch.nn.utils.clip_grad_norm is now deprecated in favor of torch.nn.utils.clip_grad_norm_.
  torch.nn.utils.clip_grad_norm(model.parameters(), clip_norm, norm_type=2)
Traceback (most recent call last):
  File "D:\src\em18\train.py", line 116, in <module>
    batch_counter, batch_len, sent_len, loss.cpu().data.numpy()[0]))
IndexError: too many indices for array

Where to get the full processed data?

Hello, the data offerd in your source code is just a little part of GENIA data. And where can I get the processed full GENIA data for your SH model?

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.