Skip to content

Commit 765b891

Browse files
author
Pedro Freire
committed
Replace Tensor by torch.Tensor in type annotations.
This should fix lint errors.
1 parent 6439095 commit 765b891

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test_ops.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def fn(self, x, rois, pool_h, pool_w, spatial_scale=1, sampling_ratio=-1, **kwar
9898
def get_script_fn(self, rois, pool_size):
9999
@torch.jit.script
100100
def script_fn(input, rois, pool_size):
101-
# type: (Tensor, Tensor, int) -> Tensor
101+
# type: (torch.Tensor, torch.Tensor, int) -> torch.Tensor
102102
return ops.roi_pool(input, rois, pool_size, 1.0)[0]
103103
return lambda x: script_fn(x, rois, pool_size)
104104

@@ -137,7 +137,7 @@ def fn(self, x, rois, pool_h, pool_w, spatial_scale=1, sampling_ratio=-1, **kwar
137137
def get_script_fn(self, rois, pool_size):
138138
@torch.jit.script
139139
def script_fn(input, rois, pool_size):
140-
# type: (Tensor, Tensor, int) -> Tensor
140+
# type: (torch.Tensor, torch.Tensor, int) -> torch.Tensor
141141
return ops.ps_roi_pool(input, rois, pool_size, 1.0)[0]
142142
return lambda x: script_fn(x, rois, pool_size)
143143

@@ -208,7 +208,7 @@ def fn(self, x, rois, pool_h, pool_w, spatial_scale=1, sampling_ratio=-1, **kwar
208208
def get_script_fn(self, rois, pool_size):
209209
@torch.jit.script
210210
def script_fn(input, rois, pool_size):
211-
# type: (Tensor, Tensor, int) -> Tensor
211+
# type: (torch.Tensor, torch.Tensor, int) -> torch.Tensor
212212
return ops.roi_align(input, rois, pool_size, 1.0)[0]
213213
return lambda x: script_fn(x, rois, pool_size)
214214

@@ -262,7 +262,7 @@ def fn(self, x, rois, pool_h, pool_w, spatial_scale=1, sampling_ratio=-1, **kwar
262262
def get_script_fn(self, rois, pool_size):
263263
@torch.jit.script
264264
def script_fn(input, rois, pool_size):
265-
# type: (Tensor, Tensor, int) -> Tensor
265+
# type: (torch.Tensor, torch.Tensor, int) -> torch.Tensor
266266
return ops.ps_roi_align(input, rois, pool_size, 1.0)[0]
267267
return lambda x: script_fn(x, rois, pool_size)
268268

0 commit comments

Comments
 (0)