public SOMLearning ( DistanceNetwork network ) : System | ||
network | DistanceNetwork | Neural network to train. |
Résultat | System |
public SOMLearning( DistanceNetwork network )
{
// network's dimension was not specified, let's try to guess
int neuronsCount = network.Layers[0].Neurons.Length;
int width = (int) Math.Sqrt( neuronsCount );
if ( width * width != neuronsCount )
{
throw new ArgumentException( "Invalid network size." );
}
// ok, we got it
this.network = network;
this.width = width;
this.height = width;
}
SOMLearning::SOMLearning ( DistanceNetwork network, int width, int height ) : System |