The-Learning-And-Vision-Atelier-LAVA / SMSR

[CVPR 2021] Exploring Sparsity in Image Super-Resolution for Efficient Inference
237 stars 30 forks source link

about generate_indices in code #11

Open Gideon1998 opened 2 years ago

Gideon1998 commented 2 years ago

Hi, I'm interested in this work. But I don’t know what is the use of generate_indices for spa_mask.

LongguangWang commented 2 years ago

Hi @Gideon1998, generate_indices() aims to produce the coordinates of "important" pixels marked by the spatial mask. With these coordinates, we can perform sparse convolution to compute the output at only these sparse locations.