NTMAddressingParameters<T>

Models & Types · AiDotNet.MetaLearning.Algorithms

The addressing parameters one NTM head emits at one step (Graves et al. 2014, section 3.3).

How It Works

A head finds its weighting over memory locations in four stages: content addressing by cosine similarity to Key, sharpened by KeyStrength (eq. 5-6); interpolation with the previous weighting by Gate (eq. 7); a circular convolution with Shift (eq. 8); and sharpening by Sharpening (eq. 9).

Constructors

Constructor Summary
NTMAddressingParameters(Tensor<T> key, Tensor<T> keyStrength, Tensor<T> gate, Tensor<T> shift, Tensor<T> sharpening) Initializes the addressing parameters of one head.

Properties

Property Summary
Tensor<T> Gate { get; } Gets the interpolation gate g_t.
Tensor<T> Key { get; } Gets the key vector k_t.
Tensor<T> KeyStrength { get; } Gets the key strength beta_t.
Tensor<T> Sharpening { get; } Gets the sharpening exponent gamma_t.
Tensor<T> Shift { get; } Gets the shift weighting s_t over the offsets -R..R.

Methods

Method Summary
NTMAddressingParameters<T> ContentOnly(Tensor<T> key, int shiftRange) Pure content addressing: beta = 1, g = 1, no shift and gamma = 1, so the weighting is the softmax of the cosine similarities to key.