google-colaboratory

AttributeError: 'google.protobuf.pyext._message.RepeatedCompositeCo' object has no attribute 'append'

房东的猫 提交于 2020-04-13 02:15:07
问题 I am building a transfer learning model on the MobileNetv2 pretrained model on Google Collab. Till yesterday, everything was fine. But, today, on executing #Create the base model(feature_extractor) from the pre-trained model MobileNet V2 _URL = "https://tfhub.dev/google/tf2-preview/mobilenet_v2/feature_vector/2" feature_extractor = hub.KerasLayer(_URL, input_shape=(_TARGET_SIZE, _TARGET_SIZE,3)) I get the error: ---------------------------------------------------------------------------

How to use Python variables in Google Colab terminal command?

≡放荡痞女 提交于 2020-04-12 14:05:55
问题 I have a cell with this content: import os os.mkdir('123') name = '123' !rm -r name I want to pass the value of the variable name to the last line. How can I do this? 回答1: Try $ . It will substitute the python variable. !rm -r $name You may need to use $name\.txt or {name}.txt in some cases. 来源: https://stackoverflow.com/questions/52851718/how-to-use-python-variables-in-google-colab-terminal-command

How to use Python variables in Google Colab terminal command?

北战南征 提交于 2020-04-12 14:05:52
问题 I have a cell with this content: import os os.mkdir('123') name = '123' !rm -r name I want to pass the value of the variable name to the last line. How can I do this? 回答1: Try $ . It will substitute the python variable. !rm -r $name You may need to use $name\.txt or {name}.txt in some cases. 来源: https://stackoverflow.com/questions/52851718/how-to-use-python-variables-in-google-colab-terminal-command

Realtime YOLO Object Detection using laptop webcam in Google Colab

坚强是说给别人听的谎言 提交于 2020-03-22 09:20:51
问题 I am using YOLOv3 and OpenCV for realtime object detection on my local system using a Webcam. Everything works like a charm and here is the link of what I did for my local system(it uses VideoStream ). I want to do the same on Google colab for faster FPS(my system is not giving high FPS). I read that Google Colab runs on some virtual environment and hence cannot access my local system webcam. But any suggestions if it is possible? 来源: https://stackoverflow.com/questions/54886155/realtime-yolo

How can restart googlecolab runtime with everything clear?

不想你离开。 提交于 2020-03-22 03:36:05
问题 I installed many libs and many settings on colab and now I want to clear all settings, files, libs, and everything on my colab accounts! Is it possibl 回答1: To drop your current backend and start fresh with a new one, select the command 'Reset all runtimes...' from the Runtime menu. 来源: https://stackoverflow.com/questions/50361934/how-can-restart-googlecolab-runtime-with-everything-clear

Evaluating TF model inside a TF op throws error

半世苍凉 提交于 2020-03-21 12:23:43
问题 I am using TensorFlow 2. I am trying to optimize a function which uses the loss of a trained tensorflow model (poison). @tf.function def totalloss(x): xt = tf.multiply(x, (1.0 - m)) + tf.multiply(m, d) label = targetlabel*np.ones(xt.shape[0]) loss1 = poison.evaluate(xt, label, steps=1) loss2 = tf.linalg.norm(m, 1) return loss1 + loss2 I am not able to execute this function, however, when I comment the @tf.function line the function works! I need to use this function as a tensorflow op so as

Is it possible to get Mask-RCNN's model.pkl file from COLAB notebook ,from a train Tensorflowflow model?

Deadly 提交于 2020-03-21 07:00:53
问题 I Got a notebook link to remove the background of objects using Mask R-CNN. basically I want to remove background from an image, which this model (TensorFlow model I guess ), exactly doing what I want. now I want a ".pkl" file from this model, to create a WEB API using Flask. - --->((here this youtube tutorial has shown exactly how to get a .pkl file from a train model.)) how Can I get this model "pkl" file from the colab notebook working model? Is it even possible to get a model from COLAB

How to prevent Google Colab from disconnecting?

人走茶凉 提交于 2020-03-17 04:27:11
问题 Q: Is there any way to programmatically prevent Google Colab from disconnecting on a timeout? The following describes the conditions causing a notebook to automatically disconnect: Google Colab notebooks have an idle timeout of 90 minutes and absolute timeout of 12 hours. This means, if user does not interact with his Google Colab notebook for more than 90 minutes, its instance is automatically terminated. Also, maximum lifetime of a Colab instance is 12 hours. Naturally, we want to

Pytorch transforms.RandomRotation() does not work on Google Colab

北城以北 提交于 2020-03-16 08:10:50
问题 Normally i was working on letter&digit recognition on my computer and I wanted to move my project to Colab but unfortunately there was an error (you can see the error below). after some debugging i found which line is giving me error. transforms.RandomRotation(degrees=(90, -90)) below i wrote simple abstract code to show this error.This code does not work on colab but it works fine at my own computer environment.Problem might be about the different versions of pytorch library i have version 1

Pytorch transforms.RandomRotation() does not work on Google Colab

别等时光非礼了梦想. 提交于 2020-03-16 08:08:55
问题 Normally i was working on letter&digit recognition on my computer and I wanted to move my project to Colab but unfortunately there was an error (you can see the error below). after some debugging i found which line is giving me error. transforms.RandomRotation(degrees=(90, -90)) below i wrote simple abstract code to show this error.This code does not work on colab but it works fine at my own computer environment.Problem might be about the different versions of pytorch library i have version 1