Hello,
I have a question about a portion of the codes in the HW C3_W1_Assignment. In Exercise 02 Implement Data Generator, there are these lines:
if stop:
break;
# Update the start index for positive data
# so that it's n_to_take positions after the current pos_index
pos_index += n_to_take
# Update the start index for negative data
# so that it's n_to_take positions after the current neg_index
neg_index += n_to_take
# Get the max tweet length (the length of the longest tweet)
# (you will pad all shorter tweets to have this length)
max_len = max([len(t) for t in batch])
My question is, why update pos_index and neg_index as such above? The reason I thought might be that this prevents not having enough batch samples towards the end of data_pos and data_neg cycle. But if this is the case, then it means the algorithm is skipping data samples in the middle too.
Thanks,
John