Created
November 25, 2021 15:25
-
-
Save Merwanski/e7740a2b14b99519fe47c26a1d01a995 to your computer and use it in GitHub Desktop.
get gpu name tensorflow and pytorch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tensorflow | |
from tensorflow.python.client import device_lib | |
devices_tf = device_lib.list_local_devices() | |
devices_tf = print(devices) | |
# pytorch | |
import torch | |
devices_torch = torch.cuda.get_device_name() | |
print(devices_torch) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment