TODOs

parent b20b4f60
......@@ -1353,6 +1353,7 @@ class TranslationDataset(CachedDataset2):
score = 0
for word in cur_seq:
score -= math.log(num_words[word])
# TODO norm by seq len
cur_seq_difficulty.append(score)
elif mode == 'neg_log_likelihood':
# neg log likelihood should be 0 <= x < infity; the bigger x the easier the sentence -> reverse order
......@@ -1451,6 +1452,7 @@ class TranslationDataset(CachedDataset2):
self._seq_order = self._seq_order[:curriculum_learning['seq_order_len']]
self._num_seqs = len(self._seq_order)
# TODO sort them with laplace
# TODO does it make a difference if I change epochsplit in the config?
if 'n_times_per_slice' in curriculum_learning:
self._seq_order = numpy.tile(self._seq_order, curriculum_learning['n_times_per_slice'])
self._num_seqs = len(self._seq_order)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment