public RlmOptimizer(IRlmDbData rlmDbData, IRlmRneuronProcessor gpu = null)
        {
            Resources          = new Dictionary <string, Resource>();
            ResourceAttributes = new Dictionary <string, ResourceAttribute>();
            Constraints        = new Dictionary <string, Constraint>();
            CycleOutputs       = new Dictionary <string, object>();
            SessionOutputs     = new Dictionary <string, List <object> >();
            CycleInputs        = new Dictionary <string, object>();

            TrainingVariables.Add("CycleScore", new TrainingVariable()
            {
                Name = "CycleScore"
            });
            TrainingVariables.Add("SessionScore", new TrainingVariable()
            {
                Name = "SessionScore"
            });

            //if (!string.IsNullOrEmpty(databaseName))
            //{
            //    DatabaseName = databaseName;
            //}

            RlmDbData    = rlmDbData;
            DatabaseName = rlmDbData.DatabaseName;

            if (gpu != null)
            {
                Gpu = gpu;
            }
        }
Пример #2
0
 /// <summary>
 /// sets your preferred database name
 /// </summary>
 /// <param name="databaseName">Uses a custom database name instead of the default generated name</param>
 /// <param name="persistData">Allows you to turn on/off the data persistence feature of the RLM. Turned on by default.</param>
 public RlmNetwork(IRlmDbData rlmDbData, bool persistData = true, IRlmRneuronProcessor gpu = null)
 {
     PersistData    = persistData;
     this.RlmDBData = rlmDbData;
     DatabaseName   = rlmDbData.DatabaseName;
     rlmDbData.Initialize();
     SessionCaseHistory = new RlmSessionCaseHistory(rlmDbData);
     Initialize(gpu);
 }
Пример #3
0
 /// <summary>
 /// default contstructor, creates "RyskampLearningMachine" database
 /// </summary>
 /// <param name="persistData">Allows you to turn on/off the data persistence feature of the RLM. Turned on by default.</param>
 public RlmNetwork(IRlmRneuronProcessor gpu = null)
 {
     PersistData = false;
     if (PersistData)
     {
         DatabaseName = "RLM_" + Guid.NewGuid().ToString("n");//RlmDbEntities.DetermineDbName(); // todo migrate to ef core
     }
     Initialize(gpu);
 }
Пример #4
0
        private void Initialize(IRlmRneuronProcessor gpu = null)
        {
            MemoryManager = new Manager(this);
            MemoryManager.DataPersistenceComplete += MemoryManager_DataPersistenceComplete;
            MemoryManager.DataPersistenceProgress += MemoryManager_DataPersistenceProgress;

            if (gpu != null)
            {
                GPURneuronProcessor = gpu;
                GPURneuronProcessor.SetManagerReference(MemoryManager);
            }

            // default
            MemoryManager.UseMomentumAvgValue = USE_MOM_AVG;
            MemoryManager.MomentumAdjustment  = MOMENTUM_ADJUSTMENT;
            MemoryManager.CacheBoxMargin      = CACHE_MARGIN;
        }