torch_frame.nn.encoder.LinearEncoder
- class LinearEncoder(out_channels: int | None = None, stats_list: list[dict[StatType, Any]] | None = None, stype: stype | None = None, post_module: torch.nn.Module | None = None, na_strategy: NAStrategy | None = None)[source]
Bases:
StypeEncoder
A 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.