在运行到
loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(output,Y))
时,报错:
ValueError: Only call sigmoid_cross_entropy_with_logits
with named arguments (labels=…, logits=…, …)
应该改为
loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(labels=output,logits=Y))
来源:CSDN
作者:Nani_xiao
链接:https://blog.csdn.net/xiao_lxl/article/details/77249209