Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
RunningLeon committed Sep 4, 2023
1 parent d9eb6c7 commit dc873af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion csrc/mmdeploy/codebase/mmdet/instance_segmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class ResizeInstanceMask : public ResizeBBox {
}
operation::Context ctx(device_, stream_);
warp_affine_ = operation::Managed<operation::WarpAffine>::Create("bilinear");
permute_ = operation::Managed<::mmdeploy::operation::Permute>::Create();
}

// TODO: remove duplication
Expand Down Expand Up @@ -137,7 +138,6 @@ class ResizeInstanceMask : public ResizeBBox {
auto mask_height = (int)d_mask.shape(1);
auto mask_width = (int)d_mask.shape(2);
// (C, H, W) -> (H, W, C)
permute_ = ::mmdeploy::operation::Managed<::mmdeploy::operation::Permute>::Create();
std::vector<int> axes = {1, 2, 0};
OUTCOME_TRY(permute_.Apply(d_mask, d_mask, axes));
Device host{"cpu"};
Expand Down

0 comments on commit dc873af

Please sign in to comment.