MCPcopy Create free account
hub / github.com/DeepGraphLearning/S3F / tuple_sum

Function tuple_sum

s3f/gvp_layer.py:11–15  ·  view source on GitHub ↗

Sums any number of tuples (s, V) elementwise.

(*args)

Source from the content-addressed store, hash-verified

9
10
11def tuple_sum(*args):
12 '''
13 Sums any number of tuples (s, V) elementwise.
14 '''
15 return tuple(map(sum, zip(*args)))
16
17
18def tuple_cat(*args, dim=-1):

Callers 1

forwardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected