jax-js
System
Light
Dark
Search…
Preparing search index...
@jax-js/jax
grad
Function grad
grad
<
F
extends
(
...
args
:
any
[]
)
=>
JsTree
<
Array
>
>
(
f
:
F
,
)
:
(
...
primals
:
MappedJsTree
<
Parameters
<
F
>
,
Array
,
ArrayLike
>
,
)
=>
MappedJsTree
<
Parameters
<
F
>
[
0
]
,
ArrayLike
,
Array
>
Compute the gradient of a scalar-valued function
f
with respect to its first argument.
Type Parameters
F
extends
(
...
args
:
any
[]
)
=>
JsTree
<
Array
>
Parameters
f
:
F
Returns
(
...
primals
:
MappedJsTree
<
Parameters
<
F
>
,
Array
,
ArrayLike
>
,
)
=>
MappedJsTree
<
Parameters
<
F
>
[
0
]
,
ArrayLike
,
Array
>
jax-js
Loading...
Compute the gradient of a scalar-valued function
fwith respect to its first argument.