Use this tag for Tensor Processing Unit (TPU). TPU is an application-specific integrated circuit developed by Google.
Questions tagged [tpu]
421 questions
3
votes
0 answers
RaggedTensor on TPU
I am trying to train a neural network using TensorFlow that takes as input (tf.keras.layers.Input) a RaggedTensor. It works fine on CPU and GPU but I am really strugling to make it work on TPU. I wanted to know if some of you managed to make it work…

Vince.Bdn
- 1,145
- 1
- 13
- 28
3
votes
1 answer
Multiplying Large Number of Matrices and Vectors on Tensorflow TPU
I am trying to multiply 3000 independent matrices and vectors on TPU in order to speed up calculations, but I have run into some issues.
I am unable to get the final result and I am also interested if there is a better solution.
Here is the…

Wooster
- 61
- 4
3
votes
1 answer
Training the model of Shakespeare with GPU instead of TPU
I'm trying to see the difference between training a model with TPU and GPU.
This is the training model part :
import time
start = time.time()
tf.keras.backend.clear_session()
resolver =…

Samir
- 235
- 1
- 10
3
votes
1 answer
How to use custom dataset generators with TPU?
My dataset is large (around 13gb). I have a hdf5 file of the dataset and i'm using a custom generator to load batches from the dataset. My model runs fine on Kaggle GPU but when i switch to TPU i'm getting an error. Below is my generator function…

Lelouche Lamperouge
- 191
- 3
3
votes
1 answer
Google Cloud TPU: gcloud compute tpus create failing with permission denied
I am trying to follow an official tutorial on training model with google cloud TPUs.
This is the tutorial : https://cloud.google.com/tpu/docs/tutorials/transformer-pytorch
At the step "Launch a Cloud TPU resource" i do the following
:~$ gcloud…

fteufel
- 59
- 1
- 5
3
votes
1 answer
Is it possible to use CuDNNLSTM with Google Colab's TPU?
I am able to do this with their GPU, but with their TPU it retrieves me an error...
Does anybody around here know what I'm missing, please?
Does it make sense to actually use the TPU with CuDNNLSTM? Or is CuDNNLSTM just tailored for GPU?
Thanks a…

joaopq
- 31
- 4
3
votes
3 answers
Colab+TPU not supporting TF 2.3.0 tf.keras.layers.experimental.preprocessing
I was updating my model using TF 2.3.0 on Colab+TPU based on https://keras.io/examples/vision/image_classification_efficientnet_fine_tuning/, specifically following the Data augmentation and Transfer learning from pre-trained weights…

Daviddd
- 761
- 2
- 12
- 37
3
votes
2 answers
How to select a specific TPU in Google Cloud?
I'm trying to use TPUs on Google cloud and I'm trying to figure out how to specify the right TPU to use. I'm trying to following the quickstart
https://cloud.google.com/tpu/docs/quickstart
But it doesn't say how to select a TPU, it only gives…

SantoshGupta7
- 5,607
- 14
- 58
- 116
3
votes
1 answer
How to check if TPU is available in Google Colab?
I am trying to choose a distribution strategy based on availability of TPU.
My code is as follows:
import tensorflow as tf
if tf.config.list_physical_devices('tpu'):
resolver = tf.distribute.cluster_resolver.TPUClusterResolver()
…

Andrey
- 5,932
- 3
- 17
- 35
3
votes
1 answer
TPU training in colab, custom model, data from my own GCP account: Cell just seems to hang, no progress or error message
I am trying to train on a colab TPU using data from my GCP account.
When I run the cell that starts the training, the cell just seems to hang, with no progress. I put a very low number of steps, so that the training should complete pretty quickly,…

SantoshGupta7
- 5,607
- 14
- 58
- 116
3
votes
0 answers
Error when running on TPU, "NotImplementedError: TPUStrategy.run(fn, ...) does not support pure eager execution....."
I am trying to train my model over a colab TPU, but I am running into
NotImplementedError: TPUStrategy.run(fn, ...) does not support pure eager execution. please make sure the function passed into strategy.run is a tf.function or strategy.run is…

SantoshGupta7
- 5,607
- 14
- 58
- 116
3
votes
0 answers
"AttributeError: Tensor.name is meaningless when eager execution is enabled." when training on TPU at "self.optimizer.apply_gradients"
I have code that works fine on GPU, but for TPU, I get at error starting at :
self.optimizer.apply_gradients(zip(gradients, trainable_vars))
Which says AttributeError: Tensor.name is meaningless when eager execution is enabled.
I have a custom…

SantoshGupta7
- 5,607
- 14
- 58
- 116
3
votes
1 answer
How to train Keras model on TPU on Google Colab ?, do I need to change my model configuration?(tinyYolo-v3)
I am not very familiar to model training on Google Colaboratory, I am currently trying to train a Keras (tinyYolov3) model using TPU, from my understanding I need get one of of the available TPU devices using
resolver =…

RichHacker
- 41
- 3
3
votes
1 answer
AttributeError: 'Delegate' object has no attribute '_library'
I am using a Coral Dev Board and I'm facing an error I can't get rid of. I am trying to run on the edgetpu the image classifier example of the official tutorial to get started with the Dev Board. I followed the tutorial step by step however when I…

nomaad95
- 33
- 3
3
votes
0 answers
Running keras model on colab TPU
I am currently trying to train a convolutional neural network CNN using Keras and the Google Colab GPU.
I found this article that discussed the option to increase the training time that is needed to train the model. Since the current training on the…

Jonas
- 67
- 9