Skip to content
Snippets Groups Projects
Commit f3051f33 authored by Jerome Hue's avatar Jerome Hue
Browse files

Fix backward pass in FCImpl CPU kernel

Add debug logging to Heaviside implementation forward pass
parent 05f8285d
No related branches found
No related tags found
No related merge requests found
Pipeline #72230 failed
...@@ -167,7 +167,7 @@ void FCImpl_cpu_backward_kernel(const DimSize_t batchSize, ...@@ -167,7 +167,7 @@ void FCImpl_cpu_backward_kernel(const DimSize_t batchSize,
for (std::size_t o = 0; o < outputFeatureSize; ++o) { for (std::size_t o = 0; o < outputFeatureSize; ++o) {
sum += weight[o*inputFeatureSize + c] * input[b*outputFeatureSize + o]; sum += weight[o*inputFeatureSize + c] * input[b*outputFeatureSize + o];
} }
output[b*inputFeatureSize + c]+= sum; output[b*inputFeatureSize + c] = sum;
} }
} }
} }
......
...@@ -26,6 +26,8 @@ template <> void Aidge::HeavisideImplCpu::forward() { ...@@ -26,6 +26,8 @@ template <> void Aidge::HeavisideImplCpu::forward() {
const auto impl = const auto impl =
Registrar<HeavisideImplCpu>::create(getBestMatch(getRequiredSpec())); Registrar<HeavisideImplCpu>::create(getBestMatch(getRequiredSpec()));
Log::info("(HeavisideImpl.cpp) Before forward");
Log::info("(HeavisideImpl.cpp) Input 0 \n{}", input0->toString());
impl.forward(input0->size(), getCPUPtr(mOp.getRawInput(0)), impl.forward(input0->size(), getCPUPtr(mOp.getRawInput(0)),
getCPUPtr(mOp.getRawOutput(0)), op_.value()); getCPUPtr(mOp.getRawOutput(0)), op_.value());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment