ierhon commited on
Commit
a8ae0da
·
1 Parent(s): a88b388

Use model_settings.py

Browse files
Files changed (1) hide show
  1. train.py +1 -1
train.py CHANGED
@@ -5,6 +5,7 @@ from keras.models import Sequential
5
  from keras.layers import Embedding, Dense, Dropout, Flatten, PReLU
6
  from keras.preprocessing.text import Tokenizer
7
  from keras_self_attention import SeqSelfAttention, SeqWeightedAttention
 
8
 
9
 
10
  with open("dataset.json", "r") as f: # TODO: move the outputs into a separate file, so it would be "key": 0, "key2": 1 etc
@@ -14,7 +15,6 @@ dset_size = len(dset)
14
  tokenizer = Tokenizer() # a tokenizer is a thing to split text into words, it might have some other stuff like making all the letters lowercase, etc.
15
  tokenizer.fit_on_texts(list(dset.keys()))
16
 
17
- emb_size = 128 # how big are the word vectors in the input (how much information can be fit into one word)
18
  vocab_size = len(tokenizer.get_vocabulary())
19
  inp_len = 10 # limit of the input length, after 10 words the
20
 
 
5
  from keras.layers import Embedding, Dense, Dropout, Flatten, PReLU
6
  from keras.preprocessing.text import Tokenizer
7
  from keras_self_attention import SeqSelfAttention, SeqWeightedAttention
8
+ from model_settings import *
9
 
10
 
11
  with open("dataset.json", "r") as f: # TODO: move the outputs into a separate file, so it would be "key": 0, "key2": 1 etc
 
15
  tokenizer = Tokenizer() # a tokenizer is a thing to split text into words, it might have some other stuff like making all the letters lowercase, etc.
16
  tokenizer.fit_on_texts(list(dset.keys()))
17
 
 
18
  vocab_size = len(tokenizer.get_vocabulary())
19
  inp_len = 10 # limit of the input length, after 10 words the
20