Closed songpipi closed 5 years ago
Sorry about the naming. The key in input_pipeline.py is a noised version of the sentence. You may refer to https://github.com/fengyang0317/unsupervised_captioning/blob/master/input_pipeline.py#L82
The objects are named classes https://github.com/fengyang0317/unsupervised_captioning/blob/master/input_pipeline.py#L60
I'm still confused, e.g, a sentence:
ipdb> sess.run(sentence)
array([ 1, 0, 29, 108, 42, 95, 4, 35, 5, 0, 97, 96, 3,
2, 0, 0, 0, 0, 0], dtype=int32)
after parse_sentence function , its noisy version :
ipdb> sess.run(key)
array([ 0, 108, 29, 95, 35, 4, 97, 0, 96, 2, 3, 0, 0,
0, 0, 2], dtype=int32)
but why the 'sentence' completely unrelated to the' key ' at corresponding batch in input_pipeline.py?
They are related somehow. You should read the paper about adding the noise or read the controlled_shuffle and random_drop functions.
OK, I'll take a closer look. Thank you very much for your friendly!
In process_descriptions.py , the 'key' is the intersection between sentence and category_name. But in input_pipeline.py, the 'key' and 'sentence' is not such. in process_descriptions.py :
in input_pipeline.py
It seems that the 'sentence' completely unrelated to the' key '. Is that reasonable? and why the 'key' is different in the above two file?