elijahcole / sinr

Spatial Implicit Neural Representations for Global-Scale Species Mapping - ICML 2023

Home Page:https://arxiv.org/abs/2306.02564

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ValueError in viz_map.py

mrtnlowry opened this issue · comments

Line 76 of the code produces a "shape mismatch" message. This appears to caused by preds.shape being too large (499385,256) to be pasted into op_im (shape: (499385,)). Which slice of preds is the correct one to use?

Hi there.

Can you confirm that you have not modified this line:

preds = model(locs_enc, return_feats=False, class_of_interest=class_of_interest).cpu().numpy()

preds should have the same number of entries as rows in locs_enc and have a single value for each entry.

The code here

https://github.com/macaodha/geo_prior/blob/b0c761712a0aeced56eba86dd19eda657fbe895a/geo_prior/models.py#L58

uses "torch.matmul(x, ...)" rather than the equivalent line in this package which uses "x * ...". Is that significant?

Thanks for flagging this. Yes, it was an issue with how "*" is treated in the version of torch specified in the requirements. Should be fixed with the latest commit.