Implement a custom linear layer that computes the affine transformation without using any built-in linear layer.