JiahuiYu/slimmable_networks

width_mult = None when training us-Net

lucaskyle opened this issue · 3 comments

in USConv2d

self.width_mult = None

then in forward function:

self.in_channels = make_divisible(self.in_channels_max * self.width_mult/ self.ratio[0]) * self.ratio[0]

int * None ?
i got type error
TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'

@lucaskyle The width_mult is set here:

slimmable_networks/train.py

Lines 301 to 303 in d211f5b

for width_mult in sorted(FLAGS.width_mult_list, reverse=True):
model.apply(
lambda m: setattr(m, 'width_mult', width_mult))

thanks a lot

Hi @lucaskyle, did you fixed the error:# TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'?# I'm experiencing the same error and can't seem to get rid of it. Thank you!