Commit 6a2d72d7 authored by Paul's avatar Paul
Browse files

Formatting

parent e17c0bec
......@@ -51,10 +51,8 @@ void fwd_conv_batchnorm_rewrite::apply(program& p) const
new_weights2(k, c, h, w) =
gamma2(k) / std::sqrt(variance2(k) + epsilon) * weights2(k, c, h, w);
});
dfor(new_bias.get_shape().elements())(
[&](std::size_t c) {
new_bias2(c) =
bias2(c) - (mean2(c) / std::sqrt(variance2(c) + epsilon));
dfor(new_bias.get_shape().elements())([&](std::size_t c) {
new_bias2(c) = bias2(c) - (mean2(c) / std::sqrt(variance2(c) + epsilon));
});
});
// Replace convolution instruction with updated weights
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment