protected override void OnPreBuild()
 {
     layoutProvider = layoutProvider ?? A.Fake <INetworkLayoutProvider>();
 }
 public NeuralNetworkBuilder Using(INetworkLayoutProvider layoutProvider)
 {
     this.layoutProvider = layoutProvider;
     return(this);
 }
Beispiel #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)
 {
 }
 protected override void OnPreBuild()
 {
     layoutProvider = layoutProvider ?? A.Fake <INetworkLayoutProvider>();
     costFunction   = costFunction ?? new QuadraticCost();
 }
Beispiel #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())
 {
 }