MCPcopy
hub / github.com/tinygrad/tinygrad / _param

Function _param

test/backend/test_optim.py:13–14  ·  view source on GitHub ↗
(tensor, val)

Source from the content-addressed store, hash-verified

11m_init = np.random.randn(1,4).astype(np.float32)
12
13def _param(tensor, val):
14 return tensor(val, requires_grad=True) if tensor is torch.tensor else tensor(val)
15
16class TeenyNet:
17 def __init__(self, tensor):

Callers 2

__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…