What is a L1 layer? Are you trying to add a layer that computes L1 loss between your data and some learnable weights?
If so you can do the following:
# declare weights somewhere
weights = Variable(torch.randn(...), requires_grad=True)

# In your training process, add:
output = torch.functional.L1_loss(input, weights)