SIGnature.models.scimilarity#

class SIGnature.models.scimilarity.Encoder(*args, **kwargs)[source]#

Bases: Module

A class that encapsulates the encoder.

Parameters:
  • n_genes (int)

  • latent_dim (int)

  • hidden_dim (List[int])

  • dropout (float)

  • input_dropout (float)

  • residual (bool)

forward(x)[source]#

Forward.

Parameters:

x (torch.Tensor) – Input tensor corresponding to input layer.

Returns:

Output tensor corresponding to output layer.

Return type:

torch.Tensor

load_state(filename, use_gpu=False)[source]#

Load model state.

Parameters:
  • filename (str) – Filename containing the model state.

  • use_gpu (bool, default: False) – Boolean indicating whether or not to use GPUs.

save_state(filename)[source]#

Save model state.

Parameters:

filename (str) – Filename to save the model state.

class SIGnature.models.scimilarity.SCimilarity(model_path, use_gpu=False)[source]#

Bases: object

A class loads the SCimilarity model.

Parameters:
  • model_path (str)

  • use_gpu (bool)