Spaces:
Sleeping
Sleeping
Update transformer.py
Browse files- transformer.py +2 -0
transformer.py
CHANGED
|
@@ -5,6 +5,8 @@ import torch.nn as nn
|
|
| 5 |
from torch.nn import functional as F
|
| 6 |
import math
|
| 7 |
|
|
|
|
|
|
|
| 8 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 9 |
|
| 10 |
dropout = 0.3
|
|
|
|
| 5 |
from torch.nn import functional as F
|
| 6 |
import math
|
| 7 |
|
| 8 |
+
from constants import n_head
|
| 9 |
+
|
| 10 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 11 |
|
| 12 |
dropout = 0.3
|