private NeuralNetworkFactory(ISomaFactory somaFactory, IAxonFactory axonFactory, ISynapseFactory hiddenSynapseFactory, ISynapseFactory inputOutputSynapseFactory, IWeightInitializer biasInitializer)
 {
     _somaFactory = somaFactory;
     _axonFactory = axonFactory;
     _hiddenSynapseFactory = hiddenSynapseFactory;
     _inputOutputSynapseFactory = inputOutputSynapseFactory;
     _biasInitiliazer = biasInitializer;
 }
예제 #2
0
 private NeuralNetworkFactory(ISomaFactory somaFactory, IAxonFactory axonFactory, ISynapseFactory hiddenSynapseFactory, ISynapseFactory inputOutputSynapseFactory, IWeightInitializer biasInitializer)
 {
     _somaFactory               = somaFactory;
     _axonFactory               = axonFactory;
     _hiddenSynapseFactory      = hiddenSynapseFactory;
     _inputOutputSynapseFactory = inputOutputSynapseFactory;
     _biasInitiliazer           = biasInitializer;
 }
        public INeuralNetworkFactory BuildBackpropagationNetworkFactory(IWeightInitializer weightInitializer,
                                                                        ISomaFactory somaFactory,
                                                                        IActivationFunctionDerivative activationFunctionDerivative,
                                                                        IActivationFunction inputActivationFunction,
                                                                        INeuronFactory neuronFactory)
        {
            var axonFactory          = BackpropagationAxonFactory.GetInstance(activationFunctionDerivative);
            var hiddenSynapseFactory = DecoratedSynapseFactory.GetInstance(weightInitializer,
                                                                           AxonFactory.GetInstance(activationFunctionDerivative));
            var inputSynapseFactory = DecoratedSynapseFactory.GetInstance(new ConstantWeightInitializer(1.0),
                                                                          AxonFactory.GetInstance(inputActivationFunction));
            var decoratedNeuronFactory    = BackpropagationNeuronFactory.GetInstance(neuronFactory);
            INeuralNetworkFactory factory = NeuralNetworkFactory.GetInstance(somaFactory, axonFactory,
                                                                             hiddenSynapseFactory, inputSynapseFactory, weightInitializer, decoratedNeuronFactory);

            var backPropNetworkFactory = new BackpropagationNetworkFactoryDecorator(factory);

            return(backPropNetworkFactory);
        }
예제 #4
0
 public static NeuralNetworkFactory GetInstance(ISomaFactory somaFactory, IAxonFactory axonFactory, ISynapseFactory hiddenSynapseFactory, ISynapseFactory inputOutputSynapseFactory, IWeightInitializer biasInitializer, INeuronFactory neuronFactory)
 {
     return(new NeuralNetworkFactory(somaFactory, axonFactory, hiddenSynapseFactory, inputOutputSynapseFactory, biasInitializer, neuronFactory));
 }
 public static NeuralNetworkFactory GetInstance(ISomaFactory somaFactory, IAxonFactory axonFactory, ISynapseFactory hiddenSynapseFactory, ISynapseFactory inputOutputSynapseFactory, IWeightInitializer biasInitializer)
 {
     return new NeuralNetworkFactory(somaFactory, axonFactory, hiddenSynapseFactory, inputOutputSynapseFactory, biasInitializer);
 }