{"id":25774171,"url":"https://github.com/shigekikarita/tfd","last_synced_at":"2025-10-11T19:33:01.246Z","repository":{"id":80354230,"uuid":"260663724","full_name":"ShigekiKarita/tfd","owner":"ShigekiKarita","description":"Tensorflow wrapper for D","archived":false,"fork":false,"pushed_at":"2021-06-15T14:07:00.000Z","size":183,"stargazers_count":32,"open_issues_count":0,"forks_count":2,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-13T21:42:38.636Z","etag":null,"topics":["d","dlang","mir","tensorflow","tfd"],"latest_commit_sha":null,"homepage":null,"language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShigekiKarita.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}},"created_at":"2020-05-02T10:31:24.000Z","updated_at":"2024-11-11T00:51:42.000Z","dependencies_parsed_at":"2023-06-06T05:00:27.515Z","dependency_job_id":null,"html_url":"https://github.com/ShigekiKarita/tfd","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ShigekiKarita/tfd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShigekiKarita%2Ftfd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShigekiKarita%2Ftfd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShigekiKarita%2Ftfd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShigekiKarita%2Ftfd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShigekiKarita","download_url":"https://codeload.github.com/ShigekiKarita/tfd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShigekiKarita%2Ftfd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008424,"owners_count":26084460,"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-10-11T02:00:06.511Z","response_time":55,"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":["d","dlang","mir","tensorflow","tfd"],"created_at":"2025-02-27T05:18:34.327Z","updated_at":"2025-10-11T19:33:01.212Z","avatar_url":"https://github.com/ShigekiKarita.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tfd: tensorflow for D\n\n[![linux](https://github.com/ShigekiKarita/tfd/workflows/linux/badge.svg)](https://github.com/ShigekiKarita/tfd/actions?query=workflow:linux)\n[![windows](https://github.com/ShigekiKarita/tfd/workflows/windows/badge.svg)](https://github.com/ShigekiKarita/tfd/actions?query=workflow:windows)\n[![codecov](https://codecov.io/gh/ShigekiKarita/tfd/branch/master/graph/badge.svg)](https://codecov.io/gh/ShigekiKarita/tfd)\n[![Dub version](https://img.shields.io/dub/v/tfd.svg)](https://code.dlang.org/packages/tfd)\n\n## Installation\n\n- If your project needs only TF C API bindings: `$ dub add tfd:deimos`\n- If your project needs entire tfd packages: `$ dub add tfd`\n\nsee also [Requirements](#requirements)\n\n## Example\n\n[Mir](https://github.com/libmir) is to **tfd** what [NumPy](https://numpy.org) is to [Tensorflow](https://www.tensorflow.org).\n\n```d\n/// tensor add\n\nimport tfd;\nimport mir.ndslice : as, iota;\n\nwith (newGraph)\n{\n  auto i = iota(2, 3, 4).as!float;\n\n  Operation x = placeholder!float(\"x\", 2, 3, 4);\n  Operation two = constant(i);\n  Operation add = x + two;\n\n  Tensor addVal = session.run([add], [x: i.tensor])[0];\n  assert(addVal.sliced!(float, 3) == i * 2);\n}\n```\n\nAnd more:\n- [save/load TF graphs between Python and D](example/graph_import)\n\n## Features\n\n- [x] dpp generated [C API bindings](deimos/tfd)\n- [x] Support `@nogc nothrow`.\n- [x] Setup CI\n- [x] Wrap tensor and session for basic usages (see `tfd.session` unittests).\n- [x] mir.ndslice.Slice `s` \u003c=\u003e tfd.tensor.Tensor `t` integration by `s.tensor`, `t.slicedAs(s)`.\n- [x] [Example](example/graph_import) to save/load TF graphs.\n- [ ] Use [pbd](https://github.com/ShigekiKarita/pbd) to save/load proto files.\n- [ ] Parse `ops.pbtxt` to generate typed ops bindings.\n- [ ] Rewrite C API example with typed bindings.\n- [ ] Implement autograd, and simple training APIs in D.\n- [ ] Support cloud TPU.\n- [ ] Support dip1000.\n\n## Requirements\n\n- [libtensorflow](https://www.tensorflow.org/install/lang_c). Currently, tfd only supports\n  - [Linux CPU v1.15.0](https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.15.0.tar.gz)\n  - [Linux GPU v1.15.0](https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-1.15.0.tar.gz) (Not tested in CI)\n  - [Windows CPU v1.15.0](https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-1.15.0.zip)\n\n## Re-generate bindings\n\ntfd uses [dpp](https://github.com/atilaneves/dpp) to generate bindings from TF C-API. You need `libclang` to run dpp.\n\n```bash\ndub fetch dpp\ndub run dpp -- --preprocess-only --include-path ./download/include \u003ctarget dpp file\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshigekikarita%2Ftfd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshigekikarita%2Ftfd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshigekikarita%2Ftfd/lists"}