Commit 2da2e7a7 authored by Мазур Грета Евгеньевна's avatar Мазур Грета Евгеньевна
Browse files

checkVRAM

parent fee925be
No related merge requests found
Showing with 2 additions and 0 deletions
+2 -0
...@@ -9,6 +9,8 @@ import torch ...@@ -9,6 +9,8 @@ import torch
device = "cuda" if torch.cuda.is_available() else "cpu" device = "cuda" if torch.cuda.is_available() else "cpu"
print(device) print(device)
# model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=4).to(device) # model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=4).to(device)
if torch.cuda.is_available():
print(f"VRAM: {torch.cuda.get_device_properties(0).total_memory / 1e9} GB")
import pandas as pd import pandas as pd
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment