Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于train_loader的使用问题? #422

Open
BearBiscuit05 opened this issue Mar 31, 2023 · 1 comment
Open

关于train_loader的使用问题? #422

BearBiscuit05 opened this issue Mar 31, 2023 · 1 comment

Comments

@BearBiscuit05
Copy link

❓ Questions & Help

1.我想问一下train_loader和我们在torch中使用的DataLoader有什么区别?因为我在输出打印train_loader迭代值batch时,发现每个batch似乎都是相同的全图数据。但是DataLoader似乎是按Batchsize来组织为一个subgraph。我想问一下我应该如何去理解train_loader,以及我应该关注哪一部分代码去了解数据加载到模型中这一过程细节。
2.看起来似乎目前只实现了GCN与GAT两个可以实现多GPU训练,其他的模型可以支持多GPU训练吗?如果我想进行修改,应该从哪入手?

@cenyk1230
Copy link
Member

Hi @BearBiscuit05 ,

  1. 需要看你具体使用那个train_loader。对于full-batch训练来说,train_loader每次就是返回整个图;对于采样mini-batch训练来说,每次就会返回batch_size的采样子图;
  2. 目前多GPU训练依赖于具体的子图采样策略,例如cluster-gcn这种,理论上能支持大多数GNN模型。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants