Skip to content

Wrong std value in CIFAR10 config  #5

Closed as not planned
Closed as not planned
@nps1ngh

Description

@nps1ngh

Hi,

the value of std in the config file:

std: [0.2023, 0.1994, 0.2010]

seems to be wrong. It should be [0.2470, 0.2435, 0.2616] instead.

See this comment.

Some code to calculate it:

import torchvision

c10 = torchvision.datasets.CIFAR10(
    ".",
    train=True,
    transform=torchvision.transforms.ToTensor(),
)

all_images = torch.stack([t[0] for t in c10])  # .shape == (50_000, 3, 32, 32)
print("mean", all_images.mean(dim=(0, 2, 3)))  # [0.4914, 0.4822, 0.4465]
print("std", all_images.std(dim=(0, 2, 3)))    # [0.2470, 0.2435, 0.2616]

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