MCPcopy
hub / github.com/OpenMotionLab/MotionGPT / detach

Method detach

mGPT/data/transforms/base.py:76–84  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

74 return self[self.datakeys[0]].device
75
76 def detach(self):
77
78 def detach_or_none(tensor):
79 if tensor is not None:
80 return tensor.detach()
81 return None
82
83 kwargs = {key: detach_or_none(self[key]) for key in self.datakeys}
84 return self.transforms.Datastruct(**kwargs)

Callers 15

fit.pyFile · 0.80
botFunction · 0.80
mainFunction · 0.80
detach_to_numpyFunction · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
updateMethod · 0.80
get_motion_embeddingsMethod · 0.80
get_motion_embeddingsMethod · 0.80
sqrtmFunction · 0.80

Calls 1

DatastructMethod · 0.45

Tested by

no test coverage detected