예제 #1
0
 def test_saliency(self):
     bcn = BaseConvNet(min_filters=4, filter_growth_rate=1.5, min_data_width=8,
                       dense_neurons=8, output_type="sigmoid")
     bcn.build_network(self.x_shape, 1)
     sal = bcn.saliency(self.x_ds)
     assert sal.max() > 0
     self.assertListEqual(list(sal.shape[1:]), list(self.x.shape))
예제 #2
0
 def test_network_build(self):
     bcn = BaseConvNet(min_filters=4, filter_growth_rate=1.5, min_data_width=8,
                       dense_neurons=4, output_type="sigmoid")
     bcn.build_network(self.x_shape, 1)
     assert bcn.model_.layers[1].output.shape[-1] == bcn.min_filters
     assert bcn.model_.layers[-6].output.shape[1] == bcn.min_data_width
     return