Skip to content

Commit

Permalink
Fix maxPathLength assertion/increment.
Browse files Browse the repository at this point in the history
Thanks for the correction @aaronnech, I read your earlier suggestion too fast :-)

For #132
  • Loading branch information
Brandon Amos committed May 8, 2016
1 parent 85d7375 commit 0707db5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion training/dataset.lua
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ function dataset:__init(...)
end

assert(length > 0, "Could not find any image file in the given input paths")
assert(maxPathLength > 1, "paths of files are length 0?")
assert(maxPathLength > 0, "paths of files are length 0?")
maxPathLength = maxPathLength + 1

self.imagePath:resize(length, maxPathLength):fill(0)
local s_data = self.imagePath:data()
Expand Down

0 comments on commit 0707db5

Please sign in to comment.