ruocwang / darts-pt

[ICLR2021 Outstanding Paper] Rethinking Architecture Selection in Differentiable NAS
Apache License 2.0
102 stars 14 forks source link

Order to run code, doubts on projection.py #9

Open casarinsof opened 1 year ago

casarinsof commented 1 year ago

Hello! First of all I would like to thank you both for the very clear paper, and for provision a code - does not often happen -. I have a doubt about the pipeline to follow to run a complete NAS algorithm.

As far as I understood, the first step is for sure to run train_search.py with specified parameters. After this, what should I do? I say there is a script darts-proj-sota.sh that calls the file projection.py which is not clear to me what it does, or to which step of NAS it corresponds. Is that step mandatory? Then, how to build the final network to train from scratch and evaluate? I saw that after calling darts-proj-sota.sh there's the final output that is a Genotype. I guess I need to insert that genotype in the python file genotype.py and run train.py, but I'm not sure of what's going on, if projection.py is mandatory step etc.

I hope I expressed my doubts clearly, if you could provide some more hints on a complete pipeline to follow it would be great. Thanka a lot!

ruocwang commented 1 year ago

Hi casarinsof,

Thank you for your interest in our work.

You are on the right track. The projection step refers to the architecture selection, so it is necessary. After the supernet is trained (train_search), you would need to run the architecture selection to pick the final architecture, which is represented as a genotype. Inserting that into the genotype.py file, give it a variable name (e.g. arch1), then run the retrain command in the README.md with "arch1".

Hope that helps!

casarinsof commented 1 year ago

Hello! Thank you for you reply! Then I have 2 other questions: