Skip to content

Commit

Permalink
Fix assert bound.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Amos committed May 8, 2016
1 parent 1d5491a commit b11910b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion training/dataset.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function dataset:__init(...)
end

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

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

1 comment on commit b11910b

@aaronnech
Copy link

Choose a reason for hiding this comment

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

Oh I think I wasn't clear. I meant add one to the maxPathLength. E.g. add the line:
maxPathLength = maxPathLength + 1

Please sign in to comment.