7c41e2eee4ff49865ea9fc2fc94fe91a68cb4807,torch_geometric/datasets/icews.py,TemporalDataset,num_rels,#TemporalDataset#,35
Before Change
@property
def num_rels(self):
if hasattr(self, "_num_rels"):
return self._num_rels
ps = self.processed_paths
rs = [torch.load(path)[0].edge_attr.max().item() + 1 for path in ps]
self._num_rels = max(rs)
return self._num_rels
@property
def raw_file_names(self):
return ["{}.txt".format(name) for name in ["train", "valid", "test"]]
After Change
@property
def num_rels(self):
return self.data.edge_type.max().item() + 1
@property
def raw_file_names(self):
return ["{}.txt".format(name) for name in ["train", "valid", "test"]]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: rusty1s/pytorch_geometric
Commit Name: 7c41e2eee4ff49865ea9fc2fc94fe91a68cb4807
Time: 2019-04-12
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/datasets/icews.py
Class Name: TemporalDataset
Method Name: num_rels
Project Name: kengz/SLM-Lab
Commit Name: 2381a50a70559340a0335288d648b4bb9a675588
Time: 2018-06-12
Author: kengzwl@gmail.com
File Name: slm_lab/agent/algorithm/dqn.py
Class Name: HydraDQN
Method Name: train
Project Name: kengz/SLM-Lab
Commit Name: 2381a50a70559340a0335288d648b4bb9a675588
Time: 2018-06-12
Author: kengzwl@gmail.com
File Name: slm_lab/agent/algorithm/actor_critic.py
Class Name: ActorCritic
Method Name: train_separate