本文介绍了输入维度/分辨率是否会影响卷积神经网络的性能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个图像分类器,其中我有66个类和图像大约50000,我的电脑的RAM是12 gb我的ram不足以训练图像我的问题是图像的分辨率会影响图像的准确性模型我正在使用卷积神经网络。

I am building a image classifier in which I have 66 classes and images around 50000 and my pc's ram is 12 gb my ram is not sufficient for the training of the images my question is does resolution of the images affects the accuracy of the model I am using convolutional neural networks.

推荐答案

如果您正在使用具有完全连接层的卷积神经网络来获得预测概率,输入层将具有固定的大小,因此您需要预处理所有图像到该大小以馈送到网络。

If you are using convolutional neural networks with fully connected layer in the end for getting prediction probabilities, the input layer will have fixed size so you will need to preprocess all images to that size to feed to the network.

如果您的图像大小小于此大小,您需要插入并增加大小,以便通过进一步减小图像大小对内存没有影响。所以最小分辨率是输入卷积层大小。

If you have images with size lesser than this size, you will need to interpolate and increase size upto this so no effect on memory by further reducing image size. So minimum resolution is the input convolutional layer size.

对于你的ram问题,根据你使用的框架,正确使用队列应该解决这个问题,无论图像大小多大是。如果在预处理期间出现OOM错误,请尝试减小队列大小,以便一次只调整一小部分图像以适应内存。如果OOM在培训期间,请尝试减小批量大小。

For your ram issue, depending on framework you are using, using queues properly should solve that issue no matter how large size images are. If the OOM error is during preprocessing, try reducing queue size so that only fraction of images are getting resized at a time to fit in memory. If OOM is during training, try reducing the batch size.

这篇关于输入维度/分辨率是否会影响卷积神经网络的性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-13 08:39