From 453561ff7842d3d11d9f6cfc1c4dd7f1ee4fb3df Mon Sep 17 00:00:00 2001 From: Nathan Painchaud Date: Wed, 1 Nov 2023 15:37:26 +0100 Subject: [PATCH] Standardize name of `out_features` in `UnimodalLogitsHead` --- didactic/models/layers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/didactic/models/layers.py b/didactic/models/layers.py index 6045914a..5b75e923 100644 --- a/didactic/models/layers.py +++ b/didactic/models/layers.py @@ -76,7 +76,7 @@ class UnimodalLogitsHead(nn.Module): def __init__( self, in_features: int, - num_logits: int, + out_features: int, backbone_distribution: Literal["poisson", "binomial"] = "poisson", tau: float = 1.0, tau_mode: Literal["fixed", "learn", "learn_sigm", "learn_fn"] = "learn_sigm", @@ -86,7 +86,7 @@ def __init__( Args: in_features: Number of features in the input feature vector. - num_logits: Number of (tempered) logits to output. + out_features: Number of (tempered) logits to output. backbone_distribution: Distribution whose probability mass function (PMF) is used to enforce an unimodal distribution of the logits. tau: Temperature parameter to control the sharpness of the distribution. @@ -102,7 +102,7 @@ def __init__( eps: Epsilon value to use in probabilities' log to avoid numerical instability. """ super().__init__() - self.num_logits = num_logits + self.num_logits = out_features self.backbone_distribution = backbone_distribution self.tau_mode = tau_mode self.eps = eps