Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🐍 A Collection of Notes for Learning & Understanding Deep Learning / Machine Learning / Artificial Intelligence (AI) with TensorFlow 🐍

License

NotificationsYou must be signed in to change notification settings

IDouble/Deep-Learning-Machine-Learning-AI-TensorFlow-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🐍Deep Learning / Machine Learning / Artificial Intelligence (AI) withTensorFlow 🐍

Learning & UnderstandingDeep Learning / Machine Learning / Artificial Intelligence (AI).
I 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.
In this Repository, the focus is mainly onTensorFlow andDeep Learning withneural networks.

What is a neural network? 🌐

A basicneural network consists of aninput layer, which is justyour data, in numerical form. After yourinput layer, you will have some number of what are called"hidden" layers.A hidden layer is just in between your input and output layers.
One hidden layer means you just have a neural network. Two or more hidden layers? you've got a deep neural network!

neural network

What is a Tensor? 🔢

Each operation takes aTensor as an Input and outputs aTensor. ATensor is how Data is represented inTensorFlow.
ATensor is a multidimensional array ex:

[0.245,0.618,0.382]

This would be anormalized one-way-tensor.

[[0.245,0.618,0.382],
[0.618,0.382,0.245],
[0.382,0.245,0.618]]

This would be anormalized two-way-tensor.

[[[0.245,0.618,0.382],[0.618,0.382,0.245],[0.382,0.245,0.618]],
[[0.245,0.618,0.382],[0.618,0.382,0.245],[0.382,0.245,0.618]],
[[0.245,0.618,0.382],[0.618,0.382,0.245],[0.382,0.245,0.618]]]

This would be anormalized three-way-tensor.

normalized inTensorFlow means that the numbers are converted to a value between 0 and 1.
The Data needs to benormalized, to be actually useable inTensorFlow.

neural network

Hyper Parameters 🔡

Hyperparameters contain the data that govern the training process itself.

As an ex. if thelearning rate is too big, our model may skip the optimal solution, if thelearning rate is too small we may need to many iterations to get the best result, so we try to find alearning rate that fits for our purpose.

hyper parameters

What are Weights and Biases? 🔤

Weights andBiases are thelearnable parameters of your model. As well asneural networks, they appear with the same names in related models such as linear regression. Most machine learning algorithms include somelearnable parameters like this.

explained picture machine learning

📝 Example Code with Comments 📝

import tensorflow as tf  # deep learning library. Tensors are just multi-dimensional arraysmnist = tf.keras.datasets.mnist  # mnist is a dataset of 28x28 images of handwritten digits and their labels(x_train, y_train),(x_test, y_test) = mnist.load_data()  # unpacks images to x_train/x_test and labels to y_train/y_testx_train = tf.keras.utils.normalize(x_train, axis=1)  # scales data between 0 and 1x_test = tf.keras.utils.normalize(x_test, axis=1)  # scales data between 0 and 1model = tf.keras.models.Sequential()  # a basic feed-forward modelmodel.add(tf.keras.layers.Flatten())  # takes our 28x28 and makes it 1x784model.add(tf.keras.layers.Dense(128, activation=tf.nn.relu))  # a simple fully-connected layer, 128 units, relu activationmodel.add(tf.keras.layers.Dense(128, activation=tf.nn.relu))  # a simple fully-connected layer, 128 units, relu activationmodel.add(tf.keras.layers.Dense(10, activation=tf.nn.softmax))  # our output layer. 10 units for 10 classes. Softmax for probability distributionmodel.compile(optimizer='adam',  # Good default optimizer to start with              loss='sparse_categorical_crossentropy',  # how will we calculate our "error." Neural network aims to minimize loss.              metrics=['accuracy'])  # what to trackmodel.fit(x_train, y_train, epochs=3)  # train the modelval_loss, val_acc = model.evaluate(x_test, y_test)  # evaluate the out of sample data with modelprint(val_loss)  # model's loss (error)print(val_acc) # model's accuracy

Resources & Links: ⛓

https://www.tensorflow.org/
https://ai.google/education/
Deep Learning:https://pythonprogramming.net/introduction-deep-learning-python-tensorflow-keras/
TensorFlow Overview:https://www.youtube.com/watch?v=2FmcHiLCwTU
AI vs Machine Learning vs Deep Learning:https://www.youtube.com/watch?v=WSbgixdC9g8
https://www.quora.com/What-do-the-terms-Weights-and-Biases-mean-in-Google-TensorFlow
https://datascience.stackexchange.com/questions/19099/what-is-weight-and-bias-in-deep-learning

Binance Ready to give crypto a try ? buy bitcoin and other cryptocurrencies on binance

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp