def __init__(self, input_shape, output_shape): super(LeNetARD, self).__init__() self.conv1 = nn_ard.Conv2dARD(input_shape, 20, 5) self.conv2 = nn_ard.Conv2dARD(20, 50, 5) self.l1 = nn_ard.LinearARD(50 * 5 * 5, 500) self.l2 = nn_ard.LinearARD(500, output_shape) self._init_weights()
def __init__(self, input_shape, output_shape, hidden_size=150, activation=None): super(DenseModelARD, self).__init__() self.l1 = nn_ard.LinearARD(input_shape, hidden_size) self.l2 = nn_ard.LinearARD(hidden_size, output_shape) self.activation = activation self._init_weights()
def __init__(self, input_shape, output_shape): super(LeNetARD_MNIST, self).__init__(input_shape, output_shape) self.l1 = nn_ard.LinearARD(50 * 4 * 4, 500) super(LeNetARD_MNIST, self)._init_weights()