tensorflow 运行error

ERROR:InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [3,3,3,128] rhs shape= [3,3,1,128] [[Node: save/Assign_36 = Assign[T=DT_FLOAT, _class=["loc:@CNN/c1_W"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](CNN/CNN/c1_W/Adam, save/RestoreV2/_73)]]

原因:checkpoint文件中保存的结构跟新执行程序中数据的结果不匹配。

解决方法:删除checkpoint 文件重新训练

猜你喜欢

转载自blog.csdn.net/Z609834342/article/details/83111196