Clear member that is not serialized on loading.

This commit is contained in:
Ryan Curtin
2022-04-03 13:18:45 -04:00
parent 8f52887fb5
commit 6d69ea45f1
@@ -129,7 +129,9 @@ void AlphaDropoutType<MatType>::serialize(
ar(CEREAL_NVP(b));
// No need to serialize the mask, since it will be recomputed on the next
// forward pass.
// forward pass. But we should clear it if we are loading.
if (Archive::is_loading::value)
mask.clear();
}
} // namespace ann