as i know  nn.CrossEntropyLoss equal to  nn.logsoftmax + nn.NLLLoss
but the nn.CrossEntropyLoss seems like have a function with one hot
so if i want to  use  nn.logsoftmax + nn.NLLLoss   to replace nn.CrossEntropyLoss
should i write a  function def onehot?