fix dropout2d bug for cpu

This commit is contained in:
z00512249 2022-08-08 17:35:07 +08:00
parent d3eb1586b9
commit d2142a5799
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ bool DropoutNdCpuKernelMod::LaunchKernel(const std::vector<AddressPtr> &inputs,
DropoutFp32(per_input, scale_, SizeToInt(inner_size), per_output); DropoutFp32(per_input, scale_, SizeToInt(inner_size), per_output);
} else { } else {
for (size_t j = 0; j < inner_size; ++j) { for (size_t j = 0; j < inner_size; ++j) {
per_output[j] = static_cast<T>(scale_) * per_input[j]; per_output[j] = static_cast<T>(scale_ * static_cast<float>(per_input[j]));
} }
} }
} else { } else {