Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
68ca6f21
"include/vscode:/vscode.git/clone" did not exist on "0e5c264c3e954c34483d8a50d9b622d5d455a160"
Unverified
Commit
68ca6f21
authored
Mar 07, 2022
by
Jiahang Xu
Committed by
GitHub
Mar 07, 2022
Browse files
Fix bug Issue4592 (#4614)
parent
358ea2eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
examples/nas/multi-trial/mnasnet/base_mnasnet.py
examples/nas/multi-trial/mnasnet/base_mnasnet.py
+3
-3
No files found.
examples/nas/multi-trial/mnasnet/base_mnasnet.py
View file @
68ca6f21
...
...
@@ -4,8 +4,8 @@ import warnings
import
torch
import
torch.nn
as
torch_nn
from
torchvision.models.utils
import
load_state_dict_from_url
import
torch.nn.functional
as
F
from
nni.retiarii
import
model_wrapper
import
sys
from
pathlib
import
Path
...
...
@@ -111,7 +111,7 @@ def _get_depths(depths, alpha):
rather than down. """
return
[
_round_to_multiple_of
(
depth
*
alpha
,
8
)
for
depth
in
depths
]
@
model_wrapper
class
MNASNet
(
nn
.
Module
):
""" MNASNet, as described in https://arxiv.org/pdf/1807.11626.pdf. This
implements the B1 variant of the model.
...
...
@@ -180,7 +180,7 @@ class MNASNet(nn.Module):
nn
.
ReLU
(
inplace
=
True
),
]
self
.
layers
=
nn
.
Sequential
(
*
layers
)
self
.
classifier
=
nn
.
Sequential
(
nn
.
Dropout
(
p
=
dropout
,
inplace
=
True
),
self
.
classifier
=
nn
.
Sequential
(
nn
.
Dropout
(
p
=
dropout
),
nn
.
Linear
(
1280
,
num_classes
))
self
.
_initialize_weights
()
#self.for_test = 10
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment