xnn.ffnn.models.amoeba.masked_sum#

xnn.ffnn.models.amoeba.masked_sum(values, index, on, size)[source]#

The rows of values (M,) or (M, C) whose mask on is set, summed into the size entries index names. The other rows are added to a scratch tail, each next to its neighbors’ entries: on a pair list sorted by atom, the atomic adds of a run of rows into one entry (zeros of the pairs a term skips among them) would run one after the other.

Parameters:
Return type:

Tensor