{"id":13936842,"url":"https://github.com/cgarciae/tensorbuilder","last_synced_at":"2025-04-10T16:42:45.818Z","repository":{"id":57474129,"uuid":"60119835","full_name":"cgarciae/tensorbuilder","owner":"cgarciae","description":"TensorBuilder is a TensorFlow library enables you to easily create complex deep neural networks by leveraging the phi DSL to help define their structure.","archived":false,"fork":false,"pushed_at":"2017-01-27T21:54:09.000Z","size":2446,"stargazers_count":90,"open_issues_count":2,"forks_count":11,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-24T14:39:04.465Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://cgarciae.gitbooks.io/tensorbuilder/content/","language":"Python","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/cgarciae.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-31T20:07:45.000Z","updated_at":"2025-02-22T15:45:07.000Z","dependencies_parsed_at":"2022-09-12T21:01:21.746Z","dependency_job_id":null,"html_url":"https://github.com/cgarciae/tensorbuilder","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgarciae%2Ftensorbuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgarciae%2Ftensorbuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgarciae%2Ftensorbuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgarciae%2Ftensorbuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cgarciae","download_url":"https://codeload.github.com/cgarciae/tensorbuilder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248252728,"owners_count":21072703,"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":[],"created_at":"2024-08-07T23:03:02.923Z","updated_at":"2025-04-10T16:42:45.793Z","avatar_url":"https://github.com/cgarciae.png","language":"Python","readme":"# Tensor Builder\nTensorBuilder had a mayor refactoring and is now based on [Phi](https://github.com/cgarciae/phi). Updates to the README comming soon!\n\n### Goals\nComming Soon!\n\n## Installation\nTensor Builder assumes you have a working `tensorflow` installation. We don't include it in the `requirements.txt` since the installation of tensorflow varies depending on your setup.\n\n#### From pypi\n```\npip install tensorbuilder\n```\n\n#### From github\nFor the latest development version\n```\npip install git+https://github.com/cgarciae/tensorbuilder.git@develop\n```\n\n## Getting Started\n\nCreate neural network with a [5, 10, 3] architecture with a `softmax` output layer and a `tanh` hidden layer through a Builder and then get back its tensor:\n\n```python\nimport tensorflow as tf\nfrom tensorbuilder import T\n\nx = tf.placeholder(tf.float32, shape=[None, 5])\nkeep_prob = tf.placeholder(tf.float32)\n\nh = T.Pipe(\n  x,\n  T.tanh_layer(10) # tanh(x * w + b)\n  .dropout(keep_prob) # dropout(x, keep_prob)\n  .softmax_layer(3) # softmax(x * w + b)\n)\n```\n\n## Features\nComming Soon!\n\n## Documentation\nComming Soon!\n\n## The Guide\nComming Soon!\n\n## Full Example\nNext is an example with all the features of TensorBuilder including the DSL, branching and scoping. It creates a branched computation where each branch is executed on a different device. All branches are then reduced to a single layer, but the computation is the branched again to obtain both the activation function and the trainer.\n\n```python\nimport tensorflow as tf\nfrom tensorbuilder import T\n\nx = placeholder(tf.float32, shape=[None, 10])\ny = placeholder(tf.float32, shape=[None, 5])\n\n[activation, trainer] = T.Pipe(\n    x,\n    [\n        T.With( tf.device(\"/gpu:0\"):\n            T.relu_layer(20)\n        )\n    ,\n        T.With( tf.device(\"/gpu:1\"):\n            T.sigmoid_layer(20)\n        )\n    ,\n        T.With( tf.device(\"/cpu:0\"):\n            T.tanh_layer(20)\n        )\n    ],\n    T.linear_layer(5),\n    [\n        T.softmax() # activation\n    ,\n        T\n        .softmax_cross_entropy_with_logits(y) # loss\n        .minimize(tf.train.AdamOptimizer(0.01)) # trainer\n    ]\n)\n```","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgarciae%2Ftensorbuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcgarciae%2Ftensorbuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgarciae%2Ftensorbuilder/lists"}