{"id":14959124,"url":"https://github.com/idouble/deep-learning-machine-learning-ai-tensorflow-python","last_synced_at":"2025-09-02T15:30:45.770Z","repository":{"id":130708451,"uuid":"159512086","full_name":"IDouble/Deep-Learning-Machine-Learning-AI-TensorFlow-Python","owner":"IDouble","description":"🐍 A Collection of Notes for Learning \u0026 Understanding Deep Learning / Machine Learning / Artificial Intelligence (AI) with TensorFlow 🐍","archived":false,"fork":false,"pushed_at":"2024-02-29T16:58:05.000Z","size":5027,"stargazers_count":40,"open_issues_count":3,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-24T08:25:49.412Z","etag":null,"topics":["ai","artificial","artificial-intelligence","artificial-neural-networks","biases","deep-learning","deep-neural-networks","inputs","machine-learning","machine-learning-algorithms","multidimensional-arrays","neural-networks","outputs","python","summation","tensor","tensorflow","tensorflow-examples","understanding-neural-networks","weights"],"latest_commit_sha":null,"homepage":"","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/IDouble.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,"dei":null}},"created_at":"2018-11-28T14:09:26.000Z","updated_at":"2024-12-11T15:48:57.000Z","dependencies_parsed_at":"2024-04-08T23:02:35.372Z","dependency_job_id":"2b7a8a40-4aab-4c0b-940b-9b88b18cd39a","html_url":"https://github.com/IDouble/Deep-Learning-Machine-Learning-AI-TensorFlow-Python","commit_stats":null,"previous_names":["idouble/deep-learning-machine-learning-ai-tensorflow-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IDouble%2FDeep-Learning-Machine-Learning-AI-TensorFlow-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IDouble%2FDeep-Learning-Machine-Learning-AI-TensorFlow-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IDouble%2FDeep-Learning-Machine-Learning-AI-TensorFlow-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IDouble%2FDeep-Learning-Machine-Learning-AI-TensorFlow-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IDouble","download_url":"https://codeload.github.com/IDouble/Deep-Learning-Machine-Learning-AI-TensorFlow-Python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231794024,"owners_count":18427531,"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":["ai","artificial","artificial-intelligence","artificial-neural-networks","biases","deep-learning","deep-neural-networks","inputs","machine-learning","machine-learning-algorithms","multidimensional-arrays","neural-networks","outputs","python","summation","tensor","tensorflow","tensorflow-examples","understanding-neural-networks","weights"],"created_at":"2024-09-24T13:18:52.982Z","updated_at":"2024-12-29T22:58:05.646Z","avatar_url":"https://github.com/IDouble.png","language":"Python","readme":"# 🐍 Deep Learning / Machine Learning / Artificial Intelligence (AI) TensorFlow Python 🐍\n🐍 **Deep Learning / Machine Learning / Artificial Intelligence (AI)** with **TensorFlow** 🐍\n\nLearning \u0026 Understanding **Deep Learning / Machine Learning / Artificial Intelligence (AI)**.\u003c/br\u003e\nI tried to keep it as short as possible, but Truth needs to be told, **Deep Learning / Machine Learning and Artificial Intelligence (AI)** are big topics. \u003c/br\u003e\nIn this Repository, the focus is mainly on **TensorFlow** and **Deep Learning** with **neural networks**.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"320\" src=\"Images/AI-ML-DL.png\"\u003e\n\u003c/p\u003e\n\n## What is a neural network? 🌐\n\nA basic **neural network** consists of an **input layer**, which is just **your data, in numerical form**. After your **input layer**, you will have some number of what are called **\"hidden\" layers**. **A hidden layer** is just in between your input and output layers.\u003c/br\u003e ***One hidden layer means you just have a neural network. Two or more hidden layers? you've got a deep neural network!***\n\n![neural network](Images/artificial-neural-network-model.png)\n\n## What is a Tensor? 🔢\n\nEach operation takes a **Tensor** as an Input and outputs a **Tensor**. A **Tensor** is how Data is represented in **TensorFlow**.\u003c/br\u003e\nA **Tensor is a multidimensional array** ex: \u003c/br\u003e\u003c/br\u003e\n[0.245,0.618,0.382]\u003c/br\u003e\u003c/br\u003e\nThis would be a **normalized one-way-tensor**.\u003c/br\u003e\u003c/br\u003e\n[[0.245,0.618,0.382], \u003c/br\u003e[0.618,0.382,0.245], \u003c/br\u003e[0.382,0.245,0.618]] \u003c/br\u003e\u003c/br\u003e\nThis would be a **normalized two-way-tensor**.\u003c/br\u003e\u003c/br\u003e\n[[[0.245,0.618,0.382],[0.618,0.382,0.245],[0.382,0.245,0.618]], \u003c/br\u003e[[0.245,0.618,0.382],[0.618,0.382,0.245],[0.382,0.245,0.618]], \u003c/br\u003e[[0.245,0.618,0.382],[0.618,0.382,0.245],[0.382,0.245,0.618]]] \u003c/br\u003e\u003c/br\u003e\nThis would be a **normalized three-way-tensor**.\u003c/br\u003e\u003c/br\u003e\n**normalized** in **TensorFlow** means that the numbers are converted to a value between 0 and 1.\u003c/br\u003e The Data needs to be **normalized**, to be actually useable in **TensorFlow**.\n\n![neural network](Images/tensor.png)\n\n## Hyper Parameters 🔡\n\n**Hyperparameters** contain the data that govern the training process itself. \u003c/br\u003e\n\nAs an ex. if the **learning rate** is too big, our model may skip the optimal solution, if the **learning rate** is too small we may need to many iterations to get the best result, so we try to find a **learning rate** that fits for our purpose.\n\n![hyper parameters](Images/learning_rate.png)\n\n## What are Weights and Biases? 🔤\n\n**Weights** and **Biases** are the **learnable parameters of your model**. As well as **neural networks**, they appear with the same names in related models such as linear regression. Most machine learning algorithms include some **learnable parameters** like this.\n\n![explained picture machine learning](Images/Overview_Explained_Example.png)\n\n## 📝 Example Code with Comments 📝\n```\nimport tensorflow as tf  # deep learning library. Tensors are just multi-dimensional arrays\n\nmnist = tf.keras.datasets.mnist  # mnist is a dataset of 28x28 images of handwritten digits and their labels\n(x_train, y_train),(x_test, y_test) = mnist.load_data()  # unpacks images to x_train/x_test and labels to y_train/y_test\n\nx_train = tf.keras.utils.normalize(x_train, axis=1)  # scales data between 0 and 1\nx_test = tf.keras.utils.normalize(x_test, axis=1)  # scales data between 0 and 1\n\nmodel = tf.keras.models.Sequential()  # a basic feed-forward model\nmodel.add(tf.keras.layers.Flatten())  # takes our 28x28 and makes it 1x784\nmodel.add(tf.keras.layers.Dense(128, activation=tf.nn.relu))  # a simple fully-connected layer, 128 units, relu activation\nmodel.add(tf.keras.layers.Dense(128, activation=tf.nn.relu))  # a simple fully-connected layer, 128 units, relu activation\nmodel.add(tf.keras.layers.Dense(10, activation=tf.nn.softmax))  # our output layer. 10 units for 10 classes. Softmax for probability distribution\n\nmodel.compile(optimizer='adam',  # Good default optimizer to start with\n              loss='sparse_categorical_crossentropy',  # how will we calculate our \"error.\" Neural network aims to minimize loss.\n              metrics=['accuracy'])  # what to track\n\nmodel.fit(x_train, y_train, epochs=3)  # train the model\n\nval_loss, val_acc = model.evaluate(x_test, y_test)  # evaluate the out of sample data with model\nprint(val_loss)  # model's loss (error)\nprint(val_acc) # model's accuracy\n```\n## Resources \u0026 Links: ⛓\nhttps://www.tensorflow.org/ \u003c/br\u003e\nhttps://ai.google/education/ \u003c/br\u003e\nDeep Learning: https://pythonprogramming.net/introduction-deep-learning-python-tensorflow-keras/ \u003c/br\u003e\nTensorFlow Overview: https://www.youtube.com/watch?v=2FmcHiLCwTU \u003c/br\u003e\nAI vs Machine Learning vs Deep Learning: https://www.youtube.com/watch?v=WSbgixdC9g8 \u003c/br\u003e\nhttps://www.quora.com/What-do-the-terms-Weights-and-Biases-mean-in-Google-TensorFlow \u003c/br\u003e\nhttps://datascience.stackexchange.com/questions/19099/what-is-weight-and-bias-in-deep-learning\n\n![Binance Ready to give crypto a try ? buy bitcoin and other cryptocurrencies on binance](Images/binance.jpg)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidouble%2Fdeep-learning-machine-learning-ai-tensorflow-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidouble%2Fdeep-learning-machine-learning-ai-tensorflow-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidouble%2Fdeep-learning-machine-learning-ai-tensorflow-python/lists"}