From 060b78075bb2071a7e32f97489b598849022df8e Mon Sep 17 00:00:00 2001 From: Arun Das Date: Wed, 2 May 2018 23:07:18 -0500 Subject: [PATCH] Update fit.py (#10685) * Update fit.py args.network is None during finetuing using fine-tune.py file which is provided. Hence, line 241 throws an error while trying to see if 'vgg' is in args.network. Patching it by checking if args.network is None before seeing if 'vgg' is present in network name. * Update fit.py --- example/image-classification/common/fit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/image-classification/common/fit.py b/example/image-classification/common/fit.py index 9412b6f9371b..8189a0a29bb9 100755 --- a/example/image-classification/common/fit.py +++ b/example/image-classification/common/fit.py @@ -238,7 +238,7 @@ def fit(args, network, data_loader, **kwargs): # AlexNet will not converge using Xavier initializer = mx.init.Normal() # VGG will not trend to converge using Xavier-Gaussian - elif 'vgg' in args.network: + elif args.network and 'vgg' in args.network: initializer = mx.init.Xavier() else: initializer = mx.init.Xavier(