-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Conversation
from nni.nas.pytorch import mutables | ||
|
||
|
||
class DartsSearchSpace(nn.Module): |
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.
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.
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.
on the way
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.
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): |
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.
Suggest to keep all convolutions in a separate file.
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.
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( |
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.
You can actually inheirt nn.Sequential
here and use self.add_module
.
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 |
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.
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...
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.
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 |
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.
End of line.
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.
done
initial commit for search space zoo