I need to broadcast a list in Python to a larger value. I'm actually working on a backpropogation algorithm without the use of Numpy. I don't have access too it in my limited development environment.
From what I understand when you use Numpy.dot() operation on two arrays, numpy will broadcast one array if it is smaller than the other so they are equal size.
dW = np.dot(dZ, A_prev.T) / m
How does Numpy handle broadcasting an array when the two are not divisible? That is, when the modulus of the two arrays does not equal 0?
In my case, I have two lists; len(dZ) is equal too 512 and len(A_prev) is equal too 741. How should I approach broadcasting dZ so it's the same size as A_prev?
What I've tried so far is:
dZ = dZ * (len(dZ) + (len(A_prev) % len(dZ)))
However, dZ turns out to be a huge number, around 16,000. I'm not sure why.