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
99818fba
Unverified
Commit
99818fba
authored
Feb 17, 2022
by
J-shang
Committed by
GitHub
Feb 17, 2022
Browse files
update ut & extend fast test windows timeout (#4558)
parent
a36dc07e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
pipelines/fast-test.yml
pipelines/fast-test.yml
+1
-0
test/ut/compression/v2/test_pruner_torch.py
test/ut/compression/v2/test_pruner_torch.py
+6
-6
No files found.
pipelines/fast-test.yml
View file @
99818fba
...
...
@@ -177,6 +177,7 @@ stages:
-
job
:
windows
pool
:
vmImage
:
windows-latest
timeoutInMinutes
:
70
steps
:
-
template
:
templates/install-dependencies.yml
...
...
test/ut/compression/v2/test_pruner_torch.py
View file @
99818fba
...
...
@@ -25,11 +25,11 @@ from nni.algorithms.compression.v2.pytorch.utils import compute_sparsity_mask2co
class
TorchModel
(
torch
.
nn
.
Module
):
def
__init__
(
self
):
super
().
__init__
()
self
.
conv1
=
torch
.
nn
.
Conv2d
(
1
,
5
,
5
,
1
)
self
.
bn1
=
torch
.
nn
.
BatchNorm2d
(
5
)
self
.
conv2
=
torch
.
nn
.
Conv2d
(
5
,
1
0
,
5
,
1
)
self
.
bn2
=
torch
.
nn
.
BatchNorm2d
(
1
0
)
self
.
fc1
=
torch
.
nn
.
Linear
(
4
*
4
*
1
0
,
100
)
self
.
conv1
=
torch
.
nn
.
Conv2d
(
1
,
10
,
5
,
1
)
self
.
bn1
=
torch
.
nn
.
BatchNorm2d
(
10
)
self
.
conv2
=
torch
.
nn
.
Conv2d
(
10
,
2
0
,
5
,
1
)
self
.
bn2
=
torch
.
nn
.
BatchNorm2d
(
2
0
)
self
.
fc1
=
torch
.
nn
.
Linear
(
4
*
4
*
2
0
,
100
)
self
.
fc2
=
torch
.
nn
.
Linear
(
100
,
10
)
def
forward
(
self
,
x
):
...
...
@@ -37,7 +37,7 @@ class TorchModel(torch.nn.Module):
x
=
F
.
max_pool2d
(
x
,
2
,
2
)
x
=
F
.
relu
(
self
.
bn2
(
self
.
conv2
(
x
)))
x
=
F
.
max_pool2d
(
x
,
2
,
2
)
x
=
x
.
view
(
-
1
,
4
*
4
*
1
0
)
x
=
x
.
view
(
-
1
,
4
*
4
*
2
0
)
x
=
F
.
relu
(
self
.
fc1
(
x
))
x
=
self
.
fc2
(
x
)
return
F
.
log_softmax
(
x
,
dim
=
1
)
...
...
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