alexandrosstergiou / SoftPool

[ICCV 2021] Code for approximated exponential maximum pooling
MIT License
288 stars 52 forks source link

Hello, I find a bug when i use softpool2d. #36

Closed KeqiWangSXuniversity closed 3 years ago

KeqiWangSXuniversity commented 3 years ago

RuntimeError: input.is_contiguous() INTERNAL ASSERT FAILED at "/export/w/SoftPool/pytorch/CUDA/softpool_cuda.cpp":120, please report a bug to PyTorch. input must be a contiguous tensor

alexandrosstergiou commented 3 years ago

Hi @KeqiWangSXuniversity,

This question has been answered in previous issues #6 and #16.

It just means that the tensor that you're passing as an argument does not occupy a contiguous memory space. You can use .contiguous() alongside the function call, although most recent repo versions do internal checks.

Best, Alex