rllm.nn.encoder.ResNetPreEncoder¶
- class rllm.nn.encoder.ResNetPreEncoder(out_dim: int, metadata: Dict[ColType, List[Dict[str, Any]]])[source]¶
Bases:
TablePreEncoderThe pre-encoder for ResNet TNN.
This encoder builds column-type-specific pre-encoders, then delegates the shared table encoding pipeline to
PreEncoder.- Parameters:
out_dim (int) – The output dimensionality.
metadata (Dict[ColType, List[Dict[str, Any]]]) – Metadata for each column type, specifying the statistics and properties of the columns.
- Returns:
Encoded outputs are produced when inherited
forwardis called.
Example
>>> from rllm.nn.encoder import ResNetPreEncoder >>> from rllm.types import ColType >>> metadata = { ... ColType.CATEGORICAL: [{"num_classes": 100}], ... ColType.NUMERICAL: [{"mean": 0.0, "std": 1.0}], ... } >>> encoder = ResNetPreEncoder(out_dim=32, metadata=metadata)