File tree 2 files changed +17
-12
lines changed
tutorials/models/5_giant_graph
2 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -217,11 +217,11 @@ pipeline {
217
217
// unit_test_linux("pytorch", "cpu")
218
218
// }
219
219
// }
220
- // stage("Tutorial test") {
221
- // steps {
222
- // tutorial_test_linux("mxnet")
223
- // }
224
- // }
220
+ stage(" Tutorial test" ) {
221
+ steps {
222
+ tutorial_test_linux(" mxnet" )
223
+ }
224
+ }
225
225
}
226
226
}
227
227
stage(" MXNet GPU" ) {
@@ -243,11 +243,11 @@ pipeline {
243
243
// unit_test_linux("pytorch", "cpu")
244
244
// }
245
245
// }
246
- // stage("Tutorial test") {
247
- // steps {
248
- // tutorial_test_linux("mxnet")
249
- // }
250
- // }
246
+ stage(" Tutorial test" ) {
247
+ steps {
248
+ tutorial_test_linux(" mxnet" )
249
+ }
250
+ }
251
251
}
252
252
}
253
253
}
Original file line number Diff line number Diff line change @@ -250,9 +250,9 @@ def forward(self, nf):
250
250
# dropout probability
251
251
dropout = 0.2
252
252
# batch size
253
- batch_size = 10000
253
+ batch_size = 1000
254
254
# number of neighbors to sample
255
- num_neighbors = 8
255
+ num_neighbors = 4
256
256
# number of epochs
257
257
num_epochs = 1
258
258
@@ -267,6 +267,7 @@ def forward(self, nf):
267
267
{'learning_rate' : 0.03 , 'wd' : 0 })
268
268
269
269
for epoch in range (num_epochs ):
270
+ i = 0
270
271
for nf in dgl .contrib .sampling .NeighborSampler (g , batch_size ,
271
272
num_neighbors ,
272
273
neighbor_type = 'in' ,
@@ -291,6 +292,10 @@ def forward(self, nf):
291
292
# optimization
292
293
trainer .step (batch_size = 1 )
293
294
print ("Epoch[{}]: loss {}" .format (epoch , loss .asscalar ()))
295
+ i += 1
296
+ # We only train the model with 32 mini-batches just for demonstration.
297
+ if i >= 32 :
298
+ break
294
299
295
300
##############################################################################
296
301
# Control Variate
You can’t perform that action at this time.
0 commit comments