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 2.4 kB

6 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. TensorFlow.NET pack all required libraries in architecture-specific assemblies folders per NuGet standard [Deprecated] .
  2. We changed to use `Microsoft.ML.TensorFlow.Redist` to maintain the TensorFlow library.
  3. ### Download manually
  4. Here are some pre-built TensorFlow binaries you can use for each platform:
  5. - Linux
  6. - CPU-only: https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.14.0.tar.gz
  7. - GPU-enabled: https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-1.14.0.tar.gz
  8. - Mac: https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-darwin-x86_64-1.14.0.tar.gz
  9. - Windows
  10. - CPU-only: https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-1.14.0.zip
  11. - GPU-enabled: https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-windows-x86_64-1.14.0.zip
  12. ### Run in Linux
  13. `Install-Package TensorFlow.NET`
  14. Download Linux pre-built library and unzip `libtensorflow.so` and `libtensorflow_framework.so` into current running directory.
  15. To run image recognition in Linux, please ensure some prerequisite libraries is install.
  16. ```shell
  17. sudo apt install libc6-dev
  18. sudo apt install libgdiplus
  19. ```
  20. More information about [System.Drawing on Linux](<https://www.hanselman.com/blog/HowDoYouUseSystemDrawingInNETCore.aspx>).
  21. ### Run in Mac OS
  22. ### GPU Tensorflow for windows
  23. Before running verify you installed CUDA and cuDNN
  24. ### Build from source for Windows
  25. https://www.tensorflow.org/install/source_windows
  26. pacman -S git patch unzip
  27. 1. Build static library
  28. `bazel build --config=opt //tensorflow:libtensorflow.so`
  29. 2. Build pip package
  30. `bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package`
  31. 3. Generate pip installation file
  32. `bazel-bin\tensorflow\tools\pip_package\build_pip_package C:/tmp/tensorflow_pkg`
  33. 4. Install from local wheel file.
  34. `pip install C:/tmp/tensorflow_pkg/tensorflow-1.14.0-cp36-cp36m-win_amd64.whl`
  35. ### Export more APIs
  36. Add more api to `c_api.h`
  37. ```c++
  38. TF_CAPI_EXPORT extern void AddControlInput(TF_Graph* graph, TF_Operation* op, TF_Operation* input);
  39. TF_CAPI_EXPORT extern void UpdateEdge(TF_Graph* graph, TF_Output new_src, TF_Input dst, TF_Status* status);
  40. TF_CAPI_EXPORT extern void RemoveAllControlInputs(TF_Graph* graph, TF_Operation* op);
  41. ```