scvi.external.GIMVI.load

classmethod GIMVI.load(dir_path, adata_seq=None, adata_spatial=None, use_gpu=None)[source]

Instantiate a model from the saved output.

Parameters
adata_seq : AnnData | NoneOptional[AnnData] (default: None)

AnnData organized in the same way as data used to train model. It is not necessary to run setup_anndata(), as AnnData is validated against the saved scvi setup dictionary. AnnData must be registered via setup_anndata().

adata_spatial : AnnData | NoneOptional[AnnData] (default: None)

AnnData organized in the same way as data used to train model. If None, will check for and load anndata saved with the model.

dir_path : strstr

Path to saved outputs.

use_gpu : str | int | bool | NoneUnion[str, int, bool, None] (default: None)

Load model on default GPU if available (if None or True), or index of GPU to use (if int), or name of GPU (if str), or use CPU (if False).

Returns

Model with loaded state dictionaries.

Examples

>>> vae = GIMVI.load(adata_seq, adata_spatial, save_path)
>>> vae.get_latent_representation()