- 报错: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})
这个问题,我前后折腾了很久,还是没能解决…抱歉…