-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to resize storage that is not resizable #37
Comments
I have also run into the same issue.Do you solve it? |
I guess new updates on Torch causes these issues. s = d * h * w left = torch.FloatTensor(torch.FloatStorage(s)) You might have to do similar thing in fromfile(fname) function in main.lua if you want to train network. Here is my fix:- local file = io.open(fname .. '.type') local d = torch.LongStorage(dim) local s= 1 local x --x = x:reshape(torch.LongStorage(dim)) |
@BroadDong Thanks for your reply, unfortunately, I haven't solved the problem. luajit: samples/bin2png.lua:15: unexpected symbol near '=' So I added a "_" before comma in line 15 of bin2png.lua as what it was originally, ( i.e. _, left = left:min(2) ), but another problem happened which is: Writing left.png |
@rohanchabra Thanks a lot for your suggestion. luajit: samples/bin2png.lua:15: unexpected symbol near '=' So I added a "_" before comma in line 15 of bin2png.lua as what it was originally, ( i.e. _, left = left:min(2) ), but another problem happened which is: Writing left.png |
@GoodStudyDayUpUp Sorry, I might haven't given whole code that I have updated. s = d * h * w print('Writing left.png') Rest should be same Maybe this will help |
@rohanchabra Thanks! Actually, last time you have given me the whole code. ( I changed both main.lua and bin2png.lua according to your suggestion.)
|
Hey guys, can you try again? The bin2png.lua script broke when the newer version of torch came out. It should work now. |
@jzbontar Thanks a lot for your update! I have written my own code to transform bin to png but I will try your updated code later! Now I meet with an interesting problem. That is: Best regards! |
Hi everyone,
I'm trying to run this script: https://github.com/jzbontar/mc-cnn (I am trying to transform left.bin and right.bin to .png file which can be shown) which produces the following error:
$ ...luajit samples/bin2png.lua
Writing left.png
luajit: ...ocal/torch_update/install/share/lua/5.1/torch/Tensor.lua:462: Trying to resize storage that is not resizable at /usr/local/torch_update/pkg/torch/lib/TH/generic/THStorage.c:183
stack traceback:
[C]: in function 'set'
...ocal/torch_update/install/share/lua/5.1/torch/Tensor.lua:462: in function 'view'
samples/bin2png.lua:9: in main chunk
[C]: at 0x00406670
Anyone knows what is wrong? I found someone said like this:
"""This happens because of this commit torch/torch7#389
I think that the author of the mc-cnn code should update his normalize script to take into account this change in torch"""
If that is the reason, can I update the normalize script (Normalize2.lua?) by myself to make the code work? How?
I am new to machine learning and GPU programming! I use ubuntu 16.04 and a server (from intranet) with GeForce GTX TITAN installed. I appreciate any hints from you!^_^
The text was updated successfully, but these errors were encountered: