Code for Loss Function without C++ ATen implementation

In which directory are codes there whose C++ ATen implementation is not there?

I am creating C++ Frontend of CrossEntropyLoss and since there is no C++ ATen implementation of it in the native directory, where can I find the implementation of this loss?

Thank you

CrossEntropyLoss is a composition of F::nll_loss and F::log_softmax: https://github.com/pytorch/pytorch/blob/15be189f0de4addf4f68d18022500f67617ab05d/torch/nn/functional.py#L2012, and that’s why it doesn’t have a C++ ATen implementation :smiley: (I also responded in the C++ torch::nn parity issue: https://github.com/pytorch/pytorch/issues/25883#issuecomment-544267626)