Sizes of tensors must match when reference mapping with SCANVI


I am not sure why I got the following error. Could you please help me with it? Thank you.

RuntimeError Traceback (most recent call last)
/tmp/ipykernel_344002/ in
—> 10 vae_q = scvi.model.SCANVI.load_query_data(
11 adata_query,
12 vae_ref_scan,

~/anaconda3/envs/python/lib/python3.9/site-packages/scvi/model/base/ in load_query_data(cls, adata, reference_model, inplace_subset_query_vars, use_gpu, unfrozen, freeze_dropout, freeze_expression, freeze_decoder_first_layer, freeze_batchnorm_encoder, freeze_batchnorm_decoder, freeze_classifier)
116 else:
117 dim_diff = new_ten.size()[-1] - load_ten.size()[-1]
→ 118 fixed_ten =[load_ten, new_ten[…, -dim_diff:]], dim=-1)
119 load_state_dict[key] = fixed_ten

RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 13 but got size 14 for tensor number 1 in the list.

Hi could you perhaps provide more context around this code? If you have a notebook or script, it would very helpful to try to reproduce the issue on our end. Thanks!