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 handling of unencoded LMDB in Torch #475

Merged
merged 1 commit into from
Dec 17, 2015

Conversation

gheinrich
Copy link
Contributor

Unencoded LMDB data are stored in BGR format so a
channel swap is required to have a consistent
representation of data across inputs, mean files,
etc.

@lukeyeager
Copy link
Member

Oops. Do we need to backport this into digits-3.0? We should at least put it as a known issue in the release notes. Will you update the RC release notes to add a Known Issues section (like this)?

@lukeyeager
Copy link
Member

Your implementation looked a little suspicious for grayscale images. I tried LeNet on grayscale images and got a different error than the one I was expecting:

2015-12-16 08:41:40 [FAIL] /home/lyeager/digits/tools/torch/main.lua:637: attempt to perform arithmetic on field 'batchSize' (a nil value)
DIGITS Lua Error
stack traceback:
/home/lyeager/digits/tools/torch/main.lua:637: in function 'Validation'
/home/lyeager/digits/tools/torch/main.lua:779: in main chunk
[C]: in function 'dofile'
/home/lyeager/digits/tools/torch/wrapper.lua:25: in function </home/lyeager/digits/tools/torch/wrapper.lua:25>
[C]: in function 'xpcall'
/home/lyeager/digits/tools/torch/wrapper.lua:25: in main chunk
[C]: in function 'dofile'
/usr/local/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670

@gheinrich
Copy link
Contributor Author

Thanks for spotting the bug on grayscale images! If have updated the code.
I have also added a reference to #477 on the 3.0 RC release notes. The fix should probably be backported into digits-3.0 for the next release candidate.

Unencoded LMDB data are stored in BGR format so a
channel swap is required to have a consistent
representation of data across inputs, mean files,
etc.

close NVIDIA#477
lukeyeager added a commit that referenced this pull request Dec 17, 2015
Fix handling of unencoded LMDB in Torch
@lukeyeager lukeyeager merged commit 2ad9743 into NVIDIA:master Dec 17, 2015
@gheinrich gheinrich deleted the dev/torch-unencoded-lmdb branch April 14, 2016 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants