Skip to content
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

fix mnist doc and code #371

Merged
merged 3 commits into from
Oct 25, 2020
Merged

fix mnist doc and code #371

merged 3 commits into from
Oct 25, 2020

Conversation

qiukun
Copy link
Contributor

@qiukun qiukun commented Oct 25, 2020

fix some doc and use gocv to load image instead of image per #323

before:

mnist ➤ go run . predict mnist_png/testing/1/385.png                                                                                                      git:develop*
2020/10/25 20:53:33 No CUDA found; CPU only
panic: ToTensorTransformer can not transform the input type: *image.Gray

goroutine 1 [running, locked to thread]:
github.com/wangkuiyi/gotorch/vision/transforms.ToTensorTransformer.Run(0x41b4d20, 0xc00002b980, 0x41ffa20)
        /Users/qiu/go/src/github.com/wangkuiyi/gotorch/vision/transforms/to_tensor.go:68 +0x557
main.predictFile(0x7ffeefbff482, 0x1b, 0xc00002b940)
        /Users/qiu/go/src/github.com/wangkuiyi/gotorch/example/mnist/mnist.go:183 +0x1a6
main.predict(0x41c988f, 0x14, 0xc0000121d0, 0x1, 0x1)
        /Users/qiu/go/src/github.com/wangkuiyi/gotorch/example/mnist/mnist.go:148 +0x1c5
main.main()
        /Users/qiu/go/src/github.com/wangkuiyi/gotorch/example/mnist/mnist.go:55 +0x50c
exit status 2

after:

mnist ➤ go run . predict mnist_png/testing/1/385.png                                                                                                      git:develop*
2020/10/25 20:56:11 No CUDA found; CPU only
1

wangkuiyi
wangkuiyi previously approved these changes Oct 25, 2020
Copy link
Owner

@wangkuiyi wangkuiyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this wonderful fix! It makes a lot of sense.

CircleCI didn't start after your push because it follows its security rule and tests only Git branches pushed into the upstream repo. I pushed your fix with my privileges and triggered CircleCI.

@codecov
Copy link

codecov bot commented Oct 25, 2020

Codecov Report

Merging #371 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #371   +/-   ##
========================================
  Coverage    87.75%   87.75%           
========================================
  Files           33       33           
  Lines         1503     1503           
========================================
  Hits          1319     1319           
  Misses         121      121           
  Partials        63       63           

@wangkuiyi wangkuiyi merged commit 3790e30 into wangkuiyi:develop Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants