I am trying to use torch.nn.SmoothL1Loss to calculate the loss for a batch. In older versions, I could use parameter reduce to return one value per element. In version 0.2.0.post3, however, the only parameter of SmoothL1Loss is size_average. It can only be used to return sum of the losses or the average loss. How can I make this class return one loss per batch element?