Commit 50029726 authored by Phil Wang's avatar Phil Wang
Browse files

fix a bug with getting the height width by patches in audio transformer, thanks to @ukemamaster

parent d514e2ff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -345,7 +345,7 @@ class AudioSpectrogramTransformer(nn.Module):

        # get number of patches along height and width

        num_patch_height, num_patch_width = x.shape[-2:]
        _, num_patch_height, num_patch_width, _ = x.shape

        # get 2d relative positions