How to make a neural network and train it? (in Deep Learning)

Logix_Quest
2 min readJul 27, 2020

--

Using Jupyter Notebook

Neural Network is very important in deep learning mainly. The neural etwork (in deep learning) learns itself and works according to that information. It copies biological neural network. But in machine learning, we’ve to train it by ourselves using algorithms, it does not learn itself as in deep learning happens. Here is an example in which neural network creates and trains in deep learning (using Jupyter Notebook).

Firstly, you’ve to import following libraries.

importing libraries

Now create a neural network.

Creation of Neural Network

To see input shape, do so

input shape

To see output shape,

output shape

We will use random numbers here. To use random numbers, we’ve to import its library.

importing library

Now use for loop to define the range of random numbers and append to the inputs and target output as well as shown below.

defining range

To check the length of input (train),

length of input_train

Now train neural network specifying number of epochs,

training of neural network

For prediction, using predict method:

using predict method

Hi readers! this is an article on making a neural network and training it. If you like my article, don’t forget to clap.

Thank You

--

--

Logix_Quest
Logix_Quest

No responses yet