"tests/vscode:/vscode.git/clone" did not exist on "452822a449e3f4aaf2b857cc9121d5df9b6910d2"
Commit f611a1b0 authored by Paul's avatar Paul
Browse files

Fix bug in pooling shape

parent d013de49
......@@ -180,8 +180,8 @@ struct pooling
const shape& input = inputs.at(0);
auto t = input.type();
assert(lengths[0] < (input.lens()[3] + 2 * padding[0]));
assert(lengths[1] < (input.lens()[4] + 2 * padding[1]));
assert(lengths[0] < (input.lens()[2] + 2 * padding[0]));
assert(lengths[1] < (input.lens()[3] + 2 * padding[1]));
return {t,
{
......@@ -189,12 +189,12 @@ struct pooling
input.lens()[1],
std::size_t(std::max<std::ptrdiff_t>(
1,
std::ceil((input.lens()[3] + 2 * padding[0] - lengths[0]) /
std::ceil((input.lens()[2] + 2 * padding[0] - lengths[0]) /
static_cast<float>(stride[0])) +
1)),
std::size_t(std::max<std::ptrdiff_t>(
1,
std::ceil((input.lens()[4] + 2 * padding[1] - lengths[1]) /
std::ceil((input.lens()[3] + 2 * padding[1] - lengths[1]) /
static_cast<float>(stride[1])) +
1)),
}};
......
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