{"id":24042223,"url":"https://github.com/hypersolution1/libtf","last_synced_at":"2026-05-02T17:32:51.246Z","repository":{"id":82611663,"uuid":"207331048","full_name":"hypersolution1/libtf","owner":"hypersolution1","description":"This library performs non-blocking inference on tensorflow frozen model. Based on the Tensorflow C API.","archived":false,"fork":false,"pushed_at":"2019-09-20T19:55:18.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T08:29:26.151Z","etag":null,"topics":["nodejs","npm-package","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hypersolution1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-09-09T14:38:14.000Z","updated_at":"2019-09-20T19:55:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"977ab709-77e2-4320-8063-c2273e7aa587","html_url":"https://github.com/hypersolution1/libtf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hypersolution1/libtf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypersolution1%2Flibtf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypersolution1%2Flibtf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypersolution1%2Flibtf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypersolution1%2Flibtf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hypersolution1","download_url":"https://codeload.github.com/hypersolution1/libtf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypersolution1%2Flibtf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273879552,"owners_count":25184427,"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","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["nodejs","npm-package","tensorflow"],"created_at":"2025-01-08T22:37:30.988Z","updated_at":"2026-05-02T17:32:51.218Z","avatar_url":"https://github.com/hypersolution1.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libtf\n\nThis library performs non-blocking inference on tensorflow frozen model. Based on the Tensorflow C API.\n\n## Dependency\n\nInstall libtensorflow from https://www.tensorflow.org/install/lang_c\n\n## Install\n\n```bash\nnpm i libtf\n```\n\n## Usage\n\n```js\nvar TFModel = require('libtf')\n\n\nvar model = TFModel() // To be called for each desired Tensorflow Session\n\n// With options:\n// var model = TFModel({\n//   'allow_growth': false,       // If true, overrides gpu_memory_fraction\n//   'gpu_memory_fraction': 1.0,\n// })\n\n;(async () =\u003e {\n\n  await model.load('./model.pb') // Session is created and model loaded\n  var input = {\n    \"isTrainingflag\": false,  // Boolean\n    \"dropout_keep_prob\": {    // Scalar\n      \"dim\": [1],\n      \"data\": new Float32Array([1]),\n    },\n    \"inputs/enc_in\": {        // Tensor, data must be of type Float32Array or UInt8Array\n      \"dim\": [1,32],\n      \"data\": new Float32Array(1*32),\n    },\n  }\n  var result = await model.execute(input, [\"dense_1/Softmax\"]) // arg1 is input, arg2 is an array of output names\n\n  console.log(result)\n\n// Output:\n// { 'dense_1/Softmax': // Output name\n//   { dim: [ 1, 62 ],\n//      data:\n//       Float32Array [ ... ] \n//   } \n// }\n\n\n})()\n.catch(function (err) {\n  console.log(err)\n})\n\n\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypersolution1%2Flibtf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhypersolution1%2Flibtf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypersolution1%2Flibtf/lists"}