diff --git a/onnxruntime/core/providers/cpu/tensor/upsample.cc b/onnxruntime/core/providers/cpu/tensor/upsample.cc index b65645ae06f1d..bd98715423b9a 100644 --- a/onnxruntime/core/providers/cpu/tensor/upsample.cc +++ b/onnxruntime/core/providers/cpu/tensor/upsample.cc @@ -342,7 +342,7 @@ Status Upsample::BaseCompute(OpKernelContext* context, const std::vectorOutput(0, Y_dims); if (no_scale) { - memcpy(Y->MutableDataRaw(), X->DataRaw(), Y->Size() * sizeof(T)); + memcpy(Y->MutableDataRaw(), X->DataRaw(), Y->Size()); return Status::OK(); }