Myvideo

Guest

Login

Нейронная сеть в 9 строк кода на Python

Uploaded By: Myvideo
1 view
0
0 votes
0

Как сделать простую нейросеть на python с нуля, без библиотек для нейросетей. Всего 9 строчек кода: from numpy import exp, array, random, dot training_set_inputs = array([[0, 0, 1], [1, 1, 1], [1, 0, 1], [0, 1, 1]]) training_set_outputs = array([[0, 1, 1, 0]]).T (1) synaptic_weights = 2 * ((3, 1)) - 1 for iteration in range(10000): output = 1 / (1 exp(-(dot(training_set_inputs, synaptic_weights)))) synaptic_weights = dot(training_set_inputs.T, (training_set_outputs - output) * output * (1 - output)) print(1 / (1 exp(-(dot(array([1, 0, 0]), synaptic_weights)))))

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later