Programming Assignment: NMT with Attention (Tensorflow) - C4W1 'Translator' object has no attribute 'vectorizer'

When running the following code
translation, logit, tokens = translate(trained_translator, original_sentence, temperature=temp)

I encountered error,
“context = model.vectorizer(text).to_tensor()”.
AttributeError: ‘Translator’ object has no attribute ‘vectorizer’

This above error came from my translate function whereby I attempted to define # Vectorize the text using the correct vectorizer.

Please help advice what is the correct vectorizer

Hi @chenkhoon,

Please apply english_vectorizer to the tensor text created at the previous step.

Thank you. Resolved

1 Like

I am glad it worked!