This Day in TensorFlow 2: tf.tpu

Image copyright TensorFlow

What is TensorFlow?

TensorFlow is Google’s machine learning library that is free and open-source for anyone to use. It’s written in C++ so it executes low-level, or it executes ridiculously fast.

What is TPU?

Well, a TPU is a Tensor Processing Unit that was developed by Google Cloud. It’s a scary machine cooled by water(see picture depicted below).

Image copyright Google Cloud. Image Source

1. tf.tpu.experimental.initialize_tpu_system

This initializes a TPU device.

tf.tpu.experimental.initialize_tpu_system(cluster_resolver=None)
  • No TPU found: RuntimeError

2. tf.tpu.experimental.shutdown_tpu_system

This shuts down the TPU device(s).

tf.tpu.experimental.shutdown_tpu_system(cluster_resolver=None)
  • No TPU found: RuntimeError if no devices found thru eager execution

- Aaron Ma, https://aaronhma.com

--

--

Living in The Milky Way 😀

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store