def test_list_invalid_key(self):
     
     lc = LearningCurve(self.fpath)
     lc.parse()
     assert_raises(KeyError, lc.list, 'wrong-key', phase=Phase.TRAIN)
     assert_raises(KeyError, lc.list, 'wrong-key', phase=Phase.TEST)
     assert_raises(KeyError, lc.list, 'accuracy', phase=Phase.TRAIN)
 def test_list_num_iters(self):
     
     lc = LearningCurve(self.fpath)
     lc.parse()
     x = lc.list('NumIters')
     dx = np.diff(x)
     assert_true(np.all(dx > 0))
Exemple #3
0
    def test_list_invalid_key(self):

        lc = LearningCurve(self.fpath)
        lc.parse()
        assert_raises(KeyError, lc.list, 'wrong-key', phase=Phase.TRAIN)
        assert_raises(KeyError, lc.list, 'wrong-key', phase=Phase.TEST)
        assert_raises(KeyError, lc.list, 'accuracy', phase=Phase.TRAIN)
Exemple #4
0
    def test_list_num_iters(self):

        lc = LearningCurve(self.fpath)
        lc.parse()
        x = lc.list('NumIters')
        dx = np.diff(x)
        assert_true(np.all(dx > 0))
 def test_list_loss_acc(self):
     
     lc = LearningCurve(self.fpath)
     lc.parse()
     loss = lc.list('loss')
     acc = lc.list('accuracy')
     assert_equal(loss.shape, acc.shape)
     assert_false(np.all(loss == acc))
Exemple #6
0
    def test_list_loss_acc(self):

        lc = LearningCurve(self.fpath)
        lc.parse()
        loss = lc.list('loss')
        acc = lc.list('accuracy')
        assert_equal(loss.shape, acc.shape)
        assert_false(np.all(loss == acc))
 def test_list(self):
     
     lc = LearningCurve(self.fpath)
     lc.parse()
     x = lc.list('NumIters')
     assert_greater(x.size, 0)
     loss = lc.list('loss')
     assert_equal(x.shape, loss.shape)
     acc = lc.list('accuracy')
     assert_equal(x.shape, acc.shape)
Exemple #8
0
    def test_list(self):

        lc = LearningCurve(self.fpath)
        lc.parse()
        x = lc.list('NumIters')
        assert_greater(x.size, 0)
        loss = lc.list('loss')
        assert_equal(x.shape, loss.shape)
        acc = lc.list('accuracy')
        assert_equal(x.shape, acc.shape)
Exemple #9
0
    def test_keys_parsed(self):

        lc = LearningCurve(self.fpath)
        train_keys, test_keys = lc.parse()
        assert_list_equal(train_keys,
                          ['NumIters', 'Seconds', 'LearningRate', 'loss'])
        assert_list_equal(
            test_keys,
            ['NumIters', 'Seconds', 'LearningRate', 'accuracy', 'loss'])
 def test_keys_parsed(self):
     
     lc = LearningCurve(self.fpath)
     train_keys, test_keys = lc.parse()
     assert_list_equal(train_keys, ['NumIters', 'Seconds', 'LearningRate', 'loss'])
     assert_list_equal(test_keys, ['NumIters', 'Seconds', 'LearningRate', 'accuracy', 'loss'])