sony / nnabla-nas

Neural Architecture Search for Neural Network Libraries
Apache License 2.0
56 stars 12 forks source link

How to get architecture without providing base architecture #65

Open omkale221 opened 1 year ago

omkale221 commented 1 year ago

Hello, I want to perform NAS for traffic light image classification, I have 4 classes (red,yellow,green,blank) . How to create a search using nnabla to get architecture as output with least loss and good f1score/accuracy. I should not provide any base architecture where the NAS just iterates throught the parameters of layers , but a fully NAS where architecture is created from scratch using CONV ,POOL, FCL, etc layers. It could be sequential or mixed.

yuikosakuma1 commented 1 year ago

Thank you for your comment. To the best of our knowledge, no concrete NAS method exists that creates architecture fully from scratch. Current NAS has a limitation that you must define a base search space.

However, I believe that your goal is using a flexible search space with different operator choices (such as CONV, POOL, FC, etc), not just a limited operator choices like only channel sizes or layer depths. You can still achieve this by using existing NAS method such as DARTS. Please find the DARTS search space here. DARTS uses the ChoiceBlock (a mixed operator layer) for which you can define candidate operations. In this example, the candidates are dilated conv, pooling, and skip connection.

For your traffic light image classification task, you can define the num_classes variable as four (red, yellow, green, blank). You can define a different loss function by replacing the final FC layer in L74 and the loss function in L199-205.