creotiv / hdrnet-pytorch

Unofficial PyTorch implementation of 'Deep Bilateral Learning for Real-Time Image Enhancement', SIGGRAPH 2017 https://groups.csail.mit.edu/graphics/hdrnet/
224 stars 43 forks source link

RuntimeError x #31

Closed Egkang-Luis closed 2 years ago

Egkang-Luis commented 2 years ago

I'm trying to run hdrnet-python code after cloning this git.

I used python 3.8.13 and pytorch 1.10.2 and torchvision 0.11.3

But when I run train.py, I got runtime error code as below.

Could you let me know how to solve and run train.py?


aten::meshgrid(Tensor[] tensors) -> (Tensor[]): Keyword argument indexing unknown. : File "/home/eunggukang/hdrnet_pytorch/hdrnet-pytorch/slice.py", line 65 """ dev = grid.device ii, jj = torch.meshgrid(


        [torch.arange(guide.shape[0]).to(dev), torch.arange(guide.shape[1]).to(dev)], indexing='ij')
'_bilateral_slice' is being compiled since it was called from 'batch_bilateral_slice'
  File "/home/eunggukang/hdrnet_pytorch/hdrnet-pytorch/slice.py", line 137
    res = []
    for i in range(grid.shape[0]):
        res.append(_bilateral_slice(grid[i], guide[i]).unsqueeze(0))
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
    return torch.concat(res, 0)
Egkang-Luis commented 2 years ago

After changing pytorch version, issue was solved

tachikoma777 commented 2 years ago

After changing pytorch version, issue was solved

Hi, could you tell me what pytorch/torchvision version you change to? I met the same error. Thanks!

tachikoma777 commented 2 years ago

I change to torch1.1&torchvision 0.3.0, and the following error occured:

RuntimeError: object has no attribute concat: @torch.jit.script def batch_bilateral_slice(grid, guide): res = [] for i in range(grid.shape[0]): res.append(_bilateral_slice(grid[i], guide[i]).unsqueeze(0)) return torch.concat(res, 0)

zrk2002 commented 1 year ago

After changing pytorch version, issue was solved

Hi, could you tell me what pytorch/torchvision version you change to? I met the same error. Thanks!

Have you solved this problem? I have encountered the same problem.