berlino / overlapping-ner-em18 Goto Github PK
View Code? Open in Web Editor NEWImplementation of Neural Segmental Hypergraph
License: MIT License
Implementation of Neural Segmental Hypergraph
License: MIT License
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?
I tried to run train.py following you setup instruction
Setup
- Put the embedding file glove.6B.100d.txt into the > folder of embeddings (or directly downlaod from here)
- run the gen_data.py to generate the processed data for training, they will be defaultly placed at the ./data folder
- 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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.