Skip to content

Commit

Permalink
fix: Added additional assert on week01 seminar to meet all get_phrase…
Browse files Browse the repository at this point in the history
…_embedding conditions
  • Loading branch information
bogdansalyp authored and poedator committed Sep 17, 2024
1 parent fea4491 commit 7f88d2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion week01_embeddings/seminar.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,8 @@
"assert np.allclose(vector[::10],\n",
" np.array([ 0.31807372, -0.02558171, 0.0933293 , -0.1002182 , -1.0278689 ,\n",
" -0.16621883, 0.05083408, 0.17989802, 1.3701859 , 0.08655966],\n",
" dtype=np.float32))"
" dtype=np.float32))\n",
"assert np.array_equal(get_phrase_embedding(\"thisisgibberish\"), np.zeros([model.vector_size], dtype='float32')), \"corner case for all missing words should be handled as described in the function comments\""
]
},
{
Expand Down

0 comments on commit 7f88d2e

Please sign in to comment.