Skip to content

hr_image and hr_edge are in different sizes #4

@n0acar

Description

@n0acar

The shape of hr_image is 3,256,256 however hr_edge is 1,70,70. I couldn't find anything relatable with 70. I made the change with cuda as in issue #1 . What might be the problem here? Where does 70 come. I use edge enhancer and sr model together in mode 3 and super resolution scale is 8.

Traceback (most recent call last):
File "main.py", line 120, in
main()
File "main.py", line 50, in main
model.train()
File "/scratch/users/nacar14/edge-informed-sisr/src/edge_match.py", line 120, in train
hr_images_pred, gen_loss, dis_loss, logs = self.sr_model.process(lr_images, hr_images, lr_edges, hr_edges_pred)
File "/scratch/users/nacar14/edge-informed-sisr/src/models.py", line 214, in process
outputs = self(lr_images, hr_edges)
File "/kuacc/users/nacar14/miniconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/scratch/users/nacar14/edge-informed-sisr/src/models.py", line 269, in forward
inputs = torch.cat((hr_images, hr_edges), dim=1)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 256 and 70 in dimension 2 at /opt/conda/conda-bld/pytorch_1573049306803/work/aten/src/THC/g
eneric/THCTensorMath.cu:71

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