text-classification-cnn-rnn
text-classification-cnn-rnn copied to clipboard
在其他python文件应用predict
为了能在其他文件直接使用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: 请问这个问题该怎么解决呢?