cnn-text-classification-tf
cnn-text-classification-tf copied to clipboard
ValueError: Variable output/W already exists, disallowed.
ValueError: Variable output/W_project already exists, disallowed. Did you mean to set reuse=True in VarScope? Originally defined at:
with tf.name_scope("output"): W= tf.Variable( "W", shape=[num_filters_total, self.config.num_classes], initializer=tf.contrib.layers.xavier_initializer()) b = tf.Variable(tf.constant(0.1, shape=[self.config.num_classes]), name="b") l2_loss += tf.nn.l2_loss(W_project) l2_loss += tf.nn.l2_loss(b) self.scores = tf.nn.xw_plus_b(self.h_drop, W_project, b, name="scores") ## error here self.predict_y = tf.argmax(self.scores, 1, name="prediction")
Any suggestions, thanks!