675b7884c09875486fdddffa2d8a6a12247ab4d7,torch_geometric/utils/convert.py,,to_networkx,#Any#Any#Any#Any#Any#,53
Before Change
G = nx.DiGraph()
G.add_nodes_from(range(data.num_nodes))
values = {key: data [key].squeeze().tolist() for key in data.keys}
for i, (u, v) in enumerate(data.edge_index.t().tolist()):
After Change
values[key] = item.squeeze().tolist()
else:
values[key] = item
if isinstance(values[key], (list, tuple)) and len(values[key]) == 1:
values[key] = item[0]
for i, (u, v) in enumerate(data.edge_index.t().tolist()):
if to_undirected and v > u:
continue
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances Project Name: rusty1s/pytorch_geometric
Commit Name: 675b7884c09875486fdddffa2d8a6a12247ab4d7
Time: 2020-05-31
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/utils/convert.py
Class Name:
Method Name: to_networkx
Project Name: rlworkgroup/garage
Commit Name: e4b6611cb73ef7658f028831be1aa6bd85ecbed0
Time: 2020-08-14
Author: 38871737+avnishn@users.noreply.github.com
File Name: src/garage/torch/policies/deterministic_mlp_policy.py
Class Name: DeterministicMLPPolicy
Method Name: get_action
Project Name: rlworkgroup/garage
Commit Name: e4b6611cb73ef7658f028831be1aa6bd85ecbed0
Time: 2020-08-14
Author: 38871737+avnishn@users.noreply.github.com
File Name: src/garage/torch/policies/stochastic_policy.py
Class Name: StochasticPolicy
Method Name: get_action
Project Name: rusty1s/pytorch_geometric
Commit Name: a998e7a1fa996edb4bcc1b34a0df5967ed6ec9e2
Time: 2020-05-13
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/utils/convert.py
Class Name:
Method Name: to_networkx