[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-08-16 UTC。"],[],[],null,["To build a [**neural network**](/machine-learning/glossary#neural_network)\nthat learns [**nonlinearities**](/machine-learning/glossary#nonlinear),\nbegin with the following familiar model structure: a\n[**linear model**](/machine-learning/glossary#linear-model) of the form\n$y' = b + w_1x_1 + w_2x_2 + w_3x_3$.\n\nWe can visualize this equation as shown below, where $x_1$,\n$x_2$, and $x_3$ are our three input nodes (in blue), and $y'$ is our output node\n(in green).\n\nExercise 1\n\nIn the model above, the [**weight**](/machine-learning/glossary#weight) and\n[**bias**](/machine-learning/glossary#bias) values have been randomly\ninitialized. Perform the following tasks to familiarize yourself with the\ninterface and explore the linear model. You can\nignore the *Activation Function* dropdown for now; we'll discuss this\ntopic later on in the module.\n\n1. Click the Play (▶️) button above the network to calculate the value of\n the output node for the input values $x_1 = 1.00$, $x_2 = 2.00$, and\n $x_3 = 3.00$.\n\n2. Click the second node in the\n [**input layer**](/machine-learning/glossary#input-layer), and increase\n the value from 2.00\n to 2.50. Note that the value of the output node changes. Select the output\n nodes (in green) and review the *Calculations* panel to see how the output\n value was calculated.\n\n | **Notes about calculations:**\n | - Values displayed are rounded to the hundredths place.\n | - The `Linear()` function simply returns the value it is passed.\n3. Click the output node (in green) to see the weight ($w_1$, $w_2$, $w_3$) and\n bias ($b$) parameter values. Decrease the weight value for\n $w_3$ (again, note that the value of the output node and the calculations below\n have changed). Then, increase the bias value. Review how these changes\n have affected the model output.\n\nAdding layers to the network\n\nNote that when you adjusted the weight and bias values of the network in\n[Exercise 1](#exercise_1), that didn't change the overall mathematical\nrelationship between input and output. Our model is still a linear model.\n\nBut what if we add another layer to the network, in between the input layer\nand the output layer? In neural network terminology, additional layers between\nthe input layer and the output layer are called\n[**hidden layers**](/machine-learning/glossary#hidden_layer), and the nodes\nin these layers are called\n[**neurons**](/machine-learning/glossary#neuron).\n\nThe value of each neuron in the hidden layer is calculated the same way as the\noutput of a linear model: take the sum of the product of each of its inputs\n(the neurons in the previous network layer) and a unique weight parameter,\nplus the bias. Similarly, the neurons in the next layer (here, the output layer)\nare calculated using the hidden layer's neuron values as inputs.\n\nThis new hidden layer allows our model to recombine the input data using another\nset of parameters. Can this help our model learn nonlinear relationships?\n\nExercise 2\n\nWe've added a hidden layer containing four neurons to the model.\n\nClick the Play (▶️) button above the network to calculate the value of\nthe four hidden-layer nodes and the output node for the input values\n$x_1 = 1.00$, $x_2 = 2.00$, and $x_3 = 3.00$.\n\nThen explore the model, and use it to answer the following questions. \nHow many [**parameters**](/machine-learning/glossary#parameter) (weights and biases) does this neural network model have? \n4 \nOur original model in [Exercise 1](#exercise-1) had four parameters: w~11~, w~21~, w~31~, and b. Because this model contains a hidden layer, there are more parameters. \n12 \nNote that the total number of parameters includes both the parameters used to calculate the node values in the hidden layer from the input values, and the parameters used to calculate the output value from the node values in the hidden layer. \n16 \nNote that the total number of parameters includes both the weight parameters and the bias parameters. \n21 \nThere are 4 parameters used to calculate each of the 4 node values in the hidden layer---3 weights (one for each input value) and a bias---which sums to 16 parameters. Then there are 5 parameters used to calculate the output value: 4 weights (one for each node in the hidden layer) and a bias. In total, this neural network has 21 parameters. \nTry modifying the model parameters, and observe the effect on the\nhidden-layer node values and the output value (you can review the\nCalculations panel below to see how these values were\ncalculated).\n\nCan this model learn nonlinearities? \nYes \nClick on each of the nodes in the hidden layer and the output node, and review the calculations below. What do you notice about all these calculations? \nNo \nIf you click on each of the nodes in the hidden layer and review\nthe calculations below, you'll see that all of them are linear\n(comprising multiplication and addition operations).\n\nIf you then click on the output node and review the calculation\nbelow, you'll see that this calculation is also linear. Linear\ncalculations performed on the output of linear calculations are\nalso linear, which means this model cannot learn nonlinearities.\n| **Key terms:**\n|\n| - [Bias](/machine-learning/glossary#bias)\n| - [Hidden layer](/machine-learning/glossary#hidden_layer)\n| - [Input layer](/machine-learning/glossary#input-layer)\n| - [Linear model](/machine-learning/glossary#linear-model)\n| - [Model](/machine-learning/glossary#model)\n| - [Neural network](/machine-learning/glossary#neural_network)\n| - [Neuron](/machine-learning/glossary#neuron)\n| - [Nonlinear](/machine-learning/glossary#nonlinear)\n| - [Parameter](/machine-learning/glossary#parameter)\n- [Weight](/machine-learning/glossary#weight) \n[Help Center](https://support.google.com/machinelearningeducation)"]]