-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix minor issues in DARTS and add a simple CIFAR10 example (with random mutator) #1776
Fix minor issues in DARTS and add a simple CIFAR10 example (with random mutator) #1776
Conversation
…-refactor-sync-1120 # Conflicts: # examples/nas/.gitignore # examples/nas/darts/model.py # examples/nas/darts/retrain.py # examples/nas/enas/macro.py # src/sdk/pynni/nni/nas/pytorch/base_mutator.py # src/sdk/pynni/nni/nas/pytorch/darts/trainer.py # src/sdk/pynni/nni/nas/pytorch/enas/trainer.py # src/sdk/pynni/nni/nas/pytorch/fixed.py # src/sdk/pynni/nni/nas/pytorch/mutables.py # src/sdk/pynni/nni/nas/pytorch/pdarts/mutator.py # src/sdk/pynni/nni/nas/pytorch/pdarts/trainer.py # src/sdk/pynni/nni/nas/pytorch/trainer.py
… dev-nas-refactor-sync-1120
… into dev-nas-refactor-sync-1120
@@ -0,0 +1,25 @@ | |||
import torch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
License will be included in a PR after cutting branch, as discussed before.
@@ -0,0 +1,25 @@ | |||
import torch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license
examples/nas/random/train.py
Outdated
|
||
if __name__ == "__main__": | ||
transform = transforms.Compose( | ||
[transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))?
You could reference here:
https://github.com/kuangliu/pytorch-cifar/blob/master/main.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an example to demonstrate the power of our interface, not for obtaining the high accuracy. The code is copied from here. I think putting a notebook is better but that will be in notebooks
folder?
examples/nas/random/train.py
Outdated
print('[%d, %5d] loss: %.3f' % (epoch + 1, i + 1, running_loss / 100)) | ||
running_loss = 0.0 | ||
|
||
print("Finished training. Final architecture:") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you provide some examples about how to use this architecture to retrain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example for retrain is already in darts. This is a simple example.
Will fix merging issues tomorrow.