MCPcopy Create free account
hub / github.com/NineAbyss/ZeroG / cycle_index

Function cycle_index

code/utils.py:390–393  ·  view source on GitHub ↗
(num, shift)

Source from the content-addressed store, hash-verified

388# loss = self.criterion(sim_matrix, correct_labels)
389# return loss
390def cycle_index(num, shift):
391 arr = torch.arange(num) + shift
392 arr[-shift:] = torch.arange(shift)
393 return arr
394
395# def sample_negative_class_indices(num_classes, num_negatives, labels, device ):
396# negative_indices = []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected