Spaces:
Running
on
T4
Running
on
T4
Update models.py
Browse files
models.py
CHANGED
@@ -6,12 +6,3 @@ import torch
|
|
6 |
class TransformerVisualizer():
|
7 |
def __init__(self):
|
8 |
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
9 |
-
|
10 |
-
|
11 |
-
def predict(self, task, text):
|
12 |
-
return task, text,1
|
13 |
-
|
14 |
-
|
15 |
-
def get_attention_gradient_matrix(self, task, text, target_layer):
|
16 |
-
return task, text,target_layer,1
|
17 |
-
|
|
|
6 |
class TransformerVisualizer():
|
7 |
def __init__(self):
|
8 |
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|