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

ENAS and DRATS search space zoo #2589

Merged
merged 47 commits into from
Jul 27, 2020
Merged

ENAS and DRATS search space zoo #2589

merged 47 commits into from
Jul 27, 2020

Conversation

tabVersion
Copy link
Contributor

initial commit for search space zoo

@QuanluZhang QuanluZhang requested a review from ultmaster June 23, 2020 14:09
from nni.nas.pytorch import mutables


class DartsSearchSpace(nn.Module):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think DARTS search space is a cell rather than a full model. Suggest to changing into DartsStackedCells that accepts a cell class to build a full model.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

on the way

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think DARTS search space is a cell rather than a full model. Suggest to changing into DartsStackedCells that accepts a cell class to build a full model.

please review new commit 99c841b

return out


class StdConv(nn.Module):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest to keep all convolutions in a separate file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Custom ops will be implemented later. I dont think it is appropriate to expose these builtin ops now.

"""
def __init__(self, C_in, C_out, kernel_size, stride, padding, affine=True):
super().__init__()
self.net = nn.Sequential(
Copy link
Contributor

Choose a reason for hiding this comment

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

You can actually inheirt nn.Sequential here and use self.add_module.

@tabVersion tabVersion marked this pull request as draft June 24, 2020 02:40
@tabVersion tabVersion marked this pull request as ready for review June 24, 2020 08:39
the number of cells contained in this network
factory_func: function
return an instance for certain cell structure
user should pass in `__init__` of demand cell class
Copy link
Contributor

Choose a reason for hiding this comment

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

Should write

``__init__``

Suggest to make the signature clearer here. For example, it can be a factory function with the following parameters, and return an object callable with the following parameters...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I listed some required parameters. But I believe the best way is referring to an example.

---
n_nodes: int
the number of nodes contained in this cell
channels_pp: int channels_pp: int
Copy link
Contributor

Choose a reason for hiding this comment

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

End of line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@tabVersion tabVersion changed the title add darts cell and search space ENAS and DRATS search space zoo Jul 6, 2020
@scarlett2018 scarlett2018 mentioned this pull request Jul 14, 2020
66 tasks
@ultmaster ultmaster requested a review from QuanluZhang July 17, 2020 02:15
@QuanluZhang QuanluZhang reopened this Jul 27, 2020
@ultmaster ultmaster merged commit eb9b72a into microsoft:master Jul 27, 2020
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.

3 participants