-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed memory leak for RoIPool Module
- Loading branch information
Showing
5 changed files
with
8 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,3 +93,4 @@ ENV/ | |
|
||
.idea | ||
extension-ffi | ||
demo_mot.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
from torch.nn.modules.module import Module | ||
# from functions.roi_pool import RoIPoolFunction | ||
from ..functions.roi_pool import RoIPoolFunction | ||
|
||
|
||
class RoIPool(Module): | ||
def __init__(self, pooled_height, pooled_width, spatial_scale): | ||
super(RoIPool, self).__init__() | ||
self.roi_pool = RoIPoolFunction(pooled_height, pooled_width, spatial_scale) | ||
|
||
self.pooled_width = int(pooled_width) | ||
self.pooled_height = int(pooled_height) | ||
self.spatial_scale = float(spatial_scale) | ||
|
||
def forward(self, features, rois): | ||
return self.roi_pool(features, rois) | ||
return RoIPoolFunction(self.pooled_height, self.pooled_width, self.spatial_scale)(features, rois) |
File renamed without changes.