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

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. 

主站蜘蛛池模板: 曲麻莱县| 土默特右旗| 安徽省| 鹤壁市| 保山市| 尼玛县| 屏山县| 吉首市| 类乌齐县| 临夏市| 中牟县| 卢氏县| 郑州市| 石河子市| 夏河县| 泗水县| 临邑县| 松江区| 花莲县| 吉首市| 新沂市| 贵州省| 温州市| 秦安县| 广昌县| 张家口市| 泰宁县| 琼结县| 康保县| 台前县| 禄丰县| 汾西县| 兰溪市| 忻城县| 陇西县| 曲松县| 弥渡县| 宾阳县| 资中县| 林周县| 张家港市|