I think you have to define mathematically the loss function for your problem
let's say correct classification is
1 2 3 4 5 6 ,
top 1: the lost function is -log(item1)
top 5: 12345
output = 1234 6 5 , here what is p(output) for your model? , The loss function is no longer -negative log prob anymore,