Skip to content

Commit

Permalink
add missing saturate in relu quantize compute
Browse files Browse the repository at this point in the history
  • Loading branch information
vera121 committed Aug 3, 2021
1 parent 3c2d549 commit 3c5f610
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/caffe/layers/relu_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ void ReLULayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
if (quant_out) {
// do not reuse "top_data"; it is shifted during the computation
caffe_cpu_quantize<Dtype>(top[0]->count(), top[0]->mutable_cpu_data(), output_scale_, output_zero_point_);
caffe_cpu_saturate(top[0]->count(), top[0]->mutable_cpu_data(), saturate_);
}
if (quant_in) {
caffe_cpu_quantize<Dtype>(bottom[0]->count(), bottom[0]->mutable_cpu_data(),
Expand Down

0 comments on commit 3c5f610

Please sign in to comment.