How to use tfjs-node with libtensorflow that is built from source

假如想象 提交于 2019-12-11 01:08:55

问题


I see that it is possible to use libtensorflow that is built from source, as mentioned in the README https://github.com/tensorflow/tfjs-node#optional-build-libtensorflow-from-tensorflow-source

I have successfully built from source, but I don't know how to let tfjs-node use this custom built version, instead of the pre-built one.


回答1:


I found that the following workaround seems to work:

Copy the file bazel-bin/tensorflow/libtensorflow.so from the tensorflow source directory to replace node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow.so inside your project.

Hopefully there is a better way to do npm install such that there is no need to download the pre-compiled version.



来源:https://stackoverflow.com/questions/52887109/how-to-use-tfjs-node-with-libtensorflow-that-is-built-from-source

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!