我在seq2seq.sequence_loss中得到了这个错误,即使第一个模糊的逻辑和标签具有相同的维度,即batchSize
我在TF1.0版本中创建了一个seq2seq模型。for traceback): logits and labels must have the same first dimension, got logits shape [1280,150000]和targets张量<e
我尝试使用Imagenet V2进行多类分类(6个类)的传输学习,但得到了以下错误。有人能帮忙吗?ValueError: `logits` and `labels` must have the same shape, received ((None, 6) vs (None, 1)).我从安德鲁·吴( Andrew )的CNN课程借用了这个代码,我花了一段时间,但最初的代码是用于二进制分类的。我试图修改它以进行多类分类,但得到了这个错误。这是我的密码:
import m
# Scenario 1loss_op = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(或# Evaluate model (with test logits, for dropout to beprediction, 1), tf.argmax(Y, 1))
accuracy = tf.red