!45311 dropout bug fix

Merge pull request !45311 from 黄晓/dropout_1109
This commit is contained in:
i-robot 2022-11-10 06:38:51 +00:00 committed by Gitee
commit d061b12c53
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 0 deletions

View File

@ -60,6 +60,7 @@ int DropoutCpuKernelMod::Resize(const BaseOperatorPtr &base_operator, const std:
if (auto ret = KernelMod::Resize(base_operator, inputs, outputs, inputsOnHost); ret != KRET_OK) {
return ret;
}
tensor_size_ = 1;
input_shape_ = inputs[0]->GetShapeVector();
for (const auto &d : input_shape_) {
tensor_size_ *= LongToSize(d);