MCPcopy Create free account
hub / github.com/OpenGVLab/DragGAN / tensor2vec

Function tensor2vec

draggan/deprecated/stylegan2/lpips/util.py:115–116  ·  view source on GitHub ↗
(vector_tensor)

Source from the content-addressed store, hash-verified

113 [:, :, :, np.newaxis].transpose((3, 2, 0, 1)))
114
115def tensor2vec(vector_tensor):
116 return vector_tensor.data.cpu().numpy()[:, :, 0, 0]
117
118def voc_ap(rec, prec, use_07_metric=False):
119 """ ap = voc_ap(rec, prec, [use_07_metric])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected