Python: numpy.dot / numpy.tensordot for multidimensional arrays
问题 I'm optimising my implementation of the back-propagation algorithm to train a neural network. One of the aspects I'm working on is performing the matrix operations on the set of datapoints (input/output vector) as a batch process optimised by the numpy library instead of looping through every datapoint. In my original algorithm I did the following: for datapoint in datapoints: A = ... (created out of datapoint info) B = ... (created out of datapoint info) C = np.dot(A,B.transpose()) _________