Source code for ACL 2019 paper "Chinese Relation Extraction with Multi-Grained Information and External Linguistic Knowledge"
MIT License
269
stars
43
forks
source link
File "Chinese_NRE\nn\mglattice.py", line 175, in reset_parameters self.weight_hh.data.set_(weight_hh_data) RuntimeError: set_storage is not allowed on a Tensor created from .data or .detach(). If your intent is to change the metadata of a Tensor (such as sizes / strides / storage / storage_offset) without autograd tracking the change, remove the .data / .detach() call and wrap the change in a `with torch.no_grad():` block. #20
Changing
self.weighthh.data.set(weight_hh_data)
to with torch.no_grad(): self.weighthh.data.set(weight_hh_data)
did not help.