Questions tagged [google-cloud-tpu]

Google Cloud TPUs (Tensor Processing Units) accelerate machine learning workloads developed using TensorFlow. This tag is used for questions about using the Google Cloud TPU service. Topics can range from the service user experience, issues with the trainer program written with Tensorflow, project quota issues, security, authentication, etc.

Official website

188 questions
15
votes
2 answers

File system scheme '[local]' not implemented in Google Colab TPU

I am using TPU runtime in Google Colab, but having problems in reading files (not sure). I initialized TPU using: import tensorflow as tf import os import tensorflow_datasets as tfds resolver =…
15
votes
6 answers

How do I set up TensorFlow in the Google cloud?

How do I set up a TensorFlow in the Google cloud? I understand how to create a Google Compute Engine instance, and how to run TensorFlow locally; and a recent Google blog post suggests that there ought to be a way to create a Google Compute Engine…
14
votes
3 answers

Using TPUs with PyTorch

I am trying to use Google Cloud's TPU from Colab. I was able to do it following the tutorial by using Tensorflow. Does anybody know if it is possible to make use of the TPUs using PyTorch? If so how can I do it? Do you have any example?
13
votes
1 answer

How to use tf.keras with bfloat16

I'm trying to get a tf.keras model to run on a TPU using mixed precision. I was wondering how to build the keras model using bfloat16 mixed precision. Is it something like this? with tf.contrib.tpu.bfloat16_scope(): inputs =…
Luke
  • 6,699
  • 13
  • 50
  • 88
13
votes
1 answer

How use TPU in google colab

Google colab brings TPUs in the Runtime Accelerator. I found an example, How to use TPU in Official Tensorflow github. But the example not worked on google-colaboratory. It stuck on following line: tf.contrib.tpu.keras_to_tpu_model(model,…
Amir
  • 16,067
  • 10
  • 80
  • 119
12
votes
5 answers

tf.data.Dataset: The `batch_size` argument must not be specified for the given input type

I'm using Talos and Google colab TPU to run hyperparameter tuning of a Keras model. Note that I'm using Tensorflow 1.15.0 and Keras 2.2.4-tf. import os import tensorflow as tf import talos as ta from tensorflow.keras.models import Sequential from…
10
votes
2 answers

Google Colab Storage

Does anybody know the storage limits for running Google Colab? I seem to run out of space after uploading 22gb zip file, and then trying to unzip it, suggesting <~40gb storage being available. At least this is my experience running the TPU instance.
Ferhat
  • 394
  • 1
  • 4
  • 17
8
votes
2 answers

How long will it take to train the VGG-16 model on IMAGENET using GOOGLE COLAB TPU?

Just curious, on how long will it take to train the VGG16 model on IMAGENET using GOOGLE COLAB TPU? If someone can explain me the calcuations they did to get to the answer, that would be great!
8
votes
2 answers

How to utilize multiple Google Cloud TPUs to train a single model

I have been allocated multiple Google Cloud TPUs in the us-central1-f region. The machine types are all v2-8. How can I utilize all my TPUs to train a single model? The us-central1-f region doesn't support pods, so using pods doesn't seem like the…
Kevin
  • 4,070
  • 4
  • 45
  • 67
7
votes
1 answer

How to convert tf.Keras model to TPU using TensorFlow 2.0 in Google Colab?

Since TF 2.0 doesn't have the tf.contrib layer, how do I convert my model to run the training on TPU, without having access to tf.contrib.tpu.keras_to_tpu_model()? I tried looking for code, but all of it are running on TensorFlow 1.x My data is in…
Leonardo
  • 155
  • 2
  • 10
7
votes
1 answer

TF / Keras error: InputLayer not a Checkpointable

I am trying out the newly added TPU support on Google Colab with the simple cats vs dogs dataset. After creating a simple CNN, I tried to export the model to TPU. But it failed with error TypeError: Checkpointable._track_checkpointable() passed…
6
votes
1 answer

Connect Colab to paid TPU

I'd like to connect Colab to a PAID TPU (upgrading from the free TPU). I created a JSON key using this guide: https://cloud.google.com/docs/authentication/production#auth-cloud-explicit-python, then uploaded it to Colab. I'm able to connect to my…
6
votes
1 answer

Keras: TPU models must have constant shapes for all operations

I am working with a pretrained keras model and I want to run it on TPU by Google Colaboratory, but I get the following error: ValueError: Layer has a variable shape in a non-batch dimension. TPU models must have constant shapes for all…
chefhose
  • 2,399
  • 1
  • 21
  • 32
6
votes
3 answers

Colab TPU error - InvalidArgumentError: Unsupported data type for TPU: double, caused by output cond_8/Merge:0

I'm trying to do some basic character classification on google colab with a TPU. I'm getting the following error: InvalidArgumentError: Unsupported data type for TPU: double, caused by output cond_8/Merge:0 I don't know what the issue is since I'm…
user3413723
  • 11,147
  • 6
  • 55
  • 64
6
votes
2 answers

Is there a decent workaround to saving checkpoints in local drive when using TPU in Tensorflow?

A follow up to this question: How to save a Tensorflow Checkpoint file from Google Colaboratory in when using TPU mode? Where the official way of saving a checkpoint when using a Tensorflow TPU is to use the Google Cloud Service. I am working if…
SantoshGupta7
  • 5,607
  • 14
  • 58
  • 116
1
2 3
12 13