InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs

报错:

InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [72,128] rhs shape= [720,128]

[[Node: save/Assign = Assign[T=DT_FLOAT, _class=["loc:@Variable"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](Variable, save/RestoreV2)]]



训练好神经网络,在预测的时候报错了,后来检查发现预测时定义的网络结构的参数和训练保存的网络结构参数不匹配造成的,修改成相同的参数就可以了。

猜你喜欢

转载自blog.csdn.net/orangefly0214/article/details/80909755
今日推荐