Skip to content

Commit

Permalink
Fix unclear errors
Browse files Browse the repository at this point in the history
also fixed accidental global
  • Loading branch information
skwerlman committed Oct 26, 2015
1 parent 54b4c66 commit b3c7e3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/CharSplitLMMinibatchLoader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function CharSplitLMMinibatchLoader.text_to_tensor(in_textfile, out_vocabfile, o
local cache_len = 10000
local rawdata
local tot_len = 0
f = io.open(in_textfile, "r")
local f = assert(io.open(in_textfile, "r"))

-- create vocabulary if it doesn't exist yet
print('creating vocabulary mapping...')
Expand All @@ -157,7 +157,7 @@ function CharSplitLMMinibatchLoader.text_to_tensor(in_textfile, out_vocabfile, o
-- construct a tensor with all the data
print('putting data into tensor...')
local data = torch.ByteTensor(tot_len) -- store it into 1D first, then rearrange
f = io.open(in_textfile, "r")
f = assert(io.open(in_textfile, "r"))
local currlen = 0
rawdata = f:read(cache_len)
repeat
Expand Down

0 comments on commit b3c7e3c

Please sign in to comment.