Google Colab 您所在的位置:网站首页 谷歌session Google Colab

Google Colab

#Google Colab| 来源: 网络整理| 查看: 265

百度翻译此文   有道翻译此文 问题描述

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: enter image description hereI always receive the message

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

推荐答案

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.

其他推荐答案

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.

其他推荐答案

This error happens when the expected device and the actual device are different.

For example, if you run the code that is written with torch_xla, which is for TPU training, on the GPU (cuda) then the Colab will return you this error.

It is really tricky since it does not give you an actual debugging message, etc, which makes you hard to find what is the actual problem.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有