google-colaboratory

google colaboratory `ResourceExhaustedError` with GPU

心不动则不痛 提交于 2019-12-22 09:55:04
问题 I'm trying to fine-tune a Vgg16 model using colaboratory but I ran into this error when training with the GPU. OOM when allocating tensor of shape [7,7,512,4096] INFO:tensorflow:Error reported to Coordinator: <class 'tensorflow.python.framework.errors_impl.ResourceExhaustedError'>, OOM when allocating tensor of shape [7,7,512,4096] and type float [[Node: vgg_16/fc6/weights/Momentum/Initializer/zeros = Const[_class=["loc:@vgg_16/fc6/weights"], dtype=DT_FLOAT, value=Tensor<type: float shape: [7

How to resolve: ModuleNotFoundError: No module named 'google.colab'

你。 提交于 2019-12-22 08:18:51
问题 I want to run the command: from google.colab import auth But I am getting this error: ModuleNotFoundError: No module named 'google.colab' This is required for accessing files on google drive from python. There is a package google but not module colab in it. How to resolve this error? 回答1: AFAIK, you can execute the module 'google.colab' from within colab.research.google.com Looking at the tag conda in your question. I assume that you are running the code from your local machine. Please make

openAI Gym NameError in Google Colaboratory

青春壹個敷衍的年華 提交于 2019-12-22 05:13:46
问题 I've just installed openAI gym on Google Colab, but when I try to run 'CartPole-v0' environment as explained here. Code: import gym env = gym.make('CartPole-v0') for i_episode in range(20): observation = env.reset() for t in range(100): env.render() print(observation) action = env.action_space.sample() observation, reward, done, info = env.step(action) if done: print("Episode finished after {} timesteps".format(t+1)) break I get this: WARN: gym.spaces.Box autodetected dtype as <class 'numpy

Google Colab Error : Failed to get convolution algorithm.This is probably because cuDNN failed to initialize

寵の児 提交于 2019-12-22 04:13:17
问题 UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above. [[{{node conv2d_1/convolution}} = Conv2D[T=DT_FLOAT, data_format="NCHW", dilations=[1, 1, 1, 1], padding="VALID", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](zero_padding2d_1/Pad, conv2d_1/kernel/read)]] [[{{node metrics/acc/Mean/_255}} = _Recv[client_terminated=false,

How to insert an inline image in Google Colaboratory from Google Drive

非 Y 不嫁゛ 提交于 2019-12-22 04:01:05
问题 I am trying to insert an image in Google Colaboratory (markdown) already saved in Google Drive using this expression ![Text](https://xxxx) but it doesn't work. For example, the Colaboratory markdown manual shows how to insert a photo inline with this example An inline image: ![Google's logo](https://www.google.com/images/logos/google_logo_41.png) . Ok, that is a photo from internet, but, when I replace that photo for one already saved in my Google Drive it doesn't appear. 回答1: I tried all the

Python 3 support in Google's CoLab

≡放荡痞女 提交于 2019-12-22 01:49:02
问题 I have been experimenting with the Jupyter notebooks at https://colab.research.google.com, and it seems that by default they run Python 2.7. Is there any way to enable Python 3 support on CoLab? 回答1: Yes! Python3 support is now live in Colab. When creating a new notebook, there's now an option for Python2 or Python3. For an existing notebook, Runtime -> Change runtime type will let you switch. We write the language info into the kernelspec in the notebook metadata, so switching runtime type

Answer “yes” to terminal on Google Colaboratory

偶尔善良 提交于 2019-12-21 22:06:31
问题 I'm trying to clone from Github using Google Colaboratory, the command I'm using is: !git clone git@github.com:CliMT/climt.git But I get the following: Cloning into 'climt'... The authenticity of host 'github.com (192.30.255.112)' can't be established. RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8. Are you sure you want to continue connecting (yes/no)? But since this is Google Colaboratory, I can't type "yes" to the terminal. What can I do? Thanks! 回答1: If you only

how to import conda packages into google colab?

跟風遠走 提交于 2019-12-21 20:05:16
问题 Hi I was able to install packages in google colab with pip, using: !pip install.... but i am not able to install any package from conda-forge. I tried: !conda install -c conda-forge cartopy thanks in advance! 回答1: One way to get it is to just Unzip the conda package to a directory directly. Get you required conda package from anaconda.org , download it. Decompress them and copy them into the library path Here's an example to install faiss from anaconda using this way. https://gist.github.com

Mount “Computers” of Google Drive to Colaboratory

痞子三分冷 提交于 2019-12-21 17:42:04
问题 I studied some ways of loading data to Colaboratory from the official notebook. But it only connects the colab with Google Drive's "My Drive" folder by the command drive.mount('/content/gdrive') Picture for colab directory tree However, I would like to access Google Drive's "Computers" folder in Colab. Is there some way to do it? Picture for Google Drive web directory tree Thanks! 回答1: Here is a partial solution that may work for you: By using the Files: update API call, you can add "root" as

Write out file with google colab

我是研究僧i 提交于 2019-12-21 09:18:14
问题 Was there a way to write out files with google colab? For example, if I use import requests r = requests.get(url) Where will those files be stored? Can they be found? And similarly, can I get the file I outputted via say tensorflow save function saver=tf.Saver(....) ... path = saver.save(sess, "./my_model.ckpt") Thanks! 回答1: In your first example, the data is still in r.content . So you also need to save them first with open('data.dat', 'wb').write(r.content) Then you can download them with