xinyu-intel 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_r198707423
########## 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: I guess this `dt` here doesn't work, please check again。 ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services