chenxin061 / pdarts

Codes for our paper "Progressive Differentiable Architecture Search:Bridging the Depth Gap between Search and Evaluation"
Other
359 stars 83 forks source link

Add more code comment? #6

Open coolKeen opened 5 years ago

coolKeen commented 5 years ago

@chenxin061 Nice Work! I have some questions when reading the code in train_search.py.

  1. What does 14 means in train_search.py? For example, in line 107 ('for i in range(14)').
  2. What's the usage of num_to_keep and num_to_drop?
  3. Could you please add more code comment in train_search.py? Especially the code (and corresponding function) from line 173 to line 262, which I think is relevant to your core contributions in the paper. Thank you very much!
chenxin061 commented 5 years ago

@chenxin061 Nice Work! I have some questions when reading the code in train_search.py.

  1. What does 14 means in train_search.py? For example, in line 107 ('for i in range(14)').
  2. What's the usage of num_to_keep and num_to_drop?
  3. Could you please add more code comment in train_search.py? Especially the code (and corresponding function) from line 173 to line 262, which I think is relevant to your core contributions in the paper. Thank you very much!

Thanks for the suggestion.
We will add more comments to make this code more clear. Here are some explanations.

  1. There are 4 intermediate nodes in a cell, resulting in 2 + 3 + 4 + 5 = 14 edges. So 14 indicates the number of edges in a cell.
  2. The num_to_keep is a list to set the number of operations to remain on each edge for each stage. The num_to_drop is the number to discard.
NdaAzr commented 4 years ago

@chenxin061 could you please explain what AvgrageMeter() does in utils?

 objs = utils.AvgrageMeter()
  top1 = utils.AvgrageMeter()

Thanks in advance

chenxin061 commented 4 years ago

@NdaAzr It is a counting tool broadly used in code for image classification. It logs the average/sum/count of the input signal.