Commit 4614de7c authored by Khalique's avatar Khalique
Browse files

continued progress, working on equations

parent 944ddd4b
...@@ -317,6 +317,7 @@ struct tf_parser ...@@ -317,6 +317,7 @@ struct tf_parser
size_t weight_w = weight_dims[3]; size_t weight_w = weight_dims[3];
if(pad_mode.find("SAME") != std::string::npos) if(pad_mode.find("SAME") != std::string::npos)
{ {
op.padding_mode = op::padding_mode_t::same;
op.padding[0] = op.padding[0] =
static_cast<size_t>(std::ceil(static_cast<double>( static_cast<size_t>(std::ceil(static_cast<double>(
-op.stride[0] + op.dilation[0] * (weight_h - 1) + 1)) / -op.stride[0] + op.dilation[0] * (weight_h - 1) + 1)) /
...@@ -328,14 +329,7 @@ struct tf_parser ...@@ -328,14 +329,7 @@ struct tf_parser
} }
else if(pad_mode.find("VALID") != std::string::npos) else if(pad_mode.find("VALID") != std::string::npos)
{ {
op.padding[0] = static_cast<size_t>( op.padding_mode = op::padding_mode_t::valid;
std::ceil(static_cast<double>(-weight_h - op.stride[0] +
op.dilation[0] * (weight_h - 1) + 1)) /
2);
op.padding[1] = static_cast<size_t>(
std::ceil(static_cast<double>(-weight_w - op.stride[1] +
op.dilation[1] * (weight_w - 1) + 1)) /
2);
} }
else if(pad_mode.find("EXPLICIT") != std::string::npos) else if(pad_mode.find("EXPLICIT") != std::string::npos)
{ {
......
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