Metrics (inp and targ)?

I have some issue understanding what is inp and targ in the metrics

also in the documentation is mentioned “out” shouldn’t be inp?

#export torch_core
def flatten_check(inp, targ):
    "Check that `out` and `targ` have the same number of elements and flatten them."
    inp,targ = inp.contiguous().view(-1),targ.contiguous().view(-1)
    test_eq(len(inp), len(targ))
    return inp,targ

It would/should likely be out, because it is your output from your model.

1 Like

So in all the documentation should be out?

I am also not sure what is targ practically.

It’s your targets (ys)

1 Like

Are my labels of the predictions?

But how can I extract those from learn?

OK I found how to calculate metrics

learn = cnn_learner(dls, resnet50, metrics=[accuracy, error_rate, Precision(average='micro'),
               Recall(average='micro')])