chenxin061 / pdarts

Codes for our paper "Progressive Differentiable Architecture Search:Bridging the Depth Gap between Search and Evaluation"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] test.py

zihaozhang9 opened this issue · comments

File "test.py", line 65, in main
utils.load(model, args.model_path)
File "/pdarts/utils.py", line 118, in load
model.load_state_dict(torch.load(model_path))
File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 719, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for NetworkCIFAR:
Missing key(s) in state_dict: "stem.0.weight", "stem.1.weight",

Has been resolved!

Modify file train_cifar.py
if num_gpus >1 : utils.save(model.module, os.path.join(args.save, 'weights.pt')) else: utils.save(model, os.path.join(args.save, 'weights.pt'))
Rerun the train_cifar.py file!