cpa.CPA.load#

classmethod CPA.load(dir_path, adata=None, use_gpu=None)[source]#

Loads the model from the specified directory.

Parameters:
dir_path str

Path to saved model.

adata ~anndata.AnnData, optional (default: None)

Annotated data matrix. Will call cpa.CPA.setup_anndata on the data after model restoration.

use_gpu bool or str or int, optional (default: None)

Whether a GPU should be used. If True, will use GPU.

Returns:

CPA Restored model from the specified directory.