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

在其他python文件应用predict #111

Open
kjp96 opened this issue Mar 26, 2019 · 0 comments
Open

在其他python文件应用predict #111

kjp96 opened this issue Mar 26, 2019 · 0 comments

Comments

@kjp96
Copy link

kjp96 commented Mar 26, 2019

为了能在其他文件直接使用predict,我在predict里面加了一个函数
predictTopic(content):
cnn_model = CnnModel()
topic = cnn_model.predict(content)
return topic
但是在其他文件中运行的时候就会报错:Variable embedding already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:
请问这个问题该怎么解决呢?

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