accumulate

sparse_accumulation.accumulate(X1, X2, idx_output, output_size, idx_1, idx_2, multipliers)

get_cg_transformation_rule

sparse_accumulation.get_cg_transformation_rule(l1, l2, l_output, dtype=torch.float32, device='cpu')

CGCalculatorSingle

class sparse_accumulation.CGCalculatorSingle(l1, l2, l_output, dtype=torch.float32)
forward(X1, X2)

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.