Hugging Face
Models
Datasets
Spaces
Community
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
yifan0sun
/
BERTGradGraph
like
0
Running
on
T4
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
013177a
BERTGradGraph
/
models.py
yifan0sun
Update models.py
a42cb18
verified
18 days ago
raw
Copy download link
history
blame
Safe
155 Bytes
import
torch
class
TransformerVisualizer
():
def
__init__
(
self
):
self.device = torch.device(
"cuda"
if
torch.cuda.is_available()
else
"cpu"
)