Table of Contents

Class NTMReadHead<T>

Namespace
AiDotNet.MetaLearning.Algorithms
Assembly
AiDotNet.dll

NTM read head for content-based addressing.

public class NTMReadHead<T>

Type Parameters

T

The numeric type.

Inheritance
NTMReadHead<T>
Inherited Members

Constructors

NTMReadHead(int, int, int)

Initializes a new instance of NTMReadHead.

public NTMReadHead(int memoryWidth, int memorySize, int headIndex)

Parameters

memoryWidth int

The width of each memory slot.

memorySize int

The number of memory slots.

headIndex int

The index of this read head.

Methods

Clone()

Clones the read head.

public NTMReadHead<T> Clone()

Returns

NTMReadHead<T>

A new read head with the same configuration.

ComputeReadWeights(Tensor<T>, NTMMemory<T>)

Computes read weights using cosine similarity.

public Vector<T> ComputeReadWeights(Tensor<T> key, NTMMemory<T> memory)

Parameters

key Tensor<T>

The key tensor.

memory NTMMemory<T>

The memory matrix.

Returns

Vector<T>

The read weights vector.