{"id":18615052,"url":"https://github.com/andrewjbateman/angular-tensorflow-notes","last_synced_at":"2026-04-21T05:31:33.853Z","repository":{"id":40668853,"uuid":"193943662","full_name":"AndrewJBateman/angular-tensorflow-notes","owner":"AndrewJBateman","description":":clipboard: Code to experiment with machine learning using Tensorflow.js, starting with recognising numbers. ","archived":false,"fork":false,"pushed_at":"2023-03-07T09:49:30.000Z","size":17377,"stargazers_count":1,"open_issues_count":13,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T02:45:22.375Z","etag":null,"topics":["angular","angular13","keras-tensorflow","repair","tensorflow","tensorflowjs","tutorial-code"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/AndrewJBateman.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}},"created_at":"2019-06-26T16:45:57.000Z","updated_at":"2022-02-18T19:39:19.000Z","dependencies_parsed_at":"2023-02-18T14:31:37.610Z","dependency_job_id":null,"html_url":"https://github.com/AndrewJBateman/angular-tensorflow-notes","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/AndrewJBateman%2Fangular-tensorflow-notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-tensorflow-notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-tensorflow-notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-tensorflow-notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/angular-tensorflow-notes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239406495,"owners_count":19633025,"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":["angular","angular13","keras-tensorflow","repair","tensorflow","tensorflowjs","tutorial-code"],"created_at":"2024-11-07T03:27:57.753Z","updated_at":"2025-11-03T03:30:34.168Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"TypeScript","readme":"# :zap: Angular TensorFlow Notepad\n\n* Code to experiment with machine learning using [Tensorflow.js](https://www.tensorflow.org/js), starting with recognising numbers. Tutorial code from Fireship (see ref in 'Inspiration') cloned then updated to Angular 13. All dependencies updated. Requires some fixes to work, due to updates. The plan is to use this to try new Tensorflow ideas.\n* **Note:** to open web links in a new window use: _ctrl+click on link_\n\n![GitHub repo size](https://img.shields.io/github/repo-size/AndrewJBateman/angular-tensorflow-notes?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/angular-tensorflow-notes?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/angular-tensorflow-notes?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/angular-tensorflow-notes?style=plastic)\n\n## :page_facing_up: Table of contents\n\n* [:zap: Angular TensorFlow Notepad](#zap-angular-tensorflow-notepad)\n  * [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)\n  * [:books: General info](#books-general-info)\n  * [:camera: Screenshots](#camera-screenshots)\n  * [:signal_strength: Technologies](#signal_strength-technologies)\n  * [:floppy_disk: Setup](#floppy_disk-setup)\n  * [:computer: Code Examples](#computer-code-examples)\n  * [:cool: Features](#cool-features)\n  * [:clipboard: Status \u0026 To-Do List](#clipboard-status--to-do-list)\n  * [:clap: Inspiration](#clap-inspiration)\n  * [:file_folder: License](#file_folder-license)\n  * [:envelope: Contact](#envelope-contact)\n\n## :books: General info\n\n* \"_TensorFlow.js is an open-source hardware-accelerated JavaScript library for training and deploying machine learning models._\"\n\n## :camera: Screenshots\n\n![Example screenshot](./img/.png)\n\n## :signal_strength: Technologies\n\n* [Angular v13](https://angular.io/)\n* [@tensorflow/tfjs v3](https://www.npmjs.com/package/@tensorflow/tfjs), javascript version of [Tensorflow](https://js.tensorflow.org)\n* [ng2-charts v3](https://www.npmjs.com/package/ng2-charts)\n\n## :floppy_disk: Setup\n\n* `npm i` to install dependenciesy\n\n* `ng serve` then navigate to port 4200.\n\n## :computer: Code Examples\n\n* tba\n\n```typescript\n async trainNewModel() {\n      // Define a model for linear regression.\n    this.linearModel = tf.sequential();\n    this.linearModel.add(tf.layers.dense({units: 1, inputShape: [1]}));\n\n    // Prepare the model for training: Specify the loss and the optimizer.\n    this.linearModel.compile({loss: 'meanSquaredError', optimizer: 'sgd'});\n\n\n    // Training data, completely random stuff\n    const xs = tf.tensor1d([3.2, 4.4, 5.5, 6.71, 6.98, 7.168, 9.779, 6.182, 7.59, 2.16, 7.042, 10.71, 5.313, 7.97, 5.654, 9.7, 3.11]);\n    const ys = tf.tensor1d([1.6, 2.7, 2.9, 3.19, 1.684, 2.53, 3.366, 2.596, 2.53, 1.22, 2.87, 3.45, 1.65, 2.904, 2.42, 2.4, 1.31]);\n\n\n    // Train\n    await this.linearModel.fit(xs, ys)\n\n    console.log('model trained')\n  }\n```\n\n## :cool: Features\n\n* to follow\n\n## :clipboard: Status \u0026 To-Do List\n\n* Status: not compiling due to errors from tensorflow update to v3\n* To-Do: Correct: Namespace has no exported member, loadModel does not exist.., fromPixels does not exist.\n\n## :clap: Inspiration\n\n* [Fireship, TensorFlow.js Quick Start](https://www.youtube.com/watch?v=Y_XM3Bu-4yc)\n* [github repo for the above](https://github.com/AngularFirebase/97-tensorflowjs-quick-start)\n\n## :file_folder: License\n\n* This project is licensed under the terms of the MIT license.\n\n## :envelope: Contact\n\n* Repo created by [ABateman](https://github.com/AndrewJBateman), email: gomezbateman@yahoo.com\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fangular-tensorflow-notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Fangular-tensorflow-notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fangular-tensorflow-notes/lists"}