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

generate_title生成标题,出现错误 #24

Open
wjy3326 opened this issue Apr 6, 2022 · 0 comments
Open

generate_title生成标题,出现错误 #24

wjy3326 opened this issue Apr 6, 2022 · 0 comments

Comments

@wjy3326
Copy link

wjy3326 commented Apr 6, 2022

wandb: WARNING W&B installed but not logged in. Run wandb login or set the WANDB_API_KEY env variable.
Calling BertTokenizer.from_pretrained() with the path to a single file or url is deprecated
Traceback (most recent call last):
File "generate_title.py", line 210, in
generate_title_GPT2("澳大利亚新闻直播:拜登说普京在乌克兰“背靠墙”;中国东方航空公司坠机调查不排除“犯规”")
File "generate_title.py", line 198, in generate_title_GPT2
model = GPT2LMHeadModel.from_pretrained(args.model_path)
File "/home/user/anaconda3/envs/image_text_match_tf_1.15/lib/python3.6/site-packages/transformers/modeling_utils.py", line 672, in from_pretrained
model = cls(config, *model_args, **model_kwargs)
File "/home/user/wjy/Jiagu-master/标题生成/GPT2-NewsTitle-main/model.py", line 26, in init
super(GPT2LMHeadModel).init(config)
TypeError: super() argument 1 must be type, not GPT2Config

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

1 participant