Open FatihMercan61 opened 2 years ago
Thanks for your question, and sorry for the late reply.
In the previous cell, Y_proba
is created like this:
Y_proba = model.predict(inputs)
The predict()
method returns a NumPy array, which does have an argsort()
method. I'm guessing you ran the following code instead:
Y_proba = model(inputs)
This would indeed return a TensorFlow tensor, which does not have an argsort()
method.
The decode_predictions()
method must try to call the argsort()
method, hence the error.
If you use the predict()
method, everything should work fine.
Hope this helps.
When I execute the following code from the notebook of chapter 14: (its the exact same code as in the notebook)
I get the following error: