def forward()

in LaNAS/one-shot_LaNAS/Evaluate/individual_model.py [0:0]


    def forward(self, s0, s1, supernet_matrix, drop_prob):
        s0 = self.preprocess0(s0)
        s1 = self.preprocess1(s1)

        states = [s0, s1]
        offset = 0
        for i in range(self._steps):
            H = []
            op = []
            for j, h in enumerate(states):
                if len(self._ops[offset + j]._ops) != 0:
                    H.append(self._ops[offset + j](h))
                    op.append(self._ops[offset + j])

            if self.training and drop_prob > 0.:
                for hn_index in range(len(H)):
                    if len(op[hn_index]._ops) != 0:
                        if not isinstance(op[hn_index]._ops[0], Identity):
                        # print(len(op[hn_index]._ops))
                        # print(op[hn_index]._ops[0])
                        # print(op[hn_index])
                            H[hn_index] = drop_path(H[hn_index], drop_prob)

            s = sum(hn for hn in H)

            offset += len(states)
            states.append(s)
        return torch.cat(states[-len(supernet_matrix):], dim=1)