google-deepmind / kinetics-i3d

Convolutional neural network model for video classification trained on the Kinetics dataset.
Apache License 2.0
1.75k stars 464 forks source link

How can I apply the first N layers of the model to a video file? #10

Closed rcrespocano closed 7 years ago

rcrespocano commented 7 years ago

Hi all,

I want to use the pre-trained model to process several video files, but I don't want to classify them. I only want to extract the properties of the first N layers (2-3 layers) to see if there are differences between the different video files (they are very similar).

After the prediction function, how can I extract the different outputs of the first layers?

Thank you in advance.

rcrespocano commented 7 years ago

Solved.

rgb_logits, all_endpoints = rgb_model(rgb_input, is_training=False, dropout_keep_prob=1.0) units = sess.run(all_endpoints['Conv3d_1a_7x7'], feed_dict=feed_dict)