sotiraslab / AgileFormer

This the repo for the paper tiltled "AgileFormer: Spatially Agile Transformer UNet for Medical Image Segmentation"
https://arxiv.org/abs/2404.00122
Apache License 2.0
63 stars 9 forks source link

ValueError #10

Closed zhangxuan-thecastle closed 4 months ago

zhangxuan-thecastle commented 5 months ago

Dear author, I am very excited after reading your paper and feel that you have written it very well. However, when reproducing the code, I encountered this issue.
I use torch==2.1.1+cu121 pip3 install natten==0.17.1+torch210cu121 -f https://shi-labs.com/natten/wheels/

File "/root/anaconda3/envs/AF1/lib/python3.10/site-packages/natten/utils/checks.py", line 119, in check_all_args check_kernel_size_arg(na_dim, kernel_size), File "/root/anaconda3/envs/AF1/lib/python3.10/site-packages/natten/utils/checks.py", line 61, in check_kernel_size_arg raise ValueError( ValueError: Invalid value for kernel_size; expected an integer or tuple of integers, got <class 'torch.nn.parameter.Parameter'>

peijie-chiu commented 4 months ago

Thank you for being interested in our work. I think the issue is caused by natten v.0.17.1. I would recommend using the same version (i.e., v. 0.15) as I used to avoid further issues.