Create config.py
Browse files
config.py
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import transformers
|
2 |
+
import os
|
3 |
+
import torch
|
4 |
+
|
5 |
+
MAX_LEN = 150 #256
|
6 |
+
TRAIN_BATCH_SIZE = 8
|
7 |
+
VALID_BATCH_SIZE = 4
|
8 |
+
EPOCHS = 5
|
9 |
+
|
10 |
+
# Folder to contain all the datasets
|
11 |
+
DATASET_LOCATION = "" #
|
12 |
+
#MODEL_PATH = "/mnt/data/group3/gaurish/SentimentAnalyserLVTwitter/bert-sentiment/src/trained_models/mbert-7epoch-lower/model.bin"
|
13 |
+
|
14 |
+
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
15 |
+
|
16 |
+
# 7 EPOCH Version
|
17 |
+
BERT_PATH = "FFZG-cleopatra/bert-emoji-latvian-twitter"
|
18 |
+
|
19 |
+
|
20 |
+
# TODO check if lower casing is required
|
21 |
+
# BertTokenizer
|
22 |
+
TOKENIZER = transformers.BertTokenizer.from_pretrained(
|
23 |
+
BERT_PATH,
|
24 |
+
do_lower_case=True
|
25 |
+
)
|
26 |
+
|
27 |
+
#####################################################################################################################################
|
28 |
+
|