hello_tf_c_api
1.0.0

مثال على كيفية تشغيل TensorFlow Lib C API على Windows و Linux و MacOS (Darwin).
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 أي الإصدار الذي تحتاجه من المصادر ، مع دعم وحدة المعالجة المركزية أو GPU.
link_directories(yourpath/to/tensorflow) # path to tensorflow lib
... # other
target_link_libraries(<target> <PRIVATE|PUBLIC|INTERFACE> tensorflow)
"Project"-> "Properties"-> خصائص التكوين "->" Linker "->" تبعيات إضافية "وأضف مسارًا إلى TensorFlow.lib كخط التالي.
تأكد من أن TensorFlow.dll في دليل الإخراج (افتراضيًا ، يتم تصحيح الإصدار تحت مجلد مشروعك) أو إما في الدليل الموجود بواسطة متغير البيئة ٪ ٪.
لإنشاء ملف graph.pb ، يأخذ حاجة الرسم البياني تعريفًا للرسم البياني ومجموعة من نقاط التفتيش وتجميدها معًا في ملف واحد.