JiahuiYu/slimmable_networks

How can I evaluate standalone smaller width model?

abhishekaich27 opened this issue · 1 comments

Hi @JiahuiYu ,

Can you post a snippet to

  1. load a trained supernet
  2. choose a smaller width model (say width = 0.5)
  3. evaluate the result for this width

I have tried the following but the result is exactly same as width = 1.0

model.load_state_dict(torch.load(checkpoint_path), strict=False)
model = model.apply(lambda m: setattr(m, 'width_mult', 0.25))    
evaluate(model)

Solved it.