Skip to content

Commit

Permalink
Update fit.py (apache#10685)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
arundasan91 authored and zheng-da committed Jun 28, 2018
1 parent 50ee8b1 commit 060b780
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/image-classification/common/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 060b780

Please sign in to comment.