def test_train_32_100_10(self): """Generic functional test""" py_args = self.generic_arguments.copy() out = test_util.run_test_helper(run_pytorch_mnist, **py_args) expected_accuracy = [ 87.65, 88.06, 88.4, 88.43, 88.68, 88.71, 88.69, 88.89, 88.85, 88.61 ] test_util.parse_results_for_accuracy(out, expected_accuracy, 2.5)
def test_mnist_train(self): """Generic test on default arguments in training""" py_args = self.generic_arguments.copy() out = test_util.run_test_helper(run_popart_mnist_training, **py_args) expected_accuracy = [ 97.72, 98.15, 98.51, 98.55, 98.55, 98.38, 98.34, 98.35, 98.43, 98.41 ] test_util.parse_results_for_accuracy(out, expected_accuracy, self.accuracy_tolerances)
def test_mnist_train(self): """Generic test on default arguments in training""" py_args = self.generic_arguments.copy() out = run_test_helper(run_popart_mnist_training, **py_args) expected_accuracy = [ 88.88, 89.63, 89.83, 90.01, 90.12, 90.22, 90.40, 90.59, 90.65, 90.70 ] parse_results_for_accuracy(out, expected_accuracy, self.accuracy_tolerances)
def test_resnet8_bs4_4ipus(self): out = run_popart_resnet_training(**{'--size': 8, '--batch-size': 4, '--norm-type': 'GROUP', '--num-ipus': 4, '--epochs': 5, '--no-prng': '', '--data-dir': './', '--num-workers': 0}) expected_accuracy = [44.1, 53.6, 61.6, 64.6, 66.1] parse_results_for_accuracy(out, expected_accuracy, 2)
def test_train_torchvision(self): """Generic functional test""" py_args = self.generic_arguments.copy() py_args["--num-ipus"] = 2 py_args["--epochs"] = 10 out = run_test_helper(run_pytorch_Torchvision, **py_args) expected_accuracy = [ 16.85, 24.52, 30.77, 36.34, 40.65, 45.59, 49.07, 52.13, 55.52, 58.14 ] parse_results_for_accuracy(out, expected_accuracy, 2.5)
def test_resnet8_bs4_4ipus_pipeline(self): out = run_popart_resnet_training(**{'--size': 8, '--batch-size': 4, '--norm-type': 'GROUP', '--num-ipus': 4, '--epochs': 5, '--pipeline': '', '--no-prng': '', '--data-dir': './', '--num-workers': 0}) expected_accuracy = [42.2, 53.9, 60.7, 63.9, 65.6] parse_results_for_accuracy(out, expected_accuracy, 2)
def test_mnist_train_sharded_pipelined(self): """Generic test on default arguments in training over 2 IPUs and pipelined""" py_args = self.generic_arguments.copy() py_args["--num-ipus"] = 2 py_args["--pipeline"] = "" out = run_test_helper(run_popart_mnist_training, **py_args) expected_accuracy = [ 88.11, 88.69, 88.91, 88.94, 88.92, 88.98, 89.05, 89.14, 89.18, 89.25 ] parse_results_for_accuracy(out, expected_accuracy, self.accuracy_tolerances)