-
Notifications
You must be signed in to change notification settings - Fork 23
Description
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