Table of Contents

Class Operation

Namespace
NeuralNetworks.Operations
Assembly
NeuralNetworks.dll
public abstract class Operation
Inheritance
Operation
Derived
Inherited Members

Methods

Backward(object)

public abstract object Backward(object outputGradient)

Parameters

outputGradient object

Returns

object

Forward(object, bool)

public abstract object Forward(object input, bool inference)

Parameters

input object
inference bool

Returns

object

GetInputType()

public abstract Type GetInputType()

Returns

Type

GetOutputType()

public abstract Type GetOutputType()

Returns

Type

SetRegistered()

Marks the operation as used in a layer. This is important for ensuring that the operation is not reused in multiple layers, which could lead to incorrect behavior, like sharing operation parameters (for example, weights or masks) between layers unintentionally.

public void SetRegistered()

Remarks

Can be called only once per instance.

Exceptions

InvalidOperationException

Thrown when the operation is already registered.

ToString()

Returns a string that represents the current operation.

public override string? ToString()

Returns

string

A string that represents the current operation.

Remarks

It is used in a layer/model description.