Skip to content

关于图片默认维度的可能笔误 #47

@YukiCR

Description

@YukiCR

教程1-2的代码块In 7中,注释为# Pytorch的图片默认顺序是 Batch,Channel,Width,Height, 这和Pytorch一些文档不符

在该代码块前面的变换定义中:

transform_img = T.Compose(
    [T.ToTensor()])

ToTensor() 也是将图片从HxWxC变换到CxHxW

因为教程中图片是32x32的,H,W交换可能不会导致bug。
为了避免大家学习时误解,建议check一下

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions