NDArray API

Arithmetic Operations

In the following example y can be a Real value or another NDArray

API Example
+ x .+ y Elementwise summation
- x .- y Elementwise minus
* x .* y Elementwise multiplication
/ x ./ y Elementwise division
^ x .^ y Elementwise power
% x .% y Elementwise modulo

Trigonometric Functions

API Example
sin sin.(x) Elementwise sine
cos cos.(x) Elementwise cosine
tan tan.(x) Elementwise tangent
asin asin.(x) Elementwise inverse sine
acos acos.(x) Elementwise inverse cosine
atan atan.(x) Elementwise inverse tangent

Hyperbolic Functions

API Example
sinh sinh.(x) Elementwise hyperbolic sine
cosh cosh.(x) Elementwise hyperbolic cosine
tanh tanh.(x) Elementwise hyperbolic tangent
asinh asinh.(x) Elementwise inverse hyperbolic sine
acosh acosh.(x) Elementwise inverse hyperbolic cosine
atanh atanh.(x) Elementwise inverse hyperbolic tangent

Activation Functions

API Example
σ σ.(x) Sigmoid function
sigmoid sigmoid.(x) Sigmoid function
relu relu.(x) ReLU function
softmax softmax.(x) Softmax function
log_softmax log_softmax.(x) Softmax followed by log

Reference