File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 55if torch .cuda .is_available ():
66 from torch_scatter import gather_cuda , segment_cuda
77
8- gat = lambda is_cuda : gather_cuda if is_cuda else gather_cpu # noqa
9- seg = lambda is_cuda : segment_cuda if is_cuda else segment_cpu # noqa
8+
9+ def gat (is_cuda ):
10+ return gather_cuda if is_cuda else gather_cpu
11+
12+
13+ def seg (is_cuda ):
14+ return segment_cuda if is_cuda else segment_cpu
1015
1116
1217class GatherCOO (torch .autograd .Function ):
Original file line number Diff line number Diff line change 66if torch .cuda .is_available ():
77 from torch_scatter import segment_cuda , gather_cuda
88
9- seg = lambda is_cuda : segment_cuda if is_cuda else segment_cpu # noqa
10- gat = lambda is_cuda : gather_cuda if is_cuda else gather_cpu # noqa
9+
10+ def seg (is_cuda ):
11+ return segment_cuda if is_cuda else segment_cpu
12+
13+
14+ def gat (is_cuda ):
15+ return gather_cuda if is_cuda else gather_cpu
1116
1217
1318class SegmentCOO (torch .autograd .Function ):
You can’t perform that action at this time.
0 commit comments