且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用带Tensorflow的预训练的inception_resnet_v2

更新时间:2022-06-26 01:22:27

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).