iamtrask/Grokking-Deep-Learning

small mistakes in Chapter 3

paulweill opened this issue · 1 comments

image
Hey, trask. There is a something wrong in Chapter 3 In[13], it should be 5 rows & 6 columns, right?

zipme commented

I also noticed that

def vect_mat_mul(vect,matrix):
    assert(len(vect) == len(matrix))
    output = [0,0,0]
    for i in range(len(vect)):
        output[i] = w_sum(vect,matrix[i])
    return output

The first line assert(len(vect) == len(matrix)) doesn't seem to be correct? it's working in the example because the number of features (3) happens to be the same as the number of the classes you want to predict