def __init__(self, cfg, net1, net2):
    super(SingleTaskNet, self).__init__()
    self.cfg = cfg
    self.net1 = net1
    self.net2 = net2
    assert (len(net1.stages) == len(net2.stages))
    (self.task1, self.task2) = get_tasks(cfg)
    self.num_stages = len(net1.stages)
    self._step = 0
def __init__(self, cfg, net1, net2):
    super(SingleTaskNet, self).__init__()
    self.cfg = cfg
    self.net1 = net1
    self.net2 = net2
    assert (len(net1.stages) == len(net2.stages))
    (self.task1, self.task2) = get_tasks(cfg)
    self.num_stages = len(net1.stages)
    self._step = 0