Skip to content

How to calculate the parameters in torchvision.transforms.Normalize(mean, std) #558

@xiexu666

Description

@xiexu666

I have load my own image dataset , but don't know how to calculate the mean and std
train_data=torchvision.datasets.ImageFolder('F:/trainData',transform=transforms.Compose( [ transforms.Scale(256), transforms.RandomCrop(224), transforms.ToTensor() ]))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions