Reputation: 816
I don't use Keras. And I want to use TPUs on Google Colab. Questions:
tf.session
automatically use TPUs?tf.contrib.tpu.TPUDistributionStrategy
, tf.contrib.tpu.rewrite
, tf.contrib.cluster_resolver.TPUClusterResolver
do in TPU computing? Are they all necessary? Upvotes: 0
Views: 633
Reputation: 31
Which Tensorflow version are you running? Currently the firmware for TPUs on Google Colab only support 1.14 (I may be wrong with the exact version, but it's definitely 1.x), however if you are using TF2.0, there is TPU support for nightly-2.x on GCP, so perhaps you can give that a try!
Note that in 2.0, you would want to get rid of any "sessions" because that is no longer a thing. Check out the TPUStrategy docs here for more information: https://www.tensorflow.org/guide/distributed_training#tpustrategy
Upvotes: 3