Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Challenge: Creating a Neuron | Neural Network from Scratch
Introduction to Neural Networks with Python
セクション 2.  2
single

single

bookChallenge: Creating a Neuron

メニューを表示するにはスワイプしてください

タスク

スワイプしてコーディングを開始

Your task is to implement the basic structure of a single neuron by completing the missing parts of the code below.

Follow these steps carefully:

  1. Initialize parameters:
    • Create the array of weights using np.random.uniform() with values in the range [1,1)[-1, 1).
    • Create a single bias value using the same uniform distribution.
    • Both should be initialized in the neuron's constructor (__init__).
  2. Compute the neuron's input:
    • Inside the activate() method, calculate the weighted sum of the inputs using the dot product:
      np.dot(inputs, self.weights)
      
    • Add the bias to this sum and store the result in the variable input_sum_with_bias.
  3. Apply the activation function:
    • Use the provided sigmoid() function to compute the neuron’s output from input_sum_with_bias.
    • Store the result in the variable output and return it.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 2.  2
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt