Machine Learning: The Sigmoid Function | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula gr√°tis
0

Machine Learning: The Sigmoid Function

Calculate Node Output. Task You are given the values for w1, w2, b, x1 and x2 and you must compute the output for the node. Use the sigmoid as the activation function. Input Format w1, w2, b, x1 and x2 on one line separated by spaces Output Format Float rounded to 4 decimal places Sample Input 0 1 2 1 2 Sample Output 0.9820 I'm having trouble, and the due date is today, which I think is stupid, since these things take WAY longer to learn than usual. If anyone can give the answer to me, I would be glad. Thanks.

15th Apr 2021, 2:15 PM
Ethan Blalock
Ethan Blalock - avatar
10 Respostas
+ 10
w1, w2, b, x1, x2 = [float(x) for x in input().split()] import math output = w1*x1 + w2*x2 + b output = round(1/(1 + math.exp(output*-1)), 4) print(output)
10th May 2021, 7:54 AM
Farzaneh Goli
Farzaneh Goli - avatar
+ 2
import math w1, w2, b, x1, x2 = [float(x) for x in input().split()] r = w1*x1 + w2*x2 + b def sigmoid(r): sig = 1 / (1+math.exp(-r)) print(round(sig, 4)) sigmoid(r)
12th Jan 2022, 2:31 AM
Rodrigo Silva
Rodrigo Silva - avatar
+ 2
ANS : w1, w2, b, x1, x2 = [float(x) for x in input().split()] import math y=(w1*x1)+(w2*x2)+b z = math.exp(-y) sig = 1 / (1 + z) sig = round(sig,4) print(sig)
25th Jul 2022, 11:56 AM
Reza Zeraat Kar
Reza Zeraat Kar - avatar
+ 1
Siavosh sanoodi please see my code above
6th May 2021, 4:47 AM
RISHABH
RISHABH - avatar
0
Show. Your. Attempt.
15th Apr 2021, 3:39 PM
Dino Wun (Use the search bar plz!)
Dino Wun (Use the search bar plz!) - avatar
0
Value =( W1*X1 + W2 * X2 ) + b Then put value in sigmoid function Sigmoid = 1/(1+(e**-value)) -> import e from math (from math import e) https://code.sololearn.com/cAc6grWX9IBZ/?ref=app here is the solution!
17th Apr 2021, 2:07 PM
RISHABH
RISHABH - avatar
0
I can't answer to this question please someone help me Machine Learning - The Sigmoid Function Task You are given the values for w1, w2, b, x1 and x2 and you must compute the output for the node. Use the sigmoid as the activation function.
6th May 2021, 2:24 AM
Siavosh Samoodi
Siavosh Samoodi - avatar
0
It says that the result should be 0.982
7th May 2021, 11:16 AM
Siddhant Thamke
Siddhant Thamke - avatar
0
w1, w2, b, x1, x2 = [float(x) for x in input().split()] import math output = w1*x1 + w2*x2 + b output = round(1/(1 + math.exp(output*-1)), 4) print(output)
17th Dec 2021, 10:10 AM
Ismoilov Abdug'ofur
Ismoilov Abdug'ofur - avatar
0
My solution import math w1, w2, b, x1, x2 = [float(x) for x in input().split()] def sigmoid(out): sigmoids=round(1/(1+math.exp(out*-1)),4) return sigmoids output=w1*x1+w2*x2+b; print(sigmoid(output))
25th May 2022, 11:24 AM
aazhmeer chhapra