Spaces:
Sleeping
Sleeping
Update src/train_transformer.py
Browse files- src/train_transformer.py +1 -1
src/train_transformer.py
CHANGED
|
@@ -16,7 +16,7 @@ LR = 1e-3
|
|
| 16 |
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
| 17 |
|
| 18 |
# Dataset wrapper
|
| 19 |
-
|
| 20 |
def __init__(self, X, y):
|
| 21 |
self.X = torch.tensor(X, dtype=torch.long)
|
| 22 |
self.y = torch.tensor(y, dtype=torch.long)
|
|
|
|
| 16 |
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
| 17 |
|
| 18 |
# Dataset wrapper
|
| 19 |
+
class EmotionDataset(Dataset):
|
| 20 |
def __init__(self, X, y):
|
| 21 |
self.X = torch.tensor(X, dtype=torch.long)
|
| 22 |
self.y = torch.tensor(y, dtype=torch.long)
|