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

freeze_graph.py错误 #10

Open
w-wenjie opened this issue Aug 1, 2019 · 1 comment
Open

freeze_graph.py错误 #10

w-wenjie opened this issue Aug 1, 2019 · 1 comment

Comments

@w-wenjie
Copy link

w-wenjie commented Aug 1, 2019

optimize_class_model方法里调用create_classification_model时会传入num_labels,但是这个num_labels在前面没定义。
#############################################################

增加 从label2id.pkl中读取num_labels, 这样也可以不用指定num_labels参数; 2019/4/17

    if not args.num_labels:
        num_labels, label2id, id2label = init_predict_var(tmp_dir)

#############################################################
如果执行脚本时输入了num_labels参数,则上面这段代码就不会执行,这就导致没有定义num_labels变量。

@zyj108
Copy link

zyj108 commented Aug 15, 2019

将183行代码的参数num_labels=num_labels改为num_labels=args.num_labels即可。

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