Demosthene-OR commited on
Commit
1157ef0
1 Parent(s): ce16949

Update main_dl.py

Browse files
Files changed (1) hide show
  1. main_dl.py +3 -3
main_dl.py CHANGED
@@ -225,8 +225,8 @@ def load_all_data():
225
 
226
  merge = Merge( dataPath+"/rnn_en-fr_split", dataPath, "seq2seq_rnn-model-en-fr.h5").merge(cleanup=False)
227
  merge = Merge( dataPath+"/rnn_fr-en_split", dataPath, "seq2seq_rnn-model-fr-en.h5").merge(cleanup=False)
228
- rnn_en_fr = keras.models.load_model(dataPath+"/seq2seq_rnn-model-en-fr.h5", compile=False)
229
- rnn_fr_en = keras.models.load_model(dataPath+"/seq2seq_rnn-model-fr-en.h5", compile=False)
230
  rnn_en_fr.compile(optimizer="rmsprop", loss="sparse_categorical_crossentropy", metrics=["accuracy"])
231
  rnn_fr_en.compile(optimizer="rmsprop", loss="sparse_categorical_crossentropy", metrics=["accuracy"])
232
 
@@ -271,7 +271,7 @@ def init_dl_identifier():
271
  lan_identified = [lan_to_language[l] for l in list_lan]
272
  label_encoder.fit(list_lan)
273
  merge = Merge(dataPath+"/dl_id_lang_split", dataPath, "dl_tiktoken_id_language_model.h5").merge(cleanup=False)
274
- dl_model = keras.models.load_model(dataPath+"/dl_tiktoken_id_language_model.h5", compile=False)
275
 
276
  if (dl_model is not None): print("dl_model OK")
277
  else: print("dl_model vide")
 
225
 
226
  merge = Merge( dataPath+"/rnn_en-fr_split", dataPath, "seq2seq_rnn-model-en-fr.h5").merge(cleanup=False)
227
  merge = Merge( dataPath+"/rnn_fr-en_split", dataPath, "seq2seq_rnn-model-fr-en.h5").merge(cleanup=False)
228
+ rnn_en_fr = keras.models.load_model(dataPath+"/seq2seq_rnn-model-en-fr.h5") # , compile=False)
229
+ rnn_fr_en = keras.models.load_model(dataPath+"/seq2seq_rnn-model-fr-en.h5") # , compile=False)
230
  rnn_en_fr.compile(optimizer="rmsprop", loss="sparse_categorical_crossentropy", metrics=["accuracy"])
231
  rnn_fr_en.compile(optimizer="rmsprop", loss="sparse_categorical_crossentropy", metrics=["accuracy"])
232
 
 
271
  lan_identified = [lan_to_language[l] for l in list_lan]
272
  label_encoder.fit(list_lan)
273
  merge = Merge(dataPath+"/dl_id_lang_split", dataPath, "dl_tiktoken_id_language_model.h5").merge(cleanup=False)
274
+ dl_model = keras.models.load_model(dataPath+"/dl_tiktoken_id_language_model.h5") #, compile=False)
275
 
276
  if (dl_model is not None): print("dl_model OK")
277
  else: print("dl_model vide")