lua - torch: what is the structure for tensors of different sizes? -


table? inserting big tensors table not efficient, not possible because of memory in case. works fine, it's ugly:

local s_ = 0 s_ = s_ + 1; local x_py_1 = fromfile(('%s/x_py_%.2f.bin'):format(data_dir, scales[s_])) s_ = s_ + 1; local x_py_2 = fromfile(('%s/x_py_%.2f.bin'):format(data_dir, scales[s_])) s_ = s_ + 1; local x_py_3 = fromfile(('%s/x_py_%.2f.bin'):format(data_dir, scales[s_])) s_ = s_ + 1; local x_py_4 = fromfile(('%s/x_py_%.2f.bin'):format(data_dir, scales[s_])) s_ = s_ + 1; local x_py_5 = fromfile(('%s/x_py_%.2f.bin'):format(data_dir, scales[s_])) s_ = s_ + 1; local x_py_6 = fromfile(('%s/x_py_%.2f.bin'):format(data_dir, scales[s_])) x_py = {x_py_1, x_py_2, x_py_3, x_py_4, x_py_5, x_py_6} 

show code.. please you

x_py = {x_py_1, x_py_2, x_py_3, x_py_4, x_py_5, x_py_6} i, v in ipairs(x_py)     v = fromfile(('%s/x_py_%.2f.bin'):format(data_dir, scales[i-1])) end 

simply using table, want it?


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -