I have conducted a workshop on Tensorflow2.0 at Facebook Dev CIrcle. This mostly covers the importance of TensorFlow to implement deep neural networks.
You can check the related demo at:
https://github.com/rayyan17/Introduction-To-Tensor-Flow.git
2. What is a Deep Learning Framework?
“An interface, library or a tool that allows us to build deep-learning model
easily and offers building blocks for designing, training, and validating deep
neural networks”
3. Building Blocks of a Deep NN
Feed-Forward
Back-Propagation
Computing
Loss
4. Building Blocks of a Deep NN cont.
● Input Data (X)
● Output (y)
● Hidden Layers
● Neuron
● Activation Functions
● Feed-Forward
● Loss Functions
● Optimizers
● Back-propagation
5. Choosing a Deep Learning Framework
● GitHub Activity
● Medium Articles
● arXiv Articles
● Books on Amazon
● Number of developers using it
● Google-Searches
● Online jobs posting
10. Traditional Programming vs Deep Learning Programs
Traditional
Programming
Rules
Data
Answers
ML/DL
Programs Rules
Data
Answers
11. “Hello World” of Neural Network
Consider a function y = f(X) defined by the relation: log(x^2 + x + 1):
12. “Hello World” of Neural Network cont.
X Y
-10 1.959
-7 1.633
-5 1.3222
-2 0.4771
0 0
2 0.8451
5 1.4914
10 2.04532
13. “Hello World” of Neural Network cont.
Input Output
Layer-1
Layer-2
Neuron with
tanh
activation
14. “Hello World” of Neural Network via Tensorflow
model = tf.keras.models.Sequential([tf.keras.layers.Dense(3, activation=tf.nn.tanh, input_shape=[1]),
tf.keras.layers.Dense(2, activation=tf.nn.tanh),
tf.keras.layers.Dense(1,)])
● Sequential: Represents a Feed-Forward-Network
● Dense: Represents a fully connected hidden layer
● Units: Represents the Neurons
Only need to pass in
the first layer
Output Layer
15. “Hello World” of Neural Network via Tensorflow
model.compile(optimizers="sgd", loss="mean_squared_error")
Model compile method deals with 3 major building blocks:
● Optimizer Functions
● Computing Loss
● Back Propagation
model.fit(x, y, epochs=800)
Model fit method represents your Training Cycle
16. Let's Move Towards the Demo
https://github.com/rayyan17/Introduction-To-Tensor-Flow.git
17. Libraries for Tensorflow
● Tensorflow Hub: Provides many pre-trained models
● Hugging Face-Transformers: State of the art Natural Language Processing
for Tensorflow 2.0 and PyTorch
● Google-Colabs
● Tensorflow can be easily integrated with models built on other libraries,
like scikit-learn, gensim, Spacy
● Playground Provided by Tensorflow http://playground.tensorflow.org/
18. Coursera Specializations:
● Tensorflow in Practice Specialization
● Deep Learning Specialization
Grokking Deep Learning by Andrew Trask
Learning Resources
One of the best way to use these tools effectively, it is best to first understand the basic difference between these 2 different approaches to solve a problem