Use RTNE as default rounding policy
RTNE, Round To Nearest Even is a better rounding policy which aligns with implementation of Tensorflow Lite. Signed-off-by: Kainan Cha <kainan.zha@verisilicon.com>
This commit is contained in:
parent
eff71c38bf
commit
88f83019a8
|
|
@ -38,7 +38,7 @@ class OperationImpl {
|
|||
OperationImpl& BindOutput(const std::shared_ptr<Tensor>& tensor);
|
||||
OperationImpl& SetRoundingPolicy(
|
||||
OverflowPolicy overflow_policy = OverflowPolicy::SATURATE,
|
||||
RoundingPolicy rounding_policy = RoundingPolicy::TO_ZERO,
|
||||
RoundingPolicy rounding_policy = RoundingPolicy::RTNE,
|
||||
DownScaleSizeRounding down_scale_size_rounding =
|
||||
DownScaleSizeRounding::FLOOR,
|
||||
uint32_t accumulator_bits = 0);
|
||||
|
|
@ -57,4 +57,4 @@ class OperationImpl {
|
|||
} // namespace vx
|
||||
} // namespace tim
|
||||
|
||||
#endif /* TIM_VX_OPERATION_PRIVATE_H_ */
|
||||
#endif /* TIM_VX_OPERATION_PRIVATE_H_ */
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ vsi_enum TranslateRoundingPolicy(RoundingPolicy type) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
return VX_ROUND_POLICY_TO_ZERO;
|
||||
return VX_ROUND_POLICY_TO_NEAREST_EVEN;
|
||||
}
|
||||
|
||||
vsi_enum TranslateDownScaleSizeRounding(DownScaleSizeRounding type) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue