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

fix slice_axis in ModulatedDeformableConvolution #20761

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/mxnet/gluon/nn/conv_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1647,8 +1647,8 @@ def forward(self, x):
offset = npx.convolution(x, self.offset_weight.data(ctx),
self.offset_bias.data(ctx), cudnn_off=True, **self._kwargs_offset)

offset_t = npx.slice_axis(offset, axis=1, begin=0, end=self.offset_split_index)
mask = npx.slice_axis(offset, axis=1, begin=self.offset_split_index, end=None)
offset_t = offset[:,0:self.offset_split_index,:, :]
mask = offset[:,self.offset_split_index:,:, :]
mask = npx.sigmoid(mask) * 2

if self.deformable_conv_bias is None:
Expand Down