Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
proekt
obuch
Commits
2da2e7a7
Commit
2da2e7a7
authored
3 weeks ago
by
Мазур Грета Евгеньевна
Browse files
Options
Download
Patches
Plain Diff
checkVRAM
parent
fee925be
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
grustno.py
+2
-0
grustno.py
with
2 additions
and
0 deletions
+2
-0
grustno.py
+
2
−
0
View file @
2da2e7a7
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets