Based on the error message hr_images and hr_edges have different shapes in dim2, while only a size mismatch would be allowed in dim1, which is used to concatenate the tensors.
You can print the shape of both tensors before applying the torch.cat operation and make sure the spatial shapes match.