πŸ•ΈοΈ
Deep Learning
  • πŸ’«Deep Learning Notes
  • πŸ’ΌPractical Tools
  • πŸ’ŽConcepts of Neural Networks
    • 🌱Introduction
    • πŸ”ŽThe Problem in General
    • πŸ‘·β€β™€οΈ Implementation Notes
    • πŸ“šCommon Concepts
    • πŸ’₯Activation Functions
    • 🎈Practical Aspects
    • πŸ‘©β€πŸ”§ NN Regularization
    • ✨Optimization Algorithms
    • 🎨Softmax Regression
    • πŸƒβ€β™€οΈ Introduction to Tensorflow
    • πŸ‘©β€πŸ’» Python Code Snippets
  • πŸ™‹β€β™€οΈ Hello World of Deep Learning with Neural Networks
    • 🌱Introduction
    • 🌐CNNs In Browser
  • πŸšͺIntroduction to Computer Vision
    • 🌱Introduction
  • 🚩Concepts of Convolutional Neural Networks
    • 🌱Introduction
    • πŸ“ŒCommon Concepts
    • 🌟Advanced Concepts
    • πŸ‘€Visualization
    • πŸ‘΅Classic Networks
    • ✨Other Approaches
    • πŸ•ΈοΈCommon Applications
  • πŸ‘©β€πŸ’» Works and Notes on CNNs
    • 🌱Introduction
  • πŸ’„Popular Strategies of Deep Learning
    • 🌱Introduction
    • πŸš™Transfer Learning
    • πŸ“šOther Strategies
  • 🀑Image Augmentation
    • 🌱Introduction
  • πŸ€Έβ€β™€οΈ Notes on Applied Machine Learning
    • 🌱Introduction
    • πŸ‘©β€πŸ”§ Notes on Structuring Machine Learning Projects
    • πŸ‘©β€πŸ« Implementation Guidelines
  • πŸ•΅οΈβ€β™€οΈ Basics of Object Detection
    • 🌱Introduction
    • β­•Region-Based CNNs
    • 🀳SSD and YOLO
    • πŸ€–TensorFlow Object Detection API
    • 🐞Model Debugging
  • ➰Sequence Models In Deep Learning
    • 🌱Introduction
    • πŸ“šGeneral Concepts
    • πŸ”„Recurrent Neural Networks
    • 🌌Vanishing Gradients with RNNs
    • 🌚Word Representation
    • πŸ’¬Mixed Info On NLP
  • πŸ’¬NLP
    • 🌱Introduction
  • πŸ’¬Applied NLP
    • πŸ™ŒπŸ» Handling texts
    • 🧩Regex
  • πŸ‘€Quick Visual Info
  • πŸ“šPDFs that I found and recommend
Powered by GitBook
On this page
  • ✨ What is Keras?
  • πŸ“š Important Terms
  • πŸ‘©β€πŸ”¬ The Simplest Neural Network
  • πŸ‘©β€πŸ’» My Code
  • πŸ”ƒ Traditional Programming vs Machine Learning
  • 🧐 References

Was this helpful?

Export as PDF
  1. πŸ™‹β€β™€οΈ Hello World of Deep Learning with Neural Networks

Introduction

πŸ‘©β€πŸ’» Intro to Neural Networks Coding

Like every first app we should start with something super simple that gives us an idea about the whole methodology.

✨ What is Keras?

Keras is a high-level neural networks API, written in Python and capable of running on top of TensorFlow, CNTK, or Theano.

πŸ“š Important Terms

Term

Description

Dense

A layer of neurons in a neural network

Loss Function

A mathematical way of measuring how wrong your predictions are

Optimizer

An algorithm to find parameter values which correspond to minimum value of loss function

πŸ‘©β€πŸ”¬ The Simplest Neural Network

It contains one layer with one neuron.

πŸ‘©β€πŸ’» Code Example

# initialize the model
model = Sequential()

# add a layer with one unit and set the dimension of input 
model.add(Dense(units=1, input_shape=[1]))

# set functional properties and compile the model
model.compile(optimizer='sgd', loss='mean_squared_error'

After building out neural network we can feed it with our sample data πŸ˜‹

πŸ‘©β€πŸ’» Code Example

xs = np.array([-1.0,  0.0, 1.0, 2.0, 3.0, 4.0], dtype=float)
ys = np.array([-3.0, -1.0, 1.0, 3.0, 5.0, 7.0], dtype=float)

Then we have to start training process πŸš€

πŸ‘©β€πŸ’» Code Example

model.fit(xs, ys, epochs=500)

Every thing is done 😎 ! Now we can test our neural network with new data πŸŽ‰

πŸ‘©β€πŸ’» Code Example

print(model.predict([10.0]))

πŸ‘©β€πŸ’» My Code

πŸ”ƒ Traditional Programming vs Machine Learning

🧐 References

PreviousπŸ™‹β€β™€οΈ Hello World of Deep Learning with Neural NetworksNextCNNs In Browser

Last updated 4 years ago

Was this helpful?

Full source code is

Tensorflow.js in browser

🌱
here 🐾
here 🐾
Official Documentation of Keras
More About Sequential model
More About Optimizers in Keras
More About Loss Functions in Keras