diff --git a/imperative/python/megengine/functional/nn.py b/imperative/python/megengine/functional/nn.py index 13dee313e33d148d5671782051fec9c1519569d0..c092f8a7e13ae1813450847702be345f5acce1bb 100644 --- a/imperative/python/megengine/functional/nn.py +++ b/imperative/python/megengine/functional/nn.py @@ -45,7 +45,6 @@ __all__ = [ "max_pool2d", "one_hot", "prelu", - "roi_align", "roi_pooling", "softmax", "softplus", @@ -1382,7 +1381,7 @@ def roi_align( np.random.seed(42) inp = tensor(np.random.randn(1, 1, 128, 128)) rois = tensor(np.random.random((4, 5))) - y = F.roi_align(inp, rois, (2, 2)) + y = F.nn.roi_align(inp, rois, (2, 2)) print(y.numpy()[0]) Outputs: diff --git a/imperative/python/test/unit/functional/test_functional.py b/imperative/python/test/unit/functional/test_functional.py index 15771e0b21e9c18364d101b404d03bd989b8b1f3..992d85731fc80e88a963dd536ebb3866a7528b6f 100644 --- a/imperative/python/test/unit/functional/test_functional.py +++ b/imperative/python/test/unit/functional/test_functional.py @@ -170,7 +170,7 @@ def test_roi_align(): grad = Grad().wrt(inp_feat, callback=_save_to(inp_feat)) output_shape = (7, 7) - out_feat = F.roi_align( + out_feat = F.nn.roi_align( inp_feat, rois, output_shape=output_shape,