Skip to content

Commit 3c5f610

Browse files
committed
add missing saturate in relu quantize compute
1 parent 3c2d549 commit 3c5f610

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/caffe/layers/relu_layer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ void ReLULayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
8383
if (quant_out) {
8484
// do not reuse "top_data"; it is shifted during the computation
8585
caffe_cpu_quantize<Dtype>(top[0]->count(), top[0]->mutable_cpu_data(), output_scale_, output_zero_point_);
86+
caffe_cpu_saturate(top[0]->count(), top[0]->mutable_cpu_data(), saturate_);
8687
}
8788
if (quant_in) {
8889
caffe_cpu_quantize<Dtype>(bottom[0]->count(), bottom[0]->mutable_cpu_data(),

0 commit comments

Comments
 (0)