Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Tensorflow support #802
Set of algorithms to support Tensorflow C API inside Essentia.
The Algorithm TensorflowPredict accepts Tensorflow graphs in Protobuff format.
Streaming prediction is also supported with the helper functions: VectorRealToTensor and TensorToPool. TensorflowPredict returns a stream of pools that can be converted to a stream of frames with the helper functions PoolToTensor and TensorToVectorReal.
This PR introduces Boost::multi_array as the base type for tensors in Essentia.
Aux function added to handle streams of arraynd and pools Added support for arraynd in poolstorage
other stuff: - move from stream of pools to stream of singlePools - change tensor related algos to receive single token - improve tensor related algos doc
explanation: - this way `Tensor` alias can be used for other types - hardcoded dim is more consistant with boost::multi_array - rename Tensor::fromPythonRef to fromPythonCopy
- remove unuseful `timeAxis` param - VectorRealToTensor: add Exceptions - TensorFlowPredict: improve output generation - TensorFlowPredict: small style changes
This was copied from the following makefile: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/makefile/Makefile
- prevent re-downloading dependencies - add -lrt flag as needed for absl libs. - modify Makefile to prevent compiling example
generate_pc.py locates the python package for TensorFlow and creates a pkg-config file to link agaist the .so libs on it. TODO: setup_tensorflow.sh should run previous script and put the .pc file on an appropiate place. Also make sure that Python is able to locate .so libs on run time.