Hi,
First of all, I think the course and the library are great. This is not a rant.
But, as someone who is new to the library and isn’t a frequent python user, I struggle a little with understanding parts of the docs, like the excerpt below. I’m just spending way too much time trying to mentally digest it all when in the first place I only wanted to know what the method’s return values are.
Learner.predict
Learner.predict (item, rm_type_tfms=None, with_input=False)
Prediction on
item
, fully decoded, loss function decoded and probabilitiesIt returns a tuple of three elements with, in reverse order, - the prediction from the model, potentially passed through the activation of the loss function (if it has one) - the decoded prediction, using the potential
decodes
method from it - the fully decoded prediction, using the transforms used to build theDatasets
/DataLoaders
So, I get to my question:
Would it be factually correct if I paraphrased and filtered down the above text to the following?
This method returns a tuple with three elements:
- The predicted label as a value
- The predicted label as an index in the returned tensor (i.e. see next returned element)
- A 1D tensor of the predicted probabilities for each label encountered during learning
Did I capture the essence of it, or am I missing anything important?
Are there any other fastai library docs that could also help?