antoine77340 / Youtube-8M-WILLOW

Kaggle Youtube 8M WILLOW approach
Apache License 2.0
465 stars 165 forks source link

Prediction results are the same in inference #18

Open gantians opened 6 years ago

gantians commented 6 years ago

I just use the pretrained model to predict my own data without training. The model is NetVLADModelLF.

I only extract rgb features on my own data and construct input tensor.

for i in xrange(data_num): 
        feature = data[i]
        pad_feature = np.zeros([300, 1152])
        pad_feature[0, :1024] = feature
        video_batch = pad_feature[np.newaxis, :, :].astype(np.float32)
        num_frames_batch = np.array([1], dtype=np.int32)
        predictions = sess.run([predictions_tensor],
                        feed_dict={input_tensor: video_batch, num_frames_tensor: num_frames_batch})

The predictions are the same. I tried to construct 300 frame input but the problems remains.

Did i do the inference correctly?