Conv2D中Keras的默认输入格式和py torch输入格式的差异Keras的Conv2D的默认输入格式为batch、width、height、channelPytorch的connection height下显示了keras: keras官方文档的输入格式。 请注意,显示了名为data_format的属性。 将data_format更改为“channels_first”和“channels_last”会影响接受的输入
数据_格式官方文档
由上图可知,默认为batch、width、height、channels
代码示例
pytorch
杂记注意图像的width,宽,看横向的距离
就是看照片的height、高度、纵向距离