ValueError: Negative dimension size caused by subtracting 2 from 1 for 'max_pooling2d_2/MaxPool' (op

如果出現這種錯誤(可以吧紫色框的內容進行搜索),是」channels_last」和」channels_first」數據格式的問題。input_shape=(C,H, W)是theano的寫法,而tensorflow需要寫出:(H, W,C)。 需要將根目錄下的.keras文件做些修改:
相關文章
相關標籤/搜索