def METHOD_NAME(self, input_shape):
    if self.self_interaction:
        output_dim = input_shape[1] ** 2
    else:
        output_dim = input_shape[1] * (input_shape[1] - 1) // 2
    return (input_shape[0], output_dim)