I want to build a model that evaluates two loss functions with the same l1 metric.
which way is a more pythonic method(or Pytorch method?)
# status 1
criterion1 = nn.L1Loss()
criterion2 = nn.L1Loss()

criterion1(input_1,output_1)
criterion2(input_2,output_2)
loss.backward()

# status 2
criterion1 = nn.L1Loss()

criterion1(input_1,output_1)
criterion1(input_2,output_2)
loss.backward()