Code Duplication    Length = 9-10 lines in 2 locations

pyActLearn/learning/nn/mlp.py 1 location

@@ 50-59 (lines=10) @@
47
        self.summaries = []
48
        # Create Layers
49
        for i in range(len(layers)):
50
            if i == 0:
51
                # First Layer
52
                self.inner_layers.append(
53
                    HiddenLayer(num_features, layers[i], x=self.x, name=('Hidden%d' % i), activation_fn=activation_fn)
54
                )
55
            else:
56
                # inner Layer
57
                self.inner_layers.append(
58
                    HiddenLayer(layers[i-1], layers[i], x=self.inner_layers[i-1].y,
59
                                name=('Hidden%d' % i), activation_fn=activation_fn)
60
                )
61
            self.summaries += self.inner_layers[i].summaries
62
        if num_classes == 1:

pyActLearn/learning/nn/sda.py 1 location

@@ 48-56 (lines=9) @@
45
            self.tuning_optimizer = tuning_optimizer
46
        # Create Layers
47
        for i in range(len(layers)):
48
            if i == 0:
49
                # First Layer
50
                self.inner_layers.append(
51
                    AutoencoderLayer(num_features, layers[i], x=self.x, name=('Hidden%d' % i))
52
                )
53
            else:
54
                # inner Layer
55
                self.inner_layers.append(
56
                    AutoencoderLayer(layers[i-1], layers[i], x=self.inner_layers[i-1].y, name=('Hidden%d' % i))
57
                )
58
            self.summaries += self.inner_layers[i].summaries
59
            self.encode_opts.append(