Google Colab - Your session crashed for an unknown reason

我只是一个虾纸丫 提交于 2020-11-29 09:24:08

问题


Your session crashed for an unknown reason

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))

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.

Update: I always receive the message

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


回答1:


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

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

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

Please find the Working code in Github Gist.




回答2:


Just a side note: sometimes you may want to reinstall an litle older version of the related module (see from the error log). It works for me in a case.



来源:https://stackoverflow.com/questions/59703866/google-colab-your-session-crashed-for-an-unknown-reason

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!