protected override void OnPreBuild()
 {
     layoutProvider = layoutProvider ?? A.Fake <INetworkLayoutProvider>();
 }
 public NeuralNetworkBuilder Using(INetworkLayoutProvider layoutProvider)
 {
     this.layoutProvider = layoutProvider;
     return(this);
 }
Esempio n. 3
0
 /// <summary>
 /// Instantiates a new neural network with the layout provided by the specified <paramref name="layoutProvider"/>.
 /// </summary>
 /// <param name="layoutProvider">Provides the layout of the network</param>
 public NeuralNetwork(INetworkLayoutProvider layoutProvider, ICostFunction costFunction)
     : this(layoutProvider.GetLayers(), costFunction)
 {
 }
Esempio n. 4
0
 protected override void OnPreBuild()
 {
     layoutProvider = layoutProvider ?? A.Fake <INetworkLayoutProvider>();
     costFunction   = costFunction ?? new QuadraticCost();
 }
Esempio n. 5
0
 /// <summary>
 /// Instantiates a new neural network with the layout provided by the specified <paramref name="layoutProvider"/>.
 /// </summary>
 /// <param name="layoutProvider">Provides the layout of the network</param>
 public NeuralNetwork(INetworkLayoutProvider layoutProvider)
     : this(layoutProvider.GetLayers())
 {
 }