7 Differentiable extended numerical functions
The gradients of functions constructed from the following functions as primitives can be computed using ∇, ∇¹ or gradient-of.
7.1 Extended operators
The same as (ext2 +-0-0 0 0).
When using malt/no-overrides, d+ should be used.
The same as (ext2 --0-0 0 0).
When using malt/no-overrides, d- should be used.
The same as (ext2 *-0-0 0 0).
When using malt/no-overrides, d-* should be used.
The same as (ext2 /-0-0 0 0).
When using malt/no-overrides, d-/ should be used.
The same as (ext2 expt-0-0 0 0).
When using malt/no-overrides, d-expt should be used.
The same as (ext1 exp-0 0).
When using malt/no-overrides, d-exp should be used.
The same as (ext1 log-0 0).
When using malt/no-overrides, d-log should be used.
The same as (ext1 abs-0 0).
When using malt/no-overrides, d-abs should be used.
The same as (expt t 1/2).
When using malt/no-overrides, d-sqrt should be used.
The same as (* t t).
When using malt/no-overrides, d-sqr should be used.
When t is of rank higher than 1, the Unary function extension rules apply.
The same as (ext1 sum-1 1).
When using malt/no-overrides, d-sum should be used.
When t is of rank higher than 2, the Unary function extension rules apply.
When t is of rank 1, this function is the same as sum.
The function is undefined if t is a scalar.
The same as (ext1 sum-1 2).
When using malt/no-overrides, d-sum-cols should be used.
When the ranks of t0 and t1 are higher than 2 and 1 respectively, the Binary function extension rules apply.
The function is undefined if t0 has rank less than 2 and t1 has rank less than 1.
The same as (ext2 * 2 1).
When using malt/no-overrides, d*-2-1 should be used.
When t is of rank higher than 1, the Unary function extension rules apply.
The function is undefined when t is of rank less than 1.
The same as (ext1 argmax-1 1).
When using malt/no-overrides, d-argmax should be used.
When t is of rank higher than 1, the Unary function extension rules apply.
The function is undefined when t is of rank less than 1.
The same as (ext1 max-1 1).
When using malt/no-overrides, d-max should be used.
Otherwise, the Binary function extension rules apply.
The function is undefined when t or u is of rank less than 1.
The same as (ext2 concat-1-1 1 1).
When using malt/no-overrides, d-concat should be used.
procedure
n : positive-integer? (d-concat-n n) → (-> ([t tensor?] [u tensor?]) tensor?) n : positive-integer?
Otherwise, the Binary function extension rules apply.
The function is undefined when t or u is of rank less than n.
When using malt/no-overrides, d-concat-n should be used.
When the ranks of t0 and t1 are higher than 2 and 1 respectively, the Binary function extension rules apply.
The function is undefined if t0 has rank less than 2 and t1 has rank less than 1.
The same as (sum (* t0 t1)).
When the ranks of t0 and t1 are higher than 2 and 1 respectively, the Binary function extension rules apply.
The function is undefined if t0 has rank less than 2 and t1 has rank less than 1.
The same as (sum (*-2-1 t0 t1)).
When the ranks of filter-bank and signal are higher than 3 and 2 respectively, the Binary function extension rules apply.