MCPcopy Create free account
hub / github.com/DataScienceHamburg/PyTorchUltimateMaterial / y_function

Function y_function

020_TensorIntro/Tensors.py:22–23  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

20print(x.requires_grad)
21#%% function for showing automatic gradient calculation
22def y_function(val):
23 return (val-3) * (val-6) * (val-4)
24
25x_range = np.linspace(0, 10, 101)
26x_range

Callers 1

Tensors.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected