torch / torch7

http://torch.ch
Other
8.97k stars 2.38k forks source link

CharStorage() not reading file. #1064

Closed Minilei89 closed 6 years ago

Minilei89 commented 7 years ago

lhuang@localhost annotations]$ echo "Hello World" > hello.txt [lhuang@localhost annotations]$ lua Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio > require 'torch' > x = torch.CharStorage('hello.txt') > = x [torch.CharStorage of size 0]

Not sure what the problem is here but CharStorage is not loading the files correctly. If someone can confirm or point out the cause that would be really helpful.

soumith commented 7 years ago

this bug was introduced in a recent commit while fixing another bug. I'm working on fixing it.

Minilei89 commented 7 years ago

Thanks for the hard work! Best of luck fixing it. In the meantime I can use an older version.

soumith commented 7 years ago

last working commit is https://github.com/torch/torch7/commit/2186e414ad8fc4dfc9f2ed090c0bf8a0e1946e62 Thanks for your patience.

soumith commented 6 years ago

fixed on master via https://github.com/torch/torch7/commit/89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8