scvi.external.drvi.SplitFCLayers#

class scvi.external.drvi.SplitFCLayers(*args, n_split=1, reuse_weights, **kwargs)[source]#

Bases: FCLayers

Fully-connected layers that process several latent splits in parallel.

A thin subclass of FCLayers for DRVI’s additive decoder. The input is a 3D tensor of shape (n_obs, n_split, n_features) (one independent “split” per channel) instead of the usual 2D (n_obs, n_features). Only small construction/application seams of FCLayers are overridden; forward and set_online_update_hooks (the scArches hooks) are inherited unchanged.

Parameters:
  • n_split (int (default: 1)) – Number of parallel splits (channels) carried in the second tensor dimension.

  • reuse_weights (Sequence[bool] | bool) – Per-layer weight-sharing across splits: either a single bool applied to every layer, or a sequence of bools with one entry per layer (length n_layers). True → that layer is a single shared Linear (broadcast over the split dimension); False → per-split weights via StackedLinearLayer.

  • **kwargs – Keyword arguments for FCLayers.

Attributes table#

Methods table#

Attributes#

SplitFCLayers.training: bool#

Methods#