Skip to main content

TPU usage in colab with single line of code

Before installation Make sure your TPU is on

Installation

To install the package from the PyPi repository you can execute the following command:

pip install tpu_tf2

If you prefer, you can clone it and run the setup.py file. Use the following commands to get a copy from GitHub and install all dependencies:

git clone https://github.com/ashishpatel26/regressionmetrics.git
cd tpu_tf2
pip install .

Usage

usage in colab : Open In Colab

from tpu_tf2.tpu import strategy
strategy.num_replicas_in_sync

> output : 8

💁 Thanks for reading and forking.

Metadata

Release files for tpu-tf2 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tpu-tf2 1.1.0
File Size Uploaded
tpu_tf2-1.1.0.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tpu-tf2 1.1.0
File Interpreter ABI Platform
tpu_tf2-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.3 kB

Release files / tpu_tf2-1.1.0.tar.gz

Download URL tpu_tf2-1.1.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
45668b5f0a25f1771545751602279b8d0d247679c53d88de791edb678b32d21a
BLAKE2b-256 checksum
How to use checksums
dd04d2e568eff09dfb2fb957da0d0a6133c058b9e03259baf88ff0f422b10c70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.5

Release files / tpu_tf2-1.1.0-py3-none-any.whl

Download URL tpu_tf2-1.1.0-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2c5f0cbd385b446d21856ae7b1b45bc7744cc9dc4ec61e2b24721c15e4329af
BLAKE2b-256 checksum
How to use checksums
2a33933e4eee66156f10bc50142266d62ed1b75bbf6e7479f068922797b9e291
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page