- Python Deep Learning Cookbook
- Indra den Bakker
- 252字
- 2021-07-02 15:43:14
Implementing a single-layer neural network
Now we can move on to neural networks. We will start by implementing the simplest form of a neural network: a single-layer neural network. The difference from a perceptron is that the computations are done by multiple units (neurons), hence a network. As you may expect, adding more units will increase the number of problems that can be solved. The units perform their computations separately and are stacked in a layer; we call this layer the hidden layer. Therefore, we call the units stacked in this layer the hidden units. For now, we will only consider a single hidden layer. The output layer performs as a perceptron. This time, as input we have the hidden units in the hidden layer instead of the input variables:

In our implementation of the perceptron, we've used a unit step function to determine the class. In the next recipe, we will use a non-linear activation function sigmoid for the hidden units and the output function. By replacing the step function with a non-linear activation function, the network will be able to uncover non-linear patterns as well. More on this later in the Activation functions section. In the backward pass, we use the derivative of the sigmoid to update the weights.
In the following recipe, we will classify two non-linearly separable classes with NumPy.
- Java 開發(fā)從入門到精通(第2版)
- Angular UI Development with PrimeNG
- AngularJS Web Application Development Blueprints
- PHP+MySQL網(wǎng)站開發(fā)技術(shù)項(xiàng)目式教程(第2版)
- UI智能化與前端智能化:工程技術(shù)、實(shí)現(xiàn)方法與編程思想
- Kali Linux Wireless Penetration Testing Beginner's Guide(Third Edition)
- 小程序開發(fā)原理與實(shí)戰(zhàn)
- Learning Salesforce Einstein
- D3.js By Example
- Learning PHP 7
- GameMaker Essentials
- PHP編程基礎(chǔ)與實(shí)踐教程
- Cocos2d-x Game Development Blueprints
- 零代碼實(shí)戰(zhàn):企業(yè)級(jí)應(yīng)用搭建與案例詳解
- Unity與C++網(wǎng)絡(luò)游戲開發(fā)實(shí)戰(zhàn):基于VR、AI與分布式架構(gòu)