Hi @SHASHANK_KUMAR_MISHR!
Welcome to the PyTorch Forums 
Please wrap your code around ``` helps in readability 
Coming to your question,
Why are your labels (2, 10) ?
Labels are the number of classes it should be a scalar value.