You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "bert.py", line 427, in
main()
File "bert.py", line 357, in main
config.pretrained_model_name, config=bertconfig)
File "/usr/local/lib/python3.6/dist-packages/pytorch_transformers/modeling_utils.py", line 536, in from_pretrained
model = cls(config, *model_args, **model_kwargs)
File "/content/drive/My Drive/bert-relation-classification-master/model.py", line 66, in init
self.apply(self.init_weights)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 440, in apply
module.apply(fn)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 440, in apply
module.apply(fn)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 440, in apply
module.apply(fn)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 441, in apply
fn(self)
TypeError: init_weights() takes 1 positional argument but 2 were given
The text was updated successfully, but these errors were encountered:
when i type
python bert.py --config config.ini
Traceback (most recent call last):
File "bert.py", line 427, in
main()
File "bert.py", line 357, in main
config.pretrained_model_name, config=bertconfig)
File "/usr/local/lib/python3.6/dist-packages/pytorch_transformers/modeling_utils.py", line 536, in from_pretrained
model = cls(config, *model_args, **model_kwargs)
File "/content/drive/My Drive/bert-relation-classification-master/model.py", line 66, in init
self.apply(self.init_weights)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 440, in apply
module.apply(fn)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 440, in apply
module.apply(fn)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 440, in apply
module.apply(fn)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 441, in apply
fn(self)
TypeError: init_weights() takes 1 positional argument but 2 were given
The text was updated successfully, but these errors were encountered: