{"id":13688088,"url":"https://github.com/danielsabinasz/TensorSlow","last_synced_at":"2025-05-01T16:30:19.303Z","repository":{"id":52971720,"uuid":"101336699","full_name":"danielsabinasz/TensorSlow","owner":"danielsabinasz","description":"Re-implementation of TensorFlow in pure python, with an emphasis on code understandability","archived":false,"fork":false,"pushed_at":"2021-04-11T22:29:25.000Z","size":4744,"stargazers_count":679,"open_issues_count":1,"forks_count":89,"subscribers_count":41,"default_branch":"master","last_synced_at":"2024-11-12T11:40:22.230Z","etag":null,"topics":["artificial-intelligence","artificial-neural-networks","deep-learning","python","tensorflow"],"latest_commit_sha":null,"homepage":"http://www.deepideas.net","language":"Jupyter Notebook","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/danielsabinasz.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}},"created_at":"2017-08-24T20:51:07.000Z","updated_at":"2024-06-24T11:44:53.000Z","dependencies_parsed_at":"2022-09-03T05:00:34.826Z","dependency_job_id":null,"html_url":"https://github.com/danielsabinasz/TensorSlow","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsabinasz%2FTensorSlow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsabinasz%2FTensorSlow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsabinasz%2FTensorSlow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsabinasz%2FTensorSlow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielsabinasz","download_url":"https://codeload.github.com/danielsabinasz/TensorSlow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251906704,"owners_count":21663148,"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":["artificial-intelligence","artificial-neural-networks","deep-learning","python","tensorflow"],"created_at":"2024-08-02T15:01:06.377Z","updated_at":"2025-05-01T16:30:19.298Z","avatar_url":"https://github.com/danielsabinasz.png","language":"Jupyter Notebook","readme":"# TensorSlow\n## A re-implementation of \u003ca href=\"http://www.tensorflow.org\"\u003eTensorFlow\u003c/a\u003e functionality in pure python\n\nTensorSlow is a minimalist machine learning API that mimicks the TensorFlow API, but is implemented in pure python (without a C backend). The source code has been built with maximal understandability in mind, rather than maximal efficiency. Therefore, TensorSlow should be used solely for educational purposes. If you want to understand how deep learning libraries like TensorFlow work under the hood, this may be your best shot. \n\nI have written an article in my blog at \u003ca href=\"http://www.deepideas.net/deep-learning-from-scratch-theory-and-implementation/\"\u003edeepideas.net\u003c/a\u003e that develops this library step by step, explaining all the math and algorithms on the way: \u003ca href=\"http://www.deepideas.net/deep-learning-from-scratch-theory-and-implementation/\"\u003eDeep Learning From Scratch\u003c/a\u003e.\n\n## How to use\nImport:\n\n    import tensorslow as ts\n\nCreate a computational graph:\n\n    ts.Graph().as_default()\n\nCreate input placeholders:\n\n    training_features = ts.placeholder()\n    training_classes = ts.placeholder()\n\nBuild a model:\n\n\tweights = ts.Variable(np.random.randn(2, 2))\n\tbiases = ts.Variable(np.random.randn(2))\n\tmodel = ts.softmax(ts.add(ts.matmul(X, W), b))\n\nCreate training criterion:\n\n    loss = ts.negative(ts.reduce_sum(ts.reduce_sum(ts.multiply(training_classes, ts.log(model)), axis=1)))\n\nCreate optimizer:\n\n    optimizer = ts.train.GradientDescentOptimizer(learning_rate=0.01).minimize(J)\n\nCreate placeholder inputs:\n\n\tfeed_dict = {\n\t\ttraining_features: my_training_features,\n\t\ttraining_classes: my_training_classes\n\t}\n\nCreate session:\n\n\tsession = ts.Session()\n\nTrain:\n\n\tfor step in range(100):\n\t\tloss_value = session.run(loss, feed_dict)\n\t\tif step % 10 == 0:\n\t\t\tprint(\"Step:\", step, \" Loss:\", loss_value)\n\t\tsession.run(optimizer, feed_dict)\n\nRetrieve model parameters:\n\n\tweights_value = session.run(weigths)\n\tbiases_value = session.run(biases)\n\nCheck out the `examples` directory for more.\n","funding_links":[],"categories":["Jupyter Notebook"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielsabinasz%2FTensorSlow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielsabinasz%2FTensorSlow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielsabinasz%2FTensorSlow/lists"}