New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add resnet50 example #3266

Merged
merged 16 commits into from Aug 3, 2016

fix pep8!

  • Loading branch information...
MoyanZitto committed Jul 22, 2016
commit 6dcfadb84558cad7ce4c1ede1824e590e848eb7e
View
@@ -145,15 +145,15 @@ def read_img(img_path):
io.imshow(img.astype('uint8'))
io.show()
#decenterize
# decenterize
img[:, :, 0] -= mean[0]
img[:, :, 1] -= mean[1]
img[:, :, 2] -= mean[2]
# 'RGB'->'BGR'
img = img[:, :, ::-1]
#'tf'->'th'
# 'tf'->'th'
img = np.transpose(img, (2, 0, 1))
# expand dim for test
img = np.expand_dims(img, axis=0)
ProTip! Use n and p to navigate between commits in a pull request.