-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_training.py
More file actions
24 lines (19 loc) · 1.07 KB
/
main_training.py
File metadata and controls
24 lines (19 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from stages.train import train
from util.disk_operations import load_preprocessed_data
if __name__ == '__main__':
source_path_syn = 'matrizes/embedding+syn/'
source_path_emb = 'matrizes/embedding/'
chunksize = 20
try:
X_google, y_google = load_preprocessed_data(chunksize=chunksize, source=source_path_syn,
name='preprocessed_X.google'), load_preprocessed_data(
chunksize=chunksize, source=source_path_syn, name='preprocessed_y.google')
print('Starting syn model training.')
train(X_google, y_google, use_synfeat=True)
X_google, y_google = load_preprocessed_data(chunksize=chunksize, source=source_path_emb,
name='preprocessed_X.google'), load_preprocessed_data(
chunksize=chunksize, source=source_path_emb, name='preprocessed_y.google')
print('Starting emb model training.')
train(X_google, y_google, use_synfeat=False)
except FileNotFoundError:
print('Execute preprocessing first!')