Write a multidimensional output BP neural network Python

I can provide you with a sample code to help you write a multi-dimensional output BP neural network: import numpy as np#Input node number n_inputs = 3#Hidden layer node number n_hidden = 2#Output node number n_outputs = 2#Set weight w_h = np.random.rand(n_inputs, n_hidden) w_o = np.random.rand(n_hidden, n_outputs) #Set the bias b_h = np.random.rand(n_hidden, 1) b_o = np.random.rand(n_outputs, 1)#Define the activation function def sigmoid(x): re

Guess you like

Origin blog.csdn.net/weixin_35754962/article/details/129594231