Skip to content

Commit

Permalink
Fix cross masking
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Feb 3, 2024
1 parent ab36361 commit 07a72ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/layers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ function (ipa::Union{IPCrossA, IPA})(TiL::Tuple{AbstractArray,AbstractArray}, si

# Setting mask to the correct dim for broadcasting.
if mask != 0
mask = reshape(mask, 1, N_frames_L, N_frames_R, 1)
mask = reshape(mask, 1, N_frames_R, N_frames_L, 1)
end

att = Flux.softmax(w_L .* (att_arg .+ bij) .+ mask, dims = 3)

# Applying the attention weights to the values.
Expand Down

0 comments on commit 07a72ce

Please sign in to comment.