@@ -129,6 +129,11 @@ def test_roi_align(self):
129129 model = ops .RoIAlign ((5 , 5 ), 1 , 2 )
130130 self .run_model (model , [(x , single_roi )])
131131
132+ x = torch .rand (1 , 1 , 10 , 10 , dtype = torch .float32 )
133+ single_roi = torch .tensor ([[0 , 0 , 0 , 4 , 4 ]], dtype = torch .float32 )
134+ model = ops .RoIAlign ((5 , 5 ), 1 , - 1 )
135+ self .run_model (model , [(x , single_roi )])
136+
132137 def test_roi_align_aligned (self ):
133138 x = torch .rand (1 , 1 , 10 , 10 , dtype = torch .float32 )
134139 single_roi = torch .tensor ([[0 , 1.5 , 1.5 , 3 , 3 ]], dtype = torch .float32 )
@@ -150,6 +155,11 @@ def test_roi_align_aligned(self):
150155 model = ops .RoIAlign ((2 , 2 ), 2.5 , 0 , aligned = True )
151156 self .run_model (model , [(x , single_roi )])
152157
158+ x = torch .rand (1 , 1 , 10 , 10 , dtype = torch .float32 )
159+ single_roi = torch .tensor ([[0 , 0.2 , 0.3 , 4.5 , 3.5 ]], dtype = torch .float32 )
160+ model = ops .RoIAlign ((2 , 2 ), 2.5 , - 1 , aligned = True )
161+ self .run_model (model , [(x , single_roi )])
162+
153163 @unittest .skip # Issue in exporting ROIAlign with aligned = True for malformed boxes
154164 def test_roi_align_malformed_boxes (self ):
155165 x = torch .randn (1 , 1 , 10 , 10 , dtype = torch .float32 )
0 commit comments