def test_parse_layers(self): dead_layers = [ "Conv2D(filters = 3,kernel_size=3, strides=[6,1], padding='valid', dilation_rate=(1,1), use_bias=True)", "InputLayer(input_shape=(32,1))", ] live_layers = parse_layers(dead_layers) l1, l2 = live_layers[0], live_layers[1] self.assertEqual(l1.filters, 3) self.assertEqual(l1.kernel_size, (3, 3)) self.assertEqual(l1.strides, (6, 1)) self.assertEqual(l1.padding, "valid") self.assertEqual(l1.dilation_rate, (1, 1)) self.assertEqual(l1.use_bias, True) self.assertEqual(l2.input_shape, [(None, 32, 1)])
def __post_init__(self): self.classifications = list(map(self.clstype, self.classifications)) if self.add_layers: # Temperory solution self.layers = parse_layers(self.layers)