From b42365c0141f07a221c746ec3c874ac39f8a7385 Mon Sep 17 00:00:00 2001 From: AntreasAntoniou Date: Wed, 8 Nov 2017 20:26:03 +0000 Subject: [PATCH] Add failure cases messages to BatchNorm test notebook --- notebooks/BatchNormalizationLayer_tests.ipynb | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/notebooks/BatchNormalizationLayer_tests.ipynb b/notebooks/BatchNormalizationLayer_tests.ipynb index 38b9d46..8550b7f 100644 --- a/notebooks/BatchNormalizationLayer_tests.ipynb +++ b/notebooks/BatchNormalizationLayer_tests.ipynb @@ -53,7 +53,12 @@ ")\n", "\n", "if shape_test and numerical_test:\n", - " print(\"Batch Normalization F-prop test passed\")" + " print(\"Batch Normalization F-prop test passed\")\n", + "if numerical_test==False:\n", + " print(\"Batch Normalization F-prop numerical test failed\")\n", + "if shape_test==False:\n", + " print(\"Batch Normalization F-prop shape test failed\")\n", + " " ] }, { @@ -82,7 +87,11 @@ ")\n", "\n", "if shape_test and numerical_test:\n", - " print(\"Batch Normalization B-prop test passed\")" + " print(\"Batch Normalization B-prop test passed\")\n", + "if numerical_test==False:\n", + " print(\"Batch Normalization B-prop numerical test failed\")\n", + "if shape_test==False:\n", + " print(\"Batch Normalization B-prop shape test failed\")" ] }, { @@ -120,7 +129,15 @@ ")\n", "\n", "if grads_gamma_shape_test and grads_gamma_numerical_test and grads_beta_shape_test and grads_beta_numerical_test:\n", - " print(\"Batch Normalization grads wrt to params test passed\")" + " print(\"Batch Normalization grads wrt to params test passed\")\n", + "if grads_gamma_numerical_test==False:\n", + " print(\"Batch Normalization grads_wrt_gamma numerical test failed\")\n", + "if grads_gamma_shape_test==False:\n", + " print(\"Batch Normalization grads_wrt_gamma shape test failed\")\n", + "if grads_beta_numerical_test==False:\n", + " print(\"Batch Normalization grads_wrt_beta numerical test failed\")\n", + "if grads_beta_shape_test==False:\n", + " print(\"Batch Normalization grads_wrt_beta shape test failed\")" ] }, { @@ -151,5 +168,5 @@ } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 1 }