torch_frame.nn.encoder.LinearEncoder
- class LinearEncoder(out_channels: Optional[int] = None, stats_list: Optional[list[dict[torch_frame.data.stats.StatType, Any]]] = None, stype: Optional[stype] = None, post_module: Optional[Module] = None, na_strategy: Optional[NAStrategy] = None)[source]
Bases:
StypeEncoderA linear function based encoder for numerical features. It applies linear layer
torch.nn.Linear(1, out_channels)on each raw numerical feature and concatenates the output embeddings. Note that the implementation does this for all numerical features in a batched manner.