MCPcopy
hub / github.com/open-mmlab/mmpose / detach

Method detach

mmpose/structures/multilevel_pixel_data.py:250–252  ·  view source on GitHub ↗

Detach all tensors in data.

(self)

Source from the content-addressed store, hash-verified

248 return self._convert(apply_to=torch.Tensor, func=lambda x: x.cuda())
249
250 def detach(self) -> 'MultilevelPixelData':
251 """Detach all tensors in data."""
252 return self._convert(apply_to=torch.Tensor, func=lambda x: x.detach())
253
254 def numpy(self) -> 'MultilevelPixelData':
255 """Convert all tensor to np.narray in data."""

Callers 15

hookMethod · 0.80
to_numpyFunction · 0.80
revert_heatmapFunction · 0.80
numpyMethod · 0.80
__init__Method · 0.80
predictMethod · 0.80
predictMethod · 0.80
predictMethod · 0.80
predictMethod · 0.80
predictMethod · 0.80
forwardMethod · 0.80
pre_decoderMethod · 0.80

Calls 1

_convertMethod · 0.95

Tested by

no test coverage detected