DEV Community

Discussion on: Build a flexible Neural Network with Backpropagation in Python

Collapse
 
rochaowng profile image
RochaOwng

Awesome tutorial, many thanks.
But I have one doubt, can you help me?

self.z2_error = self.o_delta.dot(self.W2.T) # z2 error: how much our hidden layer weights contributed to output error
self.z2_delta = self.z2_error*self.sigmoidPrime(self.z2) # applying derivative of sigmoid to z2 error

self.W1 += X.T.dot(self.z2_delta) # adjusting first set (input --> hidden) weights
self.W2 += self.z2.T.dot(self.o_delta) # adjusting second set (hidden --> output) weights

what means those T's? self.w2.T, self.z2.T etc...

Collapse
 
tamilarasu_u profile image
Tamilarasu U • Edited

T is to transpose matrix in numpy.
docs.scipy.org/doc/numpy-1.14.0/re...