Nx
▼
Project version
v0.9.2
v0.9.1
v0.9.0
v0.8.0
v0.7.3
v0.7.2
v0.7.1
v0.7.0
v0.6.4
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.3
v0.5.2
v0.5.1
v0.5.0
v0.4.2
v0.4.1
v0.4.0
v0.3.0
v0.2.1
v0.2.0
v0.1.0
Pages
Modules
API Reference
Modules
Changelog
v0.7.3 (2024-07-01)
v0.7.2 (2024-04-27)
v0.7.1 (2024-02-27)
v0.7.0 (2024-02-22)
v0.6.4 (2023-11-13)
v0.6.3 (2023-11-09)
v0.6.2 (2023-09-21)
v0.6.1 (2023-09-12)
v0.6.0 (2023-08-15)
v0.5.3 (2023-04-14)
v0.5.2 (2023-03-21)
v0.5.1 (2023-02-18)
v0.5.0 (2023-02-10)
v0.4.2 (2023-01-13)
v0.4.1 (2022-12-07)
v0.4.0 (2022-10-25)
v0.3.0 (2022-08-13)
v0.2.1 (2022-06-04)
v0.2.0 (2022-04-28)
v0.1.0 (2022-01-06)
Exercises
Exercises: 1-20
Introduction
1-10
11-20
Guides
Introduction to Nx
Numerical Elixir
Nx and tensors
Tensor aware functions
Broadcasts
Numerical definitions (defn)
Automatic differentiation (autograd)
Introduction to Vectorization
What is vectorization?
Revectorization
Reshape and Broadcast Vectors
Nx
Sections
References
Creating tensors
Broadcasting
Access syntax (slicing)
Backends
Summary
Guards
is_tensor/1
Functions: Aggregates
all/2
all_close/3
any/2
argmax/2
argmin/2
covariance/2
covariance/3
logsumexp/2
mean/2
median/2
mode/2
product/2
reduce/4
reduce_max/2
reduce_min/2
standard_deviation/2
sum/2
variance/2
weighted_mean/3
Functions: Backend
backend_copy/2
backend_deallocate/1
backend_transfer/2
default_backend/0
default_backend/1
global_default_backend/1
with_default_backend/2
Functions: Conversion
deserialize/2
load_numpy!/1
load_numpy_archive!/1
serialize/2
to_batched/3
to_binary/2
to_flat_list/2
to_heatmap/2
to_list/1
to_number/1
to_template/1
to_tensor/1
Functions: Creation
bf16/1
eye/2
f16/1
f32/1
f64/1
from_binary/3
iota/2
linspace/3
make_diagonal/2
put_diagonal/3
s8/1
s16/1
s32/1
s64/1
sigil_M/2
sigil_V/2
take_diagonal/2
template/3
tensor/2
tri/3
tril/2
triu/2
u8/1
u16/1
u32/1
u64/1
Functions: Cumulative
cumulative_max/2
cumulative_min/2
cumulative_product/2
cumulative_sum/2
Functions: Element-wise
abs/1
acos/1
acosh/1
add/2
asin/1
asinh/1
atan2/2
atan/1
atanh/1
bitwise_and/2
bitwise_not/1
bitwise_or/2
bitwise_xor/2
cbrt/1
ceil/1
clip/3
complex/2
conjugate/1
cos/1
cosh/1
count_leading_zeros/1
divide/2
equal/2
erf/1
erf_inv/1
erfc/1
exp/1
expm1/1
fill/3
floor/1
greater/2
greater_equal/2
imag/1
is_infinity/1
is_nan/1
left_shift/2
less/2
less_equal/2
log1p/1
log2/1
log10/1
log/1
log/2
logical_and/2
logical_not/1
logical_or/2
logical_xor/2
map/3
max/2
min/2
multiply/2
negate/1
not_equal/2
phase/1
population_count/1
pow/2
quotient/2
real/1
remainder/2
right_shift/2
round/1
rsqrt/1
select/3
sigmoid/1
sign/1
sin/1
sinh/1
sqrt/1
subtract/2
tan/1
tanh/1
Functions: Indexed
gather/3
indexed_add/4
indexed_put/4
put_slice/3
slice/4
slice_along_axis/4
split/3
take/3
take_along_axis/3
Functions: N-dim
argsort/2
concatenate/2
conv/3
diff/2
dot/2
dot/4
dot/6
fft2/2
fft/2
ifft2/2
ifft/2
outer/2
reverse/2
sort/2
stack/2
top_k/2
Functions: Shape
axes/1
axis_index/2
axis_size/2
broadcast/3
byte_size/1
compatible?/2
devectorize/2
flat_size/1
flatten/2
names/1
new_axis/3
pad/3
rank/1
reflect/2
rename/2
reshape/3
shape/1
size/1
squeeze/2
tile/2
transpose/2
vectorize/2
Functions: Vectorization
broadcast_vectors/2
reshape_vectors/2
revectorize/3
Functions: Type
as_type/2
bitcast/2
type/1
Functions: Window
window_max/3
window_mean/3
window_min/3
window_product/3
window_reduce/5
window_scatter_max/5
window_scatter_min/5
window_sum/3
Types
axes/0
axis/0
shape/0
t/0
template/0
Nx.Constants
Summary
Functions
e/0
e/2
epsilon/2
euler_gamma/0
euler_gamma/2
i/0
i/2
infinity/0
infinity/2
max/2
max_finite/2
min/2
min_finite/2
nan/0
nan/2
neg_infinity/0
neg_infinity/2
pi/0
pi/2
smallest_positive_normal/2
Nx.Defn
Sections
Operators
JIT compilers
Invoking custom Elixir code
Inputs and outputs types
Recursion and loops
Summary
Functions
compile/3
debug_expr/2
debug_expr_apply/3
default_options/0
default_options/1
defn/2
defnp/2
deftransform/1
deftransform/2
deftransformp/1
deftransformp/2
global_default_options/1
grad/1
grad/2
jit/2
jit_apply/3
stream/3
to_backend/1
value_and_grad/1
value_and_grad/3
Nx.Defn.Kernel
Summary
Functions
&&&/2
**/2
*/2
+/1
+/2
-/1
-/2
../0
../2
..///3
//2
!=/2
</2
<<</2
<=/2
<>/2
==/2
>/2
>=/2
>>>/2
@/1
alias/2
and/2
assert_keys/2
attach_token/2
case/2
cond/1
create_token/0
custom_grad/3
div/2
elem/2
hook/2
hook/3
hook_token/3
hook_token/4
if/2
import/2
inspect/2
keyword!/2
max/2
min/2
not/1
or/2
print_expr/2
print_value/2
print_value/3
raise/1
raise/2
rem/2
require/2
stop_grad/1
tap/2
then/2
while/4
|>/2
|||/2
~~~/1
Nx.LinAlg
Summary
Functions
adjoint/1
cholesky/1
determinant/1
eigh/2
invert/1
least_squares/2
lu/2
matrix_power/2
matrix_rank/2
norm/2
pinv/2
qr/2
solve/2
svd/2
triangular_solve/3
Nx.LinAlg.Cholesky
Summary
Functions
cholesky/2
cholesky_grad/3
cholesky_matrix/2
Nx.LinAlg.Eigh
Summary
Functions
eigh/2
eigh_matrix/2
hessenberg_decomposition/2
Nx.LinAlg.QR
Summary
Functions
householder_reflector/3
qr/2
qr_grad/3
Nx.Random
Sections
Design and Context
Summary
Functions
choice/3
choice/4
fold_in/2
gumbel/2
gumbel_split/2
key/1
multivariate_normal/4
multivariate_normal_split/4
normal/2
normal/4
normal_split/4
randint/4
randint_split/4
shuffle/3
split/2
threefry2x32_20_concat/2
uniform/2
uniform/4
uniform_split/4
Nx.Serving
Sections
Inline/serverless workflow
Stateful/process workflow
Advanced notes
Summary
Types
client_info/0
client_postprocessing/0
client_preprocessing/0
distributed_postprocessing/0
distributed_preprocessing/0
metadata/0
t/0
Callbacks
handle_batch/3
init/3
Functions
batch_size/2
batched_run/3
client_postprocessing/2
client_preprocessing/2
defn_options/2
distributed_postprocessing/2
jit/2
new/2
new/3
process_options/2
run/2
start_link/1
streaming/2
Protocols
Nx.Container
Sections
Serialization
Summary
Types
t/0
Functions
reduce/3
serialize/1
traverse/3
Nx.LazyContainer
Summary
Types
t/0
Functions
traverse/3
Nx.Stream
Summary
Types
t/0
Functions
done/1
recv/1
send/2
Structs
Nx.Batch
Summary
Types
t/0
Functions
%Nx.Batch{}
concatenate/2
key/2
merge/1
merge/2
new/0
pad/2
split/2
stack/2
Nx.Heatmap
Nx.Tensor
Summary
Types
axes/0
axis/0
data/0
name/0
shape/0
t/0
t/1
type/0
Backends
Nx.Backend
Summary
Types
axes/0
axis/0
backend_options/0
shape/0
t/0
tensor/0
Callbacks
abs/2
acos/2
acosh/2
add/3
all/3
all_close/4
any/3
argmax/3
argmin/3
argsort/3
as_type/2
asin/2
asinh/2
atan2/3
atan/2
atanh/2
backend_copy/3
backend_deallocate/1
backend_transfer/3
bitcast/2
bitwise_and/3
bitwise_not/2
bitwise_or/3
bitwise_xor/3
broadcast/4
cbrt/2
ceil/2
cholesky/2
clip/4
concatenate/3
conjugate/2
constant/3
conv/4
cos/2
cosh/2
count_leading_zeros/2
cumulative_max/3
cumulative_min/3
cumulative_product/3
cumulative_sum/3
determinant/2
divide/3
dot/7
eigh/3
equal/3
erf/2
erf_inv/2
erfc/2
exp/2
expm1/2
eye/2
fft2/3
fft/3
floor/2
from_binary/3
gather/4
greater/3
greater_equal/3
ifft2/3
ifft/3
imag/2
indexed_add/5
indexed_put/5
init/1
inspect/2
iota/3
is_infinity/2
is_nan/2
left_shift/3
less/3
less_equal/3
log1p/2
log/2
logical_and/3
logical_not/2
logical_or/3
logical_xor/3
lu/3
map/4
max/3
min/3
multiply/3
negate/2
not_equal/3
optional/3
pad/4
phase/2
population_count/2
pow/3
product/3
put_slice/4
qr/3
quotient/3
real/2
reduce/5
reduce_max/3
reduce_min/3
remainder/3
reshape/2
reverse/3
right_shift/3
round/2
rsqrt/2
select/4
sigmoid/2
sign/2
sin/2
sinh/2
slice/5
solve/3
sort/3
sqrt/2
squeeze/3
subtract/3
sum/3
svd/3
take/4
take_along_axis/4
tan/2
tanh/2
to_batched/3
to_binary/2
top_k/3
transpose/3
triangular_solve/4
window_max/4
window_min/4
window_product/4
window_reduce/6
window_scatter_max/6
window_scatter_min/6
window_sum/4
Functions
complex_to_string/2
inspect/3
Nx.BinaryBackend
Nx.TemplateBackend
Nx.Type
Summary
Types
short_t/0
t/0
Functions
cast_number!/2
complex?/1
e_binary/1
epsilon_binary/1
euler_gamma_binary/1
float?/1
infer/1
infinity_binary/1
integer?/1
max_binary/1
max_finite_binary/1
merge/2
merge_number/2
min_binary/1
min_finite_binary/1
nan_binary/1
neg_infinity_binary/1
normalize!/1
pi_binary/1
smallest_positive_normal_binary/1
to_aggregate/1
to_complex/1
to_floating/1
to_real/1
to_string/1
Compilers
Nx.Defn.Compiler
Summary
Callbacks
__compile__/4
__jit__/5
__partitions_options__/1
__stream__/7
__to_backend__/1
Functions
current/0
defn?/0
Nx.Defn.Composite
Summary
Functions
compatible?/3
count/1
flatten_list/2
reduce/3
traverse/2
traverse/3
Nx.Defn.Evaluator
Sections
Options
Nx.Defn.Expr
Summary
Functions
%Nx.Defn.Expr{}
cond/2
metadata/2
parameter/2
parameter/3
parameter/4
tensor/1
tuple/2
while/5
Nx.Defn.Token
Sections
Documentation for compilers
Nx.Defn.Tree
Summary
Functions
apply_args/4
has_hooks?/2
put_args/2
scope_ids/2
Search documentation of Nx
Settings
View Source
Nx.LinAlg.Cholesky
(Nx v0.7.3)
Summary
Functions
cholesky(a, opts \\ [])
cholesky_grad(l, arg2, g)
cholesky_matrix(a, opts \\ [])
Functions
Link to this function
cholesky(a, opts \\ [])
View Source
Link to this function
cholesky_grad(l, arg2, g)
View Source
Link to this function
cholesky_matrix(a, opts \\ [])
View Source
×