diff options
author | cloudygoose <[email protected]> | 2015-06-09 10:10:31 +0800 |
---|---|---|
committer | cloudygoose <[email protected]> | 2015-06-09 10:10:31 +0800 |
commit | c7eef26d6b615fedec1492d668ac9fe59228ead6 (patch) | |
tree | 156b39f3daaf928d83ee711e8383591ceb84817b /layer/softmax_ce.lua | |
parent | 3ce264a01113645a8f3a82853078ff804d1c7c66 (diff) | |
parent | 61a06cad66600e30254b9e16292ceccc963907f8 (diff) |
...
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'layer/softmax_ce.lua')
-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) |