text-classification-cnn-rnn icon indicating copy to clipboard operation
text-classification-cnn-rnn copied to clipboard

在其他python文件应用predict

Open kjp96 opened this issue 6 years ago • 0 comments

为了能在其他文件直接使用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: 请问这个问题该怎么解决呢?

kjp96 avatar Mar 26 '19 08:03 kjp96