1. 程式人生 > >cifar10模型訓練完,用於識別單個圖片報錯解決方案

cifar10模型訓練完,用於識別單個圖片報錯解決方案

(InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [72,384] rhs shape= [9216,384]
[[Node: save/Assign_5 = Assign[T=DT_FLOAT, _class=["loc:@local3/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](local3/weights, save/RestoreV2_5)]])

解決這種問題一般步驟

1.chenkpoint 先清除再執行

2.設定圖片的格式與訓練圖片格式要一致