Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
amarin16 committed Oct 2, 2024
1 parent cb55d4b commit 2895f37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions onnxruntime/core/providers/cpu/nn/layer_norm_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ Status LayerNormImpl::ComputeImpl(OpKernelContext* p_ctx, int64_t orig_axis, flo
}

int output_index = 1;
Tensor* mean = p_ctx->Output(output_index++, TensorShape(mean_inv_std_dev_dim));
U* mean_data = nullptr;
if (mean != nullptr) {
if (!simplified) {
Tensor* mean = p_ctx->Output(output_index++, TensorShape(mean_inv_std_dev_dim));
mean_data = mean->MutableData<U>();
}

Expand Down

0 comments on commit 2895f37

Please sign in to comment.