From 7edb34c02614c48cc9e535c39198711d6692127d Mon Sep 17 00:00:00 2001 From: Eric Kunze Date: Mon, 16 May 2022 17:34:40 -0700 Subject: Initialize accumulator with bias value for CONV3D Bias was mistakenly unused previously. Signed-off-by: Eric Kunze Change-Id: If776e923f7b3cd442c7f147fcbd22a214c37fd36 --- reference_model/src/ops/tensor_ops.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reference_model/src/ops/tensor_ops.cc b/reference_model/src/ops/tensor_ops.cc index 862c640..732480c 100644 --- a/reference_model/src/ops/tensor_ops.cc +++ b/reference_model/src/ops/tensor_ops.cc @@ -890,7 +890,8 @@ int OpConv3d::eval() { for (int oc = 0; oc < out_channels; oc++) { - acc = 0; + // Initialize accumulator with bias value + acc = this->output->getTensor()(ob, od, oh, ow, oc); for (int fd = 0; fd < f_depth; fd++) { d_idx = od * stride_d + fd * dilation_d; -- cgit v1.2.1