You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.
when i run the provided example of transform.merge():
f = transform.merge{
[1] = function(x) return 2*x end,
[2] = function(x) return x + 10 end,
foo = function(x) return x / 2 end,
[4] = function(x) return x - x end
}
f(3)
there is always the error information:
...hou/torch/install/share/lua/5.1/torchnet/utils/table.lua:123: attempt to index a number value
i find that the function 'f()' call the function 'utils.table.mergetensor(newz)', and then the line 123 of utils.table attempt to operate 'newz[1]:size()', but here the newz[1] is a number,thus the conflict is produced.
maybe the line 144 can be fixed as 'return newz' ?
The text was updated successfully, but these errors were encountered:
You should never use a table with text keys as input into transform.merge: such a hashtable has no guarantees on the order of elements when you iterate over it with pairs(), making the behavior of your example undefined. Please use a table with numerical indexes (a table you can iterate over with ipairs()) instead.
when i run the provided example of transform.merge():
there is always the error information:
...hou/torch/install/share/lua/5.1/torchnet/utils/table.lua:123: attempt to index a number value
i find that the function 'f()' call the function 'utils.table.mergetensor(newz)', and then the line 123 of utils.table attempt to operate 'newz[1]:size()', but here the newz[1] is a number,thus the conflict is produced.
maybe the line 144 can be fixed as 'return newz' ?
The text was updated successfully, but these errors were encountered: