From 2bc03484473f4f4a0d916a49a2ec93142387024c Mon Sep 17 00:00:00 2001
From: Neta Zmora <neta.zmora@intel.com>
Date: Thu, 29 Aug 2019 14:41:08 +0300
Subject: [PATCH] Fix issue #368

---
 distiller/apputils/checkpoint.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/distiller/apputils/checkpoint.py b/distiller/apputils/checkpoint.py
index fc90e88..f45026b 100755
--- a/distiller/apputils/checkpoint.py
+++ b/distiller/apputils/checkpoint.py
@@ -68,7 +68,7 @@ def save_checkpoint(epoch, arch, model, optimizer=None, scheduler=None,
         checkpoint['dataset'] = model.dataset
         if not arch:
             checkpoint['arch'] = model.arch
-    except NameError:
+    except AttributeError:
         pass
 
     if optimizer is not None:
-- 
GitLab