Search found 2 matches

by CrappyProgrammer
Sun Aug 21, 2022 10:55 pm
Forum: Deep Learning Prerequisites: The Numpy Stack in Python
Topic: Numpy exercise
Replies: 6
Views: 3967

Re: Numpy exercise

a = np.random.random((5,10)) b = np.random.random((10,5)) a_list = a.tolist() b_list = b.T.tolist() T = 100 solution_list = [] def slow_dot_product(a, b): result = 0 for e, f in zip(a,b): result += e*f return result def slow_matrix_mult(A,B): for row_index in range(len(A)): solution_row = [] for co...
by CrappyProgrammer
Sun Aug 21, 2022 10:45 pm
Forum: Deep Learning Prerequisites: The Numpy Stack in Python
Topic: Numpy exercise
Replies: 6
Views: 3967

Re: Numpy exercise

a = np.random.random((5,10)) b = np.random.random((10,5)) a_list = a.tolist() b_list = b.T.tolist() T = 100 solution_list = [] def slow_dot_product(a, b): result = 0 for e, f in zip(a,b): result += e*f return result def slow_matrix_mult(A,B): for row_index in range(len(A)): solution_row = [] for col...

Go to advanced search