Loss Function and Metric

I know that metrics are different from loss function, which is used for the learning of parameters of the model. But how should we know which loss function is being used? We can only set Metric Function but there is no place where we can select or learn about the working of the loss function. How to know more about the Loss Fn, used for updating the params and not about the metrics, which we can choose?

I think this is one of the most confusing things.

Don’t @ mention the admins like this. That is bad forum behavior. Others can answer your question and you did so only waiting 2 hours.

1 Like

Okay, Apologies.

@kanak8278 class Learner has loss_func attribute and if not provided it is inferred from the data. You may want to check http://docs.fast.ai/layers.html#fastai-loss-functions and http://docs.fast.ai/learner.html#Learner.

If you just want to check what is the loss:

learn = cnn_learner(dls, resnet34, metrics=error_rate)