Skip to content

use mlp for relgcn #316

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

Merged
merged 1 commit into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/molnet/train_molnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ def set_up_predictor(method, n_unit, conv_layers, class_num):
elif method == 'relgcn':
print('Training an RelGCN predictor...')
num_edge_type = 4
relgcn = RelGCN(out_channels=class_num, num_edge_type=num_edge_type,
relgcn = RelGCN(out_channels=n_unit, num_edge_type=num_edge_type,
scale_adj=True)
return GraphConvPredictor(relgcn, None)
return GraphConvPredictor(relgcn, mlp)
elif method == 'relgat':
print('Train Relational GAT model...')
relgat = RelGAT(out_dim=n_unit, hidden_dim=n_unit,
Expand Down
4 changes: 2 additions & 2 deletions examples/own_dataset/train_own_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ def set_up_predictor(method, n_unit, conv_layers, class_num):
elif method == 'relgcn':
print('Training an RelGCN predictor...')
num_edge_type = 4
relgcn = RelGCN(out_channels=class_num, num_edge_type=num_edge_type,
relgcn = RelGCN(out_channels=n_unit, num_edge_type=num_edge_type,
scale_adj=True)
predictor = GraphConvPredictor(relgcn, None)
predictor = GraphConvPredictor(relgcn, mlp)
elif method == 'relgat':
print('Training an RelGAT predictor...')
relgat = RelGAT(out_dim=n_unit, hidden_dim=n_unit,
Expand Down
4 changes: 2 additions & 2 deletions examples/qm9/train_qm9.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ def set_up_predictor(method, n_unit, conv_layers, class_num, scaler):
elif method == 'relgcn':
print('Use Relational GCN predictor...')
num_edge_type = 4
relgcn = RelGCN(out_channels=class_num, num_edge_type=num_edge_type,
relgcn = RelGCN(out_channels=n_unit, num_edge_type=num_edge_type,
scale_adj=True)
predictor = GraphConvPredictor(relgcn, None, scaler)
predictor = GraphConvPredictor(relgcn, mlp, scaler)
elif method == 'relgat':
print('Train Relational GAT predictor...')
relgat = RelGAT(out_dim=n_unit, hidden_dim=n_unit,
Expand Down
5 changes: 3 additions & 2 deletions examples/tox21/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ def build_predictor(method, n_unit, conv_layers, class_num):
print('Use Relational GCN predictor...')
num_edge_type = 4
predictor = GraphConvPredictor(
RelGCN(out_channels=class_num, num_edge_type=num_edge_type,
scale_adj=True))
RelGCN(out_channels=n_unit, num_edge_type=num_edge_type,
scale_adj=True),
MLP(out_dim=class_num, hidden_dim=n_unit))
elif method == 'relgat':
print('Use GAT predictor...')
predictor = GraphConvPredictor(
Expand Down