简单的CNN二进制分类网络,该网络具有由100000多个图像文件组成的数据集
我正在尝试为二进制分类构建一个简单的CNN模型,但培训数据集由超过100K的“ .png”文件组成。如果我通过一次加载所有数据来训练模型,它将创建MemoryExhustion错误。有人可以帮助我建立网络来处理如此庞大的数据集吗?
I am trying to build a simple CNN model for binary classification but the training dataset consists of over 100k of '.png' file. If I train the model by loading all the data at once, it will create a MemoryExhaustion Error. Can somebody help me to build the network to deal with such huge dataset?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
收益
语句流式传输。您可以使用语句的
迭代图像。
load_stream
功能将一一加载图像,如果您不尝试将所有图像保存在内存中,则可以防止内存排气。当然,流媒体比将图像多次多次加载到内存时要慢,因为它每次要使用时都会读取图像。
You can stream with
yield
statement.You can iterate images with
for
statement.load_stream
function will load image one by one and prevent memory exhaust if you don't try saving all images in memory.Of course streaming is slower than loading everything to memory when you use images more than one time, because it will read image every time you want to use.