文档
注册
评分
提单
论坛
小AI

量化过程中提示某层bias量化超出int32范围

问题描述

量化过程中提示某层bias量化超出int32范围,提示信息如下:

1
2
3
4
5
6
7
8
tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.
  (0) Invalid argument: assertion failed: [Quantized bias of layer \"FlowNetS/decoding/deconv5_0/conv2d_transpose\" exceed int32 range: [-2147483648.0, 2147483647.0], please add it to skip layer.] [Condition x <= y did not hold element-wise:] [x (FlowNetS/decoding/deconv5_0/bias_quant/Round:0) = ] [3.35433197e+12 3.35244296e+12 3.352325e+12...] [y (FlowNetS/decoding/deconv5_0/bias_quant/assert_less_equal/y:0) = ] [2.14748365e+09]
	 [[{{node FlowNetS/decoding/deconv5_0/bias_quant/assert_less_equal/Assert/AssertGuard/Assert}}]]
	 [[FlowNetS/decoding/deconv5_0/bias_quant/Cast/_61]]
  (1) Invalid argument: assertion failed: [Quantized bias of layer \"FlowNetS/decoding/deconv5_0/conv2d_transpose\" exceed int32 range: [-2147483648.0, 2147483647.0], please add it to skip layer.] [Condition x <= y did not hold element-wise:] [x (FlowNetS/decoding/deconv5_0/bias_quant/Round:0) = ] [3.35433197e+12 3.35244296e+12 3.352325e+12...] [y (FlowNetS/decoding/deconv5_0/bias_quant/assert_less_equal/y:0) = ] [2.14748365e+09]
	 [[{{node FlowNetS/decoding/deconv5_0/bias_quant/assert_less_equal/Assert/AssertGuard/Assert}}]]
0 successful operations.
0 derived errors ignored.

可能原因

scale_w、scale_d取值都较小、bias过大,导致bias量化超出int32的范围。

处理建议

根据提示信息,跳过日志中的量化层,例如上述提示信息中的conv2d_transpose层。

搜索结果
找到“0”个结果

当前产品无相关内容

未找到相关内容,请尝试其他搜索词