"git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "54b4bd0acd0f78e389be6c9bfaf6e65ba50b9d53"
Unverified Commit 367a3a34 authored by Junwen Yao's avatar Junwen Yao Committed by GitHub
Browse files

Fix torch import in example (#3372)

parent a04a8d06
...@@ -239,7 +239,7 @@ def run(proc_id, n_gpus, args, devices, data): ...@@ -239,7 +239,7 @@ def run(proc_id, n_gpus, args, devices, data):
# Create PyTorch DataLoader for constructing blocks # Create PyTorch DataLoader for constructing blocks
if n_gpus > 1: if n_gpus > 1:
dist_sampler = torch.utils.data.distributed.DistributedSampler(train_nid.numpy(), shuffle=True, drop_last=False) dist_sampler = th.utils.data.distributed.DistributedSampler(train_nid.numpy(), shuffle=True, drop_last=False)
dataloader = DataLoader( dataloader = DataLoader(
dataset=train_nid.numpy(), dataset=train_nid.numpy(),
batch_size=args.batch_size, batch_size=args.batch_size,
......
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