C# Класс AForge.Neuro.Network

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
inputsCount int
layers AForge.Neuro.Layer[]
layersCount int
output double[]

Открытые методы

Метод Описание
Compute ( double input ) : double[]

Compute output vector of the network.

The actual network's output vecor is determined by layers, which comprise the layer - represents an output vector of the last layer of the network. The output vector is also stored in Output property.

The method may be called safely from multiple threads to compute network's output value for the specified input values. However, the value of Output property in multi-threaded environment is not predictable, since it may hold network's output computed from any of the caller threads. Multi-threaded access to the method is useful in those cases when it is required to improve performance by utilizing several threads and the computation is based on the immediate return value of the method, but not on network's output property.

Load ( System.Stream stream ) : Network

Load network from specified file.

Neural network is loaded from file using .NET serialization (binary formater is used).

Load ( string fileName ) : Network

Load network from specified file.

Neural network is loaded from file using .NET serialization (binary formater is used).

Randomize ( ) : void

Randomize layers of the network.

Randomizes network's layers by calling Layer.Randomize method of each layer.

Save ( System.Stream stream ) : void

Save network to specified file.

The neural network is saved using .NET serialization (binary formatter is used).

Save ( string fileName ) : void

Save network to specified file.

The neural network is saved using .NET serialization (binary formatter is used).

Защищенные методы

Метод Описание
Network ( int inputsCount, int layersCount ) : System

Initializes a new instance of the Network class.

Protected constructor, which initializes inputsCount, layersCount and layers members.

Описание методов

Compute() публичный метод

Compute output vector of the network.

The actual network's output vecor is determined by layers, which comprise the layer - represents an output vector of the last layer of the network. The output vector is also stored in Output property.

The method may be called safely from multiple threads to compute network's output value for the specified input values. However, the value of Output property in multi-threaded environment is not predictable, since it may hold network's output computed from any of the caller threads. Multi-threaded access to the method is useful in those cases when it is required to improve performance by utilizing several threads and the computation is based on the immediate return value of the method, but not on network's output property.

public Compute ( double input ) : double[]
input double Input vector.
Результат double[]

Load() публичный статический метод

Load network from specified file.

Neural network is loaded from file using .NET serialization (binary formater is used).

public static Load ( System.Stream stream ) : Network
stream System.Stream Stream to load network from.
Результат Network

Load() публичный статический метод

Load network from specified file.

Neural network is loaded from file using .NET serialization (binary formater is used).

public static Load ( string fileName ) : Network
fileName string File name to load network from.
Результат Network

Network() защищенный метод

Initializes a new instance of the Network class.
Protected constructor, which initializes inputsCount, layersCount and layers members.
protected Network ( int inputsCount, int layersCount ) : System
inputsCount int Network's inputs count.
layersCount int Network's layers count.
Результат System

Randomize() публичный метод

Randomize layers of the network.
Randomizes network's layers by calling Layer.Randomize method of each layer.
public Randomize ( ) : void
Результат void

Save() публичный метод

Save network to specified file.

The neural network is saved using .NET serialization (binary formatter is used).

public Save ( System.Stream stream ) : void
stream System.Stream Stream to save network into.
Результат void

Save() публичный метод

Save network to specified file.

The neural network is saved using .NET serialization (binary formatter is used).

public Save ( string fileName ) : void
fileName string File name to save network into.
Результат void

Описание свойств

inputsCount защищенное свойство

Network's inputs count.
protected int inputsCount
Результат int

layers защищенное свойство

Network's layers.
protected Layer[],AForge.Neuro layers
Результат AForge.Neuro.Layer[]

layersCount защищенное свойство

Network's layers count.
protected int layersCount
Результат int

output защищенное свойство

Network's output vector.
protected double[] output
Результат double[]