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