video_to_sequence
video_to_sequence copied to clipboard
ValueError: Cannot feed value of shape (1, 61, 4096) for Tensor u'Placeholder:0', which has shape '(1, 80, 4096)'
When I tested the trained model, this error arose.
I think this error occurs when video sequence is shorter than 80. Is there someway to use zero-padding to get the same shape (1, 80, 4096) ?
It is solved by modifying line 319 and 320
video_feat = np.load(video_feat_path)[None,...]
video_mask = np.ones((video_feat.shape[0], video_feat.shape[1]))
to :
if video_feat.shape[1] == n_frame_step:
video_mask = np.ones((video_feat.shape[0], video_feat.shape[1]))
else:
shape_templete = np.zeros(shape=(1, n_frame_step, 4096), dtype=float )
shape_templete[:video_feat.shape[0],:video_feat.shape[1],:video_feat.shape[2]] = video_feat
video_feat = shape_templete
video_mask = np.ones((video_feat.shape[0], n_frame_step))
Faced the same problem and the above solution solved it. Cheers :)
Hi, In you forked repositories, how to get train_sents_gt.txt and test_sents_gt.txt, val_sents_gt.txt
If i remember correctly it pulled the train and test ground truth from the corpus csv file ( from MSVD). I dont remember manually specifying the train and test set ground truth files.
@meteora9479 Hi, In you forked repositories ,how to get train_sents_gt.txt and test_sents_gt.txt,vali_sents_gt.txt?