def get_initial_cnn_pool(): """ Returns the initial pool for CNNs. """ vgg_nets = [nn_examples.get_vgg_net(1), nn_examples.get_vgg_net(2), nn_examples.get_vgg_net(3), nn_examples.get_vgg_net(4)] blocked_cnns = [nn_examples.get_blocked_cnn(3, 1, 1), # 3 nn_examples.get_blocked_cnn(3, 2, 1), # 6 nn_examples.get_blocked_cnn(3, 3, 1), # 9 nn_examples.get_blocked_cnn(3, 4, 1), # 12 nn_examples.get_blocked_cnn(3, 5, 1), # 15 nn_examples.get_blocked_cnn(4, 4, 1), # 16 ] resnet_cnns = [] # multidepth_cnns = [nn_examples.get_multidepth_cnn_eg2()] multidepth_cnns = [] return vgg_nets + blocked_cnns + resnet_cnns + multidepth_cnns
def get_cnns(): """ Returns the initial pool for CNNs. """ vgg_nets = [ nn_examples.get_vgg_net(1), nn_examples.get_vgg_net(2), nn_examples.get_vgg_net(3), nn_examples.get_vgg_net(4) ] blocked_cnns = [ nn_examples.get_blocked_cnn(3, 1, 1), # 3 nn_examples.get_blocked_cnn(3, 2, 1), # 6 nn_examples.get_blocked_cnn(3, 3, 1), # 9 nn_examples.get_blocked_cnn(3, 4, 1), # 12 nn_examples.get_blocked_cnn(3, 5, 1), # 15 nn_examples.get_blocked_cnn(4, 4, 1), # 16 ] other_cnns = nn_examples.generate_cnn_architectures() ret = vgg_nets + blocked_cnns + other_cnns np.random.shuffle(ret) return ret
def test_vgg(self): """ Unit test for the VGG_net.""" self.report('Testing the VGG net. ') nn_examples.get_vgg_net(2)
def get_nn(): return get_vgg_net()
def test_vgg(self): """ Unit test for the VGG_net.""" self.report('Testing the VGG net. ') vggnet2 = nn_examples.get_vgg_net(3) save_file_prefix = os.path.join(self.save_dir, "vgg-16") visualise_nn(vggnet2, save_file_prefix)