def METHOD_NAME(self, imgs, gt, learning_rate=0, mul=1, training=True, flow_gt=None):
    for param_group in self.optimG.param_groups:
        param_group['lr'] = learning_rate
    img0 = imgs[:, :3]
    img1 = imgs[:, 3:]
    if training:
        self.train()
    else:
        self.eval()
    scale = [8, 4, 2, 1]
    flow, mask, merged = self.flownet(torch.cat((imgs, gt), 1), scale=scale, training=training)
    loss_l1 = (merged[3] - gt).abs().mean()
    loss_smooth = self.sobel(flow[3], flow[3]*0).mean()
    # loss_vgg = self.vgg(merged[2], gt)
    if training:
        self.optimG.zero_grad()
        loss_G = loss_l1 + loss_cons + loss_smooth * 0.1
        loss_G.backward()
        self.optimG.step()
    else:
        flow_teacher = flow[2]
    return merged[3], {
        'mask': mask,
        'flow': flow[3][:, :2],
        'loss_l1': loss_l1,
        'loss_cons': loss_cons,
        'loss_smooth': loss_smooth,
        }