Questions tagged [tpu]

Use this tag for Tensor Processing Unit (TPU). TPU is an application-specific integrated circuit developed by Google.

421 questions
3
votes
2 answers

Unsupported data type for TPU: double, caused by output IteratorGetNext:0

I'm building a simple deep learning model with tf.keras in the following structure: def build_simple_model(timestep, dim1, show_model_structure=False): model = tf.keras.models.Sequential() model.add(tf.keras.layers.LSTM(units=64,…
anb
  • 265
  • 1
  • 8
3
votes
5 answers

Coral Dev Board "mdt devices" can't find any devices

I was following the Coral Dev Board get started guide - Get started with the Dev Board (https://coral.withgoogle.com/docs/dev-board/get-started/). Everything worked fine until to the step - Connect to the board's shell via MDT. I've waited about 5…
Novus
  • 791
  • 8
  • 13
3
votes
5 answers

How can you use TPU from Google Colab in Tensorflow 2.0?

I'm trying to make use of Google Colab to use a Tensor Processing Unit (TPU) to train a neural network. Tensorflow has just come out with a major release, 2.0, so I am trying to do this within Tensorflow 2.0. I have tried following three guides, but…
maurera
  • 1,519
  • 1
  • 15
  • 28
3
votes
1 answer

BERT fine-tuning with Estimators on TPUs on colab TypeError: unsupported operand type(s) for *=: 'NoneType' and 'int'

i wrote a jupyter-notebook on google's colab to fine-tune (for text classification) a version BERT that i already pretrained on Arabic only. And i couldn't get around this error when the training starts. I followed the notebook given by google on…
3
votes
2 answers

Is it possible to run regular python code on Google TPU?

So I'm pretty new with Google TPU. From what I've already researched, it is optimized specifically for training machine learning models written on TensorFlow. Currently, I am trying to see how the TPU performs with other types of functions. These…
3
votes
0 answers

How to feed data for Tensorflow for multiple inputs for tpu?

I am trying to feed data for multiple inputs (2 inputs) for Keras (Tenserflow) for TPU training, but I get this error: ValueError: The dataset returned a non-Tensor type ((,
3
votes
1 answer

How to use keras model inside other model in TPU

I am trying to convert a keras model to tpu model in google colab, but this model has another model inside. Take a look at the code: https://colab.research.google.com/drive/1EmIrheKnrNYNNHPp0J7EBjw2WjsPXFVJ This is a modified version of one of the…
2
votes
1 answer

Getting ValueError: input tensor Tensor to TPUStrategy.run() has unknown rank, which is not allowed in Google Collab

I'm trying to train an RNN generative model using TPU in Google Colab. Full code of the notebook you can find here. In brief, I take text files, chop them on sequences and targets, then made a tf.data.Dataset from the lists. Then prepare vocabulary,…
Pavlo Yan
  • 35
  • 6
2
votes
0 answers

InvalidArgumentError after step 6 during my training on TPU at Kaggle

I am getting an error when I train my model with TPU on kaggle. I already looked around the internet but can get any solution. Note that it is working if I use GPU but I run OOM error. Here is the parameter: batch_size = 8 *…
stic-lab
  • 433
  • 7
  • 16
2
votes
1 answer

BERT pre-training from scratch with tensorflow version 2.x

i used run_pretraining.py (https://github.com/google-research/bert/blob/master/run_pretraining.py) python script in tensorflow version 1.15.5 version before. I use Google cloud TPU, as well. Is it possible or any python script for BERT pre-training…
hazal
  • 33
  • 4
2
votes
1 answer

Do TFX pipelines support training on TPUs?

I am new to TFX and I would like to know if it's possible to create a TFX pipeline that can train Keras models on TPUs nodes using TPUStrategy from a TPUClusterResolver. Looking at TFX documentation, it is not clear to me if such is possible. Any…
TheDude
  • 51
  • 1
  • 4
2
votes
2 answers

Google Colab - connecting to Google Cloud Storage does not create an adc.json file since few days

For the recent few days I have been struggling with the following problem on Google Colab Upon entering the produced link and entering my credentials the usual text to copy is not there. Instead I get this window Afterwards the connection to the…
2
votes
1 answer

Cannot restart TPU Node in preempted state

I am using a preemptible TPUv3-8 node with a GCE VM and I am having some difficulty restarting the TPU node after it has been preempted. On the TPUs page, it shows that the TPU-node has been preempted. But when I try to start it back it shows that…
Joy
  • 41
  • 5
2
votes
2 answers

Cleaning Google TPU memory (python)

My python code has two steps. In each step, I train a neural network (primarily using from mesh_transformer.transformer_shard import CausalTransformer and delete the network before the next step that I train another network with the same function.…
Eghbal
  • 3,892
  • 13
  • 51
  • 112
2
votes
1 answer

How to fix "pop from empty list" error while using Keras tuner search method with TPU in google colab?

I previously was able to run the search method of keras tuner on my model with GPU runtime of Google colab. But when I switched to the TPU runtime, I get the following error. I haven't been able to come to the conclusion of how to access a google…