Exemple #1
0
 def __init__(self, start_shape, stop_shape, depth=2, conv_part=Conv1dAC):
     _Net.__init__(self, start_shape, stop_shape, depth)
     self.conv_part = conv_part(start_shape=start_shape,
                                stop_shape=stop_shape,
                                depth=depth,
                                bias_prob=0.3)
     self.lin_part = LinearAC(start_shape=None,
                              stop_shape=(10, ),
                              depth=depth,
                              bias_prob=0.3)
     self.change_num = IntParam(name="")
Exemple #2
0
 def __init__(
     self,
     start_shape,
     stop_shape,
     min_features=10,
     max_features=128,
     depth=2,
     bias_prob=0.0,
 ):
     _Net.__init__(self, start_shape, stop_shape, depth)
     self.layers = [Linear(bias=False)]
     self.limits = (min_features, max_features)
     if bias_prob > 0:
         self.layers[0].bias.randomize(true_prob=bias_prob)
     self.layers[0].out_features.randomize(limits=self.limits)
Exemple #3
0
 def __init__(self, start_shape, stop_shape, depth, convclass, bias_prob=0):
     _Net.__init__(self, start_shape, stop_shape, depth)
     self.layers = [convclass()]
     self.layers[0].out_channels.randomize(limits=(self.stop_shape[0], 64))
     if bias_prob > 0:
         self.layers[0].bias.randomize(true_prob=bias_prob)
Exemple #4
0
 def __init__(self, start_shape, stop_shape, depth=3):
     _Net.__init__(self, start_shape, stop_shape, depth)
     self.layers.append(Conv2dAC(start_shape, [10, 1, 1], depth))
     self.layers.append(Conv2dThenLinear(start_shape, [10, 1, 1], depth))
     self.change_num = IntParam("", default=1)