public neural_net(neural_net other) : this(fannfixedPINVOKE.new_neural_net__SWIG_6(neural_net.getCPtr(other)), true) { if (fannfixedPINVOKE.SWIGPendingException.Pending) { throw fannfixedPINVOKE.SWIGPendingException.Retrieve(); } }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(neural_net obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public neural_net(neural_net other) : this(fannfixedPINVOKE.new_neural_net__SWIG_6(neural_net.getCPtr(other)), true) { if (fannfixedPINVOKE.SWIGPendingException.Pending) throw fannfixedPINVOKE.SWIGPendingException.Retrieve(); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(neural_net obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; }
/* Constructor: NeuralNet Creates a copy the other NeuralNet. */ public NeuralNet(NeuralNet other) { net = new neural_net(other.Net.to_fann()); Outputs = other.Outputs; }
internal NeuralNet(neural_net other) { net = other; Outputs = net.get_num_output(); }
/* Constructor: NeuralNet Constructs a backpropagation neural network from a configuration file, which have been saved by <Save>. See also: <Save>, <SaveToFixed> This function appears in FANN >= 2.3.0. */ public NeuralNet(string filename) { net = new neural_net(filename); Outputs = net.get_num_output(); }
/* Constructor: NeuralNet Creates a standard backpropagation neural network, which is sparsely connected, this will default the <NetworkType> to <NetworkType::LAYER> Parameters: connectionRate - The connection rate controls how many connections there will be in the network. If the connection rate is set to 1, the network will be fully connected, but if it is set to 0.5 only half of the connections will be set. A connection rate of 1 will yield the same result as <fann_create_standard at http://libfann.github.io/fann/docs/files/fann-h.html#fann_create_standard> numLayers - The total number of layers including the input and the output layer. layers - Integer values determining the number of neurons in each layer starting with the input layer and ending with the output layer. This function appears in FANN >= 2.3.0. */ public NeuralNet(float connectionRate, ICollection<uint> layers) { using (uintArray newLayers = new uintArray(layers.Count)) { int i = 0; foreach (uint count in layers) { newLayers.setitem(i, count); i++; } Outputs = newLayers.getitem(layers.Count - 1); net = new neural_net(connectionRate, (uint)layers.Count, newLayers.cast()); } }
/* Constructor: NeuralNet Creates a standard backpropagation neural network, which is sparsely connected, this will default the <NetworkType> to <NetworkType::LAYER> Parameters: connectionRate - The connection rate controls how many connections there will be in the network. If the connection rate is set to 1, the network will be fully connected, but if it is set to 0.5 only half of the connections will be set. A connection rate of 1 will yield the same result as <fann_create_standard at http://libfann.github.io/fann/docs/files/fann-h.html#fann_create_standard> numLayers - The total number of layers including the input and the output layer. ... - Integer values determining the number of neurons in each layer starting with the input layer and ending with the output layer. This function appears in FANN >= 2.3.0. */ public NeuralNet(float connectionRate, uint numLayers, params uint[] args) { using (uintArray newLayers = new uintArray((int)numLayers)) { for (int i = 0; i < args.Length; i++) { newLayers.setitem(i, args[i]); } Outputs = args[args.Length - 1]; net = new neural_net(connectionRate, numLayers, newLayers.cast()); } }