Use this tag for Tensor Processing Unit (TPU). TPU is an application-specific integrated circuit developed by Google.
Questions tagged [tpu]
421 questions
4
votes
2 answers
Keras tuner and TPU in Google Colab
I have some problems with keras tuner and tpu. When I run the code below, everything works well and network training is fast.
vocab_size = 5000
embedding_dim = 64
max_length = 2000
def create_model():
model = tf.keras.Sequential([
…

KarPaLex
- 41
- 2
4
votes
2 answers
How to connect to private storage bucket using the Google Colab TPU
I am using google colab pro and the provided TPU. I need to upload a pre-trained model into the TPU.
TPU can load data only from a google cloud storage bucket.
I created a cloud storage bucket and extracted the pre-trained model files in the…

fabrizioM
- 46,639
- 15
- 102
- 119
4
votes
1 answer
While running on a TPU instance on Google Colab getting InternalError: Failed to serialize message
I'm trying to train a model on Google Colab using a TPU for a college project. I'm using TensorFlow 1.15.0. Now, as I understand from the TPU examples, I'm converting the tf.keras.models.Model instance to a TPU compatible one with an appropriate…

Bhargav Desai
- 83
- 1
- 5
4
votes
1 answer
How to check if TPU device type is v2 or v3?
Is there any python API in tensorflow (or any other way) to check if the TPU accelerator is v2 or v3 TPU?

siddhadev
- 16,501
- 2
- 28
- 35
4
votes
0 answers
AttributeError: KerasTPUModel' object has no attribute _ckpt_saved_epoch
I am trying to train a model on Google Colab, in order to play around with training on TPU. However, I am running into the following error:
AttributeError Traceback (most recent call last)
…

SilverTear
- 695
- 7
- 18
4
votes
1 answer
Google Coral Edge TPU compiled model - Inference always almost the same
I'm trying to get a Mobilenetv2 model (retrained last layers to my dataset) to run on the Google edge TPU Coral. I'm able to quantize and compile the model with the 'edgetpu_compiler' (followed this page…

Paulo Ribeiro
- 153
- 9
4
votes
2 answers
Variable was not created in the distribution strategy scope with costum Layer
I'm trying to finetune a BERT-Model on Google-colaboratory with TPUs. But I always get the following error:
ValueError: Variable (tf.Variable 'bert_layer_module/bert/encoder/layer_10/attention/output/LayerNorm/beta:0' shape=(768,) dtype=float32)…

chefhose
- 2,399
- 1
- 21
- 32
4
votes
1 answer
How to diagnose out of memory errors with TPU
I'm trying to train a variation of a u-net on a TPU and there appear to be 3 ops that are using 24 gigs of memory. Given that the network is quite large, I have no way of knowing where they are. How do you figure out the actual operations that these…

Luke
- 6,699
- 13
- 50
- 88
4
votes
0 answers
Best way to train a CNN on Google Colab TPU
I am trying to train a CNN (ResNet50 for now) using Keras on Google Colab with their TPU support. The TPU VM on Colab has a small local disk size, so I cannot fit my training images on it.
I tried uploading the train/test images to Google drive but…

kg_sYy
- 1,127
- 9
- 26
4
votes
0 answers
Using SessionRunHook with TPU
I have developed a SessionRunHook which I attach to TPUEstimator. SessionRunHook works perfectly fine on CPU, however if I use TPU I get an error:
INFO:tensorflow:Error recorded from outfeed: Attempted to use a closed Session.
INFO:tensorflow:Error…

Donatas Repečka
- 141
- 2
3
votes
1 answer
Google USB Coral TPU installation - unable to install PyCoral library
Environment:
Ubuntu 20.04,
Coral TPU USB accelerator
I'm following these instructions - I was able to install the TPU Runtime after some Googling around unsigned package errors. However, when I try to add the PyCoral library I get errors around…

Chad
- 31
- 1
- 2
3
votes
1 answer
InternalError when using TPU for training Keras model
I am attempting to fine-tune a BERT model on Google Colab from the Tensorflow Hub using this link.
However, I run into the following error:
InternalError: RET_CHECK failure…

a_002311
- 43
- 2
3
votes
1 answer
Result of TPU and GPU are different
I'm trying to fine tuning using bert model.
I'm using pre trained bert model and pytorch.
The problem is that the result of GPU and the result of TPU are slightly different.
(accuracy is different about -2% ~ 2%)
I used same dataset, same seed.
And…

Kyle
- 31
- 2
3
votes
1 answer
Colab TPU Error when calling model.fit() : UnimplementedError
I'm trying to classify cifar10 images with Google colab TPU, according to the official tutorial.
However I got the following error.
UnimplementedError: 6 root error(s) found.
Without using TPU, I didn't see any error. Could someone share some…

Grand Koala
- 57
- 6
3
votes
2 answers
Not able to import python package jax in Google TPU
I am working on linux console and typing python takes me into the python console.
When I use the following command in TPU machine
import jax
then it generates following mss and get out of the python prompt.
paramjeetsingh80@t1v-n-1c883486-w-0:~$…

user395882
- 665
- 2
- 7
- 16