bug fix: BatchNormalization should mask gaps for packed sequences
This commit is contained in:
Родитель
66c82d478f
Коммит
441578ccc3
|
@ -1738,7 +1738,7 @@ public:
|
|||
{
|
||||
FrameRange fr(Input(0)->GetMBLayout());
|
||||
|
||||
Matrix<ElemType> sliceInputValue = Input(0)->ValueFor(fr);
|
||||
Matrix<ElemType> sliceInputValue = Input(0)->MaskedValueFor(fr);
|
||||
const Matrix<ElemType>& scale = Input(1)->Value();
|
||||
const Matrix<ElemType>& bias = Input(2)->Value();
|
||||
Matrix<ElemType>& runMean = Input(3)->Value();
|
||||
|
@ -1775,7 +1775,7 @@ public:
|
|||
|
||||
if (inputIndex == 0) // derivative with respect to the input.
|
||||
{
|
||||
auto sliceOutputGrad = GradientFor(fr);
|
||||
auto sliceOutputGrad = MaskedGradientFor(fr);
|
||||
auto sliceInputValue = Input(0)->ValueFor(fr);
|
||||
const Matrix<ElemType>& scale = Input(1)->Value();
|
||||
const Matrix<ElemType>& bias = Input(2)->Value();
|
||||
|
|
Загрузка…
Ссылка в новой задаче