My version changes
This commit is contained in:
1 parent
53cda0173c
commit
4448590ddc
18 files changed
+11906
-40011
No files matched your search
Regular → Executable
+4
-4
@@ -39,8 +39,8 @@ function CharSplitLMMinibatchLoader.create(data_dir, batch_size, seq_length, spl
|
||||
end
|
||||
|
||||
print('loading data files...')
|
||||
local data = torch.load(tensor_file)
|
||||
self.vocab_mapping = torch.load(vocab_file)
|
||||
local data = torch.load(tensor_file, 'ascii')
|
||||
self.vocab_mapping = torch.load(vocab_file, 'ascii')
|
||||
|
||||
-- cut off the end so that it divides evenly
|
||||
local len = data:size(1)
|
||||
@@ -226,9 +226,9 @@ function CharSplitLMMinibatchLoader.text_to_tensor(in_textfile, out_vocabfile, o
|
||||
|
||||
-- save output preprocessed files
|
||||
print('saving ' .. out_vocabfile)
|
||||
torch.save(out_vocabfile, vocab_mapping)
|
||||
torch.save(out_vocabfile, vocab_mapping, 'ascii')
|
||||
print('saving ' .. out_tensorfile)
|
||||
torch.save(out_tensorfile, data)
|
||||
torch.save(out_tensorfile, data, 'ascii')
|
||||
end
|
||||
|
||||
return CharSplitLMMinibatchLoader
|
||||
|
||||
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Regular → Executable
File mode changed.
Reference in new issue
Block a user