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
dgl
Commits
be58224f
Unverified
Commit
be58224f
authored
Jun 13, 2019
by
Da Zheng
Committed by
GitHub
Jun 13, 2019
Browse files
[CI] enable tutorial test in CI. (#631)
* enable tutorial test in CI. * reduce overhead.
parent
7d619365
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
12 deletions
+17
-12
Jenkinsfile
Jenkinsfile
+10
-10
tutorials/models/5_giant_graph/1_sampling_mx.py
tutorials/models/5_giant_graph/1_sampling_mx.py
+7
-2
No files found.
Jenkinsfile
View file @
be58224f
...
...
@@ -217,11 +217,11 @@ pipeline {
// unit_test_linux("pytorch", "cpu")
// }
//}
//
stage("Tutorial test") {
//
steps {
//
tutorial_test_linux("mxnet")
//
}
//
}
stage
(
"Tutorial test"
)
{
steps
{
tutorial_test_linux
(
"mxnet"
)
}
}
}
}
stage
(
"MXNet GPU"
)
{
...
...
@@ -243,11 +243,11 @@ pipeline {
// unit_test_linux("pytorch", "cpu")
// }
//}
//
stage("Tutorial test") {
//
steps {
//
tutorial_test_linux("mxnet")
//
}
//
}
stage
(
"Tutorial test"
)
{
steps
{
tutorial_test_linux
(
"mxnet"
)
}
}
}
}
}
...
...
tutorials/models/5_giant_graph/1_sampling_mx.py
View file @
be58224f
...
...
@@ -250,9 +250,9 @@ class GCNSampling(gluon.Block):
# dropout probability
dropout
=
0.2
# batch size
batch_size
=
1000
0
batch_size
=
1000
# number of neighbors to sample
num_neighbors
=
8
num_neighbors
=
4
# number of epochs
num_epochs
=
1
...
...
@@ -267,6 +267,7 @@ trainer = gluon.Trainer(model.collect_params(), 'adam',
{
'learning_rate'
:
0.03
,
'wd'
:
0
})
for
epoch
in
range
(
num_epochs
):
i
=
0
for
nf
in
dgl
.
contrib
.
sampling
.
NeighborSampler
(
g
,
batch_size
,
num_neighbors
,
neighbor_type
=
'in'
,
...
...
@@ -291,6 +292,10 @@ for epoch in range(num_epochs):
# optimization
trainer
.
step
(
batch_size
=
1
)
print
(
"Epoch[{}]: loss {}"
.
format
(
epoch
,
loss
.
asscalar
()))
i
+=
1
# We only train the model with 32 mini-batches just for demonstration.
if
i
>=
32
:
break
##############################################################################
# Control Variate
...
...
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