Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Fix minor issues in DARTS and add a simple CIFAR10 example (with random mutator) #1776

Merged
merged 43 commits into from
Nov 26, 2019

Conversation

ultmaster
Copy link
Contributor

Will fix merging issues tomorrow.

zhangyuge and others added 30 commits November 20, 2019 17:36
…-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
@chicm-ms chicm-ms requested a review from xuehui1991 November 25, 2019 02:38
@chicm-ms
Copy link
Contributor

@xuehui @chicm-ms

@@ -0,0 +1,25 @@
import torch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license?

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license


if __name__ == "__main__":
transform = transforms.Compose(
[transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])
Copy link
Contributor

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

Copy link
Contributor Author

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?

print('[%d, %5d] loss: %.3f' % (epoch + 1, i + 1, running_loss / 100))
running_loss = 0.0

print("Finished training. Final architecture:")
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@ultmaster ultmaster changed the base branch from dev-nas-refactor to master November 25, 2019 06:06
@QuanluZhang QuanluZhang merged commit 6c1fe5c into microsoft:master Nov 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants