Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix mask scale
Browse files Browse the repository at this point in the history
  • Loading branch information
zhreshold committed Oct 8, 2019
1 parent ebb9288 commit b7bd5dd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion python/mxnet/gluon/contrib/cnn/conv_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def hybrid_forward(self, F, x, offset_weight, deformable_conv_weight, offset_bia

offset_t = F.slice_axis(offset, axis=1, begin=0, end=18)
mask = F.slice_axis(offset, axis=1, begin=18, end=None)
mask = F.sigmoid(mask) * 2
mask = F.sigmoid(mask)

if deformable_conv_bias is None:
act = F.contrib.ModulatedDeformableConvolution(data=x, offset=offset_t, mask=mask,
Expand Down
4 changes: 0 additions & 4 deletions tests/python/unittest/test_contrib_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ def test_multibox_prior_op():
assert_allclose(boxes.asnumpy()[250, 250, 0, :], np.array([-0.948249, 0.362671, 1.636436, 0.530377]), atol=1e-5, rtol=1e-5)

@with_seed()
@assert_raises_cudnn_not_satisfied(min_version='5.1.10')
def test_modulated_deformable_convolution():
for num_batch in [1, 2]:
for num_channel_data, num_deformable_group in itertools.product([4, 8], [1, 2]):
Expand Down Expand Up @@ -369,9 +368,6 @@ def test_modulated_deformable_convolution():
rtol, atol = 1.0, 1e-2
else:
rtol, atol = 0.05, 1e-3
# By now we only have gpu implementation
check_numeric_gradient(op, [im_data, offset_data, mask_data, weight, bias], rtol=rtol, atol=atol,
grad_nodes=grad_nodes, ctx=mx.gpu(0))


if __name__ == '__main__':
Expand Down

0 comments on commit b7bd5dd

Please sign in to comment.