Table of Contents

Class AutoencoderModel<T>

Namespace
NeuralNetworks.Models
Assembly
NeuralNetworks.dll
public abstract class AutoencoderModel<T> : BaseModel<T, T> where T : notnull

Type Parameters

T
Inheritance
Model<T, T>
BaseModel<T, T>
AutoencoderModel<T>
Inherited Members

Constructors

AutoencoderModel(Loss<T>?, SeededRandom?, string?)

protected AutoencoderModel(Loss<T>? defaultLossFunction, SeededRandom? random, string? modelFilePath)

Parameters

defaultLossFunction Loss<T>
random SeededRandom
modelFilePath string

Properties

BottleneckLayer

Gets or sets the bottleneck layer of the autoencoder model, which represents the compressed latent representation of the input data.

protected DenseLayer? BottleneckLayer { get; set; }

Property Value

DenseLayer

FirstDecoderLayer

Gets or sets the first decoder layer of the autoencoder model, which is responsible for reconstructing the input data from the encoded representation.

protected DenseLayer? FirstDecoderLayer { get; set; }

Property Value

DenseLayer

Methods

Decode(float[,])

Forward encoded representation and return the decoded output. This can be used to visualize the output of the decoder part of the autoencoder based on randomly generated encoded data or to see how the decoder reconstructs the input data from the encoded (bottleneck) representation.

public T Decode(float[,] encoded)

Parameters

encoded float[,]

Returns

T

GetBottleneckActivationFunction()

public Operation GetBottleneckActivationFunction()

Returns

Operation

GetEncodedRepresentation()

Gets the encoded representation (latent data) produced by the bottleneck layer of the model.

public float[,] GetEncodedRepresentation()

Returns

float[,]

A two-dimensional array of floating-point values representing the output of the bottleneck layer.

Exceptions

InvalidOperationException

Thrown if the bottleneck layer output is not available.