更新时间:2023-12-02 20:51:40
Inception 网络期望输入图像具有从 [-1, 1] 缩放的颜色通道.如此处所见.
The Inception networks expect the input image to have color channels scaled from [-1, 1]. As seen here.
您可以使用现有的预处理,或者在您的示例中自己缩放图像:im = 2*(im/255.0)-1.0
,然后将它们提供给网络.
You could either use the existing preprocessing, or in your example just scale the images yourself: im = 2*(im/255.0)-1.0
before feeding them to the network.
在不缩放输入 [0-255] 的情况下,它比网络预期的要大得多,并且所有偏差都可以非常强烈地预测类别 918(漫画书).
Without scaling the input [0-255] is much larger than the network expects and the biases all work to very strongly predict category 918 (comic books).