Skip to content

Exercise 4.2 - Trouble getting transforms to work #60

Answered by rasbt
memetzgz asked this question in Exercises
Discussion options

You must be logged in to vote

Interesting! You mean the following data transforms?

    data_transforms = {
        "train": transforms.Compose(
            [
                transforms.Resize(32),
                transforms.RandomCrop((28, 28)),
                transforms.ToTensor(),
                # normalize images to [-1, 1] range
                transforms.Normalize((0.5,), (0.5,)),
            ]
        ),
        "test": transforms.Compose(
            [
                transforms.Resize(32),
                transforms.CenterCrop((28, 28)),
                transforms.ToTensor(),
                # normalize images to [-1, 1] range
                transforms.Normalize((0.5,), (0.5,)),
            ]
        ),
   …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@memetzgz
Comment options

@rasbt
Comment options

Answer selected by memetzgz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants