Skip to content

Commit

Permalink
Fix 'Base' bug THUDM#28 THUDM#30
Browse files Browse the repository at this point in the history
  • Loading branch information
cenyk1230 committed Oct 31, 2019
1 parent b19c97c commit 52b4ecd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ def train_model(network_data, feature_dic, log_name):
train_pairs = generate_pairs(all_walks, vocab)

edge_types = list(network_data.keys())
if edge_types[-1] != 'Base':
edge_types.sort()
edge_types.remove('Base')
edge_types.append('Base')

num_nodes = len(index2word)
edge_type_count = len(edge_types) - 1
Expand Down

0 comments on commit 52b4ecd

Please sign in to comment.