Open maral1988 opened 5 years ago
You could comment out line 144 because itag.h5 is used to save the result of training, and line 141 model.fit()
will create itag.h5.
And maybe you should learn more about Keras.
Best wishes
Thanks. Yes I'm new to keras and deep Learning. Now there is an error in this line : prs, weights, pgen, en_st1, en_st2, en_st3 = decoder_model.predict([current, full_context, en_st1, en_st2, en_st3]) in itag.py . error: InvalidArgumentError (see above for traceback): indices[0,0] = 20705 is not in [0, 20705) Do you any idea about it? thank you very much
And this the output before training:
1 28 17.90344827586207
2 2 2.0 unique_words: 1511 common: 0 unique_tags: 0 index: 1514 tags index: 1514 shared_index: 1514 tag from : 1514 sfs end: 1514 sfs start: 1515 Train on 234 samples, validate on 27 samples Epoch 1/60
Well, you used your own data, so you should update parameters(line16-line38).
ALL_WORDS : total amount of words and tags WORD_VOCAB: amount of words in texts LABEL_VOCAB: amount of tags DE_TOKENS = LABEL_VOCAB - 2 # remove pad and start tokens from file_vocab MAX_WORDS: the max length of texts MAX_LABELS: the max length of tags INDEX_FROM = 3 END_TOKEN : 'sfs end' in the output START_TOKEN: 'sfs start' in the output LABEL_FROM: 'tag from' in the output GRU_SIZE = 256 ATTENTION_SIZE = 256 EMBEDDING_DIM = 100 KEEP_PROB = 0.1 NUM_EPOCHS = 60 BATCH_SIZE = 100 TOPIC_NUM = 100 BEAM_SIZE = 3 MAX_LENGTH = 5
That's ok thanks
I got confused about some of theses parameters. could you please calulate these parameters for this simple example ?
text1 : I love python #python text2 : python is wonderful #python text3 : deep learning is amazing #deep_learning
thank you very very very much
Hi I am trying to run itag on windows . after gathering and preproccessing data Now I run itag.py but there is a runtime error :
should I create h5 file first? thanks