Skip to content

The aspect ratio is unintentionally kept in test.py and test_batch.py #11

@xunings

Description

@xunings

Hi,
I had an error while feeding male2female test images (178x218) into test.py or test_batch.py.

RuntimeError: The size of tensor a (313) must match the size of tensor b (312) at non-singleton dimension 2

It seems that the aspect ratio is unintentionally kept during resizing, leading to (256, 313) output instead of (256, 256).

One way to fix this is changing new_size=config['new_size'] to new_size=(config['new_size'], config['new_size']) in the below line.

data_loader = get_data_loader_folder(opts.input_folder, 1, False, new_size=config['new_size'], crop=False)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions