aboutsummaryrefslogtreecommitdiff
path: root/nerv/layer/softmax_ce.lua
diff options
context:
space:
mode:
authorTed Yin <ted.sybil@gmail.com>2015-06-26 00:45:13 +0800
committerTed Yin <ted.sybil@gmail.com>2015-06-26 00:45:13 +0800
commitaae4195c3898c0da0be5aae0b80e633185e1e242 (patch)
tree67512bdf955e2753547ebdac2e18f837ce6fa5b0 /nerv/layer/softmax_ce.lua
parent555f7f2e8d0578a1228cd736a35f80ba5a891817 (diff)
parentd5e95b665b9dc1890fb575fcc9fca5087eaeb674 (diff)
Merge pull request #34 from cloudygoose/try-matrix-index
add a temporary fix for matrix/vector indexing issue
Diffstat (limited to 'nerv/layer/softmax_ce.lua')
-rw-r--r--nerv/layer/softmax_ce.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/nerv/layer/softmax_ce.lua b/nerv/layer/softmax_ce.lua
index daf891e..c78d462 100644
--- a/nerv/layer/softmax_ce.lua
+++ b/nerv/layer/softmax_ce.lua
@@ -42,7 +42,7 @@ function SoftmaxCELayer:propagate(input, output)
output[1]:copy_fromd(ce)
end
-- add total ce
- self.total_ce = self.total_ce - ce:colsum()[0]
+ self.total_ce = self.total_ce - ce:colsum()[0][0]
self.total_frames = self.total_frames + softmax:nrow()
-- TODO: add colsame for uncompressed label
if self.compressed then