sc_reconstruction.adapters.FrozenMLPDecoderAdapter#

class sc_reconstruction.adapters.FrozenMLPDecoderAdapter(*args, **kwargs)[source]#

Bases: Module

Adapter that loads a frozen MLPDecoder from a Lightning checkpoint.

Parameters:
  • checkpoint_path (str) – Path to the .ckpt file produced by Lightning’s ModelCheckpoint.

  • map_location (str or torch.device, optional) – Device to map weights onto (default: cpu).

__init__(checkpoint_path, map_location='cpu')[source]#
Parameters:

checkpoint_path (str)

Methods

__init__(checkpoint_path[, map_location])

forward(x)

Decode embeddings to gene expression.

gene_dim()

train([mode])

Attributes

n_input

n_output