[PYTHON] Implement Neural Network from 1

Implement Neural Network from 1

Today is a continuation of yesterday, and I tried to make a Neural Network by myself. Click here for yesterday's article

flow

As I wrote in yesterday's article, it's like putting together a number of logistic regressions. We will add more layers to what we have implemented so far.

And the best in Neural Network? The important thing is the activation function.

Since the Neural Network imitates a human nerve cell, it fires when given a value that exceeds a certain standard value. The activation function plays that role.

code

day4.py The bias is set to be good as a result.

Question

  1. If the layer is decided like this time, you can write and calculate the differential formula, but how does the Neural Network included in sklearn and other libraries match the input number? Are you making layers?
  2. Random bias sometimes worked, and sometimes it didn't. How can I get this to work almost 100%?

Regarding 1, I think there seems to be a mathematical method. Regarding 2, I think that is what people all over the world are looking for, and I think that there are things that humans can judge and AI can not judge, so if you learn from theory, you will also be interested in such things. I'm glad I had it and started from theory. I will investigate more.

The 4th day is over!

I hope tomorrow I can improve the accuracy a little more or solve either of the questions I wrote earlier. Also, when I look back more, I will write in an easy-to-understand manner how I implemented it.

Recommended Posts

Implement Neural Network from 1
Implement Convolutional Neural Network
Implement a 3-layer neural network
Parametric Neural Network
Convolutional neural network experience
Implement feedforward neural network in Chainer to classify documents
[Deep Learning] Execute SONY neural network console from CUI
Neural network with Python (scikit-learn)
3. Normal distribution with neural network!
Neural network starting with Chainer
Neural network implementation in python
Pytorch Neural Network (CNN) Tutorial 1.3.1.
4. Circle parameters with neural network!
Neural network implementation (NumPy only)
TensorFlow Tutorial-Convolutional Neural Network (Translation)
I tried to implement a basic Recurrent Neural Network model
Non-information graduate student studied machine learning from scratch # 2: Neural network
Neural network to understand and implement in high school mathematics
[Deep Learning from scratch] Implement backpropagation processing in neural network by error back propagation method
Simple neural network implementation using Chainer
Neural network with OpenCV 3 and Python 3
Implementation of a two-layer neural network 2
Lua version Deep Learning from scratch Part 6 [Neural network inference processing]
Simple classification model with neural network
What is a Convolutional Neural Network?
[Deep Learning from scratch] About the layers required to implement backpropagation processing in a neural network
[TensorFlow] [Keras] Neural network construction with Keras
I implemented a two-layer neural network
Simple neural network theory and implementation
Touch the object of the neural network
[Language processing 100 knocks 2020] Chapter 8: Neural network
network
Survivor prediction using kaggle's titanic neural network [80.8%]
Implementation of 3-layer neural network (no learning)
Try using TensorFlow-Part 2-Convolutional Neural Network (MNIST)
Persist the neural network built with PyBrain
Neural Network Console Challenge Winning Works List
Implementation of "blurred" neural network using Chainer
Simple neural network implementation using Chainer-Data preparation-
[PyTorch] Tutorial (Japanese version) ③ ~ NEURAL NETWORKS (Neural Network) ~
Python & Machine Learning Study Memo ③: Neural Network
Simple neural network implementation using Chainer-Model description-
2. Mean and standard deviation with neural network!
[Chainer] Document classification by convolutional neural network
Python vs Ruby "Deep Learning from scratch" Chapter 3 Implementation of 3-layer neural network
[Deep Learning from scratch] Initial value of neural network weight using sigmoid function