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

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. 

主站蜘蛛池模板: 青铜峡市| 舒城县| 乌鲁木齐市| 金溪县| 公主岭市| 合阳县| 恩施市| 庆安县| 金寨县| 绥宁县| 中西区| 望奎县| 遂川县| 平昌县| 遵化市| 山阴县| 四会市| 太湖县| 忻城县| 紫阳县| 德令哈市| 鹤岗市| 曲周县| 海门市| 庆云县| 沂南县| 明水县| 壶关县| 麻栗坡县| 乌鲁木齐市| 石棉县| 思茅市| 汨罗市| 郎溪县| 肇庆市| 大港区| 贞丰县| 灵宝市| 石泉县| 商河县| 萨迦县|