If you need the class probabilities, then you can apply a Softmax function to the model outputs. The binary predictions are obtained by applying np.argmax() to the model outputs. Using a softmax instead of the argmax function would give the probabilities.

This code is no longer maintained. Please check SimpleTransformers for the updated version.

AI researcher, avid reader, fantasy and Sci-Fi geek, and fan of the Oxford comma. www.linkedin.com/in/t-rajapakse/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store