Skip to content

Commit

Permalink
std var
Browse files Browse the repository at this point in the history
  • Loading branch information
kengz committed Dec 22, 2024
1 parent 1a3b3d2 commit 30bfe89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions v2/module/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions v2/specs/merge/film.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 30bfe89

Please sign in to comment.