Closed xiaopyyy closed 7 years ago
I think the predefined parameters in target_params.pkl is just random initialization, to ensure that every time use the same initial parameters.
if you want to use your own parameters, just import pg_bleu/target_lstm.py, which is written by random initialization every time. In this way, if you have different global parameters such as EMB_DIM, just give different parameters to TARGET_LSTM() class.
====UPDATE: There is mistake in above suggestions. Actually, TARGET_LSTM is random initialized from target_params.pkl, but it is regarded as the oracle and its parameters will not be updated. The sequence generated by TARGET_LSTM is thought real data. And the generator (model.lstm class) is trained to learn the params in TARGET_LSTM.
Hello:
I've imported "target_lstm.py" from pg_bleu folder (after renaming original?) Should a new .pkl be created that refers to the new text file save/real_data.txt ?
The error below is generated.
Traceback (most recent call last):
File "sequence_gan.py", line 257, in
Your paper mentions the generation of poetry. Could you please explain the steps required to repeat this process?
Cheers
@GenTxt I suggest you read the code by yourself, this is a easy question.
After you imported "target_lstm.py" from pg_bleu folder, there is no need to give the class target_params.
Thanks for the updated information. Could you explain how to get the parameters in TARGET_LSTM for new training dataset?
Hello eecrazy:
Hmm ... maybe not such an easy question after all? Your own reply from 21 days ago contains an UPDATE which follows your mistaken suggestion.
What I was hoping to see posted was simple, single line terminal instructions for training and generation which are common to most deep learning repos posted on github.
The classic is, as you know, karpathy's which goes into wonderful detail concerning the setting up of a training environment that would be new to many programmers (torch/lua). His detailed instructions worked perfectly and opened the door to this platform. His lua code, and the improved versions that followed, are EASY to edit and test. The same can be said for most tensorflow/python versions.
I wasn't looking for the same level of detail but a few one liners would go a long way to help test the output quality of this code compared to the above lstm versions.
@xiaopppy Actually, there is no TARGET_LSTM for new training dataset. please refer to this issue: https://github.com/LantaoYu/SeqGAN/issues/3
@GenTxt In this code repos, not like karpathy's char-rnn, you must totally understand the code and edit it by yourself to fit to your own dataset. Because it is not written so clean to be a tool-code-base.
I noticed that there is a class named TARGET_LSTM which uses the predefined parameters from target_params.pkl. My question is that if I use my own data and different global parameters, such as EMB_DIM, HIDDEN_DIM, SEQ_LENGTH.., how to obtain the parameters for TARGET_LSTM? What is the usage of TARGET_LSTM?