【发布时间】:2015-09-20 12:54:51
【问题描述】:
我正在使用 Torch 命令将数据插入到一个简单的表中,它工作正常:
completeProfile = {};
table.foreach(firstHalf, function(i,v)table.insert(completeProfile,v) end);
table.foreach(secondHalf, function(i,v)table.insert(completeProfile,v) end);
table.foreach(presentWord, function(i,v) table.insert(completeProfile,v) end);
现在有人让我注意到,使用 Torch 张量可以让一切变得更高效。 所以我用
替换了第一行completeProfile = torch.Tensor(CONSTANT_NUMBER);
但不幸的是,我找不到任何能够替换 table.insert() 函数的张量函数。
你有什么想法吗?
【问题讨论】:
标签: torch