google-colaboratory

ValueError: Input 0 of layer dense is incompatible with the layer: its rank is undefined, but the layer requires a defined rank

断了今生、忘了曾经 提交于 2019-12-11 14:51:32
问题 When trying the example at https://www.tensorflow.org/tutorials/images/hub_with_keras at a local computer with tf '2.0.0-alpha0' (download, pip -download hub '0.4.0-dev' and remove !pip... lines, install tf 2, remove enable_v2_behavior , run file), it failed with ValueError: Input 0 of layer dense is incompatible with the layer: its rank is undefined, but the layer requires a defined rank. It runs fine on Google colab though. Why is this and how can it be fixed? 回答1: As proposed by @arnoegw

How to install TA-lib in google colab?

爷,独闯天下 提交于 2019-12-11 13:40:55
问题 I'm trying to install TA-Lib package in google colab notebook but without success. I tried this guide and also Installing TA-Lib on python x64 I get this error: import platform print (platform.architecture()) import sys print(sys.version) !pip install C:/ta-lib/TA_Lib-0.4.17-cp36-cp36m-win_amd64.whl ######### ('64bit', '') 3.6.3 (default, Oct 3 2017, 21:45:48) [GCC 7.2.0] Requirement 'C:/ta-lib/TA_Lib-0.4.17-cp36-cp36m-win_amd64.whl' looks like a filename, but the file does not exist TA_Lib-0

How to save installations across sessions?

筅森魡賤 提交于 2019-12-11 12:09:29
问题 In Colaboratory, is there a way to save library installations across sessions? If so how, can I do that? I'd like to learn more about Colaboratory session management in general. Currently, everytime I have to import, for e.g. a cv2 module(as this is not available by default), I need to reinstall the module with !pip install opencv-python along with it's dependencies that provide for shared objects, through a !apt=-get package-name . 回答1: VMs time out after a period of inactivity, so you'll

Failed to download .ckpt weights from Google Colab

你离开我真会死。 提交于 2019-12-11 06:46:52
问题 I've trained a Tensorflow model on Google Colab, and saved that model in ".ckpt" format. I want to download the model so I tried to do this: from google.colab import files files.download('/content/model.ckpt.index') files.download('/content/model.ckpt.meta') files.download('/content/model.ckpt.data-00000-of-00001') I was able to get meta and index files. However, data file is giving me the following error: "MessageError: Error: Failed to download: Service Worker Response Error" Could anybody

Issue with gdrive on Colab

拜拜、爱过 提交于 2019-12-11 06:37:20
问题 I am using colab to train resnet on cifar10, after mounting google drive I cloned the repository and I was able to run the script. However, Tensorflow is loaded and the data files are passed to the network but I am ending with: tensorflow.python.framework.errors_impl.NotFoundError: /content/drive/My; No such file or directory It seems that there is an issue with my path because it contains a space "/content/gdrive/My Drive/apps/PocketFlow". How I could change the way that gdrive is mounted,

Colaboratory virtual instances IP range?

南楼画角 提交于 2019-12-11 06:03:37
问题 I would like to introduce Google Colaboratory at our company. However, for most of our experiment, we would need to access a mongoDB server which uses whitelisting. Therefore, I am wondering if the virtual instances used by Colaboratory have a specific IP range that we could use? Otherwise, there is still the possibility to use a local runtime with tunneling to a Jupyter Notebook server like described here: https://research.google.com/colaboratory/local-runtimes.html Thanks, Pascal 回答1: You

How to train model with remaining epochs after long running session has ended in Google Colaboratory.?

血红的双手。 提交于 2019-12-11 05:38:49
问题 I am using Google Colab to train my 3D Convolutional neural network with 60 epochs but, when it reaches 57 epochs, my session is ended. After reconnecting it, the training starts from epoch 1. What should I do to train my model on uncompleted epochs after my session on Google Colaboratory has been ended? 回答1: The FAQ for Colaboratory includes these statements: What is Colaboratory? Colaboratory is a research tool for machine learning education and research. Colaboratory is intended for

Installing GPU support for LightGBM on Google Collab

大兔子大兔子 提交于 2019-12-11 05:09:02
问题 Anyone got luck trying to install GPU support for lightgbm on Google Collab using the Notebooks there ? 回答1: Most of it was following the documentation provided here, with two small tweaks to make it work on Google Colab. Since the instances are renewed after 12 hours of usage, I post this at the beginning of my notebook to reinstall GPU support with lightgbm : !apt-get -qq install --no-install-recommends nvidia-375 !apt-get -qq install --no-install-recommends nvidia-opencl-icd-375 nvidia

Import Google Drive files shared with/by you in colab

时间秒杀一切 提交于 2019-12-11 04:37:48
问题 It is rather obvious that this simplest recommended way which also provides the simplest API for reading the files from a drive folder ― from google.colab import drive drive.mount('/content/gdrive') ― does not allow access to files/folders shared with/by you in Google Drive, but only allows access to your own drive's files , making its use less of a fit for shared notebooks (or at least, shared notebooks that need to access data from shared google drive folders). Is it possible to access

How can you connect to a postgresql database on heroku from google-colaboratory?

拥有回忆 提交于 2019-12-11 03:26:15
问题 Just started using colaboratory and would like to run sql queries against a postgresql db. Is this possible on colaboratory. I've used magic sql with jupyter nb to do this. 回答1: It was a matter of using 2 %% instead of 1 that was giving me an error. What I'm running is this: ! pip install ipython-sql ! pip install psycopg2 %sql postgres://<connect string> %sql select tablename from pg_tables; I saw an example where there sql was run with %%sql and when I tried that I got an error. Everything