官术网_书友最值得收藏!

Neural network model

Once we have defined the inputs and outputs of the model using PyTorch variables, we have to build a model which learns how to map the outputs from the inputs. In traditional programming, we build a function by hand coding different logic to map the inputs to the outputs. However, in deep learning and machine learning, we learn the function by showing it the inputs and the associated outputs. In our example, we implement a simple neural network which tries to map the inputs to outputs, assuming a linear relationship. The linear relationship can be represented as y = wx + b, where w and b are learnable parameters. Our network has to learn the values of w and b, so that wx + b will be closer to the actual y. Let's visualize our training dataset and the model that our neural network has to learn:

Input data points

The following figure represents a linear model fitted on input data points:

Linear model fitted on input data points

The dark-gray (blue) line in the image represents the model that our network learns. 

主站蜘蛛池模板: 西乌| 泽普县| 涞水县| 广安市| 东宁县| 当涂县| 乌兰察布市| 张家口市| 城固县| 策勒县| 保定市| 清流县| 洪江市| 临沂市| 通化县| 宁德市| 海阳市| 安岳县| 清新县| 南平市| 海伦市| 浙江省| 上饶市| 霍邱县| 宜兴市| 荥阳市| 介休市| 屯门区| 平乡县| 桂林市| 林甸县| 施秉县| 虎林市| 喜德县| 泗水县| 洛浦县| 洞头县| 保山市| 郎溪县| 化州市| 南木林县|