org.apache.clojure-mxnet.ndarray

NDArray API for Clojure package.

%

(% ndarray ndarray-or-double-or-float)

%=

(%= ndarray double-or-float-or-ndarray)

*

(* ndarray ndarray-or-double-or-float)

**

(** ndarray double-or-float-or-ndarray)

**=

(**= ndarray ndarray-or-double-or-float)

*=

(*= ndarray ndarray-or-double-or-float)

+

(+ ndarray ndarray-or-double-or-float)

+=

(+= ndarray double-or-float-or-ndarray)

-

(- ndarray ndarray-or-double-or-float)

-=

(-= ndarray double-or-float-or-ndarray)

->byte-vec

(->byte-vec ndarray)

->double-vec

(->double-vec ndarray)

->float-vec

(->float-vec ndarray)

->int-vec

(->int-vec ndarray)

->nd-vec

(->nd-vec ndarray)
Convert an ndarray `ndarray` into a n-dimensional Clojure vector.
Ex:
  (->nd-vec (array [1] [1 1 1]))           ;[[[1.0]]]
  (->nd-vec (array [1 2 3] [3 1 1]))       ;[[[1.0]] [[2.0]] [[3.0]]]
  (->nd-vec (array [1 2 3 4 5 6]) [3 1 2]) ;[[[1.0 2.0]] [[3.0 4.0]] [[5.0 6.0]]]

->ndarray

(->ndarray nd-vec {:keys [ctx], :or {ctx (mx-context/default-context)}, :as opts})(->ndarray nd-vec)
Creates a new NDArray based on the given n-dimenstional vector
of numbers.
 `nd-vec`: n-dimensional vector with numbers.
 `opts-map` {
    `ctx`: Context of the output ndarray, will use default context if unspecified.
 }
 returns: `ndarray` with the given values and matching the shape of the input vector.
Ex:
 (->ndarray [5.0 -4.0])
 (->ndarray [5 -4] {:ctx (context/cpu)})
 (->ndarray [[1 2 3] [4 5 6]])
 (->ndarray [[[1.0] [2.0]]]

->raw

(->raw ndarray)

->vec

(->vec ndarray)
Converts a nd-array to a vector (one dimensional)

/

(/ ndarray num-or-NDArray)

<

(< ndarray double-or-float-or-ndarray)

<=

(<= ndarray double-or-float-or-ndarray)

>

(> ndarray double-or-float-or-ndarray)

>=

(>= ndarray double-or-float-or-ndarray)

abs

(abs & nd-array-and-params)

activation

(activation & nd-array-and-params)

adam-update

(adam-update & nd-array-and-params)

add-n

(add-n & nd-array-and-params)

api

(api)

arange

(arange start stop {:keys [step repeat ctx dtype], :or {step (float 1), repeat (int 1), ctx (mx-context/default-context), dtype base/MX_REAL_TYPE}, :as opts})(arange start stop)
Returns evenly spaced values within a given interval.
Values are generated within the half-open interval [`start`, `stop`). In other
words, the interval includes `start` but excludes `stop`.

arccos

(arccos & nd-array-and-params)

arccosh

(arccosh & nd-array-and-params)

arcsin

(arcsin & nd-array-and-params)

arcsinh

(arcsinh & nd-array-and-params)

arctan

(arctan & nd-array-and-params)

arctanh

(arctanh & nd-array-and-params)

argmax

(argmax & nd-array-and-params)

argmax-channel

(argmax-channel & nd-array-and-params)

argmin

(argmin & nd-array-and-params)

argsort

(argsort & nd-array-and-params)

array

(array source-vec shape-vec {:keys [ctx dtype], :or {ctx (mx-context/default-context)}, :as opts})(array source-vec shape-vec)
Create a new NDArray that copies content from source vector

as-in-context

(as-in-context ndarray ctx)
Return an `NDArray` that lives in the target context. If the array
is already in that context, `self` is returned. Otherwise, a copy is made.

as-type

(as-type ndarray dtype)
Return a copied numpy array of current array with specified type.

at

(at ndarray num)

batch-dot

(batch-dot & nd-array-and-params)

batch-norm

(batch-norm & nd-array-and-params)

batch-norm-v1

(batch-norm-v1 & nd-array-and-params)

batch-take

(batch-take & nd-array-and-params)

bilinear-sampler

(bilinear-sampler & nd-array-and-params)

block-grad

(block-grad & nd-array-and-params)

broadcast-add

(broadcast-add & nd-array-and-params)

broadcast-axes

(broadcast-axes & nd-array-and-params)

broadcast-axis

(broadcast-axis & nd-array-and-params)

broadcast-div

(broadcast-div & nd-array-and-params)

broadcast-equal

(broadcast-equal & nd-array-and-params)

broadcast-greater

(broadcast-greater & nd-array-and-params)

broadcast-greater-equal

(broadcast-greater-equal & nd-array-and-params)

broadcast-hypot

(broadcast-hypot & nd-array-and-params)

broadcast-lesser

(broadcast-lesser & nd-array-and-params)

broadcast-lesser-equal

(broadcast-lesser-equal & nd-array-and-params)

broadcast-like

(broadcast-like & nd-array-and-params)

broadcast-logical-and

(broadcast-logical-and & nd-array-and-params)

broadcast-logical-or

(broadcast-logical-or & nd-array-and-params)

broadcast-logical-xor

(broadcast-logical-xor & nd-array-and-params)

broadcast-maximum

(broadcast-maximum & nd-array-and-params)

broadcast-minimum

(broadcast-minimum & nd-array-and-params)

broadcast-minus

(broadcast-minus & nd-array-and-params)

broadcast-mod

(broadcast-mod & nd-array-and-params)

broadcast-mul

(broadcast-mul & nd-array-and-params)

broadcast-not-equal

(broadcast-not-equal & nd-array-and-params)

broadcast-plus

(broadcast-plus & nd-array-and-params)

broadcast-power

(broadcast-power & nd-array-and-params)

broadcast-sub

(broadcast-sub & nd-array-and-params)

broadcast-to

(broadcast-to & nd-array-and-params)

bytes-allocated

(bytes-allocated ndarray)

cast

(cast & nd-array-and-params)

cast-storage

(cast-storage & nd-array-and-params)

cbrt

(cbrt & nd-array-and-params)

ceil

(ceil & nd-array-and-params)

choose-element-0index

(choose-element-0index & nd-array-and-params)

clip

(clip & nd-array-and-params)

close

(close ndarray)

concat

(concat & nd-array-and-params)

concatenate

(concatenate ndarrays {:keys [axis always-copy], :or {axis 1, always-copy true}})(concatenate ndarrays)

context

(context ndarray)

convolution

(convolution & nd-array-and-params)

convolution-v1

(convolution-v1 & nd-array-and-params)

copy

(copy ndarray)

copy-to

(copy-to source-ndarray target-ndarray)
Copy the content of current array to other

correlation

(correlation & nd-array-and-params)

cos

(cos & nd-array-and-params)

cosh

(cosh & nd-array-and-params)

creation-trace

(creation-trace ndarray)

crop

(crop & nd-array-and-params)

ctc-loss

(ctc-loss & nd-array-and-params)

custom

(custom & nd-array-and-params)

deconvolution

(deconvolution & nd-array-and-params)

degrees

(degrees & nd-array-and-params)

dependencies

(dependencies ndarray)

depth-to-space

(depth-to-space & nd-array-and-params)

deserialize

(deserialize byte-array)

diag

(diag & nd-array-and-params)

dispose

(dispose ndarray)(dispose ndarray bool)

dispose-deps

(dispose-deps ndarray)

dispose-deps-except

(dispose-deps-except ndarray & nd-array-and-params)

div

(div ndarray ndarray-or-double-or-float)

div=

(div= ndarray double-or-float-or-ndarray)

dot

(dot & nd-array-and-params)

dropout

(dropout & nd-array-and-params)

dtype

(dtype ndarray)

element-wise-sum

(element-wise-sum & nd-array-and-params)

elemwise-add

(elemwise-add & nd-array-and-params)

elemwise-div

(elemwise-div & nd-array-and-params)

elemwise-mul

(elemwise-mul & nd-array-and-params)

elemwise-sub

(elemwise-sub & nd-array-and-params)

embedding

(embedding & nd-array-and-params)

empty

(empty shape-vec {:keys [ctx dtype], :or {ctx (mx-context/default-context), dtype base/MX_REAL_TYPE}, :as opts})(empty shape-vec)
Create an empty uninitialized new NDArray, with specified shape

equal

(equal ndarray-or-ndarray double-or-float-or-ndarray)

equals

(equals ndarray Object)

erf

(erf & nd-array-and-params)

erfinv

(erfinv & nd-array-and-params)

exp

(exp & nd-array-and-params)

expand-dims

(expand-dims & nd-array-and-params)

expm1

(expm1 & nd-array-and-params)

fill-element-0index

(fill-element-0index & nd-array-and-params)

finalize

(finalize ndarray)

fix

(fix & nd-array-and-params)

flatten

(flatten & nd-array-and-params)

flip

(flip & nd-array-and-params)

floor

(floor & nd-array-and-params)

ftml-update

(ftml-update & nd-array-and-params)

ftrl-update

(ftrl-update & nd-array-and-params)

full

(full shape-vec value {:keys [ctx dtype], :or {ctx (mx-context/default-context)}, :as opts})(full shape-vec value)
Create a new NDArray filled with given value, with specified shape.

fully-connected

(fully-connected & nd-array-and-params)

gamma

(gamma & nd-array-and-params)

gammaln

(gammaln & nd-array-and-params)

gather-nd

(gather-nd & nd-array-and-params)

greater

(greater ndarray-or-ndarray ndarray-or-double-or-float)

greater-equal

(greater-equal ndarray-or-ndarray double-or-float-or-ndarray)

grid-generator

(grid-generator & nd-array-and-params)

handle

(handle ndarray)

hard-sigmoid

(hard-sigmoid & nd-array-and-params)

hash-code

(hash-code ndarray)

identity

(identity & nd-array-and-params)

identity-attach-kl-sparse-reg

(identity-attach-kl-sparse-reg & nd-array-and-params)

instance-norm

(instance-norm & nd-array-and-params)

internal

(internal ndarray)

is-de-allocated

(is-de-allocated ndarray)

is-disposed

(is-disposed ndarray)

khatri-rao

(khatri-rao & nd-array-and-params)

l2-normalization

(l2-normalization & nd-array-and-params)

layer-norm

(layer-norm & nd-array-and-params)

leaky-re-lu

(leaky-re-lu & nd-array-and-params)

lesser

(lesser ndarray-or-ndarray ndarray-or-double-or-float)

lesser-equal

(lesser-equal ndarray-or-ndarray ndarray-or-double-or-float)

linalg-extractdiag

(linalg-extractdiag & nd-array-and-params)

linalg-extracttrian

(linalg-extracttrian & nd-array-and-params)

linalg-gelqf

(linalg-gelqf & nd-array-and-params)

linalg-gemm

(linalg-gemm & nd-array-and-params)

linalg-gemm2

(linalg-gemm2 & nd-array-and-params)

linalg-inverse

(linalg-inverse & nd-array-and-params)

linalg-makediag

(linalg-makediag & nd-array-and-params)

linalg-maketrian

(linalg-maketrian & nd-array-and-params)

linalg-potrf

(linalg-potrf & nd-array-and-params)

linalg-potri

(linalg-potri & nd-array-and-params)

linalg-sumlogdiag

(linalg-sumlogdiag & nd-array-and-params)

linalg-syrk

(linalg-syrk & nd-array-and-params)

linalg-trmm

(linalg-trmm & nd-array-and-params)

linalg-trsm

(linalg-trsm & nd-array-and-params)

linear-regression-output

(linear-regression-output & nd-array-and-params)

load

(load filename)
Takes a filename and returns back a map of ndarray-name to ndarray

load-from-file

(load-from-file fname)
Load one ndarry from a file

load2-array

(load2-array String)

load2-map

(load2-map String)

log

(log & nd-array-and-params)

log-dispose-warning

(log-dispose-warning ndarray)

log-softmax

(log-softmax & nd-array-and-params)

log10

(log10 & nd-array-and-params)

log1p

(log1p & nd-array-and-params)

log2

(log2 & nd-array-and-params)

logical-not

(logical-not & nd-array-and-params)

logistic-regression-output

(logistic-regression-output & nd-array-and-params)

lrn

(lrn & nd-array-and-params)

mae-regression-output

(mae-regression-output & nd-array-and-params)

make-loss

(make-loss & nd-array-and-params)

max

(max & nd-array-and-params)

max-axis

(max-axis & nd-array-and-params)

maximum

(maximum ndarray-or-ndarray-or-double-or-float double-or-float-or-ndarray-or-ndarray)

mean

(mean & nd-array-and-params)

min

(min & nd-array-and-params)

min-axis

(min-axis & nd-array-and-params)

minimum

(minimum ndarray-or-ndarray-or-double-or-float double-or-float-or-ndarray-or-ndarray)

moments

(moments & nd-array-and-params)

mp-sgd-mom-update

(mp-sgd-mom-update & nd-array-and-params)

mp-sgd-update

(mp-sgd-update & nd-array-and-params)

multi-mp-sgd-mom-update

(multi-mp-sgd-mom-update & nd-array-and-params)

multi-mp-sgd-update

(multi-mp-sgd-update & nd-array-and-params)

multi-sgd-mom-update

(multi-sgd-mom-update & nd-array-and-params)

multi-sgd-update

(multi-sgd-update & nd-array-and-params)

nanprod

(nanprod & nd-array-and-params)

nansum

(nansum & nd-array-and-params)

native-address

(native-address ndarray)

native-de-allocator

(native-de-allocator ndarray)

negative

(negative & nd-array-and-params)

norm

(norm & nd-array-and-params)

normal

(normal & nd-array-and-params)

not-equal

(not-equal ndarray-or-ndarray ndarray-or-double-or-float)

one-hot

(one-hot & nd-array-and-params)

onehot-encode

(onehot-encode ndarray ndarray-1)

ones

(ones shape-vec {:keys [ctx dtype], :or {ctx (mx-context/default-context), dtype base/MX_REAL_TYPE}, :as opts})(ones shape-vec)
Create a new NDArray filled with 1, with specified shape.

ones-like

(ones-like & nd-array-and-params)

org.apache.mxnet.nd-array

(org.apache.mxnet.nd-array ndarray long bool bool-1)(org.apache.mxnet.nd-array ndarray long bool)

pad

(pad & nd-array-and-params)

pick

(pick & nd-array-and-params)

pooling

(pooling & nd-array-and-params)

pooling-v1

(pooling-v1 & nd-array-and-params)

power

(power double-or-float-or-ndarray-or-ndarray ndarray-or-double-or-float-or-ndarray)

prod

(prod & nd-array-and-params)

radians

(radians & nd-array-and-params)

random

(random)

random-exponential

(random-exponential & nd-array-and-params)

random-gamma

(random-gamma & nd-array-and-params)

random-generalized-negative-binomial

(random-generalized-negative-binomial & nd-array-and-params)

random-negative-binomial

(random-negative-binomial & nd-array-and-params)

random-normal

(random-normal & nd-array-and-params)

random-poisson

(random-poisson & nd-array-and-params)

random-randint

(random-randint & nd-array-and-params)

random-uniform

(random-uniform & nd-array-and-params)

ravel-multi-index

(ravel-multi-index & nd-array-and-params)

rcbrt

(rcbrt & nd-array-and-params)

reciprocal

(reciprocal & nd-array-and-params)

ref

(ref ndarray)

register

(register ndarray)

relu

(relu & nd-array-and-params)

repeat

(repeat & nd-array-and-params)

reshape

(reshape ndarray Shape-or-vec-of-ints)(reshape ndarray long<> Option)

reshape-like

(reshape-like & nd-array-and-params)

reverse

(reverse & nd-array-and-params)

rint

(rint & nd-array-and-params)

rmsprop-update

(rmsprop-update & nd-array-and-params)

rmspropalex-update

(rmspropalex-update & nd-array-and-params)

rnn

(rnn & nd-array-and-params)

roi-pooling

(roi-pooling & nd-array-and-params)

round

(round & nd-array-and-params)

rsqrt

(rsqrt & nd-array-and-params)

sample-exponential

(sample-exponential & nd-array-and-params)

sample-gamma

(sample-gamma & nd-array-and-params)

sample-generalized-negative-binomial

(sample-generalized-negative-binomial & nd-array-and-params)

sample-multinomial

(sample-multinomial & nd-array-and-params)

sample-negative-binomial

(sample-negative-binomial & nd-array-and-params)

sample-normal

(sample-normal & nd-array-and-params)

sample-poisson

(sample-poisson & nd-array-and-params)

sample-uniform

(sample-uniform & nd-array-and-params)

save

(save fname map-of-name-to-ndarray)
Save list of NDArray or dict of str->NDArray to binary file
(The name of the file.Can be S3 or HDFS address (remember built with S3 support))
Example of fname:
  *     - `s3://my-bucket/path/my-s3-ndarray`
  *     - `hdfs://my-bucket/path/my-hdfs-ndarray`
  *     - `/path-to/my-local-ndarray`

save-to-file

(save-to-file fname ndarray)
Save one ndarray to a file

scatter-nd

(scatter-nd & nd-array-and-params)

scope

(scope ndarray)

scope-=

(scope-= ndarray Option)

sequence-last

(sequence-last & nd-array-and-params)

sequence-mask

(sequence-mask & nd-array-and-params)

sequence-reverse

(sequence-reverse & nd-array-and-params)

serialize

(serialize ndarray)

set

(set ndarray ndarray-or-double-or-float-or-vec-of-floats-or-double<>)

sgd-mom-update

(sgd-mom-update & nd-array-and-params)

sgd-update

(sgd-update & nd-array-and-params)

shape

(shape ndarray)

shape-array

(shape-array & nd-array-and-params)

shape-vec

(shape-vec ndarray)

shuffle

(shuffle & nd-array-and-params)

sigmoid

(sigmoid & nd-array-and-params)

sign

(sign & nd-array-and-params)

signsgd-update

(signsgd-update & nd-array-and-params)

signum-update

(signum-update & nd-array-and-params)

sin

(sin & nd-array-and-params)

sinh

(sinh & nd-array-and-params)

size

(size ndarray)

size-array

(size-array & nd-array-and-params)

slice

(slice ndarray i)(slice ndarray start stop)
Return a sliced NDArray that shares memory with current one.

slice-axis

(slice-axis & nd-array-and-params)

slice-channel

(slice-channel & nd-array-and-params)

slice-like

(slice-like & nd-array-and-params)

smooth-l1

(smooth-l1 & nd-array-and-params)

softmax

(softmax & nd-array-and-params)

softmax-activation

(softmax-activation & nd-array-and-params)

softmax-cross-entropy

(softmax-cross-entropy & nd-array-and-params)

softmax-output

(softmax-output & nd-array-and-params)

softmin

(softmin & nd-array-and-params)

softsign

(softsign & nd-array-and-params)

sort

(sort & nd-array-and-params)

space-to-depth

(space-to-depth & nd-array-and-params)

spatial-transformer

(spatial-transformer & nd-array-and-params)

split

(split & nd-array-and-params)

sqrt

(sqrt & nd-array-and-params)

square

(square & nd-array-and-params)

squeeze

(squeeze & nd-array-and-params)

stack

(stack & nd-array-and-params)

stop-gradient

(stop-gradient & nd-array-and-params)

sum

(sum & nd-array-and-params)

sum-axis

(sum-axis & nd-array-and-params)

svm-output

(svm-output & nd-array-and-params)

swap-axis

(swap-axis & nd-array-and-params)

swapaxes

(swapaxes & nd-array-and-params)

t

(t ndarray)

take

(take & nd-array-and-params)

tan

(tan & nd-array-and-params)

tanh

(tanh & nd-array-and-params)

tile

(tile & nd-array-and-params)

to-array

(to-array ndarray)

to-float64-array

(to-float64-array ndarray)

to-float64-scalar

(to-float64-scalar ndarray)

to-scalar

(to-scalar ndarray)

to-string

(to-string ndarray)

topk

(topk & nd-array-and-params)

tracing-enabled

(tracing-enabled ndarray)

transpose

(transpose & nd-array-and-params)

trunc

(trunc & nd-array-and-params)

unary--

(unary-- ndarray)

uniform

(uniform & nd-array-and-params)

unravel-index

(unravel-index & nd-array-and-params)

up-sampling

(up-sampling & nd-array-and-params)

wait-to-read

(wait-to-read ndarray)

waitall

(waitall)

where

(where & nd-array-and-params)

writable

(writable ndarray)

zeros

(zeros shape-vec {:keys [ctx dtype], :or {ctx (mx-context/default-context), dtype base/MX_REAL_TYPE}, :as opts})(zeros shape-vec)
Create a new NDArray filled with 0, with specified shape.

zeros-like

(zeros-like & nd-array-and-params)