Replies: 1 comment
-
idk if it's because I'm not familiar with python, or just I miss something, I just cant understand. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone~
I've been reading these several file in section 3 -- Perceptron, but I still got confused.
Here's my confusion:
In the Perceptron.ipynb file, we first generate some random data that have two dimensions/features, and we use 80% of them as trainning data, and 20% of them as test data
and then comes to this
train
function, where I started to get confused:in this func, we first get
num_dims
, which as postitive example 's column, stands for the number of the feature, which will be 2and our
weight
will be a vector of 1 col and num_dims rows, so it going to match the featurein the for loop, we pick up a random example, and dot product it with weight.
now, since the
weight
was init to zero, HOW would the result of dot product be non-zero value ?wouldn't that be always zero ?
Beta Was this translation helpful? Give feedback.
All reactions