We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fa8811 commit ab28054Copy full SHA for ab28054
encoding.lua
@@ -55,7 +55,8 @@ end
55
function one_hot_to_ints(ont_hot)
56
-- y,i=torch.max(x,1) returns the largest element in each column (across
57
-- rows) of x, and a tensor i of their corresponding indices in x.
58
- local _, ints = torch.max(one_hot:t(), 1)
+ -- y,i=torch.max(x,2) performs the max operation across rows.
59
+ local _, ints = torch.max(one_hot, 2)
60
return ints
61
end
62
0 commit comments