diff options
author | Determinant <[email protected]> | 2015-06-08 17:09:16 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-06-08 17:09:16 +0800 |
commit | 61a06cad66600e30254b9e16292ceccc963907f8 (patch) | |
tree | d062a3bab2b4d6a0d46542c59d96c2d4ae08cdd6 /layer | |
parent | 0f30b1a4b5e583cb1df7dbb349c1af4378e41369 (diff) |
...
Diffstat (limited to 'layer')
-rw-r--r-- | layer/softmax_ce.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/layer/softmax_ce.lua b/layer/softmax_ce.lua index 79e859e..4147f0c 100644 --- a/layer/softmax_ce.lua +++ b/layer/softmax_ce.lua @@ -39,7 +39,10 @@ function SoftmaxCELayer:propagate(input, output) -- add total ce self.total_ce = self.total_ce - ce:rowsum():colsum()[0] self.total_frames = self.total_frames + soutput:nrow() - self.total_correct = self.total_correct + classified:colsame(input[2])[0] + -- TODO: add colsame for uncompressed label + if self.compressed then + self.total_correct = self.total_correct + classified:colsame(input[2])[0] + end end function SoftmaxCELayer:back_propagate(next_bp_err, bp_err, input, output) |