import torch from torch import nn class MetacriticScorePredictorBase(nn.Module): def __init__(self, input_dim: int, dropout: float = 0.25) -> None: super().__init__() self.network = nn.Sequential( nn.Linear(input_dim, 256), nn.ReLU(), nn.Dropout(dropout), nn.Linear(256, 128), nn.ReLU(), nn.Dropout(dropout), nn.Linear(128, 64), nn.ReLU(), nn.Dropout(dropout), nn.Linear(64, 1), ) def forward(self, features: torch.Tensor) -> torch.Tensor: return self.network(features)