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

Commit

Permalink
modify code for working in gpu context. (#13302)
Browse files Browse the repository at this point in the history
  • Loading branch information
pilhoon authored and nswamy committed Nov 17, 2018
1 parent 98830d5 commit 64657c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/tutorials/python/predict_image.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 64657c2

Please sign in to comment.