From 71341e9a0a420454f11b51fbeb991777687e1613 Mon Sep 17 00:00:00 2001 From: Jiazhen Wang <47851024+teamwong111@users.noreply.github.com> Date: Tue, 23 Nov 2021 18:38:32 +0800 Subject: [PATCH] [Fix] fix assert (#1490) --- mmcv/ops/deform_conv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mmcv/ops/deform_conv.py b/mmcv/ops/deform_conv.py index 9efa8d1e2..dc2391d42 100644 --- a/mmcv/ops/deform_conv.py +++ b/mmcv/ops/deform_conv.py @@ -87,8 +87,8 @@ class DeformConv2dFunction(Function): ctx.bufs_ = [input.new_empty(0), input.new_empty(0)] # columns, ones cur_im2col_step = min(ctx.im2col_step, input.size(0)) - assert (input.size(0) % - cur_im2col_step) == 0, 'im2col step must divide batchsize' + assert (input.size(0) % cur_im2col_step + ) == 0, 'batch size must be divisible by im2col_step' ext_module.deform_conv_forward( input, weight,