def loss_func(*params): f = model.forward_batch(batch, 'train') return model.loss(f, label)
def loss_func(*params): f = model.forward(img, 'train') return model.loss(f, label)