CheXNet
CheXNet copied to clipboard
Checkpoint Issue
hello @arnoweng I am in urgent need of this CheXNet model. I downloaded "model.pth.tar" file but I am unable to extract files like we normally extract files from a zip folder can you tell me how can I extract the model checkpoint or basic code to checkpoint?
You should extract that with Python code, not manual. I use code from this repo and it working fine.
CKPT_PATH = 'model.pth.tar' ... model = DenseNet121(N_CLASSES).cuda() model = torch.nn.DataParallel(model).cuda()
if os.path.isfile(CKPT_PATH):
print("=> loading checkpoint")
checkpoint = torch.load(CKPT_PATH)
model.load_state_dict(checkpoint['state_dict'], strict=False)
print("=> loaded checkpoint (Some weights might not be loaded)")
else:
print("=> no checkpoint found")