All Projects → Neargye → Hello_tf_c_api

Neargye / Hello_tf_c_api

Licence: mit
Neural Network TensorFlow C API

Programming Languages

c
50402 projects - #5 most used programming language
cpp
1120 projects

Projects that are alternatives of or similar to Hello tf c api

Bmw Yolov4 Inference Api Cpu
This is a repository for an nocode object detection inference API using the Yolov4 and Yolov3 Opencv.
Stars: ✭ 180 (-53.61%)
Mutual labels:  api, deep-neural-networks
Realtime object detection
Plug and Play Real-Time Object Detection App with Tensorflow and OpenCV. No Bugs No Worries. Enjoy!
Stars: ✭ 260 (-32.99%)
Mutual labels:  api, deep-neural-networks
Bmw Tensorflow Inference Api Gpu
This is a repository for an object detection inference API using the Tensorflow framework.
Stars: ✭ 277 (-28.61%)
Mutual labels:  api, deep-neural-networks
First Steps Towards Deep Learning
This is an open sourced book on deep learning.
Stars: ✭ 376 (-3.09%)
Mutual labels:  deep-neural-networks
Villus
🏎 A tiny and fast GraphQL client for Vue.js
Stars: ✭ 378 (-2.58%)
Mutual labels:  api
Lib
Autocode CLI and standard library tooling
Stars: ✭ 3,773 (+872.42%)
Mutual labels:  api
Taso
The Tensor Algebra SuperOptimizer for Deep Learning
Stars: ✭ 391 (+0.77%)
Mutual labels:  deep-neural-networks
Rmdl
RMDL: Random Multimodel Deep Learning for Classification
Stars: ✭ 375 (-3.35%)
Mutual labels:  deep-neural-networks
Para
Open source back-end server for web, mobile and IoT. The backend for busy developers. (self-hosted or hosted)
Stars: ✭ 389 (+0.26%)
Mutual labels:  api
Figma To Google Slides
Convert Figma frames into a Google Slides presentation 🍭
Stars: ✭ 385 (-0.77%)
Mutual labels:  api
Slackapidoc
Documentation of undocumented Slack API methods
Stars: ✭ 380 (-2.06%)
Mutual labels:  api
Neteasecloudmusicapi
网易云音乐 Node.js API service
Stars: ✭ 22,297 (+5646.65%)
Mutual labels:  api
Awesome Ocelot
A curated list of awesome ocelot books, courses, trainings, conference talks, blogs and most inspiring open source contributors
Stars: ✭ 386 (-0.52%)
Mutual labels:  api
Flow Forecast
Deep learning PyTorch library for time series forecasting, classification, and anomaly detection (originally for flood forecasting).
Stars: ✭ 368 (-5.15%)
Mutual labels:  deep-neural-networks
Jekyll
Jekyll-based static site for The Programming Historian
Stars: ✭ 387 (-0.26%)
Mutual labels:  api
Feather
Feather is a modern Swift-based content management system powered by Vapor 4.
Stars: ✭ 374 (-3.61%)
Mutual labels:  api
Rack App
minimalist framework for building rack applications
Stars: ✭ 389 (+0.26%)
Mutual labels:  api
Teamvision
Teamvision软件工程协作工具
Stars: ✭ 380 (-2.06%)
Mutual labels:  api
Memento
Memento is a development-only tool that caches HTTP calls once they have been executed.
Stars: ✭ 380 (-2.06%)
Mutual labels:  api
Polr
🚡 A modern, powerful, and robust URL shortener
Stars: ✭ 4,147 (+968.81%)
Mutual labels:  api

Example TensorFlow C API

Example TensorFlow C API logo

Branch Linux/OSX Windows License Codacy
master Build Status Build status License Codacy Badge

Example how to run TensorFlow lib C API on Windows, Linux and macOS(Darwin).

Example

Build example

Windows

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

Linux

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 .

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 "XCode" ..
cmake --build .

Remarks

  • After the build, you can find the TensorFlow lib in the folder hello_tf_c_api/tensorflow/lib, and header in hello_tf_c_api/tensorflow/include.
  • The tensorflow in the repository is compiled in x64 mode. Make sure that project target 64-bit platforms.
  • Make sure that the tensorflow lib is in Output Directory or either in the directory contained by the %PATH% environment variable.

Get tensorflow lib

For x64 CPU, you can download the tensorflow.so, tensorflow.dll and tensorflow.lib from https://github.com/neargye-forks/tensorflow/releases.

Or build lib which version you need from the sources, with CPU or GPU support.

Link tensorflow lib

CMakeLists.txt

link_directories(yourpath/to/tensorflow) # path to tensorflow lib
... # other
target_link_libraries(<target> <PRIVATE|PUBLIC|INTERFACE> tensorflow)

Visual Studio

"Project"->"Properties"->Configuration Properties"->"Linker"->"Additional Dependencies" and add path to your tensorflow.lib as a next line.

Make sure that the tensorflow.dll is in Output Directory (by default, this is Debug\Release under your project's folder) or either in the directory contained by the %PATH% environment variable.

Here’s an example how prepare models

To generated the graph.pb file need takes a graph definition and a set of checkpoints and freezes them together into a single file.

Here’s an example how create tensorflow.lib file from tensorflow.dll for windows

Few articles with details

Licensed under the MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].