Unverified Commit 2ff8ecfb authored by Chao Ma's avatar Chao Ma Committed by GitHub
Browse files

update test_batch_size (#510)

parent ca48787a
...@@ -194,7 +194,7 @@ def main(args): ...@@ -194,7 +194,7 @@ def main(args):
for epoch in range(args.n_epochs): for epoch in range(args.n_epochs):
idx = 0 idx = 0
for nf in sampler: for nf in sampler:
print("epoch: %d, subgraph: %d" %(epoch, idx)) print("Train epoch: %d, subgraph: %d" %(epoch, idx))
idx += 1 idx += 1
nf.copy_from_parent() nf.copy_from_parent()
# forward # forward
...@@ -216,11 +216,14 @@ def main(args): ...@@ -216,11 +216,14 @@ def main(args):
num_acc = 0. num_acc = 0.
idx = 0
for nf in dgl.contrib.sampling.NeighborSampler(g, args.test_batch_size, for nf in dgl.contrib.sampling.NeighborSampler(g, args.test_batch_size,
g.number_of_nodes(), g.number_of_nodes(),
neighbor_type='in', neighbor_type='in',
num_hops=args.n_layers+1, num_hops=args.n_layers+1,
seed_nodes=test_nid): seed_nodes=test_nid):
print("Test epoch: %d, subgraph: %d" %(epoch, idx))
idx += 1
nf.copy_from_parent() nf.copy_from_parent()
pred = infer_model(nf) pred = infer_model(nf)
batch_nids = nf.layer_parent_nid(-1).astype('int64').as_in_context(ctx) batch_nids = nf.layer_parent_nid(-1).astype('int64').as_in_context(ctx)
......
DGLBACKEND=mxnet python3 gcn_ns_sampler.py --ip 127.0.0.1:2049 --num-sender=1 --dataset reddit-self-loop --num-neighbors 2 --batch-size 1000 --test-batch-size 500 DGLBACKEND=mxnet python3 gcn_ns_sampler.py --ip 127.0.0.1:2049 --num-sender=1 --dataset reddit-self-loop --num-neighbors 3 --batch-size 1000 --test-batch-size 5000
DGLBACKEND=mxnet python3 gcn_trainer.py --ip 127.0.0.1:2049 --num-sender=1 --dataset reddit-self-loop --num-neighbors 2 --batch-size 1000 --test-batch-size 500 --n-hidden 64 DGLBACKEND=mxnet python3 gcn_trainer.py --ip 127.0.0.1:2049 --num-sender=1 --dataset reddit-self-loop --num-neighbors 3 --batch-size 1000 --test-batch-size 5000 --n-hidden 64
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment