Neural Network and depth learning fourth week-building your Deep neural network-step by step

Source: Internet
Author: User
Building your Deep neural network:step by step

Welcome to your Week 4 assignment (Part 1 of 2)! You are have previously trained a 2-layer neural network (with a single hidden layer). This week is a deep neural network with as many layers In this notebook, you'll implement the functions required to build a deep neural. (In this notebook, you will achieve all the functions needed to build a deep neural network.) In the next assignment, you'll use this functions to build a deep neural network for image classification. (In the next task, you will use these functions to construct a deep neural network for image classification.) )

After this assignment you are able to:
-Use non-linear units likes Relu to improve your model (using non-linear units such as Relu to improve your models)
-Build a deeper neural network (with more than 1 hidden layer) (Create a deeper neural network (with more than one hidden layer))
-Implement an Easy-to-use neural network class (implement an easy to use neural network classes)

notation:
-Superscript [l] [l] denotes a quantity associated with the Lth l^{th} layer.
-Example:a[l] a^{[l] is the Lth l^{th} layer activation. W[L] w^{[l]} and B[l] b^{[l]} are the Lth l^{th} layer parameters.
-Superscript (i) (i) denotes a quantity associated with the ith i^{th} example.
-Example:x (i) x^{(i)} is the ith i^{th} training Example.
-Lowerscript I I denotes the ith i^{th} entry of a vector.
-Example:a[l]i a^{[l]}_i denotes the ith i^{th} entry of the Lth l^{th ' s layer).

Let ' s get started! 1-packages

Let ' s-all the packages, you'll need during this assignment.
-NumPy is the main package for scientific computing with Python.
-Matplotlib is a library to plot graphs in Python.
-Dnn_utils provides some necessary functions for this notebook.
-Testcases provides some test cases to assess the correctness of your functions
-np.random.seed (1) was used to Keep all the random function calls consistent. It would help us grade your work. Please don ' t change the seed. (Np.random.seed (1) is used to keep all random function calls consistent. This will help us to score your work. Please do not change seed. )

Import NumPy as NP
import h5py
import Matplotlib.pyplot as plt from
testcases_v2 import * from
Dnn_utils_ V2 Import sigmoid, Sigmoid_backward, Relu, relu_backward%matplotlib inline plt.rcparams[
' figure.figsize '] = ( 5.0, 4.0) # Set default size of plots
plt.rcparams[' image.interpolation '] = ' nearest ' plt.rcparams[' Image.cmap '
] = ' Gray '

%load_ext autoreload
%autoreload 2

np.random.seed (1)
2-outline of the assignment

To build your neural network, and you'll be implementing several "helper functions". These helper functions is used in the next assignment to build a Two-layer neural network and a l-layer neural Rk. Each small helper function you'll implement'll have detailed instructions that'll walk you through the necessary Ste PS. is a outline of this assignment, your will:
(to build your neural network, you'll implement several "help functions.") These auxiliary functions will be used for the next task to establish a Double-layer neural network and an L-layer neural network. Each small helper feature you will perform will have detailed instructions that will guide you through the necessary steps. This is the summary of this task, and you will: Initialize the parameters for a Two-layer network and for a L

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.