google-deepmind / kinetics-i3d

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

Trouble saving I3d features #86

Open GayatriPurandharT opened 5 years ago

GayatriPurandharT commented 5 years ago

In evaluate_sample.py, the return value of InceptionI3d is model_logits. So are these my I3d features? If yes, how can I save the 'model_logits' ? I tried to convert to numpy array and save in .npy format. But that doesn't seem right as I get this error: NotImplementedError: Cannot convert a symbolic Tensor (RGB/inception_i3d/Mean:0) to a numpy array. Can I get some help? Thanks a lot.

ed-fish commented 4 years ago

Both the logits and the softmax outputs will be tensors. If using latest version of TensorFlow in eager mode (default) you can convert them to numpy arrays by using model_logits.numpy()

ed-fish commented 4 years ago

https://stackoverflow.com/questions/34097281/how-can-i-convert-a-tensor-into-a-numpy-array-in-tensorflow/56554855#56554855