官术网_书友最值得收藏!

Getting ready

In this section, we will follow the model-building process in exactly the same way as we did in the previous section.

However, we will adopt a small change to our strategy:

  • We will invert the background color, and also the foreground color. Essentially, the background will be colored white in this scenario, and the label will be written in black.

The intuition for this change impacting the model accuracy is as follows.

The pixels in the corner of images do not contribute toward predicting the label of an image. Given that a black pixel (original scenario) has a pixel value of zero, it is automatically taken care of, as when this input is multiplied by any weight value, the output is zero. This will result in the network learning that any change in the weight value connecting this corner pixel to a hidden layer will not have an impact on changing the loss value.

However, if we have a white pixel in the corner (where we already know that the corner pixels do not contribute toward predicting the label of an image), it will contribute toward certain hidden unit values, and thus the weights need to be fine-tuned until the impact of the corner pixels on the predicted label is minimal.

主站蜘蛛池模板: 碌曲县| 虞城县| 慈溪市| 阿鲁科尔沁旗| 内乡县| 麟游县| 顺平县| 富宁县| 苍山县| 那坡县| 六盘水市| 昌乐县| 衡阳市| 平塘县| 陇西县| 永宁县| 九龙坡区| 沂南县| 通河县| 台中县| 岑巩县| 鄂尔多斯市| 孝感市| 兴仁县| 甘孜| 松江区| 渝中区| 浏阳市| 寻乌县| 射阳县| 庆云县| 清苑县| 罗城| 兴义市| 北碚区| 邻水| 潮州市| 南开区| 万年县| 贵溪市| 宁远县|