From 30bfe895083f1716da321e9be96564625db92718 Mon Sep 17 00:00:00 2001 From: kengz Date: Sun, 22 Dec 2024 00:48:04 -0500 Subject: [PATCH] std var --- v2/module/merge.py | 6 +++--- v2/specs/merge/film.yaml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/v2/module/merge.py b/v2/module/merge.py index fabd0a3..952b981 100644 --- a/v2/module/merge.py +++ b/v2/module/merge.py @@ -62,10 +62,10 @@ class FiLMMerge(nn.Module): FiLM(x) = gamma(z) * x + beta(z) """ - def __init__(self, feature_size: int, conditioner_size: int): + def __init__(self, feature_dim: int, conditioner_dim: int): super().__init__() - self.gamma = nn.Linear(conditioner_size, feature_size) - self.beta = nn.Linear(conditioner_size, feature_size) + self.gamma = nn.Linear(conditioner_dim, feature_dim) + self.beta = nn.Linear(conditioner_dim, feature_dim) def forward(self, feature: torch.Tensor, conditioner: torch.Tensor) -> torch.Tensor: return self.gamma(conditioner) * feature + self.beta(conditioner) diff --git a/v2/specs/merge/film.yaml b/v2/specs/merge/film.yaml index 4daf96a..fcc8eca 100644 --- a/v2/specs/merge/film.yaml +++ b/v2/specs/merge/film.yaml @@ -9,8 +9,8 @@ modules: out_features: 4 merge_1_2: MergeFiLM: - feature_size: 10 - condition_size: 4 + feature_dim: 10 + condition_dim: 4 tail: Linear: in_features: 10