@staticmethod
def forward(ctx, input, a, b):
    """
        In the forward pass we receive a Tensor containing the input and return
        a Tensor containing the output. ctx is a context object that can be used
        to stash information for backward computation. You can cache arbitrary
        objects for use in the backward pass using the ctx.save_for_backward method.
        """
    ctx.save_for_backward(input, a, b)
    S = a.shape[0]
    output = input.clamp(min=0)
    for s in range(S):
        t = -input + b[s]
        output += a[s] * t.clamp(min=0)
    return output
