Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Update fit.py (#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 szha committed May 3, 2018
1 parent 1420697 commit 9dce757
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 9dce757

Please sign in to comment.