Torch 中图像(RGB)尺寸的约定是什么

What is the convention for image (RGB) dimensions in Torch

Torch 中图像尺寸的约定是什么?我不是 Torch 用户,但正在阅读一些代码,我需要知道 Torch 通常将 RGB 图像表示为 {height, width, channels} 还是 {channels, width, height},因为我认为我正在读出代码正在看。

如果您使用 image 包(这是通常的方式),那么它通常将图像表示为大小 (channels, height, width) 的张量。