def METHOD_NAME(self, x_spt, y_spt, x_qry, y_qry):
    """
    :param x_spt:   [b, setsz, c_, h, w]
    :param y_spt:   [b, setsz]
    :param x_qry:   [b, querysz, c_, h, w]
    :param y_qry:   [b, querysz]
    :return:
    """
    task_num, setsz, c_, h, w = x_spt.size()
    querysz = x_qry.size(1)
    losses_q = [0 for _ in range(self.update_step + 1)]  # losses_q[i] is the loss on step i
    corrects = [0 for _ in range(self.update_step + 1)]
    for i in range(task_num):
        # 1. run the i-th task and compute loss for k=0
        logits = self.net(x_spt[i], vars=None, bn_training=True)
        loss = F.cross_entropy(logits, y_spt[i])
        grad = torch.autograd.grad(loss, self.net.parameters())
        fast_weights = list([p[1] - self.update_lr * p[0]for p in zip(grad, self.net.parameters())])
        # this is the loss and accuracy before first update
        with torch.no_grad():
            # [setsz, nway]
            logits_q = self.net(x_qry[i], self.net.parameters(), bn_training=True)
            loss_q = F.cross_entropy(logits_q, y_qry[i])
            losses_q[0] += loss_q
            pred_q = F.softmax(logits_q, dim=1).argmax(dim=1)
            correct = torch.eq(pred_q, y_qry[i]).sum().item()
            corrects[0] = corrects[0] + correct
        # this is the loss and accuracy after the first update
        with torch.no_grad():
            # [setsz, nway]
            logits_q = self.net(x_qry[i], fast_weights, bn_training=True)
            loss_q = F.cross_entropy(logits_q, y_qry[i])
            losses_q[1] += loss_q
            # [setsz]
            pred_q = F.softmax(logits_q, dim=1).argmax(dim=1)
            correct = torch.eq(pred_q, y_qry[i]).sum().item()
            corrects[1] = corrects[1] + correct
        for k in range(1, self.update_step):
            # 1. run the i-th task and compute loss for k=1~K-1
            logits = self.net(x_spt[i], fast_weights, bn_training=True)
            loss = F.cross_entropy(logits, y_spt[i])
            # 2. compute grad on theta_pi
            grad = torch.autograd.grad(loss, fast_weights)
            # 3. theta_pi = theta_pi - train_lr * grad
            fast_weights = [p[1] - self.update_lr * p[0] for p in zip(grad, fast_weights)]
            logits_q = self.net(x_qry[i], fast_weights, bn_training=True)
            # loss_q will be overwritten and just keep the loss_q on last update step.
            loss_q = F.cross_entropy(logits_q, y_qry[i])
            losses_q[k + 1] += loss_q
            with torch.no_grad():
                pred_q = F.softmax(logits_q, dim=1).argmax(dim=1)
                correct = torch.eq(pred_q, y_qry[i]).sum().item()  # convert to numpy
                corrects[k + 1] = corrects[k + 1] + correct
    # end of all tasks
    # sum over all losses on query set across all tasks
    loss_q = losses_q[-1] / task_num
    # optimize theta parameters
    self.meta_optim.zero_grad()
    loss_q.backward()
    # print('meta update')
    # for p in self.net.parameters()[:5]:
    # 	print(torch.norm(p).item())
    self.meta_optim.step()
    accs = torch.tensor(corrects) / (querysz * task_num)
    return accs