Skip to content

Commit

Permalink
Update i6_models/parts/frontend/generic_frontend.py
Browse files Browse the repository at this point in the history
Co-authored-by: SimBe195 <[email protected]>
  • Loading branch information
Judyxujj and SimBe195 authored Nov 10, 2023
1 parent 695c5c8 commit ec3356f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions i6_models/parts/frontend/generic_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ def forward(self, tensor: torch.Tensor, sequence_mask: torch.Tensor) -> Tuple[to
if isinstance(layer, nn.Conv2d) or isinstance(layer, nn.MaxPool2d):
sequence_mask = mask_pool(
sequence_mask,
kernel_size=layer.kernel_size if isinstance(layer.kernel_size, int) else layer.kernel_size[0],
stride=layer.stride if isinstance(layer.stride, int) else layer.stride[0],
padding=layer.padding if isinstance(layer.padding, int) else layer.padding[0],
kernel_size=layer.kernel_size[0],
stride=layer.stride[0],
padding=layer.padding[0],
)

tensor = torch.transpose(tensor, 1, 2) # transpose to [B,T",C,F"]
Expand Down

0 comments on commit ec3356f

Please sign in to comment.