scvi.external.drvi.SplitFCLayers#
- class scvi.external.drvi.SplitFCLayers(*args, n_split=1, reuse_weights, **kwargs)[source]#
Bases:
FCLayersFully-connected layers that process several latent splits in parallel.
A thin subclass of
FCLayersfor 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 ofFCLayersare overridden;forwardandset_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 (lengthn_layers).True→ that layer is a single sharedLinear(broadcast over the split dimension);False→ per-split weights viaStackedLinearLayer.**kwargs – Keyword arguments for
FCLayers.
Attributes table#
Methods table#
Attributes#
- SplitFCLayers.training: bool#