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

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. 

主站蜘蛛池模板: 丹凤县| 济南市| 区。| 桓台县| 濉溪县| 通道| 余姚市| 肃宁县| 青海省| 昭平县| 明水县| 哈巴河县| 开远市| 青阳县| 临洮县| 临清市| 巴彦县| 会东县| 栾城县| 伊春市| 北流市| 靖远县| 洛阳市| 丹巴县| 眉山市| 敦煌市| 山西省| 榆社县| 龙江县| 三都| 务川| 苏尼特右旗| 常德市| 汶川县| 望奎县| 嘉峪关市| 临澧县| 乌拉特前旗| 漳州市| 深州市| 泽州县|