ZeroDivisionError: long division or modulo by zero
Created by: imistyrain
使用object_detection训练mobilenet-ssd, 但是scale设为了0.25,得到
File "train.py", line 338, in <module>
val_file_list=val_file_list)
File "train.py", line 183, in train
is_train=True)
File "train.py", line 112, in build_program
locs, confs, box, box_var = mobile_net(class_num, image, image_shape,scale=args.scale)
File "mobilenet_ssd.py", line 92, in mobile_net
module14 = extra_block(module13, 256, 512, 1, 2, scale)
File "mobilenet_ssd.py", line 58, in extra_block
padding=0)
File "mobilenet_ssd.py", line 26, in conv_bn
bias_attr=False)
File "python2.7/site-packages/paddle/fluid/layers/nn.py", line 1818, in conv2d
if num_channels % groups != 0:
ZeroDivisionError: long division or modulo by zero
经过调试,发现mobilenet_ssd.py57行处num_groups=int(num_groups * scale),由于传入的num_groups为1,导致计算出的num_groups结果为0.