def update_state(self, epoch):
        """ A function that is called at the end of every epoch. Can adjust state of the network here.
        For example, if one wants to change the loss weights for prediction during training (e.g. deep supervision), """
        if hasattr(self.opts.raw,'late_gate'):
            if epoch < self.opts.raw.late_gate:
                self.weight[0] = 0
                self.weight[1] = 0
                print('='*10,'weight={}'.format(self.weight), '='*10)
            if epoch == self.opts.raw.late_gate:
                self.weight = self.opts.raw.weight[:]
                weight_t = torch.from_numpy(np.array(self.weight, dtype=np.float32))
                self.aggregation_weight = Variable(weight_t,volatile=True).view(-1,1,1).cuda()
                print('='*10,'weight={}'.format(self.weight), '='*10)
 A function that is called at the end of every epoch. Can adjust state of the network here.
        For example, if one wants to change the loss weights for prediction during training (e.g. deep supervision), 
models/aggregated_classifier.py