{"id":19028680,"url":"https://github.com/neargye/hello_tf_c_api","last_synced_at":"2025-04-05T00:09:57.300Z","repository":{"id":50731928,"uuid":"132614643","full_name":"Neargye/hello_tf_c_api","owner":"Neargye","description":"Neural Network TensorFlow C API","archived":false,"fork":false,"pushed_at":"2024-05-15T21:11:12.000Z","size":14635,"stargazers_count":470,"open_issues_count":5,"forks_count":135,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-03-28T23:09:04.600Z","etag":null,"topics":["api","c","cpp","deep-learning","deep-neural-networks","machine-learning","neural-network","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Neargye.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["paypal.me/Neargye","btc.com/btc/address/bc1qzevldln8tqz5xf4lyufu9msgl7t97xstth9zq8","etherscan.io/address/0xbb42fdef9204fa6f3d535d202b088dee35fcbd31"],"liberapay":"neargye"}},"created_at":"2018-05-08T13:41:02.000Z","updated_at":"2025-03-18T05:50:37.000Z","dependencies_parsed_at":"2024-11-08T21:12:04.522Z","dependency_job_id":"98035f1c-69d3-41c9-9608-1ca8a867bd77","html_url":"https://github.com/Neargye/hello_tf_c_api","commit_stats":{"total_commits":138,"total_committers":2,"mean_commits":69.0,"dds":0.007246376811594235,"last_synced_commit":"51516101cf59408a6bb456f7e5f3c6628e327b3a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neargye%2Fhello_tf_c_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neargye%2Fhello_tf_c_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neargye%2Fhello_tf_c_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neargye%2Fhello_tf_c_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Neargye","download_url":"https://codeload.github.com/Neargye/hello_tf_c_api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266565,"owners_count":20910836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","c","cpp","deep-learning","deep-neural-networks","machine-learning","neural-network","tensorflow"],"created_at":"2024-11-08T21:12:01.021Z","updated_at":"2025-04-05T00:09:57.282Z","avatar_url":"https://github.com/Neargye.png","language":"C++","funding_links":["paypal.me/Neargye","btc.com/btc/address/bc1qzevldln8tqz5xf4lyufu9msgl7t97xstth9zq8","etherscan.io/address/0xbb42fdef9204fa6f3d535d202b088dee35fcbd31","https://liberapay.com/neargye"],"categories":[],"sub_categories":[],"readme":"# Example TensorFlow C API\n\n![Example TensorFlow C API Logo](logo.png)\n\nExample how to run TensorFlow lib C API on Windows, Linux and macOS(Darwin).\n\n## [Example](src/)\n\n* [Hello TF](src/hello_tf.cpp)\n* [Load graph](src/load_graph.cpp)\n* [Create Tensor](src/create_tensor.cpp)\n* [Allocate Tensor](src/allocate_tensor.cpp)\n* [Run session](src/session_run.cpp)\n* [Interface](src/interface.cpp)\n* [Tensor Info](src/tensor_info.cpp)\n* [Graph Info](src/graph_info.cpp)\n* [Image processing](https://github.com/Xonxt/hello_tf_c_api/blob/master/src/image_example.cpp)\n\n## Build example\n\n### Windows\n\n```text\ngit clone --depth 1 https://github.com/Neargye/hello_tf_c_api\ncd hello_tf_c_api\nmkdir build\ncd build\ncmake -G \"Visual Studio 15 2017\" -A x64 ..\ncmake --build . --config Debug\n```\n\n### Linux\n\n```text\ngit clone --depth 1 https://github.com/Neargye/hello_tf_c_api\ncd hello_tf_c_api\nmkdir build\ncd build\ncmake -G \"Unix Makefiles\" ..\ncmake --build .\n```\n\n### macOS(Darwin)\n\n```text\ngit clone --depth 1 https://github.com/Neargye/hello_tf_c_api\ncd hello_tf_c_api\nmkdir build\ncd build\ncmake -G \"XCode\" ..\ncmake --build .\n```\n\n### Remarks\n\n* 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.\n* The tensorflow in the repository is compiled in x64 mode. Make sure that project target 64-bit platforms.\n* Make sure that the tensorflow lib is in Output Directory or either in the directory contained by the %PATH% environment variable.\n\n## Get tensorflow lib\n\nFor x64 CPU, you can download the tensorflow.so, tensorflow.dll and tensorflow.lib from https://www.tensorflow.org/install/lang_c.\n\nOr build lib which version you need from the sources, with CPU or GPU support.\n\n### Link tensorflow lib\n\n#### CMakeLists.txt\n\n```text\nlink_directories(yourpath/to/tensorflow) # path to tensorflow lib\n... # other\ntarget_link_libraries(\u003ctarget\u003e \u003cPRIVATE|PUBLIC|INTERFACE\u003e tensorflow)\n```\n\n#### Visual Studio\n\n\"Project\"-\u003e\"Properties\"-\u003eConfiguration Properties\"-\u003e\"Linker\"-\u003e\"Additional Dependencies\" and add path to your tensorflow.lib as a next line.\n\nMake 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.\n\n### [Here’s an example how prepare models](doc/prepare_models.md)\n\nTo generated the graph.pb file need takes a graph definition and a set of checkpoints and freezes them together into a single file.\n\n### [Here’s an example how create tensorflow.lib file from tensorflow.dll for windows](doc/create_lib_file_from_dll_for_windows.md)\n\n### __Few articles with details__\n\n* https://www.tensorflow.org/install/lang_c\n* https://medium.com/@vladislavsd/undocumented-tensorflow-c-api-b527c0b4ef6\n* https://medium.com/analytics-vidhya/deploying-tensorflow-2-1-as-c-c-executable-1d090845055c\n\n\n## Licensed under the [MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneargye%2Fhello_tf_c_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneargye%2Fhello_tf_c_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneargye%2Fhello_tf_c_api/lists"}