Unverified Commit ac56b487 authored by Prabhat Roy's avatar Prabhat Roy Committed by GitHub
Browse files

Fixed unused variables in ops (#4666)

* Fixed unused variables in ops

* Fixed test failure
parent 341fca91
...@@ -323,7 +323,7 @@ def masks_to_boxes(masks: torch.Tensor) -> torch.Tensor: ...@@ -323,7 +323,7 @@ def masks_to_boxes(masks: torch.Tensor) -> torch.Tensor:
bounding_boxes = torch.zeros((n, 4), device=masks.device, dtype=torch.float) bounding_boxes = torch.zeros((n, 4), device=masks.device, dtype=torch.float)
for index, mask in enumerate(masks): for index, mask in enumerate(masks):
y, x = torch.where(masks[index] != 0) y, x = torch.where(mask != 0)
bounding_boxes[index, 0] = torch.min(x) bounding_boxes[index, 0] = torch.min(x)
bounding_boxes[index, 1] = torch.min(y) bounding_boxes[index, 1] = torch.min(y)
......
...@@ -74,7 +74,7 @@ def deform_conv2d( ...@@ -74,7 +74,7 @@ def deform_conv2d(
pad_h, pad_w = _pair(padding) pad_h, pad_w = _pair(padding)
dil_h, dil_w = _pair(dilation) dil_h, dil_w = _pair(dilation)
weights_h, weights_w = weight.shape[-2:] weights_h, weights_w = weight.shape[-2:]
_, n_in_channels, in_h, in_w = input.shape _, n_in_channels, _, _ = input.shape
n_offset_grps = offset.shape[1] // (2 * weights_h * weights_w) n_offset_grps = offset.shape[1] // (2 * weights_h * weights_w)
n_weight_grps = n_in_channels // weight.shape[1] n_weight_grps = n_in_channels // weight.shape[1]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment