You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.7 kB

6 years ago
6 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. TensorFlow.NET pack all required libraries in architecture-specific assemblies folders per NuGet standard.
  2. Here are some pre-built TensorFlow binaries you can use for each platform:
  3. - Linux
  4. - CPU-only: https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.13.1.tar.gz
  5. - GPU-enabled: https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-1.13.1.tar.gz
  6. - Mac: https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-darwin-x86_64-1.13.1.tar.gz
  7. - Windows: https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-1.13.1.zip
  8. ### Run in Linux
  9. `Install-Package TensorFlow.NET`
  10. Download Linux pre-built library and unzip `libtensorflow.so` and `libtensorflow_framework.so` into current running directory.
  11. ### Run in Mac OS
  12. ### Build from source for Windows
  13. https://www.tensorflow.org/install/source_windows
  14. pacman -S git patch unzip
  15. 1. Build static library
  16. `bazel build --config=opt //tensorflow:libtensorflow.so`
  17. 2. Build pip package
  18. `bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package`
  19. 3. Generate pip installation file
  20. `bazel-bin\tensorflow\tools\pip_package\build_pip_package C:/tmp/tensorflow_pkg`
  21. 4. Install from local wheel file.
  22. `pip install C:/tmp/tensorflow_pkg/tensorflow-1.13.0-cp36-cp36m-win_amd64.whl`
  23. ### Export more APIs
  24. Add more api to `c_api.h`
  25. ```c++
  26. TF_CAPI_EXPORT extern void AddControlInput(TF_Graph* graph, TF_Operation* op, TF_Operation* input);
  27. TF_CAPI_EXPORT extern void UpdateEdge(TF_Graph* graph, TF_Output new_src, TF_Input dst, TF_Status* status);
  28. TF_CAPI_EXPORT extern void RemoveAllControlInputs(TF_Graph* graph, TF_Operation* op);
  29. ```