MCPcopy Create free account
hub / github.com/AMAP-ML/Eevee / patch_tensor_constructor

Function patch_tensor_constructor

models/manager.py:57–62  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

55 module._buffers[name] = module._buffers[name].to(device)
56
57 def patch_tensor_constructor(fn):
58 def wrapper(*args, **kwargs):
59 kwargs["device"] = device
60 return fn(*args, **kwargs)
61
62 return wrapper
63
64 if include_buffers:
65 tensor_constructors_to_patch = {

Callers 1

init_weights_on_deviceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected