Google Colab-您的会话因未知原因而崩溃 [英] Google Colab - Your session crashed for an unknown reason

查看:876
本文介绍了Google Colab-您的会话因未知原因而崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您的会话因未知原因而崩溃

Your session crashed for an unknown reason

当我在Google Colab中运行以下单元格时:

when I run the following cell in Google Colab:

from keras import backend as K
if 'tensorflow' == K.backend():
  import tensorflow as tf
  from keras.backend.tensorflow_backend import set_session
  config = tf.ConfigProto()
  config.gpu_options.allow_growth = True
  config.gpu_options.visible_device_list = "0"
  set_session(tf.Session(config=config))

我收到了此消息,因为我已经将两个数据集上传到了Google云端硬盘.

I receive this message since I have uploaded two data sets to google drive.

有人知道此消息并且可以给我一些建议吗? 非常感谢您的每一个提示.

Does anyone know this message and can give me some advice? Many thanks for every hint.

更新: 我总是收到消息

更新 我已经从Google云端硬盘中删除了数据集,但是会话仍然崩溃.

Update I have removed the data sets from Google Drive, but the session is still crashing.

推荐答案

Google Colab崩溃是因为您试图使用Runtime作为CPU来运行与GPU相关的代码.

Google Colab is crashing because you are trying to Run Code related to GPU with Runtime as CPU.

如果将Runtime更改为GPU,则执行成功.下面提到了相同的步骤:

The execution is successful if you change the Runtime as GPU. Steps for the same are mentioned below:

运行时->更改运行时-> GPU(从下拉列表中选择).

Runtime -> Change Runtime -> GPU (Select from dropdown).

请在 Github Gist 中找到工作代码.

Please find the Working code in Github Gist.

这篇关于Google Colab-您的会话因未知原因而崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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