Skip to content

Commit

Permalink
Update src/adapters/methods/bottleneck.py
Browse files Browse the repository at this point in the history
Co-authored-by: Leon Engländer <leon.englaender@gmail.com>
  • Loading branch information
calpt and lenglaender authored Oct 19, 2023
1 parent 4952105 commit 216669f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/adapters/methods/bottleneck.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def repeat(self, state: BottleneckState, channels: int) -> BottleneckState:
state.bottleneck_up.repeat(channels, 1, 1) if state.bottleneck_up is not None else None,
)

def mean(self, states: List[NamedTuple], weights: torch.Tensor) -> NamedTuple:
def mean(self, states: List[BottleneckState], weights: torch.Tensor) -> BottleneckState:
return BottleneckState(
torch.mean(torch.stack([s.hidden_states for s in states], 0) * weights, dim=0),
states[0].input_tensor,
Expand Down

0 comments on commit 216669f

Please sign in to comment.