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

How can i import the found network architecture ?

cristyioan2000 opened this issue · comments

Hello,

I want to load the found architecture in a different script, is there a way to load the architecture structure(class) and the .weight file externally, just by importing using torch.load() ?

Thanks

Sorry for the late reply.
If you want to load the architecture, just copy and name the Genotype generated at the end of a search process to genotypes.py. When retraining, use --arch your_arch_name to call the architecture.
You can use torch.load() to load the previous weights but I do not suggest to re-use the learned weights by loading the .weight file because it is usually useless in the retraining scenario.

I was thinking on saving as a checkpoint the whole class of the network and load it after, like a way to export the whole architecture externally, outside the script and load it without any dependencies, if you want to build the architecture again you need to use modules from Pdarts, and i want to have it like an handmade architecture using just torch functions. I'm going to try with the checkpoint method and if successful i will close the issue. If you do have other solution on exporting the whole architecture i would like to hear it.

I think you should try torch.set/get_rng_state().