We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
switch (round_mode_) { case PoolingParameter_RoundMode_CEIL: pooled_height_ = static_cast(ceil(static_cast( height_ + 2 * pad_h_ - kernel_h_) / stride_h_)) + 1; pooled_width_ = static_cast(ceil(static_cast( width_ + 2 * pad_w_ - kernel_w_) / stride_w_)) + 1; if (height_ % 2 == 1) { pooled_height_ += 1; } if (width_ % 2 == 1) { pooled_width_ += 1; } break; case PoolingParameter_RoundMode_FLOOR: pooled_height_ = static_cast(floor(static_cast( height_ + 2 * pad_h_ - kernel_h_) / stride_h_)) + 1; pooled_width_ = static_cast(floor(static_cast( width_ + 2 * pad_w_ - kernel_w_) / stride_w_)) + 1; if (height_ % 2 == 1) { pooled_height_ += 1; } if (width_ % 2 == 1) { pooled_width_ += 1; } break; }
可以在pooling_layer.cpp的Reshape函数中加入几行代码,来对最大池化后map的宽度和高度进行调整以支持yolov3-tiny中的maxpool层(size=2,stride=1)。当然,这样可能只对这种特殊情况有效。 另外,需要对模型转换代码和检测代码做修改。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
switch (round_mode_) {
case PoolingParameter_RoundMode_CEIL:
pooled_height_ = static_cast(ceil(static_cast(
height_ + 2 * pad_h_ - kernel_h_) / stride_h_)) + 1;
pooled_width_ = static_cast(ceil(static_cast(
width_ + 2 * pad_w_ - kernel_w_) / stride_w_)) + 1;
if (height_ % 2 == 1) {
pooled_height_ += 1;
}
if (width_ % 2 == 1) {
pooled_width_ += 1;
}
break;
case PoolingParameter_RoundMode_FLOOR:
pooled_height_ = static_cast(floor(static_cast(
height_ + 2 * pad_h_ - kernel_h_) / stride_h_)) + 1;
pooled_width_ = static_cast(floor(static_cast(
width_ + 2 * pad_w_ - kernel_w_) / stride_w_)) + 1;
if (height_ % 2 == 1) {
pooled_height_ += 1;
}
if (width_ % 2 == 1) {
pooled_width_ += 1;
}
break;
}
可以在pooling_layer.cpp的Reshape函数中加入几行代码,来对最大池化后map的宽度和高度进行调整以支持yolov3-tiny中的maxpool层(size=2,stride=1)。当然,这样可能只对这种特殊情况有效。
另外,需要对模型转换代码和检测代码做修改。
The text was updated successfully, but these errors were encountered: