Exercice 3 and exercice 4

Hi @Chrisldn

You may passed the tests but it’s definitely wrong. Tests are not perfect and they do not catch all mistakes as it happened in this case. You will have problems down the road if you don’t fix this.

To get the vocab size you should use the parameter text_vectorizer: trained instance of TextVecotrization. This instance has a method called vocabulary_size() which “Gets the current size of the layer’s vocabulary.”

As for first part of Exercise 4 (which you are struggling with), remember what the model’s last layer does:
image
it concatenates the outputs.

So when you call model.predict(*) you get the concatenated output which you now need to split back into v1 and v2.

For how to do that, you have a clear hint with similar (but with different variable names) example right before Part 3:
image
This hint has a somewhat misleading name embedding_size which in my opinion should have been different (out_size, or n_feat as in your exercise). But in essence is what you’re looking for.

Cheers