Example #1
0
 def test_vgg_cat_dog_mouse_must_converge(self):
     train_error = cat_dog_mouse_must_converge("vgg16", vgg.VGG16,
                                               optimizers.AdamOptimizer,
                                               batch_size=32,
                                               epochs=80,
                                               initial_learning_rate=1e-4,
                                               summaries=False)
     self.assertTrue(train_error <= 0.1)
Example #2
0
 def test_alexnet_cat_dog_mouse_must_converge(self):
     train_error = cat_dog_mouse_must_converge("alexnet",
                                               alexnet.AlexNet,
                                               optimizers.AdamOptimizer,
                                               batch_size=32,
                                               epochs=80,
                                               initial_learning_rate=1e-4,
                                               summaries=True)
     self.assertTrue(train_error <= 0.1)
Example #3
0
 def test_lenet_cat_dog_mouse_must_converge_299(self):
     train_error = cat_dog_mouse_must_converge("lenet", lenet.LeNet,
                                               optimizers.AdamOptimizer,
                                               # optimizers.MomentumOptimizer,
                                               batch_size=16,#*TestLenet.gpus,
                                               epochs=25,
                                               initial_learning_rate=1e-4, # rate for new fc
                                               summaries=True,
                                               dim=299)
     self.assertTrue(train_error <= 0.1)
Example #4
0
 def test_lenet_cat_dog_mouse_must_converge_28(self):
     train_error = cat_dog_mouse_must_converge("lenet", lenet.LeNet,
                                                  optimizers.AdamOptimizer,
                                                  # optimizers.MomentumOptimizer,
                                                  batch_size=32*TestLenet.gpus,
                                                  epochs=80,
                                                  initial_learning_rate=1e-3,
                                                  summaries=True,
                                                  dim=28)
     self.assertTrue(train_error <= 0.1)
Example #5
0
 def test_inceptionV3_cat_dog_mouse_must_converge28(self):
     train_error = cat_dog_mouse_must_converge("inceptionV3", inception.InceptionV3,
                                               optimizers.AdamOptimizer,
                                               # optimizers.MomentumOptimizer,
                                               batch_size=32,
                                               epochs=180,
                                               initial_learning_rate=1e-4,
                                               summaries=False,
                                               dim=28)
     print(train_error)
     self.assertTrue(train_error <= 0.1)
 def test_inceptionV3_cat_dog_mouse_must_converge(self):
     train_error = cat_dog_mouse_must_converge(
         "inceptionV3",
         inception.InceptionV3,
         optimizers.AdamOptimizer,
         # optimizers.MomentumOptimizer,
         batch_size=32,
         epochs=180,
         initial_learning_rate=1e-4,
         summaries=False,
         dim=299)
     print(train_error)
     self.assertTrue(train_error <= 0.1)
Example #7
0
    def test_lenet_cat_dog_mouse_must_converge_299(self):
        model = lenet.LeNet

        train_error = cat_dog_mouse_must_converge(
            "lenet",
            model,
            optimizers.AdamOptimizer,
            # optimizers.MomentumOptimizer,
            batch_size=32,
            epochs=50,
            initial_learning_rate=1e-3,  # rate for new fc
            summaries=True,
            dim=299)
        self.assertTrue(train_error <= 0.1)