Traceback (most recent call last):
File "D:/pycharm/work/Chinese_NRE-master/main.py", line 187, in
train(data, configure.savemodel)
File "D:/pycharm/work/Chinese_NRE-master/main.py", line 97, in train
model = MGLattice_model(data)
File "D:\pycharm\work\Chinese_NRE-master\nn\framework.py", line 15, in init
self.encoder = BiLstmEncoder(data)
File "D:\pycharm\work\Chinese_NRE-master\nn\encoder.py", line 98, in init
self.forward_lstm = LatticeLSTM(lstm_input, lstm_hidden, data.gaz_dropout, data.gaz_alphabet.size(), data.gaz_emb_dim, data.pretrain_gaz_embedding, True, data.HP_fix_gaz_emb, self.gpu)
File "D:\pycharm\work\Chinese_NRE-master\nn\mglattice.py", line 262, in init
self.rnn = MultiInputLSTMCell(input_dim, hidden_dim)
File "D:\pycharm\work\Chinese_NRE-master\nn\mglattice.py", line 163, in init
self.reset_parameters()
File "D:\pycharm\work\Chinese_NRE-master\nn\mglattice.py", line 174, in reset_parameters
self.weighthh.data.set(weight_hh_data)
RuntimeError: set_storage is not allowed on Tensor created from .data or .detach()
Traceback (most recent call last): File "D:/pycharm/work/Chinese_NRE-master/main.py", line 187, in
train(data, configure.savemodel)
File "D:/pycharm/work/Chinese_NRE-master/main.py", line 97, in train
model = MGLattice_model(data)
File "D:\pycharm\work\Chinese_NRE-master\nn\framework.py", line 15, in init
self.encoder = BiLstmEncoder(data)
File "D:\pycharm\work\Chinese_NRE-master\nn\encoder.py", line 98, in init
self.forward_lstm = LatticeLSTM(lstm_input, lstm_hidden, data.gaz_dropout, data.gaz_alphabet.size(), data.gaz_emb_dim, data.pretrain_gaz_embedding, True, data.HP_fix_gaz_emb, self.gpu)
File "D:\pycharm\work\Chinese_NRE-master\nn\mglattice.py", line 262, in init
self.rnn = MultiInputLSTMCell(input_dim, hidden_dim)
File "D:\pycharm\work\Chinese_NRE-master\nn\mglattice.py", line 163, in init
self.reset_parameters()
File "D:\pycharm\work\Chinese_NRE-master\nn\mglattice.py", line 174, in reset_parameters
self.weighthh.data.set(weight_hh_data)
RuntimeError: set_storage is not allowed on Tensor created from .data or .detach()