Skip to content

the question about output shape #48

Description

@lucky26418

I got a problem when i test the model with cityscapes's dataset like this. How can I solve it?

Traceback (most recent call last):
File "main.py", line 348, in
loaders, w_class, class_encoding = load_dataset(dataset)
File "main.py", line 124, in load_dataset
color_labels = utils.batch_transform(labels, label_to_rgb)
File "D:\Projects\ENetProjects\PyTorch-ENet-master\utils.py", line 21, in batch_transform
transf_slices = [transform(tensor) for tensor in torch.unbind(batch)]
File "D:\Projects\ENetProjects\PyTorch-ENet-master\utils.py", line 21, in
transf_slices = [transform(tensor) for tensor in torch.unbind(batch)]
File "D:\Applications\anaconda3\lib\site-packages\torchvision\transforms\transforms.py", line 61, in call
img = t(img)
File "D:\Projects\ENetProjects\PyTorch-ENet-master\transforms.py", line 92, in call
color_tensor[channel].masked_fill_(mask, color_value)
RuntimeError: output with shape [360, 480] doesn't match the broadcast shape [3, 360, 480]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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