You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/12/13 20:10:07 UTC

[GitHub] szha closed pull request #8664: fix VGG error in benchmark_score

szha closed pull request #8664: fix VGG error in benchmark_score
URL: https://github.com/apache/incubator-mxnet/pull/8664
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/example/image-classification/benchmark_score.py b/example/image-classification/benchmark_score.py
index aeacffa82b..b6d1d642c8 100644
--- a/example/image-classification/benchmark_score.py
+++ b/example/image-classification/benchmark_score.py
@@ -33,6 +33,9 @@ def get_symbol(network, batch_size):
     if 'resnet' in network:
         num_layers = int(network.split('-')[1])
         network = 'resnet'
+    if 'vgg' in network:
+        num_layers = int(network.split('-')[1])
+        network = 'vgg'
     net = import_module('symbols.'+network)
     sym = net.get_symbol(num_classes = 1000,
                          image_shape = ','.join([str(i) for i in image_shape]),
@@ -65,7 +68,7 @@ def score(network, dev, batch_size, num_batches):
     return num_batches*batch_size/(time.time() - tic)
 
 if __name__ == '__main__':
-    networks = ['alexnet', 'vgg', 'inception-bn', 'inception-v3', 'resnet-50', 'resnet-152']
+    networks = ['alexnet', 'vgg-16', 'inception-bn', 'inception-v3', 'resnet-50', 'resnet-152']
     devs = [mx.gpu(0)] if len(get_gpus()) > 0 else []
     # Enable USE_MKL2017_EXPERIMENTAL for better CPU performance
     devs.append(mx.cpu())


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services