达到输出大小限制后,缓冲的数据将被截断 [英] Buffered data was truncated after reaching the output size limit

查看:82
本文介绍了达到输出大小限制后,缓冲的数据将被截断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用Colaboratory运行我的NIN模型时,它在训练过程的输出中发生错误,提示缓冲的数据在达到输出大小限制后被截断了".在第61个时代.我对这次崩溃一无所知,我的代码还在运行吗?我该如何解决这个问题?

When I use Colaboratory to run my NIN model, it occurs an error in the output of training process which tells "Buffered data was truncated after reaching the output size limit." in the 61th epoch. I have no idea about this crash.Is my code still running ? How can I solve this problem?

以下是有关我的培训过程输出的一些信息:

Here is some information about the output of my training process:

Epoch 57/200
391/391 [==============================] - 53s 135ms/step - loss: 0.8365 - acc: 0.7784 - val_loss: 0.9250 - val_acc: 0.7625
Epoch 58/200
 28/391 [=>............................] - ETA: 46s - loss: 0.8356 - acc: 0.7835391/391 [==============================] - 53s 136ms/step - loss: 0.8288 - acc: 0.7811 - val_loss: 0.8977 - val_acc: 0.7608
Epoch 59/200
326/391 [========================>.....] - ETA: 8s - loss: 0.8309 - acc: 0.7789391/391 [==============================] - 53s 136ms/step - loss: 0.8297 - acc: 0.7798 - val_loss: 0.9030 - val_acc: 0.7628
Epoch 60/200
391/391 [==============================] - 53s 134ms/step - loss: 0.8245 - acc: 0.7825 - val_loss: 0.8378 - val_acc: 0.7767
Epoch 61/200
 28/391 [=>............................] - ETA: 46s - loss: 0.8281 - acc: 0.7879390/391 [============================>.] - ETA: 0s - loss: 0.8177 - acc: 0.7851Buffered data was truncated after reaching the output size limit.

推荐答案

即使RAM | GPU |在colab上的DISK是免费的,由于在colab上显示单元格输出的内存有限,因此仍然会出现此错误.假设在训练过程中运行多个纪元(148+)时内存限制在2Mb到5Mb左右,它往往会填满该内存,因此输出将被截断,因为没有更多的可用内存来显示缓冲的纪元了.但是,机器保持在后台运行,并且处理了输出,但是由于缓冲的限制,它不显示.您仍然会得到所需的输出.

Even if RAM | GPU | DISK on colab is free, this error still comes because there is a limited memory for displaying output of a cell on colab. Assuming the memory limit is around 2Mb to 5Mb when we run many epochs(148+) during training, it tends to fill that memory and hence the output is truncated because there is no more memory left free to display the buffered epochs. However, the machine keeps running in the background and the output is processed but it is not displayed because of the buffered limit. You will still get your desired output.

一种解决方案是不使用verbose = 1(改用0).

One solution is not to use verbose=1 (use 0 instead).

这篇关于达到输出大小限制后,缓冲的数据将被截断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆