MCPcopy Create free account
hub / github.com/dotchen/LearningByCheating / repeat

Function repeat

training/phase2_utils.py:24–47  ·  view source on GitHub ↗

Substitute for numpy's repeat function. Taken from https://discuss.pytorch.org/t/how-to-tile-a-tensor/13853/2 torch.repeat([1,2,3], 2) --> [1, 2, 3, 1, 2, 3] np.repeat([1,2,3], repeats=2, axis=0) --> [1, 1, 2, 2, 3, 3] :param a: tensor :param repeats: number of repeats :par

(a, repeats, dim=0)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

_trainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected