scglue.models.base.Model

class scglue.models.base.Model(*args, **kwargs)[source]

Bases: object

Abstract model class

Parameters:
  • net – Network type

  • *args – Positional arguments are passed to the network constructor

  • **kwargs – Keyword arguments are passed to the network constructor

Note

Subclasses may override arguments for API definition.

Methods

compile

Prepare model for training

fit

Alias of .trainer.fit.

get_losses

Alias of .trainer.get_losses.

save

Save model to file

upgrade

Upgrade the model if generated by older versions

Attributes

logger

net

Neural network module in the model (read-only)

trainer

Trainer of the neural network module (read-only)