Closed wilbur-caper closed 2 years ago
Hi, @hererookie sorry for reply so late. Because, I wrapped this model into DataParallel when training, which stores the model in module.
Sol:
model.load_state_dict({k.replace('module.',''):v for k,v in weights['state_dict'].items()}
Hi, @hererookie sorry for reply so late. Because, I wrapped this model into DataParallel when training, which stores the model in module.
Sol:
model.load_state_dict({k.replace('module.',''):v for k,v in weights['state_dict'].items()}
thanks for your reply, I will try