Rank-1, Rank-5 vs Classification Accuracy

Is there any difference between Rank-1 and Classification accuracy? In face identification, rank accuracy is use where as image classification task classification accuracy is used to measure the effectiveness of a model. Both are same? How to find out rank-1 and rank-5 accuracy in pytorch? Thank in advance.