예제 #1
0
    public void LoadData(NNTMSaveData data)
    {
        m_learnRate  = data.m_learnRate;
        m_batchSize  = data.m_batchSize;
        m_curveRange = data.m_curveRange;
        m_curve      = data.m_curve;

        m_dropoutKeepRate = data.m_dropoutKeepRate;

        m_weightDecayRate = data.m_weightDecayRate;

        m_trainNetworkOnline        = data.m_trainNetworkOnline;
        m_saveSamplesOnline         = data.m_saveSamplesOnline;
        m_trainingCooldownOnlineMin = data.m_trainingCooldownOnlineMin;
        m_trainingCooldownOnlineMax = data.m_trainingCooldownOnlineMax;

        m_trainNetworkOffline              = data.m_trainNetworkOffline;
        m_trainingUnits                    = data.m_trainingUnits;
        m_trainingCooldownOfflineMin       = data.m_trainingCooldownOfflineMin;
        m_trainingCooldownOfflineMax       = data.m_trainingCooldownOfflineMax;
        m_trainingCooldownOfflineGatherMin = data.m_trainingCooldownOfflineGatherMin;
        m_trainingCooldownOfflineGatherMax = data.m_trainingCooldownOfflineGatherMax;

        m_stopAtMaximumUnitCount = data.m_stopAtMaximumUnitCount;

        m_trainingCooldownRdyOnline        = Time.time + GetRandom(m_trainingCooldownOnlineMin, m_trainingCooldownOnlineMax);
        m_trainingCooldownRdyOffline       = Time.time + GetRandom(m_trainingCooldownOfflineMin, m_trainingCooldownOfflineMax);
        m_trainingCooldownRdyOfflineGather = (m_trainingCooldownOfflineGatherMin < 0 && m_trainingCooldownOfflineGatherMax < 0) ? float.MaxValue : Time.time + GetRandom(m_trainingCooldownOfflineGatherMin, m_trainingCooldownOfflineGatherMax);


        //m_trainingCooldownRdyOnline = data.m_trainingCooldownRdyOnline;
        //m_trainingCooldownRdyOffline = data.m_trainingCooldownRdyOffline;
        //m_trainingCooldownRdyOfflineGather = data.m_trainingCooldownRdyOfflineGather;

        m_trainingUnitsCompleted = data.m_trainingUnitsCompleted;
        m_currentSeed            = data.m_currentSeed;
        m_initSeed = data.m_initSeed;
    }
예제 #2
0
    public NNTMSaveData SaveData()
    {
        NNTMSaveData data = new NNTMSaveData
        {
            m_learnRate  = m_learnRate,
            m_batchSize  = m_batchSize,
            m_curveRange = m_curveRange,
            m_curve      = m_curve,

            m_dropoutKeepRate = m_dropoutKeepRate,

            m_weightDecayRate = m_weightDecayRate,

            m_trainNetworkOnline        = m_trainNetworkOnline,
            m_saveSamplesOnline         = m_saveSamplesOnline,
            m_trainingCooldownOnlineMin = m_trainingCooldownOnlineMin,
            m_trainingCooldownOnlineMax = m_trainingCooldownOnlineMax,

            m_trainNetworkOffline              = m_trainNetworkOffline,
            m_trainingUnits                    = m_trainingUnits,
            m_trainingCooldownOfflineMin       = m_trainingCooldownOfflineMin,
            m_trainingCooldownOfflineMax       = m_trainingCooldownOfflineMax,
            m_trainingCooldownOfflineGatherMin = m_trainingCooldownOfflineGatherMin,
            m_trainingCooldownOfflineGatherMax = m_trainingCooldownOfflineGatherMax,

            m_stopAtMaximumUnitCount = m_stopAtMaximumUnitCount,

            //m_trainingCooldownRdyOnline                 = m_trainingCooldownRdyOnline,
            //m_trainingCooldownRdyOffline                = m_trainingCooldownRdyOffline,
            //m_trainingCooldownRdyOfflineGather          = m_trainingCooldownRdyOfflineGather,

            m_trainingUnitsCompleted = m_trainingUnitsCompleted,
            m_currentSeed            = m_currentSeed,
            m_initSeed = m_initSeed
        };

        return(data);
    }