报错:tensorflow.InvalidArgumentError: Input reshape is 7680 values, but the requested shape has 768

  • 报错:tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 76800 values, but the requested shape has 768
print("auxiliary_tensor:",auxiliary_tensor)    # Tensor("AuxLogits/SpatialSqueeze:0", shape=(1, 768), dtype=float32)
print("----------------------------------------------")
print("train_auxiliarys-shape:",np.shape(train_auxiliarys))      # (10, 768)
print("train_ground_truth-shape:",np.shape(train_ground_truth))  # (10, 5)
print("auxiliary_input:",auxiliary_input)   # Tensor("input/AuxiliaryInputPlaceholder:0", shape=(?, 768), dtype=float32)
print("ground_truth_input:",ground_truth_input) # Tensor("input/GroundTruthInput:0", shape=(?, 5), dtype=float32)
print("type train_auxiliarys:",type(train_auxiliarys))   # type train_auxiliarys: <class 'list'>
print("type train_ground_truth:",type(train_ground_truth))   # type train_ground_truth: <class 'list'>
print("----------------------------------------------")


train_summary, _ = sess.run([merged, train_step],
         feed_dict={auxiliary_input: train_auxiliarys,
                    ground_truth_input: train_ground_truth})

这个问题,我前后折腾了很久,还是没能解决…抱歉…

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值