colab_has_gpu

colab_has_gpu()[source]

Detect if the current environment is running on Google colab with a GPU.

Returns

True if the current environment is on colab with a GPU, False otherwise.

Return type

bool