Liking cljdoc? Tell your friends :D

uncomplicate.diamond.internal.protocols

Internal Deep Diamond API mostly relevant to programmers who write tools, extensions and additional backend engines.

When implementing your own backend, in addition to the light documentation provided in this namespace, please refer to the DNNL implementation and its tests. It is currently the most complete one. Next, see the cuDNN GPU backend to see how it solves differences in general approach to computation. There are countless small and not so small gotchas with these complex technologies, so expect lots of debugging.

Internal Deep Diamond API mostly relevant to programmers who write tools, extensions
and additional backend engines.

When implementing your own backend, in addition to the light documentation provided in this
namespace, please refer to the DNNL implementation and its tests. It is currently the most
complete one. Next, see the cuDNN GPU backend to see how it solves differences in general
approach to computation. There are countless small and not so small gotchas with these
complex technologies, so expect lots of debugging.
raw docstring

*workspace*clj


Backpropcljprotocol

An object that can be trained with the backpropagation algorithm.

An object that can be trained with the backpropagation algorithm.

backwardclj

(backward this)
(backward this hyperparam)

Do the backward pass with the provided hyperparam s relevant to the encompassing backprop variants such as stochastic gradient descent or Adam.

Do the backward pass with the provided `hyperparam` s relevant to the encompassing backprop
variants such as stochastic gradient descent or Adam.

forwardclj

(forward this)
(forward this hyperparam)

Do the forward pass with the provided hyperparam s relevant to the encompassing backprop variants such as stochastic gradient descent or Adam.

Do the forward pass with the provided `hyperparam` s relevant to the encompassing backprop
variants such as stochastic gradient descent or Adam.
raw docstring

BatchDescriptorcljprotocol

An object that can provide information relevant for batch based computation.

An object that can provide information relevant for batch based computation.

batch-indexclj

(batch-index this)

The index of batch in tensor shape (typically 0, but can be 1 for RNN).

The index of batch in tensor shape (typically 0, but can be 1 for RNN).
raw docstring

CostFactorycljprotocol

A backend factory for supported cost implementations.

A backend factory for supported cost implementations.

crossentropy-costclj

(crossentropy-cost this last-layer train-tz)

Create cross-entropy cost blueprint.

Create cross-entropy cost blueprint.

mean-absolute-costclj

(mean-absolute-cost this last-layer train-tz)

Create absolute cost blueprint.

Create absolute cost blueprint.

quadratic-costclj

(quadratic-cost this last-layer train-tz)

Create quadratic cost blueprint.

Create quadratic cost blueprint.
raw docstring

DescriptorProvidercljprotocol

An object that can provide several descriptors for connecting with other layers in different contexts (inference, training, and gradients.)

An object that can provide several descriptors for connecting with other layers
in different contexts (inference, training, and gradients.)

diff-descclj

(diff-desc this)

Descriptor used for propagating gradients.

Descriptor used for propagating gradients.

inf-descclj

(inf-desc this)

Descriptor used in inference layer.

Descriptor used in inference layer.

train-descclj

(train-desc this)

Descriptor used in training layer.

Descriptor used in training layer.
raw docstring

DiamondFactoryProvidercljprotocol

An object that can provide a DD backend factory, and native backend factory.

An object that can provide a DD backend factory, and native backend factory.

diamond-factoryclj

(diamond-factory this)

Returens the backend factory related to this object.

Returens the backend factory related to this object.

native-diamond-factoryclj

(native-diamond-factory this)

Returns native backend factory related to this object.

Returns native backend factory related to this object.
raw docstring

DiffParameterscljprotocol

An object that has weights gradients (typically objects that can be used in training).

An object that has weights gradients (typically objects that can be used in training).

diff-weightsclj

(diff-weights this)

Gradient weights tensor.

Gradient weights tensor.
raw docstring

DiffTransfercljprotocol

An object that can transfer gradient data.

An object that can transfer gradient data.

diff-inputclj

(diff-input this)

Gradients at the input of this.

Gradients at the input of `this`.

diff-outputclj

(diff-output this)

Gradients at the output of this.

Gradients at the output of `this`.

diff-zclj

(diff-z this)

Gradients after the linear part of this transformation.

Gradients after the linear part of `this` transformation.
raw docstring

DnnFactorycljprotocol

A backend factory for neural networks related structures, that typically creates blueprints for common layers such as fully connected layers, convolutions, batch normalization, etc.

A backend factory for neural networks related structures, that typically
creates blueprints for common layers such as fully connected layers,
convolutions, batch normalization, etc.

inner-product-blueprintclj

(inner-product-blueprint this src-desc dst-desc weights-type)

Create technology specific inner product blueprint with input src-desc, output dst-desc, and weights-type keyword.

Create technology specific inner product blueprint with input `src-desc`,
output `dst-desc`, and `weights-type` keyword.

gaussian-dropout-blueprintclj

(gaussian-dropout-blueprint this src-desc sd)

Create dropout layer blueprint with input src-desc, and standard deviation scalar sd.

Create dropout layer blueprint with input `src-desc`, and standard deviation scalar `sd`.

create-workspaceclj

(create-workspace this byte-size)

Creates technology specific workspace of byte-size size.

Creates technology specific workspace of `byte-size` size.

sum-blueprintclj

(sum-blueprint this src-descs)

Create summing layer blueprint with inputs src-descs.

Create summing layer blueprint with inputs `src-descs`.

concat-blueprintclj

(concat-blueprint this src-descs conc-dim dst-type)

Create concatenation layer blueprint with inputs src-descs, scalar conc-dim, and dst-type keyword.

Create concatenation layer blueprint with inputs `src-descs`, scalar `conc-dim`,
and `dst-type` keyword.

fc-blueprintclj

(fc-blueprint this src-desc dst-desc activ alpha beta weights-type)

Create fully connected (dense) layer blueprint with input src-desc, output dst-desc, activ keyword, alpha, and beta scalar parameters, and weights-type keyword.

Create fully connected (dense) layer blueprint with input `src-desc`,
output `dst-desc`, `activ` keyword, `alpha`, and `beta` scalar parameters,
and `weights-type` keyword.

pooling-blueprintclj

(pooling-blueprint this src-desc dst-desc algo strides kernel padding)

Create pooling layer blueprint with input src-desc, output dst-desc, algorithm keyword algo, strides, kernel, and padding Clojure vectors.

Create pooling layer blueprint with input `src-desc`, output `dst-desc`,
algorithm keyword `algo`, `strides`, `kernel`, and `padding` Clojure vectors.

activ-blueprintclj

(activ-blueprint this src-desc activ alpha beta)

Create technology specific activation blueprint from src-desc, activ keyword, alpha, and beta scalar parameters.

Create technology specific activation blueprint from `src-desc`,
`activ` keyword, `alpha`, and `beta` scalar parameters.

branch-blueprintclj

(branch-blueprint this src-desc split-dim dst-descs)

Create branch layer blueprint with input src-desc, scalar split-dim, and dst-descs outputs.

Create branch layer blueprint with input `src-desc`, scalar `split-dim`,
and `dst-descs` outputs.

batch-norm-blueprintclj

(batch-norm-blueprint this src-desc activ alpha beta)

Create batch normalization layer blueprint with input src-desc, activ keyword, alpha, and beta scalar parameters.

Create batch normalization layer blueprint with input `src-desc`, `activ` keyword,
`alpha`, and `beta` scalar parameters.

convolution-blueprintclj

(convolution-blueprint this
                       src-desc
                       kernel-desc
                       dst-desc
                       activ
                       strides
                       padding
                       dilation
                       alpha
                       beta)

Create convolution layer blueprint with input src-desc, kernel kernel-desc, output dst-desc, algorithm keyword algo, activ keyword, strides, padding and dilation Clojure vectors, alpha, and beta scalar parameters.

Create convolution layer blueprint with input `src-desc`, kernel `kernel-desc`,
output `dst-desc`, algorithm keyword `algo`, `activ` keyword, `strides`, `padding` and
`dilation` Clojure vectors, `alpha`, and `beta` scalar parameters.

split-blueprintclj

(split-blueprint this src-desc n)

Create split layer blueprint with input src-desc, and scalar n, the number of splits at the output.

Create split layer blueprint with input `src-desc`, and scalar `n`, the number of splits at the output.
raw docstring

Initializablecljprotocol

An object that can be initialized with a provided function init-fn.

An object that can be initialized with a provided function `init-fn`.

initclj

(init this init-fn)

Initialize this with init-fn.

Initialize `this` with `init-fn`.
raw docstring

LinearBackpropcljprotocol

An object that provides hooks of the linear part of the backward pass.

An object that provides hooks of the linear part of the backward pass.

backward-diffclj

(backward-diff this scal-diff-w scal-g scal-diff-b scal-b)

Compute the linear part of the backward gradient computation of the backprop algorithm.

Compute the linear part of the backward gradient computation of the backprop algorithm.
raw docstring

MappedTensorFactorycljprotocol

A backend factory for memory-mapped tensor-related structures, such as the mapped tensors themselves.

A backend factory for memory-mapped tensor-related structures, such as the mapped tensors themselves.

map-channelclj

(map-channel this channel desc flag offset-bytes n-index)

Create a mapped tensor from the provided FileChannel, descriptor desc, mapping flags.

Create a mapped tensor from the provided `FileChannel`, descriptor `desc`, mapping `flags`.
raw docstring

NeanderthalFactoryProvidercljprotocol

An object that can provide relevant Neanderthal backend factory for the provided dtype (typically a keyword such as :float, :int, etc.). Most backends are supposed to provide these factories for Java primitive types supported by Neanderthal.

Anyway, don't forget to check out both DNNL and cuDNN implementations, AND the relevant tests. They are the final sources of truth, not these docstrings; if the docs and tests don't match, the tests are right, and the docstrings are wrong.

An object that can provide relevant Neanderthal backend factory for the provided
`dtype` (typically a keyword such as `:float`, `:int`, etc.). Most backends are
supposed to provide these factories for Java primitive types supported by Neanderthal.

Anyway, don't forget to check out both DNNL and cuDNN implementations, AND the relevant **tests**.
They are the final sources of truth, not these docstrings; if the docs and tests don't match,
the tests are right, and the docstrings are wrong.

neanderthal-factoryclj

(neanderthal-factory this dtype)

Returns Neanderthal backend factory related to this DD object.

Returns Neanderthal backend factory related to this DD object.
raw docstring

Offsetcljprotocol

An object for which the memory region that it controls can be (destructively) changed.

An object for which the memory region that it controls can be (destructively) changed.

offsetclj

(offset tz n-ofst)

Offsets the underlying memory region for this tz by n-ofst batches (not in bytes or scalar entries).

Offsets the underlying memory region for this `tz` by `n-ofst` batches
(not in bytes or scalar entries).
raw docstring

Parameterscljprotocol

An object that has trainable parameters.

An object that has trainable parameters.

biasclj

(bias this)

Provides tensor that contains bias, or anything that can be considered bias in the context of learning algorithms.

Provides tensor that contains bias, or anything that can be considered bias in the context of learning algorithms.

weightsclj

(weights this)

Provides tensor that contains weights, or anything that can be considered weights in the context of learning algorithms.

Provides tensor that contains weights, or anything that can be considered weights in the context of learning algorithms.
raw docstring

ParametersSeqcljprotocol

An object that has a sequence of parameters.

An object that has a sequence of parameters.

parametersclj

(parameters this)
raw docstring

RnnFactorycljprotocol

A backend factory for recurrent neural networks (RNN) related structures, that typically creates blueprints for RNN operations and layers.

A backend factory for recurrent neural networks (RNN) related structures, that typically
creates blueprints for RNN operations and layers.

abbreviate-blueprintclj

(abbreviate-blueprint fact src-desc dst-type)

Creates a RNN output sequence abbreviation blueprint.

Creates a RNN output sequence abbreviation blueprint.

rnn-blueprintclj

(rnn-blueprint fact
               src-desc
               dst-desc
               lrs
               activ
               alpha
               weights-type
               src-iter?
               dst-iter?)

Create RNN layer with src-desc, dst-desc, activ keyword, weights-type keyword, and booleans src-iter?, and dst-iter?.

Create RNN layer with `src-desc`, `dst-desc`, `activ` keyword, `weights-type` keyword,
and booleans `src-iter?`, and `dst-iter?`.

rnn-op-blueprintclj

(rnn-op-blueprint this
                  src-desc
                  dst-desc
                  weights-type
                  activ
                  dir
                  lrs
                  src-iter?
                  dst-iter?)

Create RNN operation with src-desc, dst-desc, weights-type keyword, activ keyword, direction dir, number of layers lrs, and booleans src-iter?, and dst-iter?.

Create RNN operation with `src-desc`, `dst-desc`, `weights-type` keyword, `activ` keyword,
direction `dir`, number of layers `lrs`, and booleans `src-iter?`, and `dst-iter?`.
raw docstring

RnnParameterscljprotocol

An object that has trainable parameters in the context of recurrent networks.

An object that has trainable parameters in the context of recurrent networks.

bias-iterclj

(bias-iter this)

Bias iteration tensor.

Bias iteration tensor.

bias-layerclj

(bias-layer this)

Bias tensor.

Bias tensor.

weights-iterclj

(weights-iter this)

Weights iteration tensor.

Weights iteration tensor.

weights-layerclj

(weights-layer this)

Weights tensor.

Weights tensor.
raw docstring

TensorFactorycljprotocol

A backend factory for tensor-related structures, such as the tensors themselves, tensor decsciptors, tensor transformers, batchers, shufflers, and engines.

A backend factory for tensor-related structures, such as the tensors themselves,
tensor decsciptors, tensor transformers, batchers, shufflers, and engines.

create-batcherclj

(create-batcher this src dst mb-size)

Create batcher from src to dst that has mini-batch capacity mb-size.

Create batcher from `src` to `dst` that has mini-batch capacity `mb-size`.

create-shufflerclj

(create-shuffler this src dst)

Create shuffluer from src to dst

Create shuffluer from `src` to `dst`

create-tensorclj

(create-tensor this desc init)
(create-tensor this desc batch-index init)

Create tensor from the provided descriptor desc, and initializes it to zero if init is true.

Create tensor from the provided descriptor `desc`, and initializes it to zero if `init` is true.

create-tensor-descclj

(create-tensor-desc this desc)
(create-tensor-desc this shape type format)

Create technology-specific tensor descriptor from another descriptor desc, or from shape, type, and format.

Create technology-specific tensor descriptor from another descriptor `desc`,
or from `shape`, `type`, and `format`.

create-transformerclj

(create-transformer this in out)

Create transformer from in to out

Create transformer from `in` to `out`

tensor-engineclj

(tensor-engine this dtype)

Provides DD tensor engine for data type dtype (:float, etc.)

Provides DD tensor engine for data type `dtype` (`:float`, etc.)
raw docstring

Workspacecljprotocol

An object that can inform interested parties of the capacity of workspace that it needs.

An object that can inform interested parties of the capacity of workspace that it needs.

inf-ws-sizeclj

(inf-ws-size this)

Necessary workspace size during inference.

Necessary workspace size during inference.

train-ws-sizeclj

(train-ws-size this)

Necessary workspace size during training.

Necessary workspace size during training.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close