Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error #9

Open
ybwdsg opened this issue Sep 5, 2020 · 1 comment
Open

error #9

ybwdsg opened this issue Sep 5, 2020 · 1 comment

Comments

@ybwdsg
Copy link

ybwdsg commented Sep 5, 2020

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

@wang-h
Copy link
Member

wang-h commented Sep 22, 2020

see readme. pytorch-transformers==1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants