You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ns...@apache.org on 2018/11/17 05:37:04 UTC

[incubator-mxnet] branch master updated: modify code for working in gpu context. (#13302)

This is an automated email from the ASF dual-hosted git repository.

nswamy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 64657c2  modify code for working in gpu context. (#13302)
64657c2 is described below

commit 64657c2c46f38ac3e87db8a342d3c2bfe7786f28
Author: pilhoon <pi...@gmail.com>
AuthorDate: Sat Nov 17 14:36:52 2018 +0900

    modify code for working in gpu context. (#13302)
---
 docs/tutorials/python/predict_image.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/tutorials/python/predict_image.md b/docs/tutorials/python/predict_image.md
index a9a0d29..8be98d9 100644
--- a/docs/tutorials/python/predict_image.md
+++ b/docs/tutorials/python/predict_image.md
@@ -69,6 +69,7 @@ def get_image(url, show=False):
     img = mx.image.imresize(img, 224, 224) # resize
     img = img.transpose((2, 0, 1)) # Channel first
     img = img.expand_dims(axis=0) # batchify
+    img = img.astype('float32') # for gpu context
     return img
 
 def predict(url):