NICALab / SUPPORT

Accurate denoising of voltage imaging data through statistically unbiased prediction, Nature Methods.
https://www.nature.com/articles/s41592-023-02005-8
GNU General Public License v3.0
69 stars 14 forks source link

src.test RuntimeError: Error(s) in loading state_dict for SUPPORT: #6

Closed saglag closed 1 year ago

saglag commented 1 year ago

Following CLI model training, python -m src.test creates a runtime error for loading the state_dict for SUPPORT: RuntimeError: Error(s) in loading state_dict for SUPPORT: size mismatch for out_convs.0.weight: copying a param with shape torch.Size([32, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([32, 128, 1, 1]).

Size mismatch is caused by incompatible bs_size specification between the bs_size of the model versus the argument passed to the function call.

Modified the ### Change it with your data ### section to specify bs_size bs_size = 1 # set to match the bs_size of the model and the function call to be bs_size=bs_size.

SteveJayH commented 1 year ago

I fixed src.test.py. Thanks!