MCPcopy Index your code
hub / github.com/twitter/the-algorithm-ml / pin_memory

Method pin_memory

common/batch.py:29–33  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27 feature_value.record_stream(stream)
28
29 def pin_memory(self):
30 args = {}
31 for feature_name, feature_value in self.as_dict().items():
32 args[feature_name] = feature_value.pin_memory()
33 return self.__class__(**args)
34
35 def __repr__(self) -> str:
36 def obj2str(v):

Callers 1

_dense_tf_to_torchFunction · 0.80

Calls 1

as_dictMethod · 0.95

Tested by

no test coverage detected