torchcell.models.hetero_cell_bipartite_dango_diff_gi.LinearDecoder

class LinearDecoder(input_dim: int, output_dim: int = 1)[source]

Bases: Module

Simple linear decoder for baseline comparison.

Maps combined embeddings directly to phenotype predictions.

forward(z_c: Tensor) → Tensor[source]

Forward pass.

Parameters:

z_c – Combined embeddings [batch_size, input_dim]

Returns:

Predictions [batch_size, output_dim]

sample(context: Tensor, **kwargs: Any) → Tensor[source]

Sample method for compatibility with diffusion decoder interface.

For linear decoder, this is just a forward pass.