SantoshGupta7
SantoshGupta7

Reputation: 6197

How to load data for TPU inference in Colab, without using GCP?

For training models on the colab TPUs, the data needs to be on GCP buckets. However, for small amounts of data, I am wondering if it's possible to directly inference data directly from the local colab enviroment.

Upvotes: 1

Views: 670

Answers (2)

Andrey
Andrey

Reputation: 6367

You can read files with Python:

with open(image_path, "rb") as local_file:
  img = local_file.read()

Upvotes: 0

Allen Wang
Allen Wang

Reputation: 301

Unfortunately, it isn't possible to load local data into the TPU with Colab currently. You will need to continue using the GCS bucket for any data loading into the TPU.

Upvotes: 1

Related Questions