Update src/mlpack/methods/ann/layer/multihead_attention_impl.hpp
Co-authored-by: Ryan Curtin <ryan@ratml.org>
This commit is contained in:
co-authored by
Ryan Curtin
parent
346ea05d3e
commit
6dd71c19a7
@@ -333,7 +333,9 @@ Gradient(const MatType& input,
|
||||
|
||||
if (selfAttention && tgtSeqLen != srcSeqLen)
|
||||
{
|
||||
Log::Fatal << "Incorrect input dimensions for selfAttention!" << std::endl;
|
||||
Log::Fatal << "Target sequence length (" << tgtSeqLen << ") and source "
|
||||
<< "sequence length (" << srcSeqLen << ") must match when using "
|
||||
<< "self-attention!" << std::endl;
|
||||
}
|
||||
|
||||
if (error.n_rows != tgtSeqLen * embedDim)
|
||||
|
||||
Reference in New Issue
Block a user