tfbook icon indicating copy to clipboard operation
tfbook copied to clipboard

Fix predict classes

Open JTibs18 opened this issue 1 year ago • 1 comments

model.predict_classes() is depreciated

replaced all instances of predicted = model.predict_classes(token_list) with:

pred_classes = model.predict(token_list, verbose=0)
predicted = np.argmax(pred_classes, axis=-1)

as per this stackoverflow discussion

JTibs18 avatar Dec 07 '23 03:12 JTibs18

@lmoroney Are we able to merge this?

I see in the book the tf version is 2.0.0 but installing it seems a bit difficult. xD

Or could we a requirements.txt?

andrew-delph avatar May 04 '24 20:05 andrew-delph