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 2018/07/02 22:09:10 UTC
[GitHub] rahul003 commented on a change in pull request #10391: [MXNET-139]
Tutorial for mixed precision training with float16
rahul003 commented on a change in pull request #10391: [MXNET-139] Tutorial for mixed precision training with float16
URL: https://github.com/apache/incubator-mxnet/pull/10391#discussion_r199635132
##########
File path: example/image-classification/benchmark_score.py
##########
@@ -74,11 +75,17 @@ def score(network, dev, batch_size, num_batches):
devs.append(mx.cpu())
batch_sizes = [1, 2, 4, 8, 16, 32]
-
for net in networks:
logging.info('network: %s', net)
for d in devs:
logging.info('device: %s', d)
for b in batch_sizes:
- speed = score(network=net, dev=d, batch_size=b, num_batches=10)
- logging.info('batch size %2d, image/sec: %f', b, speed)
+ for dtype in ['float32', 'float16']:
+ if d == mx.cpu() and dtype == 'float16':
+ #float16 is not supported on CPU
+ continue
+ elif net in ['inception-bn', 'alexnet'] and dt == 'float16':
Review comment:
Thanks for letting me know, fixing it here https://github.com/apache/incubator-mxnet/pull/11533/
----------------------------------------------------------------
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