I implement the diversity loss through below concept, where the feature size is 2 and the number of frames is 3.