Browse Source

use of datasets path instead

Jérôme BUISINE 6 months ago
parent
commit
124af56005
2 changed files with 5 additions and 5 deletions
  1. 4 4
      generate/generate_dataset_sequence_file.py
  2. 1 1
      train_lstm_weighted.py

+ 4 - 4
generate/generate_dataset_sequence_file.py

@@ -23,12 +23,12 @@ from transformations import Transformation
 
 def generate_data_model(_filename, _transformations, _dataset_folder, _selected_zones, _sequence):
 
-    output_train_filename = os.path.join(cfg.output_data_folder, _filename, _filename + ".train")
-    output_test_filename = os.path.join(cfg.output_data_folder, _filename, _filename + ".test")
+    output_train_filename = os.path.join(cfg.output_datasets, _filename, _filename + ".train")
+    output_test_filename = os.path.join(cfg.output_datasets, _filename, _filename + ".test")
 
     # create path if not exists
-    if not os.path.exists(os.path.join(cfg.output_data_folder, _filename)):
-        os.makedirs(os.path.join(cfg.output_data_folder, _filename))
+    if not os.path.exists(os.path.join(cfg.output_datasets, _filename)):
+        os.makedirs(os.path.join(cfg.output_datasets, _filename))
 
     train_file = open(output_train_filename, 'w')
     test_file = open(output_test_filename, 'w')

+ 1 - 1
train_lstm_weighted.py

@@ -24,7 +24,7 @@ import sklearn
 from sklearn.model_selection import train_test_split
 from joblib import dump
 
-import custom_config as cfg
+import config as cfg
 
 # global variables
 n_counter = 0