NameError: name 'logits' is not defined

pred = multilayer_perceptron(x, weights, biases)

cost = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=logits,labels=labels)(pred, y))
optm = tf.train.GradientDescentOptimizer(learning_rate=0.001).minimize(cost)
corr = tf.equal(tf.argmax(pred, 1), tf.argmax(y, 1))
accr = tf.reduce_mean(tf.cast(corr,”float”))

init = tf.global_variables_initializer()
print (“FUNCTIONS READY”)
NameError: name ‘logits’ is not defined
请问这个名称错误如何解决

阅读更多
文章标签: tensorflow nameError
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭