diff --git a/model.py b/model.py index 6163889..a82318e 100644 --- a/model.py +++ b/model.py @@ -265,7 +265,7 @@ def train(): current_video_masks[ind][:len(current_feats_vals[ind])] = 1 current_captions = current_batch['Description'].values - current_caption_ind = map(lambda cap: [wordtoix[word] for word in cap.lower().split(' ')[:-1] if word in wordtoix], current_captions) + current_caption_ind = map(lambda cap: [wordtoix[word] for word in cap.lower().split(' ') if word in wordtoix], current_captions) current_caption_matrix = sequence.pad_sequences(current_caption_ind, padding='post', maxlen=n_frame_step-1) current_caption_matrix = np.hstack( [current_caption_matrix, np.zeros( [len(current_caption_matrix),1]) ] ).astype(int)