コード例 #1
0
 public DashboardDataController(PageModelBuilder pageModelBuilder, IInitialiser initialiser, ICanReload[] reloads)
 {
     _initialiser = initialiser;
     _reloads     = reloads;
     _initialiser.Load();
     _pageModelBuilder = pageModelBuilder;
 }
コード例 #2
0
 public DashboardDataController(PageModelBuilder pageModelBuilder, IInitialiser initialiser, ICanReload[] reloads)
 {
     _initialiser = initialiser;
     _reloads = reloads;
     _initialiser.Load();
     _pageModelBuilder = pageModelBuilder;
 }
コード例 #3
0
 public SystemDataController(IInitialiser systemInitialiser, IErrorSummaryWindow errorSummary, ISystemEventSummaryWindow eventSummaryWindow)
 {
     _initialiser = systemInitialiser;
     _initialiser.Load();
     _errorSummary       = errorSummary;
     _eventSummaryWindow = eventSummaryWindow;
 }
コード例 #4
0
 public SystemDataController(IInitialiser systemInitialiser, IErrorSummaryWindow errorSummary, ISystemEventSummaryWindow eventSummaryWindow)
 {
     _initialiser = systemInitialiser;
     _initialiser.Load();
     _errorSummary = errorSummary;
     _eventSummaryWindow = eventSummaryWindow;
 }
コード例 #5
0
 public static void Set(IInitialiser init)
 {
     if (_initialiser == null)
     {
         _initialiser = init;
     }
 }
コード例 #6
0
 private void InitialiseWeights(IInitialiser <float> initialiser, int amountOfWeights)
 {
     Weights = new float[amountOfWeights];
     for (var weight = 0; weight < amountOfWeights; weight++)
     {
         Weights[weight] = initialiser.GenerateNewValue();
     }
 }
コード例 #7
0
 public App(IConfiguration config, IInitialiser initialiser, IUserStatus userStatus, Floor floor, IElevatorProcessing elevatorProcessing)
 {
     _config             = config;
     _initialiser        = initialiser;
     _floor              = floor;
     _userStatus         = userStatus;
     _elevatorProcessing = elevatorProcessing;
 }
コード例 #8
0
ファイル: ReedSolomon.cs プロジェクト: noikiy/Barcodes
        public ReedSolomon(IInitialiser initialiser)
        {
            if (initialiser == null)
                throw new ArgumentNullException("initialiser", "Polynomial initialiser cannot be null.");

            _Initialiser = initialiser;
            InitaliseLogTables();
            _Coefficients = new CoefficientsCollection();
        }
コード例 #9
0
        public ReedSolomon(IInitialiser initialiser)
        {
            if (initialiser == null)
            {
                throw new ArgumentNullException("initialiser", "Polynomial initialiser cannot be null.");
            }

            _Initialiser = initialiser;
            InitaliseLogTables();
            _Coefficients = new CoefficientsCollection();
        }
コード例 #10
0
 public SystemDataController(IInitialiser systemInitialiser,
                             IErrorSummaryWindow errorSummary,
                             ISystemEventSummaryWindow eventSummaryWindow,
                             ChanelDataAdjustment chanelDataAdjustment)
 {
     _initialiser = systemInitialiser;
     _initialiser.Load();
     _errorSummary         = errorSummary;
     _eventSummaryWindow   = eventSummaryWindow;
     _chanelDataAdjustment = chanelDataAdjustment;
 }
コード例 #11
0
 public SystemDataController(IInitialiser systemInitialiser, 
     IErrorSummaryWindow errorSummary,
     ISystemEventSummaryWindow eventSummaryWindow,
     ChanelDataAdjustment chanelDataAdjustment)
 {
     _initialiser = systemInitialiser;
     _initialiser.Load();
     _errorSummary = errorSummary;
     _eventSummaryWindow = eventSummaryWindow;
     _chanelDataAdjustment = chanelDataAdjustment;
 }
コード例 #12
0
        public FiringNeuron(Coordinate location,
                            int amountOfWeights,
                            IActivationFunction activationFunction,
                            IInitialiser <float> weightInitialiser = null,
                            IInitialiser <float> biasInitialiser   = null)
        {
            _activationFunction = activationFunction;
            NeuronLocation      = location;

            InitialiseWeights(weightInitialiser ?? new Initialiser(), amountOfWeights);
            InitialiseBias(biasInitialiser ?? new Initialiser());
        }
コード例 #13
0
ファイル: Trainer.cs プロジェクト: xiaoxiongnpu/Sigma
        /// <inheritdoc />
        public void AddInitialiser(string identifier, IInitialiser initialiser)
        {
            if (identifier == null)
            {
                throw new ArgumentNullException(nameof(identifier));
            }
            if (initialiser == null)
            {
                throw new ArgumentNullException(nameof(initialiser));
            }

            if (_initialisers.ContainsKey(identifier))
            {
                throw new InvalidOperationException($"Cannot add duplicate identifier {identifier} for initialiser {initialiser}," +
                                                    $" identifier is already bound to initialiser {_initialisers[identifier]}");
            }

            _initialisers.Add(identifier, initialiser);
        }
コード例 #14
0
ファイル: Trainer.cs プロジェクト: xiaoxiongnpu/Sigma
        private void InitialiseNetwork(IComputationHandler handler, out int initialisedNumberCount, out int initialisedNDArrayCount)
        {
            Network.Initialise(handler);

            initialisedNDArrayCount = 0;
            initialisedNumberCount  = 0;

            RegistryResolver networkResolver = new RegistryResolver(Network.Registry.Get <IRegistry>("layers"));
            List <string>    orderedInitialiserIdentifiers = _initialisers.Keys.ToList();

            orderedInitialiserIdentifiers.Sort(RegistryUtils.CompareIdentifierSpecificityAscending);

            foreach (string identifier in orderedInitialiserIdentifiers)
            {
                object[]     values      = networkResolver.ResolveGet(identifier, new object[0]);
                IInitialiser initialiser = _initialisers[identifier];

                foreach (object value in values)
                {
                    INDArray array = value as INDArray;

                    if (array != null)
                    {
                        initialiser.Initialise(array, handler, Sigma.Random);
                        initialisedNDArrayCount++;
                    }
                    else
                    {
                        INumber number = value as INumber;

                        if (number != null)
                        {
                            initialiser.Initialise(number, handler, Sigma.Random);
                            initialisedNumberCount++;
                        }
                    }
                }
            }
        }
コード例 #15
0
 void Init(IInitialiser initialiser)
 {
     _store = initialiser.Initialise();
 }
コード例 #16
0
 private void InitialiseBias(IInitialiser <float> initialiser)
 {
     Bias = initialiser.GenerateNewValue();
 }
コード例 #17
0
 public Foo(IInitialiser i)
 {
     this.isInitalised = false;
     this.i            = i;
 }