hello_tf_c_api
1.0.0

ตัวอย่างวิธีเรียกใช้ tensorflow lib c api บน windows, linux และ macOS (ดาร์วิน)
git clone --depth 1 https://github.com/Neargye/hello_tf_c_api
cd hello_tf_c_api
mkdir build
cd build
cmake -G "Visual Studio 15 2017" -A x64 ..
cmake --build . --config Debug
git clone --depth 1 https://github.com/Neargye/hello_tf_c_api
cd hello_tf_c_api
mkdir build
cd build
cmake -G "Unix Makefiles" ..
cmake --build .
git clone --depth 1 https://github.com/Neargye/hello_tf_c_api
cd hello_tf_c_api
mkdir build
cd build
cmake -G "XCode" ..
cmake --build .
สำหรับ X64 CPU คุณสามารถดาวน์โหลด tensorflow.so, tensorflow.dll และ tensorflow.lib จาก https://www.tensorflow.org/install/lang_c
หรือสร้าง lib เวอร์ชันใดที่คุณต้องการจากแหล่งที่มาด้วยการสนับสนุน CPU หรือ GPU
link_directories(yourpath/to/tensorflow) # path to tensorflow lib
... # other
target_link_libraries(<target> <PRIVATE|PUBLIC|INTERFACE> tensorflow)
"Project"-> "คุณสมบัติ"-> คุณสมบัติการกำหนดค่า "->" linker "->" การพึ่งพาเพิ่มเติม "และเพิ่มพา ธ ไปยัง tensorflow.lib ของคุณเป็นบรรทัดถัดไป
ตรวจสอบให้แน่ใจว่า tensorflow.dll อยู่ในไดเรกทอรีเอาต์พุต (โดยค่าเริ่มต้นนี่คือ debug release ภายใต้โฟลเดอร์ของโครงการของคุณ) หรือในไดเรกทอรีที่อยู่ในตัวแปรสภาพแวดล้อม % Path %
ในการสร้างไฟล์ graph.pb จำเป็นต้องใช้คำจำกัดความของกราฟและชุดของจุดตรวจสอบและค้างไว้ในไฟล์เดียว