| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ba831d3 commit b5bb7e9
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -141,10 +141,10 @@ def test_mnist(self): | |||
| 141 | 141 | logdir=logdir, | |
| 142 | 142 | num_epochs=num_epochs, | |
| 143 | 143 | verbose=False, | |
| 144 | - callbacks=[CheckpointCallback(save_n_best=3)] | ||
| 144 | + callbacks=[CheckpointCallback(save_n_best=3, use_runner_logdir=True)] | ||
| 145 | 145 | ) | |
| 146 | 146 | ||
| 147 | - with open('./logs/checkpoints/_metrics.json') as f: | ||
| 147 | + with open('./logs/_metrics.json') as f: | ||
| 148 | 148 | metrics = json.load(f) | |
| 149 | - self.assertTrue(metrics['train.3']['loss'] < metrics['train.1']['loss']) | ||
| 150 | - self.assertTrue(metrics['best']['loss'] < 0.35) | ||
| 149 | + self.assertTrue(metrics['train.3']['valid']['loss'] < metrics['train.1']['valid']['loss']) | ||
| 150 | + self.assertTrue(metrics['best']['valid']['loss'] < 0.35) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,7 +20,7 @@ def test_addition(self): | |||
| 20 | 20 | # forward | |
| 21 | 21 | c.forward() | |
| 22 | 22 | ||
| 23 | - self.assertAlmostEqual(c.d, a.d + b.d) | ||
| 23 | + self.assertAlmostEqual(c.d, a.d + b.d, places=3) | ||
| 24 | 24 | ||
| 25 | 25 | @gpu_test | |
| 26 | 26 | def test_cuda_ext(self): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments