~xdavidwu/xdavidwu.link

eafa2b89a7e17745874cea2a6c1de9bf1e7622fc — xdavidwu 5 years ago e75c924
Update 2019-01-06-tensorflow-cpp.md
1 files changed, 18 insertions(+), 1 deletions(-)

M _posts/2019-01-06-tensorflow-cpp.md
M _posts/2019-01-06-tensorflow-cpp.md => _posts/2019-01-06-tensorflow-cpp.md +18 -1
@@ 30,4 30,21 @@ sudo cp bazel-genfiles/tensorflow/include/. /usr/local/include/ -r
```
sudo ln /usr/local/include/external/com_google_absl/absl /usr/local/include/absl -s
sudo ln /usr/local/include/external/protobuf_archive/src/google /usr/local/include/google -s
```
\ No newline at end of file
```

libraries 的部份:

```
sudo cp bazel-bin/tensorflow/libtensorflow_cc.so /usr/local/lib/
sudo cp bazel-bin/tensorflow/libtensorflow_framework.so /usr/local/lib/
```

編譯:

```
g++ foo.cpp -ltensorflow_framework -ltensorflow_cc
```

absl 的 header 貌似在 C++17 下會把 absl::string_view 用 std::basic_string_view 實做

可能會造成 link 時有用字串當參數的函式找不到 例如 Conv2D 的 constructor
\ No newline at end of file